(Ada) ravenscar-thread.c: remove unwanted trailing \n in call to warning
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
2
3         * ravenscar-thread.c (ravenscar_inferior_created): Remove
4         trailing newline at end of string in call to warning.
5
6 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
7
8         * osdata.h: Include vector isntead of vec.h.
9         (osdata_column_s): Remove typedef.
10         (struct osdata_column): Add constructor.
11         <name, value>: Change type to std::string.
12         (DEF_VEC_O (osdata_column_s)): Remove.
13         (osdata_item_s): Remove typedef.
14         (struct osdata_item) <columns>: Change type to std::vector.
15         (DEF_VEC_O (osdata_item_s)): Remove.
16         (struct osdata): Add constructor.
17         <type>: Change type to std::string.
18         <items>: Change type to std::vector.
19         (osdata_p): Remove typedef.
20         (DEF_VEC_P (osdata_p)): Remove.
21         (osdata_parse): Return a unique_ptr.
22         (osdata_free): Remove.
23         (make_cleanup_osdata_free): Remove.
24         (get_osdata): Return a unique_ptr.
25         (get_osdata_column): Return pointer to std::string, take a
26         reference to osdata_item as parameter.
27         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
28         unique_ptr.
29         <property_name>: Change type to std::string.
30         (osdata_start_osdata): Allocate osdata with new and adjust.
31         (osdata_start_item): Adjust.
32         (osdata_start_column): Adjust.
33         (osdata_end_column): Adjust.
34         (clear_parsing_data): Remove.
35         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
36         (osdata_item_clear): Remove.
37         (get_osdata): return a unique_ptr and adjust.
38         (get_osdata_column): Return a pointer to std::string and adjust.
39         (info_osdata): Adjust.
40         * mi/mi-main.c: Include <map>.
41         (free_vector_of_osdata_items): Remove.
42         (list_available_thread_groups): Adjust, use std::map instead of
43         splay tree.
44
45 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
46
47         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
48         case in switch.
49
50 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
51
52         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
53
54 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
55
56         * varobj.h (struct varobj_update_result): Add constructor, add
57         move constructor, disable copy and assign, initialize fields.
58         <newobj>: Change type to std::vector.
59         (varobj_update): Return std::vector.
60         * varobj.c (install_dynamic_child): Change VEC parameters to
61         std::vector and adjust.
62         (update_dynamic_varobj_children): Likewise.
63         (varobj_update): Return std::vector and adjust.
64         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
65
66 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
67
68         * varobj.h (struct varobj) <parent>: Remove const.
69         <children>: Change type to std::vector.
70         (varobj_list_children): Return std::vector const reference.
71         (varobj_restrict_range): Change parameter type to std::vector
72         const reference.
73         * varobj.c (varobj_has_more): Adjust.
74         (varobj_restrict_range): Change parameter type to std::vector
75         const reference and adjust.
76         (install_dynamic_child): Adjust.
77         (update_dynamic_varobj_children): Adjust.
78         (varobj_list_children): Return std::vector const reference and
79         adjust.
80         (varobj_add_child): Adjust.
81         (update_type_if_necessary): Adjust.
82         (varobj_update): Adjust.
83         (delete_variable_1): Adjust.
84         * ada-varobj.c (ada_value_has_mutated): Adjust.
85         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
86
87 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
88
89         * varobj.h (struct varobj): Add constructor and destructor,
90         initialize fields.
91         * varobj.c (struct varobj_root): Initialize fields.
92         (struct varobj_dynamic): Initialize fields.
93         (varobj_create): Use unique_ptr instead of cleanup.  Create
94         varobj with new instead of new_root_variable.
95         (delete_variable_1): Free variable with delete instead of
96         free_variable.
97         (create_child_with_value): Create variable with new instead of
98         new_variable.
99         (varobj::varobj): New.
100         (varobj::~varobj): New (body mostly coming from free_variable).
101         (new_variable): Remove.
102         (free_variable): Remove.
103         (do_free_variable_cleanup): Remove.
104         (make_cleanup_free_variable): Remove.
105
106 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
107
108         * core-regset.c: Remove file.
109         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
110
111 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
112
113         * NEWS: Document use of GNU MPFR.
114         * README: Likewise.
115
116         * Makefile.in (LIBMPFR): Add define.
117         (CLIBS): Add $(LIBMPFR).
118         * configure.ac: Add --with-mpfr configure option.
119         * configure: Regenerate.
120         * config.in: Regenerate.
121
122         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
123         (class mpfr_float_ops): New type.
124         (mpfr_float_ops::from_target): Two new overloaded functions.
125         (mpfr_float_ops::to_target): Likewise.
126         (mpfr_float_ops::to_string): New function.
127         (mpfr_float_ops::from_string): Likewise.
128         (mpfr_float_ops::to_longest): Likewise.
129         (mpfr_float_ops::from_longest): Likewise.
130         (mpfr_float_ops::from_ulongest): Likewise.
131         (mpfr_float_ops::to_host_double): Likewise.
132         (mpfr_float_ops::from_host_double): Likewise.
133         (mpfr_float_ops::convert): Likewise.
134         (mpfr_float_ops::binop): Likewise.
135         (mpfr_float_ops::compare): Likewise.
136         (get_target_float_ops): Use mpfr_float_ops if available.
137
138 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
139
140         * target-float.c: Do not include <math.h>.
141         Include <cmath> and <limits>.
142         (DOUBLEST): Do not define.
143         (class target_float_ops): New type.
144         (class host_float_ops): New templated type.
145         (class decimal_float_ops): New type.
146
147         (floatformat_to_doublest): Rename to ...
148         (host_float_ops<T>::from_target): ... this.  Use template type T
149         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
150         (host_float_ops<T>::from_target): New overload using a type argument.
151         (floatformat_from_doublest): Rename to ...
152         (host_float_ops<T>::to_target): ... this.  Use template type T
153         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
154         (host_float_ops<T>::to_target): New overload using a type argument.
155         (floatformat_printf_format): New function.
156         (struct printf_length_modifier): New templated type.
157         (floatformat_to_string): Rename to ...
158         (host_float_ops<T>::to_string): ... this.  Use type instead of
159         floatformat argument.  Use floatformat_printf_format and
160         printf_length_modifier.  Remove special handling of invalid numbers,
161         infinities and NaN (moved to target_float_to_string).
162         (struct scanf_length_modifier): New templated type.
163         (floatformat_from_string): Rename to ...
164         (host_float_ops<T>::from_string): ... this.  Use type instead of
165         floatformat argument.  Use scanf_length_modifier.
166         (floatformat_to_longest): Rename to ...
167         (host_float_ops<T>::to_longest): ... this.  Use type instead of
168         floatformat argument.  Handle out-of-range values deterministically.
169         (floatformat_from_longest): Rename to ...
170         (host_float_ops<T>::from_longest): ... this.  Use type instead of
171         floatformat argument.
172         (floatformat_from_ulongest): Rename to ...
173         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
174         floatformat argument.
175         (floatformat_to_host_double): Rename to ...
176         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
177         floatformat argument.
178         (floatformat_from_host_double): Rename to ...
179         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
180         floatformat argument.
181         (floatformat_convert): Rename to ...
182         (host_float_ops<T>::convert): ... this.  Use type instead of
183         floatformat arguments.  Remove handling of no-op conversions.
184         (floatformat_binop): Rename to ...
185         (host_float_ops<T>::binop): ... this.  Use type instead of
186         floatformat arguments.
187         (floatformat_compare): Rename to ...
188         (host_float_ops<T>::compare): ... this.  Use type instead of
189         floatformat arguments.
190
191         (match_endianness): Use type instead of length/byte_order arguments.
192         (set_decnumber_context): Likewise.
193         (decimal_from_number): Likewise.  Update calls.
194         (decimal_to_number): Likewise.
195         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
196         (decimal_float_ops::to_host_double): New dummy function.
197         (decimal_float_ops::from_host_double): Likewise.
198         (decimal_to_string): Rename to ...
199         (decimal_float_ops::to_string): ... this.  Use type instead of
200         length/byte_order arguments.  Update calls.
201         (decimal_from_string): Rename to ...
202         (decimal_float_ops::from_string): ... this.  Use type instead of
203         length/byte_order arguments.  Update calls.
204         (decimal_from_longest): Rename to ...
205         (decimal_float_ops::from_longest): ... this.  Use type instead of
206         length/byte_order arguments.  Update calls.
207         (decimal_from_ulongest): Rename to ...
208         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
209         length/byte_order arguments.  Update calls.
210         (decimal_to_longest): Rename to ...
211         (decimal_float_ops::to_longest): ... this.  Use type instead of
212         length/byte_order arguments.  Update calls.
213         (decimal_binop): Rename to ...
214         (decimal_float_ops::binop): ... this.  Use type instead of
215         length/byte_order arguments.  Update calls.
216         (decimal_compare): Rename to ...
217         (decimal_float_ops::compare): ... this.  Use type instead of
218         length/byte_order arguments.  Update calls.
219         (decimal_convert): Rename to ...
220         (decimal_float_ops::convert): ... this.  Use type instead of
221         length/byte_order arguments.  Update calls.
222
223         (target_float_same_category_p): New function.
224         (target_float_same_format_p): Likewise.
225         (target_float_format_length): Likewise.
226         (enum target_float_ops_kind): New type.
227         (get_target_float_ops_kind): New function.
228         (get_target_float_ops): Three new overloaded functions.
229
230         (target_float_is_zero): Update call.
231         (target_float_to_string): Add special handling of invalid numbers,
232         infinities and NaN (moved from floatformat_to_string).  Use
233         target_float_ops callback.
234         (target_float_from_string): Use target_float_ops callback.
235         (target_float_to_longest): Likewise.
236         (target_float_from_longest): Likewise.
237         (target_float_from_ulongest): Likewise.
238         (target_float_to_host_double): Likewise.
239         (target_float_from_host_double): Likewise.
240         (target_float_convert): Add special case for no-op conversions.
241         Use target_float_ops callback.
242         (target_float_binop): Use target_float_ops callback.
243         (target_float_compare): Likewise.
244
245 2017-11-22  Yao Qi  <yao.qi@linaro.org>
246
247         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
248
249 2017-11-22  Yao Qi  <yao.qi@linaro.org>
250
251         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
252         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
253
254 2017-11-21  Jerome Guitton  <guitton@adacore.com>
255
256         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
257         with event ptid from the lower layer before doing the
258         ravenscar-specific update.
259
260 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
261
262         * ravenscar-thread.c (is_ravenscar_task): Also verify that
263         the ptid's TID is nonzero.
264
265 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
266
267         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
268         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
269         Make non-static.  Change return type to char *.  Adjust code
270         accordingly.  Rewrite the function's documentation.
271         (read_atcb): Adjust call to get_tcb_types_info accordingly.
272         * ravenscar-thread.c (ravenscar_inferior_created): Check that
273         we have enough debugging information in the runtime to support
274         Ada task debugging before we enable the ravenscar-thread layer.
275
276 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
277
278         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
279         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
280         * ravenscar-thread.c: Add into comment.
281         (base_magic_null_ptid): Delete.
282         (base_ptid): Change documentation.
283         (ravenscar_active_task): Renames ravenscar_running_thread.
284         All callers updated throughout.
285         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
286         (ravenscar_task_is_currently_active): Likewise.
287         (get_base_thread_from_ravenscar_task): Ditto.
288         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
289         (ravenscar_runtime_initialized): Likewise.
290         (get_running_thread_id): Add new parameter "cpu".  Adjust
291         implementation to handle this new parameter.
292         (ravenscar_fetch_registers): Small adjustment to use
293         is_ravenscar_task and ravenscar_task_is_currently_active in
294         order to decide whether to use the target beneath or this
295         module's arch_ops.
296         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
297         (ravenscar_stopped_by_sw_breakpoint): Use
298         get_base_thread_from_ravenscar_task to get the underlying
299         thread, rather than using base_ptid.
300         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
301         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
302         Likewise.
303         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
304
305 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
306
307         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
308         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
309         (get_tcb_types_info): Set fieldnos.base_cpu.
310         (read_atcb): Set task_info->base_cpu.
311         (info_task): Print "Base CPU" info if set by runtime.
312
313 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
314
315         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
316         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
317         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
318         New functions.
319         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
320         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
321         to_stopped_data_address and to_core_of_thread fields of
322         ravenscar_ops.
323
324 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
325
326         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
327         (struct gdbarch_tdep): New member long_double_abi.
328         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
329         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
330         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
331         format depending on long_double_abi tdep member.
332         (ppc_floatformat_for_type): Handle __ibm128 type.
333
334 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
335
336         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
337
338 2017-11-21  Pedro Alves  <palves@redhat.com>
339
340         * dwarf2read.c (mapped_index::find_name_components_bounds)
341         <completion mode, upper bound>: Use std::lower_bound instead of
342         std::upper_bound.
343         (test_mapped_index_find_name_component_bounds): Remove incorrect
344         "t1_fund" from expected symbols.
345
346 2017-11-21  Pedro Alves  <palves@redhat.com>
347
348         * dwarf2read.c (mapped_index::name_components_casing): New field.
349         (mapped_index) <build_name_components,
350         find_name_components_bounds): Declare new methods.
351         (mapped_index::find_name_components_bounds)
352         (mapped_index::build_name_components): New methods, factored out
353         from dw2_expand_symtabs_matching_symbol.
354         (check_find_bounds_finds)
355         (test_mapped_index_find_name_component_bounds): New.
356         (run_test): Rename to ...
357         (test_dw2_expand_symtabs_matching_symbol): ... this.
358         (run_test): Reimplement.
359
360 2017-11-21  Pedro Alves  <palves@redhat.com>
361
362         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
363         (symbol_end): Use cp_ident_is_alnum.
364         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
365         * dwarf2read.c (make_sort_after_prefix_name): New function.
366         (dw2_expand_symtabs_matching_symbol): Use it.
367         (test_symbols): Add more symbols.
368         (run_test): Add tests.
369
370 2017-11-17  Tom Tromey  <tom@tromey.com>
371
372         * symtab.h (enum symbol_subclass_kind): New.
373         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
374         Remove.
375         <subclass>: New member.
376         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
377         * rust-lang.c (rust_get_trait_object_pointer): Update.
378         * dwarf2read.c (read_func_scope): Update.
379         (read_variable): Update.
380
381 2017-11-17  Tom Tromey  <tom@tromey.com>
382
383         * dwarf2read.c (read_func_scope): Update.
384         * symtab.h (struct template_symbol): Derive from symbol.
385         <base>: Remove.
386
387 2017-11-17  Tom Tromey  <tom@tromey.com>
388
389         * symtab.h (struct symbol) <is_rust_vtable>: New member.
390         (struct rust_vtable_symbol): New.
391         (find_symbol_at_address): Declare.
392         * symtab.c (find_symbol_at_address): New function.
393         * symfile.h (struct quick_symbol_functions)
394         <find_compunit_symtab_by_address>: New member.
395         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
396         function.
397         (debug_sym_quick_functions): Link to
398         debug_qf_find_compunit_symtab_by_address.
399         * rust-lang.c (rust_get_trait_object_pointer): New function.
400         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
401         rust_get_trait_object_pointer.
402         * psymtab.c (psym_relocate): Clear psymbol_map.
403         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
404         functions.
405         (psym_functions): Link to psym_find_compunit_symtab_by_address.
406         * objfiles.h (struct objfile) <psymbol_map>: New member.
407         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
408         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
409         (rust_containing_type, read_variable): New functions.
410
411 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
412
413         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
414
415 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
416
417         * common/filestuff.c: Include <algorithm>.
418         (open_fds): Change type to std::vector<int>.
419         (do_mark_open_fd): Adjust.
420         (unmark_fd_no_cloexec): Adjust.
421         (do_close): Adjust.
422
423 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
424
425         * breakpoint.c (output_thread_groups): Take an std::vector.
426         (print_one_breakpoint_location): Adjust.
427
428 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
429
430         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
431         (ada_evaluate_subexp_for_cast): New function.
432         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
433         ada_evaluate_subexp_for_cast.
434         (ada_evaluate_subexp) <nosideret>: Replace code by call to
435         eval_skip_value.
436         * eval.c (evaluate_var_value): Make non-static.
437         (evaluate_var_msym_value, eval_skip_value): Likewise.
438         * value.h (evaluate_var_value, evaluate_var_msym_value)
439         (eval_skip_value): Declare.
440
441 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
442
443         * ada-lang.c (ada_value_cast): Remove parameter "noside".
444         Update all callers.
445
446 2017-11-16  Pedro Alves  <palves@redhat.com>
447
448         * python/py-unwind.c (pyuw_sniffer): Translate
449         PyExc_KeyboardInterrupt to a GDB Quit exception.
450
451 2017-11-16  Pedro Alves  <palves@redhat.com>
452
453         * infrun.c (resume_cleanups): Delete.
454         (resume): No longer install a resume_cleanups cleanup nor call
455         QUIT.
456         (proceed): Pass the terminal to the inferior.
457         (keep_going_pass_signal): No longer install a resume_cleanups
458         cleanup.
459
460 2017-11-16  Pedro Alves  <palves@redhat.com>
461
462         * inf-loop.c (inferior_event_handler): Don't swallow the exception
463         if the prompt is blocked.
464
465 2017-11-16  Pedro Alves  <palves@redhat.com>
466
467         * breakpoint.c (insert_bp_location): Replace bp_err and
468         bp_err_message locals by a gdb_exception local.
469
470 2017-11-16  Pedro Alves  <palves@redhat.com>
471
472         * inflow.c (scoped_ignore_sigttou): New class.
473         (child_terminal_ours_1, new_tty): Use it.
474
475 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
476
477         * target-float.c (decimal_from_number): Add byte_order argument and
478         call match_endianness.  Error if unknown floating-point type.
479         (decimal_to_number): Add byte_order argument and call match_endianness.
480         (decimal_from_longest): Update call.  Do not call match_endianness.
481         (decimal_from_ulongest): Likewise.
482         (decimal_binop): Likewise.
483         (decimal_is_zero): Likewise.
484         (decimal_compare): Likewise.
485         (decimal_convert): Likewise.
486
487 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
488
489         * python/python.c (gdbpy_rbreak): New function.
490         * NEWS: Document Python rbreak feature.
491
492 2017-11-16  Yao Qi  <yao.qi@linaro.org>
493
494         * features/tic6x-c62x.xml: Remove.
495         * features/tic6x-c64x.xml: Remove.
496         * features/tic6x-c64xp.xml: Remove.
497
498 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
499
500         * symtab.h: Include <array>.
501
502 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
503
504         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
505         (bsd_kvm_proc_cmd): Likewise.
506
507 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
508
509         * tui/tui-win.c (window_name_completer): Replace VEC with
510         std::vector.
511
512 2017-11-15  Andrew Cagney  <cagney@gnu.org>
513
514         * MAINTAINERS: Remove no-longer applicable entries.
515
516 2017-11-15  Andrew Cagney  <cagney@gnu.org>
517
518         * MAINTAINERS: Move self to Past Maintainers.
519
520 2017-11-15  Yao Qi  <yao.qi@linaro.org>
521
522         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
523         * features/nios2-linux.c: Remove.
524         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
525         initialize_tdesc_nios2_linux.
526
527 2017-11-15  Yao Qi  <yao.qi@linaro.org>
528
529         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
530         M68HC11_LAST_HARD_REG + 1.
531
532 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
533
534         PR gdb/22388
535         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
536         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
537         Return TARGET_XFER_EOF if size of returned data is 0.
538
539 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
540
541         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
542         memory-map-selftests.c.
543         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
544         * memory-map.c (memory_map_start_memory): Fix computation of hi
545         address.
546         * unittests/memory-map-selftests.c: New file.
547
548 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
549
550         * ada-lang.c: Fix some typos in the general command documenting
551         how Ada expressions are being evaluated and how their result
552         is printed.
553
554 2017-11-09  Tom Tromey  <tom@tromey.com>
555
556         * psymtab.c (psymbol_hash): Do not hash string contents.
557         (psymbol_compare): Add comment.
558
559 2017-11-09  Tom Tromey  <tom@tromey.com>
560
561         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
562
563 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
564
565         * ada-exp.y (write_var_from_sym): Remove parameter
566         "orig_left_context".  Update all callers.
567
568 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
569
570         * tracepoint.h (class collection_list) <stringify>: Return
571         std::vector<std::string>.
572         (encode_actions_rsp): Change parameters to
573         std::vector<std::string> *.
574         * tracepoint.c (collection_list::stringify): Return
575         std::vector<std::string> and adjust accordingly.
576         (encode_actions_rsp): Changee parameters to
577         std::vector<std::string> and adjust accordingly.
578         * remote.c (free_actions_list),
579         free_actions_list_cleanup_wrapper): Remove.
580         (remote_download_tracepoint): Adjust to std::vector.
581
582 2017-11-08  Tom Tromey  <tom@tromey.com>
583
584         * dwarf2read.c (symbolp): Remove typedef.
585         (read_func_scope): Use std::vector.
586         (process_structure_scope): Use std::vector.
587
588 2017-11-08  Pedro Alves  <palves@redhat.com>
589
590         * ada-lang.c (ada_make_symbol_completion_list): Use
591         completion_skip_symbol.
592         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
593         (symbol_is_function_or_method(symbol*)): New.
594         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
595         completion_skip_symbol.
596         (default_collect_symbol_completion_matches_break_on): Use
597         completion_skip_symbol.  Pass down mode.
598         (collect_file_symbol_completion_matches): Pass down mode.
599         * symtab.h (symbol_is_function_or_method): New declarations.
600         (completion_skip_symbol): New template function.
601
602 2017-11-08  Pedro Alves  <palves@redhat.com>
603
604         * linespec.c (iterate_over_all_matching_symtabs): Add
605         search_domain parameter.  Pass it down to expand_symtabs_matching.
606         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
607         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
608         search_domain.
609         (add_all_symbol_names_from_pspace): Add search_domain parameter.
610         Pass it down.
611         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
612         symbols.
613         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
614         it down.
615
616 2017-11-08  Pedro Alves  <palves@redhat.com>
617
618         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
619         text_len locals and don't pass them down.
620         * symtab.c (completion_list_add_name): Remove
621         sym_text/sym_text_len parameters and adjust.
622         (completion_list_add_symbol, completion_list_add_msymbol)
623         (completion_list_objc_symbol, completion_list_add_fields)
624         (add_symtab_completions): Likewise.
625         (default_collect_symbol_completion_matches_break_on)
626         (collect_file_symbol_completion_matches): Remove sym_text_len
627         local and don't pass it down.
628         * symtab.h (completion_list_add_name): Remove
629         sym_text/sym_text_len parameters.
630
631 2017-11-08  Pedro Alves  <palves@redhat.com>
632
633         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
634         unittests/lookup_name_info-selftests.c.
635         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
636         * cp-support.c: Include "selftest.h".
637         (cp_remove_params_1): Rename from cp_remove_params.  Add
638         'require_param' parameter, and handle it.
639         (cp_remove_params): Reimplement.
640         (cp_remove_params_if_any): New.
641         (selftests::quote): New.
642         (selftests::check_remove_params): New.
643         (selftests::test_cp_remove_params): New.
644         (_initialize_cp_support): Install
645         selftests::test_cp_remove_params.
646         * cp-support.h (cp_remove_params_if_any): Declare.
647         * dwarf2read.c :Include "selftest.h".
648         (dw2_expand_symtabs_matching_symbol): Use
649         lookup_name_info::make_ignore_params.
650         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
651         (selftests::dw2_expand_symtabs_matching::string_or_null)
652         (selftests::dw2_expand_symtabs_matching::check_match)
653         (selftests::dw2_expand_symtabs_matching::test_symbols)
654         (selftests::dw2_expand_symtabs_matching::run_test): New.
655         (_initialize_dwarf2_read): Register
656         selftests::dw2_expand_symtabs_matching::run_test.
657         * psymtab.c (psym_expand_symtabs_matching): Use
658         lookup_name_info::make_ignore_params.
659         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
660         If the lookup name wants to ignore parameters, strip them.
661         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
662         code handling '('.
663         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
664         (default_collect_symbol_completion_matches_break_on): Don't try to
665         strip parameters.
666         * symtab.h (lookup_name_info::lookup_name_info): Add
667         'ignore_parameters' parameter.
668         (lookup_name_info::ignore_parameters)
669         (lookup_name_info::make_ignore_params): New methods.
670         (lookup_name_info::m_ignore_parameters): New field.
671         * unittests/lookup_name_info-selftests.c: New file.
672
673 2017-11-08  Pedro Alves  <palves@redhat.com>
674
675         * dwarf2read.c (dw2_expand_marked_cus)
676         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
677         (dw2_expand_symtabs_matching): Move further below.
678         (dw2_expand_marked_cus): Reindent.
679
680 2017-11-08  Pedro Alves  <palves@redhat.com>
681
682         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
683         (struct name_component): New.
684         (mapped_index::name_components): New field.
685         (mapped_index::symbol_name_at): New method.
686         (dwarf2_read_index): Call mapped_index ctor.
687         (dw2_map_matching_symbols): Add comment about name_components
688         table.
689         (dw2_expand_symtabs_matching): Factor part to...
690         (dw2_expand_symtabs_matching_symbol): ... this new function.
691         Build name components table, and lookup symbols in it before
692         calling the name matcher.
693         (dw2_expand_marked_cus): New, factored out from
694         dw2_expand_symtabs_matching.
695         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
696
697 2017-11-08   Pedro Alves  <palves@redhat.com>
698
699         * ada-lang.c (ada_encode): Rename to ..
700         (ada_encode_1): ... this.  Add throw_errors parameter and handle
701         it.
702         (ada_encode): Reimplement.
703         (match_name): Delete, folded into full_name.
704         (resolve_subexp): No longer pass the encoded name to
705         ada_lookup_symbol_list.
706         (should_use_wild_match): Delete.
707         (name_match_type_from_name): New.
708         (ada_lookup_simple_minsym): Use lookup_name_info and the
709         language's symbol_name_matcher_ftype.
710         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
711         (ada_add_block_renamings): Adjust to use lookup_name_info.
712         (ada_lookup_name): New.
713         (add_nonlocal_symbols, ada_add_all_symbols)
714         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
715         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
716         (ada_name_for_lookup): Delete.
717         (ada_lookup_encoded_symbol): Construct a verbatim name.
718         (wild_match): Reverse sense of return type.  Use bool.
719         (full_match): Reverse sense of return type.  Inline bits of old
720         match_name here.
721         (ada_add_block_symbols): Adjust to use lookup_name_info.
722         (symbol_completion_match): Delete, folded into...
723         (ada_lookup_name_info::matches): ... .this new method.
724         (symbol_completion_add): Delete.
725         (ada_collect_symbol_completion_matches): Add name_match_type
726         parameter.  Adjust to use lookup_name_info and
727         completion_list_add_name.
728         (get_var_value, ada_add_global_exceptions): Adjust to use
729         lookup_name_info.
730         (ada_get_symbol_name_cmp): Delete.
731         (do_wild_match, do_full_match): New functions.
732         (ada_lookup_name_info::ada_lookup_name_info): New method.
733         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
734         functions.
735         (ada_language_defn): Install ada_get_symbol_name_matcher.
736         * ada-lex.l (processId): If name starts with '<', copy it
737         verbatim.
738         * block.c (block_iter_match_step, block_iter_match_first)
739         (block_iter_match_next, block_lookup_symbol)
740         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
741         lookup_name_info.
742         * block.h (block_iter_match_first, block_iter_match_next)
743         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
744         * c-lang.c (c_language_defn, cplus_language_defn)
745         (asm_language_defn, minimal_language_defn): Adjust comments to
746         refer to la_get_symbol_name_matcher.
747         * completer.c (complete_files_symbols)
748         (collect_explicit_location_matches, symbol_completer): Pass a
749         symbol_name_match_type down.
750         * completer.h (class completion_match, completion_match_result):
751         New classes.
752         (completion_tracker::reset_completion_match_result): New method.
753         (completion_tracker::m_completion_match_result): New field.
754         * cp-support.c (make_symbol_overload_list_block): Adjust to use
755         lookup_name_info.
756         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
757         functions.
758         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
759         * d-lang.c: Adjust comments to refer to
760         la_get_symbol_name_matcher.
761         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
762         Adjust to use lookup_name_info.
763         (dict_iter_match_first, dict_iter_match_next)
764         (iter_match_first_hashed, iter_match_next_hashed)
765         (iter_match_first_linear, iter_match_next_linear): Adjust to work
766         with a lookup_name_info.
767         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
768         Likewise.
769         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
770         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
771         (gdb_index_symbol_name_matcher): New class.
772         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
773         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
774         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
775         with a symbol_name_match_type.
776         (f_language_defn): Adjust comments to refer to
777         la_get_symbol_name_matcher.
778         * go-lang.c (go_language_defn): Adjust comments to refer to
779         la_get_symbol_name_matcher.
780         * language.c (default_symbol_name_matcher)
781         (language_get_symbol_name_matcher): New functions.
782         (unknown_language_defn, auto_language_defn): Adjust comments to
783         refer to la_get_symbol_name_matcher.
784         * language.h (symbol_name_cmp_ftype): Delete.
785         (language_defn) <la_collect_symbol_completion_matches>: Add match
786         type parameter.
787         <la_get_symbol_name_cmp>: Delete field.
788         <la_get_symbol_name_matcher>: New field.
789         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
790         (default_symbol_name_matcher, language_get_symbol_name_matcher):
791         Declare.
792         * linespec.c (iterate_over_all_matching_symtabs)
793         (iterate_over_file_blocks): Adjust to use lookup_name_info.
794         (find_methods): Add language parameter, and use lookup_name_info
795         and the language's symbol_name_matcher_ftype.
796         (linespec_complete_function): Adjust.
797         (lookup_prefix_sym): Use lookup_name_info.
798         (add_all_symbol_names_from_pspace): Adjust.
799         (find_superclass_methods): Add language parameter and pass it
800         down.
801         (find_method): Pass symbol language down.
802         (find_linespec_symbols): Don't demangle or Ada encode here.
803         (search_minsyms_for_name): Add lookup_name_info parameter.
804         (add_matching_symbols_to_info): Add name_match_type parameter.
805         Use lookup_name_info.
806         * m2-lang.c (m2_language_defn): Adjust comments to refer to
807         la_get_symbol_name_matcher.
808         * minsyms.c: Include <algorithm>.
809         (add_minsym_to_demangled_hash_table): Remove table parameter and
810         add objfile parameter.  Use search_name_hash, and add language to
811         demangled languages vector.
812         (struct found_minimal_symbols): New struct.
813         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
814         New functions.
815         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
816         input names here.  Use lookup_name_info instead.  Lookup up
817         demangled names once for each language in the demangled names
818         vector.
819         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
820         demangled names once for each language in the demangled names
821         vector.
822         (build_minimal_symbol_hash_tables): Adjust.
823         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
824         lookup_name_info.
825         * objc-lang.c (objc_language_defn): Adjust comment to refer to
826         la_get_symbol_name_matcher.
827         * objfiles.h: Include <vector>.
828         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
829         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
830         la_get_symbol_name_matcher.
831         * p-lang.c (pascal_language_defn): Adjust comment to refer to
832         la_get_symbol_name_matcher.
833         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
834         (match_partial_symbol): Use symbol_name_match_type,
835         lookup_name_info and psymbol_name_matches.
836         (lookup_partial_symbol): Use lookup_name_info.
837         (map_block): Use symbol_name_match_type and lookup_name_info.
838         (psym_map_matching_symbols): Use symbol_name_match_type.
839         (psymbol_name_matches): New.
840         (recursively_search_psymtabs): Use lookup_name_info and
841         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
842         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
843         'kind' parameter to 'domain'.
844         * rust-lang.c (rust_language_defn): Adjust comment to refer to
845         la_get_symbol_name_matcher.
846         * symfile-debug.c (debug_qf_map_matching_symbols)
847         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
848         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
849         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
850         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
851         Adjust to use symbol_name_match_type.
852         <expand_symtabs_matching>: Adjust to use lookup_name_info.
853         (expand_symtabs_matching): Adjust to use lookup_name_info.
854         * symmisc.c (maintenance_expand_symtabs): Use
855         lookup_name_info::match_any ().
856         * symtab.c (symbol_matches_search_name): New.
857         (eq_symbol_entry): Adjust to use lookup_name_info and the
858         language's matcher.
859         (demangle_for_lookup_info::demangle_for_lookup_info): New.
860         (lookup_name_info::match_any): New.
861         (iterate_over_symbols, search_symbols): Use lookup_name_info.
862         (compare_symbol_name): Add language, lookup_name_info and
863         completion_match_result parameters, and use them.
864         (completion_list_add_name): Make extern.  Add language and
865         lookup_name_info parameters.  Use them.
866         (completion_list_add_symbol, completion_list_add_msymbol)
867         (completion_list_objc_symbol): Add lookup_name_info parameters and
868         adjust.  Pass down language.
869         (completion_list_add_fields): Add lookup_name_info parameters and
870         adjust.  Pass down language.
871         (add_symtab_completions): Add lookup_name_info parameters and
872         adjust.
873         (default_collect_symbol_completion_matches_break_on): Add
874         name_match_type parameter, and use it.  Use lookup_name_info.
875         (default_collect_symbol_completion_matches)
876         (collect_symbol_completion_matches): Add name_match_type
877         parameter, and pass it down.
878         (collect_symbol_completion_matches_type): Adjust.
879         (collect_file_symbol_completion_matches): Add name_match_type
880         parameter, and use lookup_name_info.
881         * symtab.h: Include <string> and "common/gdb_optional.h".
882         (enum class symbol_name_match_type): New.
883         (class ada_lookup_name_info): New.
884         (struct demangle_for_lookup_info): New.
885         (class lookup_name_info): New.
886         (symbol_name_matcher_ftype): New.
887         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
888         (symbol_matches_search_name): Declare.
889         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
890         (default_collect_symbol_completion_matches)
891         (collect_symbol_completion_matches)
892         (collect_file_symbol_completion_matches): Add name_match_type
893         parameter.
894         (iterate_over_symbols): Use lookup_name_info.
895         (completion_list_add_name): Declare.
896         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
897         (strncmp_iw_with_mode): Now extern.
898         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
899         (strncmp_iw_with_mode): Declare.
900
901 2017-11-08  Keith Seitz  <keiths@redhat.com>
902             Pedro Alves  <palves@redhat.com>
903
904         * ada-lang.c (ada_language_defn): Install
905         default_search_name_hash.
906         * buildsym.c (struct buildsym_compunit): <language>: New field.
907         (finish_block_internal): Pass language when creating dictionaries.
908         (start_buildsym_compunit, start_symtab): New language parameters.
909         Use them.
910         (restart_symtab): Pass down compilation unit's language.
911         * buildsym.h (enum language): Forward declare.
912         (start_symtab): New 'language' parameter.
913         * c-lang.c (c_language_defn, cplus_language_defn)
914         (asm_language_defn, minimal_language_defn): Install
915         default_search_name_hash.
916         * coffread.c (coff_start_symtab): Adjust.
917         * d-lang.c (d_language_defn): Install default_search_name_hash.
918         * dbxread.c (struct symloc): Add 'pst_language' field.
919         (PST_LANGUAGE): Define.
920         (start_psymtab, read_ofile_symtab): Use it.
921         (process_one_symbol): New 'language' parameter.  Pass it down.
922         * dictionary.c (struct dictionary) <language>: New field.
923         (DICT_LANGUAGE): Define.
924         (dict_create_hashed, dict_create_hashed_expandable)
925         (dict_create_linear, dict_create_linear_expandable): New parameter
926         'language'.  Set the dictionary's language.
927         (iter_match_first_hashed): Adjust to rename.
928         (insert_symbol_hashed): Assert we don't see mismatching
929         languages.  Adjust to rename.
930         (dict_hash): Rename to ...
931         (default_search_name_hash): ... this and make extern.
932         * dictionary.h (struct language_defn): Forward declare.
933         (dict_create_hashed): New parameter 'language'.
934         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
935         * f-lang.c (f_language_defn): Install default_search_name_hash.
936         * go-lang.c (go_language_defn): Install default_search_name_hash.
937         * jit.c (finalize_symtab): Pass compunit's language to dictionary
938         creation.
939         * language.c (unknown_language_defn, auto_language_defn):
940         * language.h (language_defn::la_search_name_hash): New field.
941         (default_search_name_hash): Declare.
942         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
943         * mdebugread.c (new_block): New parameter 'language'.
944         * mdebugread.c (parse_symbol): Pass symbol language to block
945         allocation.
946         (psymtab_to_symtab_1): Pass down language.
947         (new_symtab): Pass compunit's language to block allocation.
948         * objc-lang.c (objc_language_defn): Install
949         default_search_name_hash.
950         * opencl-lang.c (opencl_language_defn):
951         * p-lang.c (pascal_language_defn): Install
952         default_search_name_hash.
953         * rust-lang.c (rust_language_defn): Install
954         default_search_name_hash.
955         * stabsread.h (enum language): Forward declare.
956         (process_one_symbol): Add 'language' parameter.
957         * symtab.c (search_name_hash): New function.
958         * symtab.h (search_name_hash): Declare.
959         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
960
961 2017-11-08  Pedro Alves  <palves@redhat.com>
962
963         * cp-name-parser.y (main): Don't initialize extra_chars.
964
965 2017-11-07  Tom Tromey  <tom@tromey.com>
966
967         * event-top.h (command_handler): Constify.
968         * record-full.c (cmd_record_full_start): Update.
969         * thread.c (thread_apply_all_command): Update.
970         * printcmd.c (eval_command): Update.
971         * mi/mi-main.c (mi_execute_cli_command): Update.
972         (mi_execute_async_cli_command): Update.
973         * tui/tui-stack.c (tui_update_command): Update.
974         * cli/cli-interp.c (safe_execute_command): Constify.
975         * record.c (record_start): Update.
976         (record_start, record_stop, cmd_record_start): Update.
977         * record-btrace.c (cmd_record_btrace_bts_start): Update.
978         (cmd_record_btrace_pt_start): Update.
979         (cmd_record_btrace_start): Update.
980         (cmd_record_btrace_start): Update.
981         * reverse.c (exec_reverse_once): Update.
982         * python/python.c (execute_gdb_command): Don't copy the command.
983         * event-top.c (command_line_handler): Update.
984         (command_handler): Constify.
985         * defs.h (deprecated_call_command_hook): Constify.
986         * cli/cli-script.h (execute_user_command): Constify.
987         * cli/cli-script.c (execute_user_command): Constify.
988         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
989         (enum command_control_type): Update.
990         * main.c (catch_command_errors): Remove non-const overload.
991         (catch_command_errors_ftype): Remove.
992         * python/py-cmd.c (cmdpy_function): Constify.
993         * guile/scm-cmd.c (cmdscm_function): Constify.
994         * cli/cli-dump.c (call_dump_func): Constify.
995         * cli/cli-decode.c (do_const_cfunc): Constify.
996         (do_sfunc): Constify.
997         (cmd_func): Constify.
998         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
999         * top.h (execute_command): Constify.
1000         * top.c (execute_command): Constify.
1001         (execute_command_to_string): Constify.
1002         (deprecated_call_command_hook): Constify.
1003         * command.h (cmd_func): Constify.
1004         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1005
1006 2017-11-07  Tom Tromey  <tom@tromey.com>
1007
1008         * ada-lang.c (catch_ada_exception_command): Constify.
1009         (catch_assert_command): Constify.
1010         * break-catch-throw.c (catch_catch_command, catch_throw_command)
1011         (catch_rethrow_command): Constify.
1012         (catch_exception_command_1): Constify.
1013         * breakpoint.h (add_catch_command): Constify.
1014         * break-catch-syscall.c (catch_syscall_command_1): Constify.
1015         (catch_syscall_split_args): Constify.
1016         * break-catch-sig.c (catch_signal_command): Constify.
1017         (catch_signal_split_args): Constify.
1018         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1019         cmd_const_sfunc_ftype.
1020         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1021         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1022         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1023         (add_setshow_string_cmd, struct cmd_list_element)
1024         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1025         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1026         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1027         Constify.
1028         (set_cmd_sfunc): Constify.
1029         (empty_sfunc): Constify.
1030         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1031         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1032         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1033         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1034         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1035         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1036         Constify.
1037         (set_cmd_sfunc): Constify.
1038         (cmd_sfunc_ftype): Remove.
1039         * compile/compile.c (set_compile_args): Constify.
1040         * infrun.c (set_disable_randomization): Constify.
1041         * infcmd.c (set_args_command, set_cwd_command): Constify.
1042         * breakpoint.c (set_condition_evaluation_mode): Constify.
1043         (add_catch_command): Constify.
1044         (catch_fork_command_1, catch_exec_command_1)
1045         (catch_load_command_1, catch_unload_command_1): Constify.
1046         (catch_load_or_unload): Constify.
1047         * guile/scm-param.c (pascm_set_func): Constify.
1048         (add_setshow_generic): Constify.
1049         * python/py-param.c (get_set_value): Constify.
1050         * top.h (set_verbose): Constify.
1051         * tui/tui-win.c (tui_set_var_cmd): Constify.
1052         * mi/mi-main.c (set_mi_async_command): Constify.
1053         * cli/cli-logging.c (set_logging_overwrite)
1054         (set_logging_redirect): Constify.
1055         * value.c (set_max_value_size): Constify.
1056         * valprint.c (set_input_radix, set_output_radix): Constify.
1057         * utils.c (set_width_command, set_height_command): Constify.
1058         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1059         * tracepoint.c (set_disconnected_tracing)
1060         (set_circular_trace_buffer, set_trace_buffer_size)
1061         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1062         * top.c (set_history_size_command, set_verbose, set_editing)
1063         (set_gdb_datadir, set_history_filename): Constify.
1064         * target.c (set_targetdebug, maint_set_target_async_command)
1065         (maint_set_target_non_stop_command, set_target_permissions)
1066         (set_write_memory_permission): Constify.
1067         (open_target): Constify.
1068         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1069         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1070         * symtab.c (set_symbol_cache_size_handler): Constify.
1071         * symfile.c (set_ext_lang_command): Constify.
1072         * symfile-debug.c (set_debug_symfile): Constify.
1073         * source.c (set_directories_command): Constify.
1074         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1075         * serial.c (set_parity): Constify.
1076         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1077         * remote.c (set_remote_exec_file, set_remotebreak)
1078         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1079         * record.c (set_record_insn_history_size)
1080         (set_record_call_history_size): Constify.
1081         * record-full.c (set_record_full_insn_max_num): Constify.
1082         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1083         * osabi.c (set_osabi): Constify.
1084         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1085         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1086         * maint.c (maintenance_set_profile_cmd): Constify.
1087         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1088         * language.c (set_language_command, set_range_command)
1089         (set_case_command): Constify.
1090         * infrun.c (set_non_stop, set_observer_mode)
1091         (set_stop_on_solib_events, set_schedlock_func)
1092         (set_exec_direction_func): Constify.
1093         * infcmd.c (set_inferior_tty_command): Constify.
1094         * disasm.c (set_disassembler_options_sfunc): Constify.
1095         * demangle.c (set_demangling_command): Constify.
1096         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1097         * cris-tdep.c (set_cris_version, set_cris_mode)
1098         (set_cris_dwarf2_cfi): Constify.
1099         * corefile.c (set_gnutarget_command): Constify.
1100         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1101         (set_target_wide_charset_sfunc): Constify.
1102         * breakpoint.c (update_dprintf_commands): Constify.
1103         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1104         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1105         (set_disassembly_style_sfunc): Constify.
1106         * arch-utils.c (set_endian, set_architecture): Constify.
1107         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1108         * agent.c (set_can_use_agent): Constify.
1109
1110 2017-11-07  Tom Tromey  <tom@tromey.com>
1111
1112         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1113         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1114         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1115         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1116         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1117         (parse_int_arg, show_thread_default_detach_sc_cmd)
1118         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1119         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1120         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1121         (show_task_pause_cmd, set_task_detach_sc_cmd)
1122         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1123         (set_noninvasive_cmd, set_thread_pause_cmd)
1124         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1125         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1126         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1127         * windows-nat.c (display_selectors): Constify.
1128         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1129         non-const "cfunc".
1130         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1131         (cmd_cfunc_eq): Likewise.
1132         (struct cmd_list_element): Likewise.
1133         (do_cfunc): Remove.
1134         (cli_user_command_p): Update.
1135         * command.h (add_cmd): Remove non-const overload.
1136         (cmd_cfunc_ftype): Remove typedef.
1137         (cmd_cfunc_eq): Remove non-const overload.
1138         * value.c (show_values): Constify.
1139         * thread.c (thread_apply_all_command): Constify.
1140         * symfile.c (load_command): Constify.
1141         * source.c (directory_command): Constify.
1142         * maint.c (maintenance_internal_error)
1143         (maintenance_demangler_warning, maintenance_space_display)
1144         (maintenance_print_architecture, maintenance_translate_address)
1145         (maintenance_info_selftests, maintenance_internal_warning):
1146         Constify.
1147         * breakpoint.c (disable_trace_command, enable_trace_command):
1148         Constify.
1149         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1150         Constify.
1151         (add_auto_load_safe_path): Constify.
1152         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1153         * top.h (show_commands): Constify.
1154         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1155         * sparc64-tdep.c (adi_examine_command): Constify.
1156         (adi_assign_command): Constify.
1157
1158 2017-11-07  Tom Tromey  <tom@tromey.com>
1159
1160         * frame.h (info_locals_command, info_args_command): Constify.
1161         * auto-load.h (auto_load_info_scripts): Constify.
1162         * inferior.h (registers_info): Constify.
1163         * copying.c: Rebuild.
1164         * copying.awk: Constify generated commands.
1165         * auto-load.c (auto_load_info_scripts)
1166         (info_auto_load_gdb_scripts): Constify.
1167         * cli/cli-decode.c (struct cmd_list_element): Take a
1168         cmd_const_cfunc_ftype.
1169         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1170         * tui/tui-win.c (tui_all_windows_info): Constify.
1171         * python/py-auto-load.c (info_auto_load_python_scripts):
1172         Constify.
1173         * cli/cli-cmds.c (show_command): Remove non-const overload.
1174         * tracepoint.c (info_tvariables_command, info_scope_command):
1175         Constify.
1176         (info_static_tracepoint_markers_command): Constify.
1177         * thread.c (info_threads_command): Constify.
1178         (print_thread_info_1): Constify.
1179         * target.c (info_target_command): Constify.
1180         * symtab.c (info_sources_command, info_functions_command)
1181         (info_types_command): Constify.
1182         (info_variables_command): Remove non-const overload.
1183         * symfile.c (info_ext_lang_command): Constify.
1184         * stack.c (info_frame_command, info_locals_command)
1185         (info_args_command): Constify.
1186         (backtrace_command): Remove non-const overload.
1187         * source.c (info_source_command, info_line_command): Constify.
1188         * solib.c (info_sharedlibrary_command): Constify.
1189         * skip.c (info_skip_command): Constify.
1190         * ser-go32.c (info_serial_command): Constify.
1191         * reverse.c (info_bookmarks_command): Constify.
1192         * printcmd.c (info_symbol_command, info_address_command)
1193         (info_display_command): Constify.
1194         * osdata.c (info_osdata_command): Constify.
1195         * objc-lang.c (info_selectors_command, info_classes_command):
1196         Constify.
1197         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1198         * memattr.c (info_mem_command): Constify.
1199         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1200         * linux-fork.c (info_checkpoints_command): Constify.
1201         * infrun.c (info_signals_command): Constify.
1202         * inflow.c (info_terminal_command): Constify.
1203         * inferior.c (info_inferiors_command): Constify.
1204         (print_inferior): Constify.
1205         * infcmd.c (info_program_command, info_all_registers_command)
1206         (info_registers_command, info_vector_command)
1207         (info_float_command): Constify.
1208         (registers_info): Constify.
1209         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1210         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1211         Constify.
1212         * f-valprint.c (info_common_command): Constify.
1213         * dcache.c (info_dcache_command): Constify.
1214         (dcache_info_1): Constify.
1215         * darwin-nat-info.c (info_mach_tasks_command)
1216         (info_mach_task_command, info_mach_ports_command)
1217         (info_mach_port_command, info_mach_threads_command)
1218         (info_mach_thread_command, info_mach_regions_command)
1219         (info_mach_regions_recurse_command, info_mach_region_command)
1220         (info_mach_exceptions_command): Constify.
1221         (get_task_from_args): Constify.
1222         * cp-support.c (info_vtbl_command): Constify.
1223         * breakpoint.c (info_watchpoints_command)
1224         (info_tracepoints_command): Constify.
1225         (info_breakpoints_command): Remove non-const overload.
1226         * avr-tdep.c (avr_io_reg_read_command): Constify.
1227         * auxv.c (info_auxv_command): Constify.
1228         * ada-tasks.c (info_tasks_command): Constify.
1229         (info_task): Constify.
1230         * ada-lang.c (info_exceptions_command): Constify.
1231
1232 2017-11-07  Tom Tromey  <tom@tromey.com>
1233
1234         * solib.h (no_shared_libraries): Constify.
1235         * frame.h (return_command): Constify.
1236         * cli/cli-cmds.h (quit_command): Constify.
1237         * top.h (quit_command, execute_command): Constify.
1238         * target.h (flash_erase_command): Constify.
1239         * inferior.h (set_inferior_args, attach_command): Constify.
1240         * tracepoint.h (start_tracing, stop_tracing): Constify.
1241         * breakpoint.h (break_command, tbreak_command)
1242         (hbreak_command_wrapper, thbreak_command_wrapper)
1243         (rbreak_command_wrapper, watch_command_wrapper)
1244         (awatch_command_wrapper, rwatch_command_wrapper)
1245         (get_tracepoint_by_number): Constify.
1246         * symtab.c (info_variables_command, rbreak_command)
1247         (symtab_symbol_info): Constify.
1248         (info_variables_command): Add non-const overload.
1249         * top.c (dont_repeat_command): Constify.
1250         * breakpoint.c (ignore_command, commands_command)
1251         (condition_command, tbreak_command, hbreak_command)
1252         (thbreak_command, clear_command, break_command)
1253         (info_breakpoints_command, watch_command, rwatch_command)
1254         (awatch_command, trace_command, ftrace_command, strace_command)
1255         (trace_pass_command, break_range_command, dprintf_command)
1256         (agent_printf_command, get_tracepoint_by_number)
1257         (watch_maybe_just_location, trace_pass_command): Constify.
1258         (info_breakpoints_command): Add non-const overload.
1259         * tracefile.c (tsave_command): Constify.
1260         * infcmd.c (attach_command, disconnect_command, signal_command)
1261         (queue_signal_command, stepi_command, nexti_command)
1262         (finish_command, next_command, step_command, until_command)
1263         (advance_command, jump_command, continue_command, run_command)
1264         (start_command, starti_command, interrupt_command)
1265         (run_command_1, set_inferior_args, step_1): Constify.
1266         * inferior.c (add_inferior_command, remove_inferior_command)
1267         (clone_inferior_command): Constify.
1268         * linux-fork.c (checkpoint_command, restart_command): Constify.
1269         * windows-nat.c (signal_event_command): Constify.
1270         * guile/guile.c (guile_repl_command, guile_command): Constify.
1271         * printcmd.c (x_command, display_command, printf_command)
1272         (output_command, set_command, call_command, print_command)
1273         (eval_command): Constify.
1274         (non_const_set_command): Remove.
1275         (_initialize_printcmd): Update.
1276         * source.c (forward_search_command, reverse_search_command):
1277         Constify.
1278         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1279         Constify.
1280         * infrun.c (handle_command): Constify.
1281         * memattr.c (mem_command): Constify.
1282         * stack.c (return_command, up_command, up_silently_command)
1283         (down_command, down_silently_command, frame_command)
1284         (backtrace_command, func_command, backtrace_command_1): Constify.
1285         (backtrace_command): Add non-const overload.
1286         * remote-sim.c (simulator_command): Constify.
1287         * exec.c (set_section_command): Constify.
1288         * tracepoint.c (tdump_command, trace_variable_command)
1289         (tstatus_command, tstop_command, tstart_command)
1290         (end_actions_pseudocommand, while_stepping_pseudocommand)
1291         (collect_pseudocommand, teval_pseudocommand, actions_command)
1292         (start_tracing, stop_tracing): Constify.
1293         * value.c (init_if_undefined_command): Constify.
1294         * tui/tui-stack.c (tui_update_command): Constify.
1295         * tui/tui-win.c (tui_refresh_all_command)
1296         (tui_set_tab_width_command, tui_set_win_height_command)
1297         (tui_set_focus_command, tui_scroll_forward_command)
1298         (tui_scroll_backward_command, tui_scroll_left_command)
1299         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1300         (tui_set_win_height): Constify.
1301         * tui/tui-layout.c (tui_layout_command): Constify.
1302         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1303         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1304         (proc_untrace_sysexit_cmd): Constify.
1305         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1306         (threadset_test_cmd, threadlist_update_test_cmd)
1307         (threadalive_test): Constify.
1308         * objc-lang.c (print_object_command): Constify.
1309         * command.h (add_com): Constify.
1310         * cli/cli-dump.c (restore_command): Constify.
1311         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1312         (help_command, complete_command, shell_command, edit_command)
1313         (list_command, disassemble_command, make_command)
1314         (apropos_command, alias_command): Constify.
1315         * cli/cli-script.c (document_command, define_command)
1316         (while_command, if_command, validate_comname): Constify.
1317         * cli/cli-decode.c (struct cmd_list_element): Change type of
1318         "fun".
1319         * target.c (do_monitor_command, flash_erase_command): Constify.
1320         * regcache.c (reg_flush_command): Constify.
1321         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1322         (reverse_nexti, reverse_continue, reverse_finish)
1323         (save_bookmark_command, goto_bookmark_command)
1324         (exec_reverse_once): Constify.
1325         * python/python.c (python_interactive_command, python_command):
1326         Constify.
1327         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1328         Constify.
1329         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1330         * gcore.c (gcore_command): Constify.
1331
1332 2017-11-07  Tom Tromey  <tom@tromey.com>
1333
1334         * printcmd.c (x_command): Call set_repeat_arguments.
1335         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1336         * top.c (repeat_arguments): New global.
1337         (set_repeat_arguments): New function.
1338         (execute_command): Handle repeat_arguments.
1339         (show_commands): Calls set_repeat_arguments.
1340         * command.h (set_repeat_arguments): Declare.
1341
1342 2017-11-07  Tom Tromey  <tom@tromey.com>
1343
1344         * stack.c (backtrace_command): Use std::string.
1345         (backtrace_command_1): Make "count_exp" const.
1346
1347 2017-11-07  Tom Tromey  <tom@tromey.com>
1348
1349         * source.c (directory_switch, mod_path, add_path): Constify.
1350         * defs.h (add_path, mod_path, directory_switch): Constify.
1351         * mi/mi-cmd-env.c (env_mod_path): Constify.
1352
1353 2017-11-07  Tom Tromey  <tom@tromey.com>
1354
1355         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1356         (run_command_1, continue_command, step_1, jump_command)
1357         (signal_command, until_command, advance_command, finish_command)
1358         (attach_command): Update.
1359
1360 2017-11-07  Tom Tromey  <tom@tromey.com>
1361
1362         * command.h (set_cmd_cfunc): Don't declare.
1363         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1364
1365 2017-11-07  Tom Tromey  <tom@tromey.com>
1366
1367         * stack.c (select_frame_command): Constify.
1368         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1369         * command.h (add_com_suppress_notification): Constify.
1370
1371 2017-11-07  Tom Tromey  <tom@tromey.com>
1372
1373         * breakpoint.c (stop_command): Constify.
1374         * cli/cli-decode.c (struct cmd_list_element): Constify.
1375         * command.h (add_abbrev_prefix_cmd): Constify.
1376
1377 2017-11-07  Pedro Alves  <palves@redhat.com>
1378
1379         * breakpoint.c (extract_bp_kind): New enum.
1380         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1381         factored out from ...
1382         (extract_bp_number_and_location): ... here.
1383         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1384
1385 2017-11-07  Pedro Alves  <palves@redhat.com>
1386
1387         * breakpoint.c (extract_bp_number_and_location): Change return
1388         type to void.  Throw error instead of warning.
1389         (enable_disable_command): Adjust.
1390
1391 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1392             Pedro Alves  <palves@redhat.com>
1393
1394         * breakpoint.c (map_breakpoint_number_range): New, factored out
1395         from ...
1396         (map_breakpoint_numbers): ... here.
1397         (find_location_by_number): Change parameters from string to
1398         breakpoint number and location.
1399         (extract_bp_number_and_location): New function.
1400         (enable_disable_bp_num_loc)
1401         (enable_disable_breakpoint_location_range)
1402         (enable_disable_command): New functions, factored out ...
1403         (enable_command, disable_command): ... these functions, and
1404         adjusted to support ranges.
1405         * NEWS: Document enable/disable breakpoint location range feature.
1406
1407 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1408
1409         * MAINTAINERS (Write After Approval): Update my e-mail address.
1410
1411 2017-11-06  Pedro Alves  <palves@redhat.com>
1412
1413         * gnu-nat.c (gnu_terminal_init): Delete.
1414         (gnu_target): Don't install gnu_terminal_init.
1415         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1416         (child_terminal_init): ... this function.
1417
1418 2017-11-06  Pedro Alves  <palves@redhat.com>
1419
1420         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1421         sgtty.h.
1422         * config.in, configure: Regenerate.
1423
1424 2017-11-06  Pedro Alves  <palves@redhat.com>
1425
1426         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1427         (async_init_signals): Adjust.
1428         (handle_stop_sig): Rename to ...
1429         (handle_sigtstp): ... this.
1430         (async_stop_sig): Rename to ...
1431         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1432         SIGTSTP path.
1433         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1434         instead of STOP_SIGNAL thoughout.
1435         (handle_stop_sig): Rename to ...
1436         (handle_sigtstp): ... this.
1437         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1438
1439 2017-11-06  Pedro Alves  <palves@redhat.com>
1440
1441         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1442         longer set flags twice in row.
1443
1444 2017-11-06  Pedro Alves  <palves@redhat.com>
1445
1446         * Makefile.in (SER_HARDWIRE): Update comment.
1447         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1448         * common/gdb_termios.h: Delete file.
1449         * common/job-control.c: Include termios.h and unistd.h instead of
1450         gdb_termios.h.
1451         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1452         check.
1453         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1454         Remove sgtty code.
1455         * configure.ac: No longer check for termio.h and sgtty.h.
1456         * configure: Regenerate.
1457         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1458         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1459         Replace PROCESS_GROUP_TYPE references with pid_t references
1460         throughout.
1461         (gdb_getpgrp): Delete.
1462         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1463         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1464         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1465         gdb_getpgrp.  Use serial_set_tty_state instead aof
1466         serial_noflush_set_tty_state.  Remove sgtty code.
1467         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1468         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1469         (inferior_process_group): Now returns pid_t.
1470         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1471         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1472         * ser-event.c (serial_event_ops): Update.
1473         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1474         (dos_ops): Update.
1475         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1476         * ser-pipe.c (pipe_ops): Update.
1477         * ser-tcp.c (tcp_ops): Update.
1478         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1479         HAVE_TERMIOS checks.
1480         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1481         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1482         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1483         assume termios.
1484         (hardwire_noflush_set_tty_state): Delete.
1485         (hardwire_print_tty_state, hardwire_drain_output)
1486         (hardwire_flush_output, hardwire_flush_input)
1487         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1488         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1489         code, and assume termios.
1490         (hardwire_ops): Update.
1491         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1492         * serial.c (serial_noflush_set_tty_state): Delete.
1493         * serial.h (serial_noflush_set_tty_state): Delete.
1494         (serial_ops::noflush_set_tty_state): Delete.
1495
1496 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1497
1498         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1499         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1500         (COMMON_OBS): Remove doublest.o and dfp.o.
1501         Do not build target-float.c (instead of doublest.c)
1502         with -Wformat-nonliteral.
1503
1504         * doublest.c: Remove file.
1505         * doublest.h: Remove file.
1506         * dfp.c: Remove file.
1507         * dfp.h: Remove file.
1508
1509         * target-float.c: Do not include "doublest.h" and "dfp.h".
1510         (DOUBLEST): Move here from doublest.h.
1511         (enum float_kind): Likewise.
1512         (FLOATFORMAT_CHAR_BIT): Likewise.
1513         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1514         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1515         (floatformat_precision): Likewise.
1516         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1517         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1518         Likewise.
1519         (host_float_format, host_double_format, host_long_double_format):
1520         Likewise.
1521         (floatformat_to_string, floatformat_from_string): Likewise.
1522         (floatformat_to_doublest): Likewise.  Also, inline the original
1523         convert_floatformat_to_doublest.
1524         (floatformat_from_doublest): Likewise.  Also, inline the original
1525         convert_floatformat_from_doublest.
1526
1527         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1528         (MAX_DECIMAL_STRING): Move here from dfp.c.
1529         (match_endianness): Likewise.
1530         (set_decnumber_context, decimal_check_errors): Likewise.
1531         (decimal_from_number, decimal_to_number): Likewise.
1532         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1533         (decimal_from_longest, decimal_from_ulongest): Likewise.
1534         (decimal_to_longest): Likewise.
1535         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1536         (decimal_convert): Likewise.
1537
1538 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1539
1540         * doublest.c: Do not include "gdbtypes.h".
1541         (extract_typed_floating): Remove.
1542         (store_typed_floating): Remove.
1543         (convert_typed_floating): Remove.
1544         * doublest.h (struct type): Remove.
1545         (DOUBLEST_PRINT_FORMAT): Remove.
1546         (DOUBLEST_SCAN_FORMAT): Remove.
1547         (extract_typed_floating): Remove.
1548         (store_typed_floating): Remove.
1549         (convert_typed_floating): Remove.
1550
1551         * dfp.c (decimal_from_doublest): Remove.
1552         (decimal_to_doublest): Remove.
1553         * dfp.h: Do not include "doublest.h".
1554         (decimal_from_doublest): Remove.
1555         (decimal_to_doublest): Remove.
1556
1557         * value.c: Do not include "doublest.h" and "dfp.h".
1558         (value_as_double): Remove.
1559         (unpack_double): Remove.
1560         (value_from_double): Remove.
1561         (value_from_decfloat): Remove.
1562         * value.h: Do not include "doublest.h".
1563         (value_as_double): Remove.
1564         (unpack_double): Remove.
1565         (value_from_double): Remove.
1566         (value_from_decfloat): Remove.
1567
1568 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1569
1570         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1571         (i386_extract_return_value): Use target_float_convert.
1572         (i386_store_return_value): Likewise.
1573         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1574         (i387_value_to_register): Likewise.
1575         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1576         (ia64_register_to_value): Use target_float_convert.
1577         (ia64_value_to_register): Likewise.
1578         (ia64_extract_return_value): Likewise.
1579         (ia64_store_return_value): Likewise.
1580         (ia64_push_dummy_call): Likewise.
1581         * m68k-tdep.c: Include "target-float.h".
1582         (m68k_register_to_value): Use target_float_convert.
1583         (m68k_value_to_register): Likewise.
1584         (m68k_svr4_extract_return_value): Likewise.
1585         (m68k_svr4_store_return_value): Likewise.
1586         * ppc-sysv-tdep.c: Include "target-float.h".
1587         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1588         (do_ppc_sysv_return_value): Likewise.
1589         (ppc64_sysv_abi_push_freg): Likewise.
1590         (ppc64_sysv_abi_return_value_base): Likewise.
1591         * rs6000-aix-tdep.c: Include "target-float.h".
1592         (rs6000_push_dummy_call): Use target_float_convert.
1593         (rs6000_return_value): Likewise.
1594         * rs6000-lynx178-tdep.c: Include "target-float.h".
1595         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1596         (rs6000_lynx178_return_value): Likewise.
1597         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1598         (rs6000_register_to_value): Use target_float_convert.
1599         (rs6000_value_to_register): Likewise.
1600         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1601         (arm_extract_return_value): Use target_float_convert.
1602         (arm_store_return_value): Likewise.
1603         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1604         (sh_register_convert_to_virtual): Use target_float_convert.
1605         (sh_register_convert_to_raw): Likewise.
1606         * sh64-tdep.c: Include "target-float.h".
1607         (sh64_extract_return_value): Use target_float_convert.
1608         (sh64_register_convert_to_virtual): Likewise.
1609         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1610
1611 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1612
1613         * target-float.c (floatformat_to_host_double): New function.
1614         (floatformat_from_host_double): Likewise.
1615         (target_float_to_host_double): Likewise.
1616         (target_float_from_host_double): Likewise.
1617         * target-float.h (target_float_to_host_double): Add prototype.
1618         (target_float_from_host_double): Likewise.
1619
1620         * guile/scm-value.c: Include "target-float.h".
1621         (gdbscm_value_to_real): Use target_float_to_host_double.
1622         Handle integer source values via value_as_long.
1623         * guile/scm-math.c: Include "target-float.h".  Do not include
1624         "doublest.h", "dfp.h", and "expression.h".
1625         (vlscm_convert_typed_number): Use target_float_from_host_double.
1626         (vlscm_convert_number): Likewise.
1627
1628         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1629         (convert_value_from_python): Use target_float_from_host_double.
1630
1631 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1632
1633         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1634         (cast_from_fixed): Likewise.
1635         (ada_scaling_type): New function.
1636         (ada_delta): Return value instead of DOUBLEST.  Perform target
1637         arithmetic instead of host arithmetic.
1638         (scaling_factor): Rename to ...
1639         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1640         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1641         (ada_fixed_to_float): Remove.
1642         (ada_float_to_fixed): Remove.
1643         * ada-lang.h (ada_fixed_to_float): Remove.
1644         (ada_float_to_fixed): Remove.
1645         (ada_delta): Return value instead of DOUBLEST.
1646         (ada_scaling_factor): Add prototype.
1647
1648         * ada-typeprint.c: Include "target-float.h".
1649         (print_fixed_point_type): Perform target arithmetic instead of
1650         host arithmetic.
1651         * ada-valprint.c: Include "target-float.h".
1652         (ada_val_print_num): Perform target arithmetic instead of
1653         host arithmetic for fixed-point types.
1654
1655 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1656
1657         * target-float.c: Include <math.h>.
1658         (floatformat_binop): New function.
1659         (floatformat_compare): Likewise.
1660         (target_float_binop): Likewise.
1661         (target_float_compare): Likewise.
1662         * target-float.h: Include "expression.h".
1663         (target_float_binop): Add prototype.
1664         (target_float_compare): Likewise.
1665
1666         * valarith.c: Do not include "doublest.h" and "dfp.h".
1667         Include "common/byte-vector.h".
1668         (value_args_as_decimal): Remove, replace by ...
1669         (value_args_as_target_float): ... this function.  Handle both
1670         binary and decimal target floating-point formats.
1671         (scalar_binop): Handle both binary and decimal FP using
1672         value_args_as_target_float and target_float_binop.
1673         (value_equal): Handle both binary and decimal FP using
1674         value_args_as_target_float and target_float_compare.
1675         (value_less): Likewise.
1676         (value_pos): Handle all scalar types as simple copy.
1677         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1678         * dfp.c (decimal_binop): Throw error instead of internal_error
1679         when called with an unsupported operation code.
1680
1681 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1682
1683         * target-float.c (target_float_to_string): New function.
1684         (target_float_from_string): New function.
1685         * target-float.h (target_float_to_string): Add prototype.
1686         (target_float_from_string): Add prototype.
1687
1688         * valprint.c: Include "target-float.h".  Do not include
1689         "doublest.h" and "dfp.h".
1690         (print_floating): Use target_float_to_string.
1691         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1692         (printf_floating): Use target_float_to_string.
1693         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1694         (print_i387_value): Use target_float_to_string.
1695         * mips-tdep.c: Include "target-float.h".
1696         (mips_print_fp_register): Use target_float_to_string.
1697         * sh64-tdep.c: Include "target-float.h".
1698         (sh64_do_fp_register): Use target_float_to_string.
1699
1700         * parse.c: Include "target-float.h".  Do not include
1701         "doublest.h" and "dfp.h".
1702         (parse_float): Use target_float_from_string.
1703         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1704         (define_symbol): Use target_float_from_string.
1705         * gdbarch-selftests.c: Include "target-float.h".
1706         (register_to_value_test): Use target_float_from_string.
1707
1708 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1709
1710         * Makefile.c (SFILES): Add target-float.c.
1711         (HFILES_NO_SRCDIR): Add target-float.h.
1712         (COMMON_OBS): Add target-float.o.
1713         * target-float.h: New file.
1714         * target-float.c: New file.
1715
1716         * doublest.c (floatformat_classify): Fix detection of float_zero.
1717
1718         * gdbtypes.c (is_floating_type): New function.
1719         * gdbtypes.h (is_floating_type): Add prototype.
1720
1721         * value.c: Do not include "floatformat.h".
1722         (unpack_double): Use target_float_is_valid.
1723         (is_floating_value): New function.
1724         * value.h (is_floating_value): Add prototype-
1725
1726         * valarith.c: Include "target-float.h".
1727         (value_logical_not): Use target_float_is_zero.
1728
1729         * python/py-value.c: Include "target-float.h".
1730         (valpy_nonzero): Use target_float_is_zero.
1731
1732 2017-11-04  Tom Tromey  <tom@tromey.com>
1733
1734         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1735
1736 2017-11-04  Tom Tromey  <tom@tromey.com>
1737
1738         * breakpoint.c (set_momentary_breakpoint): Return
1739         breakpoint_up.
1740         (until_break_command): Update.
1741         (new_until_break_fsm): Change argument types to
1742         breakpoint_up.
1743         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1744         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1745         Remove.
1746         * infcmd.c (finish_forward): Update.
1747         * breakpoint.h (set_momentary_breakpoint)
1748         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1749         (make_cleanup_delete_breakpoint): Remove.
1750         (struct breakpoint_deleter): New.
1751         (breakpoint_up): New typedef.
1752         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1753         (insert_exception_resume_breakpoint): Update.
1754         (insert_exception_resume_from_probe): Update.
1755         (insert_longjmp_resume_breakpoint): Update.
1756         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1757         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1758         * infcall.c (call_function_by_hand_dummy): Update
1759
1760 2017-11-04  Tom Tromey  <tom@tromey.com>
1761
1762         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1763
1764 2017-11-04  Tom Tromey  <tom@tromey.com>
1765
1766         * linux-tdep.c (linux_core_info_proc_mappings): Use
1767         gdb::def_vector.
1768         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1769         "size" argument.
1770         (linux_corefile_thread): Update.
1771         (linux_make_corefile_notes): Remove unused variable.
1772
1773 2017-11-04  Tom Tromey  <tom@tromey.com>
1774
1775         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1776         gdb::byte_vector.
1777
1778 2017-11-04  Tom Tromey  <tom@tromey.com>
1779
1780         * objfiles.c (do_free_objfile_cleanup): Remove.
1781         * compile/compile-object-load.c (compile_object_load): Update.
1782         * objfiles.h (make_cleanup_free_objfile): Remove.
1783
1784 2017-11-04  Tom Tromey  <tom@tromey.com>
1785
1786         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1787         (adi_read_versions): Change "tags" to "gdb_byte *".
1788         (adi_print_versions): Likewise.
1789
1790 2017-11-04  Tom Tromey  <tom@tromey.com>
1791
1792         * breakpoint.c
1793         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1794         from start_rbreak_breakpoints.
1795         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1796         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1797         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1798         * symtab.c (do_end_rbreak_breakpoints): Remove.
1799         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1800
1801 2017-11-04  Tom Tromey  <tom@tromey.com>
1802
1803         * cp-namespace.c (reset_directive_searched): Remove.
1804         (cp_lookup_symbol_via_imports): Use scoped_restore.
1805         * cp-support.c (reset_directive_searched): Remove.
1806         (make_symbol_overload_list_using): Use scoped_restore.
1807         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1808         (reset_directive_searched): Remove.
1809
1810 2017-11-04  Tom Tromey  <tom@tromey.com>
1811
1812         * symfile.c (find_separate_debug_file_by_debuglink): Use
1813         unique_xmalloc_ptr.
1814
1815 2017-11-04  Tom Tromey  <tom@tromey.com>
1816
1817         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1818         type of "info".
1819         (compute_stack_depth): Likewise.
1820         (do_compile_dwarf_expr_to_c): Use std::vector.
1821
1822 2017-11-04  Tom Tromey  <tom@tromey.com>
1823
1824         * compile/compile-object-load.c (link_callbacks_einfo): Use
1825         std::string.
1826
1827 2017-11-04  Tom Tromey  <tom@tromey.com>
1828
1829         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1830         Use scoped_free_pendings.
1831         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1832         scoped_free_pendings.
1833         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1834         (xcoff_initial_scan): Likewise.
1835         * buildsym.c (reset_symtab_globals): Update comment.
1836         (scoped_free_pendings): Rename from really_free_pendings.
1837         (prepare_for_building): Update comment.
1838         (buildsym_init): Likewise.
1839         * buildsym.h (class scoped_free_pendings): New class.
1840         (really_free_pendings): Don't declare.
1841
1842 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1843
1844         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1845         output when converting a zero value to a special byteorder format.
1846
1847 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1848
1849         * frame.c (do_frame_register_read): Remove aspace.
1850         * jit.c (jit_frame_sniffer): Likwise.
1851         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1852         * regcache.c (regcache::regcache): Pass nullptr.
1853         (regcache_print): Caller updated.
1854         * regcache.h (regcache::regcache): Remove one constructor
1855         parameter aspace.
1856
1857 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1858
1859         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1860
1861 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1862
1863         * breakpoint.c (insert_single_step_breakpoints): Update.
1864         * frame.c (struct frame_info) <aspace>: Add const.
1865         (frame_save_as_regcache): Add const.
1866         (get_frame_address_space): Return const address_space *.
1867         * frame.h (get_frame_address_space): Update declaration.
1868         * infrun.c (struct step_over_info) <aspace>: Add const.
1869         (set_step_over_info): Make aspace const.
1870         (displaced_step_prepare_throw): Change variable const.
1871         (resume): Likewise.
1872         (proceed): Likewise.
1873         (adjust_pc_after_break): Likewise.
1874         (save_waitstatus): Likewise.
1875         (handle_signal_stop): Likewise.
1876         (keep_going_pass_signal): Likewise.
1877         * jit.c (jit_frame_sniffer): Add const.
1878         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1879         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1880         * record-full.c (record_full_wait_1): Likewise.
1881         * regcache.c (regcache::regcache): Change parameter to const.
1882         * regcache.h (regcache::regcache): Likewise.
1883         (regcache::aspace): Return const address_space *.
1884         (regcache) <m_aspace>: Add const.
1885
1886 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1887
1888         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1889         * frame.c (create_sentinel_frame): Likewise.
1890         * infrun.c (displaced_step_prepare_throw): Likewise.
1891         (resume): Likewise.
1892         (thread_still_needs_step_over_bp): Likewise.
1893         (proceed): Likewise.
1894         (do_target_wait): Likewise.
1895         (adjust_pc_after_break): Likewise.
1896         (handle_syscall_event): Likewise.
1897         (save_waitstatus): Likewise.
1898         (handle_inferior_event_1): Likewise.
1899         (handle_signal_stop): Likewise.
1900         (keep_going_pass_signal): Likewise.
1901         * linux-nat.c (status_callback): Likewise.
1902         (save_stop_reason): Likewise.
1903         (resume_stopped_resumed_lwps): Likewise.
1904         * record-full.c (record_full_exec_insn): Likewise.
1905         (record_full_wait_1): Likewise.
1906         * regcache.c (get_regcache_aspace): Remove.
1907         * regcache.h (get_regcache_aspace): Remove.
1908
1909 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1910
1911         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1912         (init_regcache_descr): Use gdbarch_num_regs.
1913         (regcache::regcache): Likewise.
1914         (regcache::get_register_status): Likewise.
1915         (regcache::assert_raw_regnum): Likewise.
1916         (regcache::cooked_read): Likewise.
1917         (regcache::cooked_read_value): Likewise.
1918         (regcache::cooked_write): Likewise.
1919         (regcache::dump): Likewise.
1920         (regcache::num_raw_registers): New method.
1921         * regcache.h (class regcache) <num_raw_registers>: New.
1922
1923 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1924
1925         * regcache.c (regcache::assert_regnum): New method.
1926         (regcache::invalidate): Call assert_regnum.
1927         (regcache::raw_update): Likewise.
1928         (regcache::raw_write): Likewise.
1929         (regcache::raw_read_part): Likewise.
1930         (regcache::raw_write_part): Likewise.
1931         (regcache::raw_supply): Likewise.
1932         (regcache::raw_supply_integer): Likewise.
1933         (regcache::raw_supply_zeroed): Likewise.
1934         (regcache::raw_collect): Likewise.
1935         (regcache::raw_collect_integer): Likewise.
1936         * regcache.h (regcache::assert_regnum): Declare.
1937
1938 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1939
1940         * regcache.c (regcache::dump): Remove code.
1941
1942 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1943
1944         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1945         Remove.
1946         <sizeof_cooked_register_status>: Remove.
1947         (init_regcache_descr): Update.
1948         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1949         (regcache::save): Likewise.
1950         (regcache::dump): Likewise.
1951
1952 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1953
1954         * ft32-tdep.c (ft32_fetch_instruction): New function.
1955         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1956
1957 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1958
1959         * cli/cli-script.c (execute_control_command): Rename to ...
1960         (execute_control_command_1): ... this.
1961         (execute_control_command): New function.
1962
1963 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * tracepoint.c (tfind_command): Remove const_cast.
1966
1967 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1968
1969         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1970
1971 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1972
1973         * common/common-utils.h (in_inclusive_range): New function.
1974         * arm-tdep.c (arm_record_extension_space): Use
1975         in_inclusive_range.
1976         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1977         * cris-tdep.c (cris_spec_reg_applicable): Use
1978         in_inclusive_range.
1979
1980 2017-10-30  Pedro Alves  <palves@redhat.com>
1981             Simon Marchi <simon.marchi@ericsson.com>
1982
1983         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1984         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1985
1986 2017-10-30  Pedro Alves  <palves@redhat.com>
1987
1988         * common/common-utils.c (string_appendf, string_vappendf): New
1989         functions.
1990         * common/common-utils.h (string_appendf, string_vappendf): New
1991         declarations.
1992         * unittests/common-utils-selftests.c (string_appendf_func)
1993         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1994         (string_vappendf_tests): New functions.
1995         (_initialize_common_utils_selftests): Register "string_appendf" and
1996         "string_vappendf tests".
1997
1998 2017-10-30  Pedro Alves  <palves@redhat.com>
1999
2000         * unittests/common-utils-selftests.c (format_func): New typedef.
2001         (string_printf_tests, string_vprintf_tests): Tests factored out
2002         and merged to ...
2003         (test_format_func): ... this new function.
2004         (string_printf_tests, string_vprintf_tests): Reimplement on top of
2005         test_format_func.
2006
2007 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2008
2009         * darwin-nat.c: Remove include of gdb.h.
2010
2011 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * xtensa-xtregs.c: Fix formatting issues.
2014
2015 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2016
2017         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2018
2019 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
2020
2021         PR python/21213
2022         * python/py-infthread.c (thpy_get_inferior): Increment reference
2023         of inferior before returning it.
2024
2025 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2026
2027         * unittests/common-utils-selftests.c (format): Add
2028         ATTRIBUTE_PRINTF.
2029
2030 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2031
2032         * xml-syscall.c (struct syscall_desc): Add constructor.
2033         <name>: Change type to std::string.
2034         (syscall_desc_up): New typedef.
2035         (syscall_desc_p): Remove typeder.
2036         (DEF_VEC_P(syscall_desc_p)): Remove.
2037         (struct syscall_group_desc): Add constructor.
2038         <name>: Change type to std::string.
2039         <syscalls>: Change type to std::vector.
2040         (syscall_group_desc_up): New typedef.
2041         (syscall_group_desc_p): Remove typedef.
2042         (DEF_VEC_P(syscall_group_desc_p)): Remove.
2043         (struct syscalls_info) <syscalls>: Change type to std::vector of
2044         unique_ptr.
2045         <groups>: Likewise.
2046         <my_gdb_datadir>: Change type to std::string.
2047         (syscalls_info_up): New typedef.
2048         (allocate_syscalls_info): Remove.
2049         (syscalls_info_free_syscalls_desc): Remove.
2050         (syscalls_info_free_syscall_group_desc): Remove.
2051         (free_syscalls_info): Remove.
2052         (make_cleanup_free_syscalls_info): Remove.
2053         (syscall_group_create_syscall_group_desc): Adjust.
2054         (syscall_group_add_syscall): Adjust.
2055         (syscall_create_syscall_desc): Adjust.
2056         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2057         (init_syscalls_info): Adjust.
2058         (syscall_group_get_group_by_name): Adjust.
2059         (xml_get_syscall_number): Adjust.
2060         (xml_get_syscall_name): Adjust.
2061         (xml_list_of_syscalls): Adjust.
2062         (xml_list_syscalls_by_group): Adjust.
2063         (xml_list_of_groups): Adjust.
2064
2065 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2066
2067         * probe.h: Don't include gdb_vecs.h.
2068         (DEF_VEC_P (probe_p)): Remove.
2069         (find_probes_in_objfile): Return an std::vector.
2070         * probe.c (find_probes_in_objfile): Likewise.
2071         * breakpoint.c (breakpoint_objfile_data)
2072         <longjmp_probes>: Change type to std::vector.
2073         <exception_probes>: Likewise.
2074         (free_breakpoint_probes): Don't manually free vectors.
2075         (create_longjmp_master_breakpoint): Adjust.
2076         (create_exception_master_breakpoint): Adjust.
2077         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2078         parameter type, adjust.
2079         (svr4_create_solib_event_breakpoints): Adjust.
2080
2081 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2082
2083         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2084         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2085         with new.
2086         (free_breakpoint_probes): Rename to ...
2087         (free_breakpoint_objfile_data): ... this, and call delete on
2088         bp_objfile_data..
2089
2090 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2091
2092         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2093         (loaded_script_ptr): Remove typedef.
2094         (DEF_VEC_P (loaded_script_ptr)): Remove.
2095         (struct collect_matching_scripts_data): Add constructor.
2096         <scripts_p>: Change type to (pointer to) std::vector.
2097         (collect_matching_scripts_data): Adjust.
2098         (sort_scripts_by_name): Make suitable for std::sort.
2099         (print_scripts): Don't sort vector, adjust to std::vector.
2100         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2101
2102 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2103
2104         * symfile.c (filename_language): Make struct, not typedef.  Add
2105         constructor.
2106         <ext>: Change type to std::string.
2107         (DEF_VEC_O (filename_language)): Remove.
2108         (filename_language_table): Change type to std::vector.
2109         (add_filename_language): Adjust.
2110         (set_ext_lang_command): Adjust.
2111         (info_ext_lang_command): Adjust.
2112         (deduce_language_from_filename): Adjust.
2113         (class scoped_restore_filename_language_table): Remove.
2114         (test_filename_language): Use scoped_restore.
2115         (test_set_ext_lang_command): Use scoped_restore, adjust to
2116         std::vector change.
2117
2118 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2119
2120         * symfile.c: Include selftest.h.
2121         (class scoped_restore_filename_language_table): New.
2122         (test_filename_language): New test.
2123         (test_set_ext_lang_command): New test.
2124         (_initialize_symfile): Register tests.
2125
2126 2017-10-27  Keith Seitz  <keiths@redhat.com>
2127
2128         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2129         in the bp_location, falling back to find_pc_sect_function when
2130         needed.
2131         (add_location_to_breakpoint): Save sal->symbol.
2132         * breakpoint.h (struct bp_location) <symbol>: New field.
2133         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2134         * symtab.h (struct symtab_and_line) <symbol>: New field.
2135
2136 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2137
2138         PR gdb/13669
2139         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2140         to rewind obstack.
2141
2142 2017-10-26  Pedro Alves  <palves@redhat.com>
2143
2144         * remote.c (remote_async_terminal_ours_p): Delete.
2145         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2146         Remove references to 'remote_async_terminal_ours_p'.
2147
2148 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2149
2150         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2151
2152 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2153
2154         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2155         aspace const.
2156         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2157         Likewise.
2158         * breakpoint.c (bpstat_check_location): Remove cast.
2159         (breakpoint_hit_catch_fork): Make aspce const.
2160         (breakpoint_hit_catch_solib): Likewise.
2161         (breakpoint_hit_catch_exec): Likewise.
2162         (breakpoint_hit_ranged_breakpoint): Likewise.
2163         (breakpoint_hit_watchpoint): Likewise.
2164         (base_breakpoint_breakpoint_hit): Likewise.
2165         (bkpt_breakpoint_hit): Likewise.
2166         (dprintf_breakpoint_hit): Likewise.
2167         (tracepoint_breakpoint_hit): Likewise.
2168         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2169
2170 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2171
2172         * breakpoint.c (breakpoint_location_address_match): Change
2173         "struct address_space *" to "const address_space".
2174         (breakpoint_location_address_range_overlap): Likewise.
2175         (breakpoint_here_p): Likewise.
2176         (breakpoint_in_range_p): Likewise.
2177         (moribund_breakpoint_here_p): Likewise.
2178         (bp_location_inserted_here_p): Likewise.
2179         (software_breakpoint_inserted_here_p): Likewise.
2180         (hardware_breakpoint_inserted_here_p): Likewise.
2181         (hardware_watchpoint_inserted_in_range): Likewise.
2182         (bpstat_check_location): Likewise.
2183         (bpstat_stop_status): Likewise.
2184         (breakpoint_address_match): Likewise.
2185         (breakpoint_address_match_range): Likewise.
2186         (breakpoint_location_address_match): Likewise.
2187         (breakpoint_location_address_range_overlap): Likewise.
2188         (insert_single_step_breakpoint): Likewise.
2189         (breakpoint_has_location_inserted_here): Likewise.
2190         (single_step_breakpoint_inserted_here_p): Likewise.
2191         (pc_at_non_inline_function): Likewise.
2192         * breakpoint.h (bpstat_stop_status): Update declaration.
2193         (breakpoint_here_p): Likewise.
2194         (breakpoint_in_range_p): Likewise.
2195         (moribund_breakpoint_here_p): Likewise.
2196         (breakpoint_inserted_here_p): Likewise.
2197         (software_breakpoint_inserted_here_p): Likewise.
2198         (hardware_breakpoint_inserted_here_p): Likewise.
2199         (breakpoint_has_location_inserted_here): Likewise.
2200         (single_step_breakpoint_inserted_here_p): Likewise.
2201         (hardware_watchpoint_inserted_in_range): Likewise.
2202         (breakpoint_address_match): Likewise.
2203         (insert_single_step_breakpoint): Likewise.
2204         (pc_at_non_inline_function): Likewise.
2205         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2206         * record.c (record_check_stopped_by_breakpoint): Likewise.
2207         * record.h (record_check_stopped_by_breakpoint): Likewise.
2208         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2209
2210 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2211
2212         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2213         regcache->arch () instead get_regcache_arch.
2214         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2215         Likewise.
2216         (aarch64_fbsd_store_inferior_registers): Likewise.
2217         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2218         (store_gregs_to_thread): Likewise.
2219         (fetch_fpregs_from_thread): Likewise.
2220         (store_fpregs_to_thread): Likewise.
2221         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2222         (aarch64_store_return_value): Likewise.
2223         (aarch64_software_single_step): Likewise.
2224         * aix-thread.c (aix_thread_wait): Likewise.
2225         (supply_reg32): Likewise.
2226         (supply_sprs64): Likewise.
2227         (supply_sprs32): Likewise.
2228         (fill_gprs64): Likewise.
2229         (fill_gprs32): Likewise.
2230         (fill_sprs64): Likewise.
2231         (fill_sprs32): Likewise.
2232         (store_regs_user_thread): Likewise.
2233         (store_regs_kernel_thread): Likewise.
2234         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2235         (alphabsd_store_inferior_registers): Likewise.
2236         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2237         (alpha_store_return_value): Likewise.
2238         (alpha_deal_with_atomic_sequence): Likewise.
2239         (alpha_next_pc): Likewise.
2240         (alpha_software_single_step): Likewise.
2241         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2242         (amd64bsd_store_inferior_registers): Likewise.
2243         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2244         Likewise.
2245         (amd64_linux_store_inferior_registers): Likewise.
2246         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2247         (amd64_collect_native_gregset): Likewise.
2248         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2249         (amd64obsd_collect_uthread): Likewise.
2250         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2251         (amd64_collect_fpregset): Likewise.
2252         (amd64_supply_fxsave): Likewise.
2253         (amd64_supply_xsave): Likewise.
2254         (amd64_collect_fxsave): Likewise.
2255         (amd64_collect_xsave): Likewise.
2256         * arc-tdep.c (arc_write_pc): Likewise.
2257         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2258         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2259         (arm_fbsd_store_inferior_registers): Likewise.
2260         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2261         (store_vfp_regs): Likewise.
2262         (arm_linux_fetch_inferior_registers): Likewise.
2263         (arm_linux_store_inferior_registers): Likewise.
2264         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2265         (arm_linux_sigreturn_next_pc): Likewise.
2266         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2267         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2268         (fetch_register): Likewise.
2269         (store_register): Likewise.
2270         * arm-tdep.c (arm_is_thumb): Likewise.
2271         (displaced_in_arm_mode): Likewise.
2272         (bx_write_pc): Likewise.
2273         (arm_get_next_pcs_addr_bits_remove): Likewise.
2274         (arm_software_single_step): Likewise.
2275         (arm_extract_return_value): Likewise.
2276         (arm_store_return_value): Likewise.
2277         (arm_write_pc): Likewise.
2278         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2279         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2280         (bsd_uthread_store_registers): Likewise.
2281         * core-regset.c (fetch_core_registers): Likewise.
2282         * corelow.c (get_core_registers): Likewise.
2283         * cris-tdep.c (cris_store_return_value): Likewise.
2284         (cris_extract_return_value): Likewise.
2285         (find_step_target): Likewise.
2286         (find_step_target): Likewise.
2287         (cris_software_single_step): Likewise.
2288         * ctf.c (ctf_fetch_registers): Likewise.
2289         * darwin-nat.c (cancel_breakpoint): Likewise.
2290         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2291         * frv-tdep.c (frv_extract_return_value): Likewise.
2292         * ft32-tdep.c (ft32_store_return_value): Likewise.
2293         (ft32_extract_return_value): Likewise.
2294         * go32-nat.c (fetch_register): Likewise.
2295         (go32_fetch_registers): Likewise.
2296         (go32_store_registers): Likewise.
2297         (store_register): Likewise.
2298         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2299         (h8300_store_return_value): Likewise.
2300         * hppa-linux-nat.c (fetch_register): Likewise.
2301         (store_register): Likewise.
2302         (hppa_linux_fetch_inferior_registers): Likewise.
2303         (hppa_linux_store_inferior_registers): Likewise.
2304         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2305         (i386_darwin_store_inferior_registers): Likewise.
2306         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2307         (gnu_store_registers): Likewise.
2308         * i386-linux-nat.c (fetch_register): Likewise.
2309         (store_register): Likewise.
2310         (supply_gregset): Likewise.
2311         (fill_gregset): Likewise.
2312         (i386_linux_fetch_inferior_registers): Likewise.
2313         (i386_linux_store_inferior_registers): Likewise.
2314         (i386_linux_resume): Likewise.
2315         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2316         Likewise.
2317         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2318         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2319         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2320         (i386obsd_collect_uthread): Likewise.
2321         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2322         (i386_supply_gregset): Likewise.
2323         (i386_collect_gregset): Likewise.
2324         (i386_supply_fpregset): Likewise.
2325         (i386_collect_fpregset): Likewise.
2326         (i386_mpx_bd_base): Likewise.
2327         * i386-v4-nat.c (supply_fpregset): Likewise.
2328         (fill_fpregset): Likewise.
2329         * i387-tdep.c (i387_supply_fsave): Likewise.
2330         (i387_collect_fsave): Likewise.
2331         (i387_supply_fxsave): Likewise.
2332         (i387_collect_fxsave): Likewise.
2333         (i387_supply_xsave): Likewise.
2334         (i387_collect_xsave): Likewise.
2335         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2336         (ia64_linux_store_registers): Likewise.
2337         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2338         (ia64_extract_return_value): Likewise.
2339         (ia64_store_return_value): Likewise.
2340         (find_func_descr): Likewise.
2341         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2342         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2343         (inf_ptrace_store_registers): Likewise.
2344         * infrun.c (use_displaced_stepping): Likewise.
2345         (displaced_step_prepare_throw): Likewise.
2346         (resume): Likewise.
2347         (proceed): Likewise.
2348         (do_target_wait): Likewise.
2349         (adjust_pc_after_break): Likewise.
2350         (handle_inferior_event_1): Likewise.
2351         (handle_signal_stop): Likewise.
2352         (save_infcall_suspend_state): Likewise.
2353         (restore_infcall_suspend_state): Likewise.
2354         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2355         * jit.c (jit_frame_prev_register): Likewise.
2356         * linux-nat.c (save_stop_reason): Likewise.
2357         (linux_nat_wait_1): Likewise.
2358         (resume_stopped_resumed_lwps): Likewise.
2359         * linux-record.c (record_linux_sockaddr): Likewise.
2360         (record_linux_msghdr): Likewise.
2361         (record_linux_system_call): Likewise.
2362         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2363         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2364         (lm32_store_return_value): Likewise.
2365         * m32c-tdep.c (m32c_read_flg): Likewise.
2366         (m32c_pseudo_register_read): Likewise.
2367         (m32c_pseudo_register_write): Likewise.
2368         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2369         (m32r_linux_collect_gregset): Likewise.
2370         * m32r-tdep.c (m32r_store_return_value): Likewise.
2371         (m32r_extract_return_value): Likewise.
2372         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2373         (m68kbsd_collect_fpregset): Likewise.
2374         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2375         * m68k-linux-nat.c (fetch_register): Likewise.
2376         (old_fetch_inferior_registers): Likewise.
2377         (old_store_inferior_registers): Likewise.
2378         (store_regs): Likewise.
2379         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2380         (m68k_svr4_store_return_value): Likewise.
2381         * m88k-tdep.c (m88k_store_arguments): Likewise.
2382         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2383         (mi_cmd_data_write_register_values): Likewise.
2384         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2385         (mips_fbsd_store_inferior_registers): Likewise.
2386         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2387         (mips_fbsd_supply_gregs): Likewise.
2388         (mips_fbsd_collect_fpregs): Likewise.
2389         (mips_fbsd_collect_gregs): Likewise.
2390         (mips_fbsd_supply_fpregset): Likewise.
2391         (mips_fbsd_collect_fpregset): Likewise.
2392         (mips_fbsd_supply_gregset): Likewise.
2393         (mips_fbsd_collect_gregset): Likewise.
2394         * mips-linux-nat.c (supply_gregset): Likewise.
2395         (fill_gregset): Likewise.
2396         (supply_fpregset): Likewise.
2397         (fill_fpregset): Likewise.
2398         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2399         (mips_fill_gregset): Likewise.
2400         (mips_supply_fpregset): Likewise.
2401         (mips_fill_fpregset): Likewise.
2402         (mips64_supply_gregset): Likewise.
2403         (micromips_linux_sigframe_validate): Likewise.
2404         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2405         (mipsnbsd_fetch_inferior_registers): Likewise.
2406         (mipsnbsd_store_inferior_registers): Likewise.
2407         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2408         (mipsnbsd_supply_gregset): Likewise.
2409         (mipsnbsd_iterate_over_regset_sections): Likewise.
2410         (mipsnbsd_supply_reg): Likewise.
2411         (mipsnbsd_supply_fpreg): Likewise.
2412         * mips-tdep.c (mips_in_frame_stub): Likewise.
2413         (mips_dummy_id): Likewise.
2414         (is_octeon_bbit_op): Likewise.
2415         (micromips_bc1_pc): Likewise.
2416         (extended_mips16_next_pc): Likewise.
2417         (mips16_next_pc): Likewise.
2418         (deal_with_atomic_sequence): Likewise.
2419         * moxie-tdep.c (moxie_process_readu): Likewise.
2420         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2421         * nto-procfs.c (procfs_store_registers): Likewise.
2422         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2423         (ppcfbsd_store_inferior_registers): Likewise.
2424         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2425         (fetch_altivec_register): Likewise.
2426         (get_spe_registers): Likewise.
2427         (fetch_spe_register): Likewise.
2428         (fetch_altivec_registers): Likewise.
2429         (fetch_all_gp_regs): Likewise.
2430         (fetch_all_fp_regs): Likewise.
2431         (store_vsx_register): Likewise.
2432         (store_altivec_register): Likewise.
2433         (set_spe_registers): Likewise.
2434         (store_spe_register): Likewise.
2435         (store_altivec_registers): Likewise.
2436         (store_all_gp_regs): Likewise.
2437         (store_all_fp_regs): Likewise.
2438         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2439         (ppc_linux_collect_gregset): Likewise.
2440         (ppc_canonicalize_syscall): Likewise.
2441         (ppc_linux_record_signal): Likewise.
2442         (ppu2spu_prev_register): Likewise.
2443         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2444         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2445         (ppcobsd_store_registers): Likewise.
2446         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2447         Likewise.
2448         (ppc_ravenscar_generic_store_registers): Likewise.
2449         * procfs.c (procfs_fetch_registers): Likewise.
2450         (procfs_store_registers): Likewise.
2451         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2452         (ravenscar_store_registers): Likewise.
2453         (ravenscar_prepare_to_store): Likewise.
2454         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2455         * record-full.c (record_full_wait_1): Likewise.
2456         (record_full_registers_change): Likewise.
2457         (record_full_store_registers): Likewise.
2458         (record_full_core_fetch_registers): Likewise.
2459         (record_full_save): Likewise.
2460         (record_full_goto_insn): Likewise.
2461         * regcache.c (regcache_register_size): Likewise.
2462         (get_regcache_arch): Remove.
2463         (regcache_read_pc): Likewise.
2464         * regcache.h (get_regcache_arch): Remove.
2465         * remote-sim.c (gdbsim_fetch_register): Likewise.
2466         (gdbsim_store_register): Likewise.
2467         * remote.c (fetch_register_using_p): Likewise.
2468         (send_g_packet): Likewise.
2469         (remote_prepare_to_store): Likewise.
2470         (store_registers_using_G): Likewise.
2471         * reverse.c (save_bookmark_command): Likewise.
2472         (goto_bookmark_command): Likewise.
2473         * rs6000-aix-tdep.c (branch_dest): Likewise.
2474         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2475         (fetch_register): Likewise.
2476         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2477         (ppc_collect_reg): Likewise.
2478         (ppc_collect_gregset): Likewise.
2479         (ppc_collect_fpregset): Likewise.
2480         (ppc_collect_vsxregset): Likewise.
2481         (ppc_collect_vrregset): Likewise.
2482         (ppc_displaced_step_hw_singlestep): Likewise.
2483         (rs6000_pseudo_register_read): Likewise.
2484         (rs6000_pseudo_register_write): Likewise.
2485         * s390-linux-nat.c (supply_gregset): Likewise.
2486         (fill_gregset): Likewise.
2487         (s390_linux_fetch_inferior_registers): Likewise.
2488         * s390-linux-tdep.c (s390_write_pc): Likewise.
2489         (s390_software_single_step): Likewise.
2490         (s390_all_but_pc_registers_record): Likewise.
2491         (s390_linux_syscall_record): Likewise.
2492         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2493         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2494         (shnbsd_store_inferior_registers): Likewise.
2495         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2496         (sh_extract_return_value_fpu): Likewise.
2497         (sh_store_return_value_nofpu): Likewise.
2498         (sh_corefile_supply_regset): Likewise.
2499         (sh_corefile_collect_regset): Likewise.
2500         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2501         (sh64_store_return_value): Likewise.
2502         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2503         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2504         (sparc_store_inferior_registers): Likewise.
2505         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2506         (sparc_ravenscar_prepare_to_store): Likewise.
2507         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2508         (sparc_analyze_control_transfer): Likewise.
2509         (sparc_step_trap): Likewise.
2510         (sparc_software_single_step): Likewise.
2511         (sparc32_gdbarch_init): Likewise.
2512         (sparc_supply_rwindow): Likewise.
2513         (sparc_collect_rwindow): Likewise.
2514         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2515         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2516         (sparc64nbsd_collect_gregset): Likewise.
2517         (sparc64nbsd_supply_fpregset): Likewise.
2518         (sparc64nbsd_collect_fpregset): Likewise.
2519         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2520         (sparc64_supply_gregset): Likewise.
2521         (sparc64_collect_gregset): Likewise.
2522         (sparc64_supply_fpregset): Likewise.
2523         (sparc64_collect_fpregset): Likewise.
2524         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2525         * spu-tdep.c (spu_unwind_sp): Likewise.
2526         (spu2ppu_prev_register): Likewise.
2527         (spu_memory_remove_breakpoint): Likewise.
2528         * stack.c (return_command): Likewise.
2529         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2530         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2531         * tracefile.c (trace_save_ctf): Likewise.
2532         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2533         (do_windows_store_inferior_registers): Likewise.
2534         (windows_resume): Likewise.
2535         * xtensa-linux-nat.c (fill_gregset): Likewise.
2536         (supply_gregset_reg): Likewise.
2537         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2538         (xtensa_register_read_masked): Likewise.
2539         (xtensa_supply_gregset): Likewise.
2540         (xtensa_extract_return_value): Likewise.
2541         (xtensa_store_return_value): Likewise.
2542
2543 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2544
2545         * doublest.c (floatformat_from_string): New function.
2546         * doublest.h (floatformat_from_string): Add prototype.
2547
2548         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2549         (OP_FLOAT): ... this.
2550         * expression.h: Do not include "doublest.h".
2551         (union exp_element): Replace doubleconst and decfloatconst by
2552         new element floatconst.
2553         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2554         (ada_evaluate_subexp): Likewise.
2555         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2556         OP_DOUBLE and OP_DECFLOAT.
2557         * expprint.c (print_subexp_standard): Likewise.
2558         (dump_subexp_body_standard): Likewise.
2559         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2560
2561         * parse.c: Include "dfp.h".
2562         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2563         (write_exp_elt_floatcst): New function.
2564         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2565         and OP_DECFLOAT.
2566         (operator_check_standard): Likewise.
2567         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2568         Return target format buffer instead of host DOUBLEST.
2569         Use floatformat_from_string and decimal_from_string to parse
2570         either binary or decimal floating-point types.
2571         (parse_c_float): Remove.
2572         * parser-defs.h: Do not include "doublest.h".
2573         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2574         (write_exp_elt_floatcst): Add prototype.
2575         (parse_float): Update prototype.
2576         (parse_c_float): Remove.
2577
2578         * c-exp.y: Do not include "dfp.h".
2579         (typed_val_float): Use byte buffer instead of DOUBLEST.
2580         (typed_val_decfloat): Remove.
2581         (DECFLOAT): Remove.
2582         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2583         (parse_number): Update to new parse_float interface.
2584         Parse suffixes and determine type before calling parse_float.
2585         Handle decimal and binary FP types the same way.
2586
2587         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2588         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2589         (parse_number): Update to new parse_float interface.
2590         Parse suffixes and determine type before calling parse_float.
2591
2592         * f-exp.y: Replace dval by typed_val_float.
2593         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2594         (parse_number): Use parse_float instead of atof.
2595
2596         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2597         (parse_go_float): Remove.
2598         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2599         (parse_number): Call parse_float instead of parse_go_float.
2600         Parse suffixes and determine type before calling parse_float.
2601
2602         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2603         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2604         (parse_number): Update to new parse_float interface.
2605         Parse suffixes and determine type before calling parse_float.
2606
2607         * m2-exp.y: Replace dval by byte buffer val.
2608         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2609         (parse_number): Call parse_float instead of atof.
2610
2611         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2612         (lex_number): Call parse_float instead of strtod.
2613         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2614         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2615         Use write_exp_elt_floatcst.
2616         (unit_testing): Remove static variable.
2617         (rust_type): Do not check unit_testing.
2618         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2619
2620         * ada-exp.y (type_float, type_double): Remove.
2621         (typed_val_float): Use byte buffer instead of DOUBLEST.
2622         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2623         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2624
2625 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2626
2627         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2628         * arch/aarch64.h: New file.
2629
2630 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2631
2632         * dfp.h (decimal_from_string): Use const reference for argument.
2633         * dfp.c (decimal_from_string): Likewise.
2634
2635 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2636
2637         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2638         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2639         * mips-tdep.c (mips_print_fp_register): Likewise.
2640
2641 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2642
2643         * common/format.h (enum argclass): Replace decfloat_arg by
2644         dec32float_arg, dec64float_arg, and dec128float_arg.
2645         * common/format.c (parse_format_string): Update to return
2646         new decimal float argument classes.
2647
2648         * printcmd.c (printf_decfloat): Rename to ...
2649         (printf_floating): ... this.  Add argclass argument, and use it
2650         instead of parsing the format string again.  Add support for
2651         binary floating-point values, using floatformat_to_string.
2652         Convert value to the target format if it doesn't already match.
2653         (ui_printf): Call printf_floating instead of printf_decfloat,
2654         also for double_arg / long_double_arg.  Pass argclass.
2655
2656         * dfp.c (decimal_to_string): Add format string argument.
2657         * dfp.h (decimal_to_string): Likewise.
2658
2659         * doublest.c (floatformat_to_string): Add format string argument.
2660         * doublest.h (floatformat_to_string): Likewise.
2661
2662 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2663
2664         * doublest.c (floatformat_precision): New routine.
2665         (floatformat_to_string): Likewise.
2666         * doublest.c (floatformat_to_string): Add prototype.
2667
2668         * printcmd.c (print_scalar_formatted): Only call print_floating
2669         on floating-point types.
2670         * valprint.c: Do not include "floatformat.h".
2671         (generic_val_print_decfloat): Remove.
2672         (generic_val_print): Call generic_val_print_float for both
2673         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2674         (print_floating): Use floatformat_to_string.  Handle decimal float.
2675         (print_decimal_floating): Remove, merge into floatformat_to_string.
2676         * value.h (print_decimal_floating): Remove.
2677
2678         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2679
2680 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2681
2682         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2683
2684 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2685
2686         * memattr.h: Don't include vec.h.
2687         (struct mem_attrib): Initialize fields.
2688         <unknown>: New static method.
2689         (struct mem_region): Add constructors, operator<, initialize
2690         fields.
2691         * memattr.c: Include algorithm.
2692         (default_mem_attrib, unknown_mem_attrib): Remove.
2693         (user_mem_region_list): New global.
2694         (target_mem_region_list, mem_region_list): Change type to
2695         std::vector<mem_region>.
2696         (mem_use_target): Now a function.
2697         (target_mem_regions_valid): Change type to bool.
2698         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2699         (require_user_regions): Adjust.
2700         (require_target_regions): Adjust.
2701         (create_mem_region): Adjust.
2702         (lookup_mem_region): Adjust.
2703         (invalidate_target_mem_regions): Adjust.
2704         (mem_clear): Rename to...
2705         (user_mem_clear): ... this, and adjust.
2706         (mem_command): Adjust.
2707         (info_mem_command): Adjust.
2708         (mem_enable, enable_mem_command, mem_disable,
2709         disable_mem_command): Adjust.
2710         (mem_delete): Adjust.
2711         (delete_mem_command): Adjust.
2712         * memory-map.h (parse_memory_map): Return an std::vector.
2713         * memory-map.c (parse_memory_map): Likewise.
2714         (struct memory_map_parsing_data): Add constructor.
2715         <memory_map>: Point to std::vector.
2716         (memory_map_start_memory): Adjust.
2717         (memory_map_end_memory): Adjust.
2718         (memory_map_end_property): Adjust.
2719         (clear_result): Remove.
2720         * remote.c (remote_memory_map): Return an std::vector.
2721         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2722         Remove.
2723         (target_debug_print_mem_region_vector): New.
2724         * target-delegates.c: Regenerate.
2725         * target.h (mem_region_vector): New typedef.
2726         (to_memory_map): Return mem_region_vector.
2727         (target_memory_map): Return an std::vector.
2728         * target.c (target_memory_map): Return an std::vector.
2729         (flash_erase_command): Adjust.
2730
2731 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2732
2733         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2734         Change type to std::string.
2735         (memory_map_start_property): Adjust.
2736         (memory_map_end_property): Adjust.
2737
2738 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2739
2740         * infrun.h: Include common/byte-vector.h.
2741         (struct displaced_step_closure): New struct.
2742         (struct buf_displaced_step_closure): New struct.
2743         * infrun.c (displaced_step_closure::~displaced_step_closure):
2744         Provide default implementation.
2745         (displaced_step_clear): Deallocate step closure with delete.
2746         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2747         (aarch64_displaced_step_closure): ... this, extend
2748         displaced_step_closure.
2749         (aarch64_displaced_step_data) <dsc>: Change type to
2750         aarch64_displaced_step_closure.
2751         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2752         unique_ptr.
2753         (aarch64_displaced_step_fixup): Add cast for displaced step
2754         closure.
2755         * amd64-tdep.c (displaced_step_closure): Rename to ...
2756         (amd64_displaced_step_closure): ... this, extend
2757         displaced_step_closure.
2758         <insn_buf>: Change type to std::vector<gdb_byte>.
2759         <max_len>: Remove.
2760         (fixup_riprel): Change type of DSC parameter, adjust to type
2761         change of insn_buf.
2762         (fixup_displaced_copy): Change type of DSC parameter.
2763         (amd64_displaced_step_copy_insn): Instantiate
2764         amd64_displaced_step_closure.
2765         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2766         to type change of insn_buf.
2767         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2768         parameter DSC.
2769         (arm_linux_copy_svc): Likewise.
2770         (cleanup_kernel_helper_return): Likewise.
2771         (arm_catch_kernel_helper_return): Likewise.
2772         (arm_linux_displaced_step_copy_insn): Instantiate
2773         arm_displaced_step_closure.
2774         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2775         (displaced_read_reg): Change type of parameter DSC.
2776         (branch_write_pc): Likewise.
2777         (load_write_pc): Likewise.
2778         (alu_write_pc): Likewise.
2779         (displaced_write_reg): Likewise.
2780         (arm_copy_unmodified): Likewise.
2781         (thumb_copy_unmodified_32bit): Likewise.
2782         (thumb_copy_unmodified_16bit): Likewise.
2783         (cleanup_preload): Likewise.
2784         (install_preload): Likewise.
2785         (arm_copy_preload): Likewise.
2786         (thumb2_copy_preload): Likewise.
2787         (install_preload_reg): Likewise.
2788         (arm_copy_preload_reg): Likewise.
2789         (cleanup_copro_load_store): Likewise.
2790         (install_copro_load_store): Likewise.
2791         (arm_copy_copro_load_store) Likewise.
2792         (thumb2_copy_copro_load_store): Likewise.
2793         (cleanup_branch): Likewise.
2794         (install_b_bl_blx): Likewise.
2795         (arm_copy_b_bl_blx): Likewise.
2796         (thumb2_copy_b_bl_blx): Likewise.
2797         (thumb_copy_b): Likewise.
2798         (install_bx_blx_reg): Likewise.
2799         (arm_copy_bx_blx_reg): Likewise.
2800         (thumb_copy_bx_blx_reg): Likewise.
2801         (cleanup_alu_imm): Likewise.
2802         (arm_copy_alu_imm): Likewise.
2803         (thumb2_copy_alu_imm): Likewise.
2804         (cleanup_alu_reg): Likewise.
2805         (install_alu_reg): Likewise.
2806         (arm_copy_alu_reg): Likewise.
2807         (thumb_copy_alu_reg): Likewise.
2808         (cleanup_alu_shifted_reg): Likewise.
2809         (install_alu_shifted_reg): Likewise.
2810         (arm_copy_alu_shifted_reg): Likewise.
2811         (cleanup_load): Likewise.
2812         (cleanup_store): Likewise.
2813         (arm_copy_extra_ld_st): Likewise.
2814         (install_load_store): Likewise.
2815         (thumb2_copy_load_literal): Likewise.
2816         (thumb2_copy_load_reg_imm): Likewise.
2817         (arm_copy_ldr_str_ldrb_strb): Likewise.
2818         (cleanup_block_load_all): Likewise.
2819         (cleanup_block_store_pc): Likewise.
2820         (cleanup_block_load_pc): Likewise.
2821         (arm_copy_block_xfer): Likewise.
2822         (thumb2_copy_block_xfer): Likewise.
2823         (cleanup_svc): Likewise.
2824         (install_svc): Likewise.
2825         (arm_copy_svc): Likewise.
2826         (thumb_copy_svc): Likewise.
2827         (arm_copy_undef): Likewise.
2828         (thumb_32bit_copy_undef): Likewise.
2829         (arm_copy_unpred): Likewise.
2830         (arm_decode_misc_memhint_neon): Likewise.
2831         (arm_decode_unconditional): Likewise.
2832         (arm_decode_miscellaneous): Likewise.
2833         (arm_decode_dp_misc): Likewise.
2834         (arm_decode_ld_st_word_ubyte): Likewise.
2835         (arm_decode_media): Likewise.
2836         (arm_decode_b_bl_ldmstm): Likewise.
2837         (arm_decode_ext_reg_ld_st): Likewise.
2838         (thumb2_decode_dp_shift_reg): Likewise.
2839         (thumb2_decode_ext_reg_ld_st): Likewise.
2840         (arm_decode_svc_copro): Likewise.
2841         (thumb2_decode_svc_copro): Likewise.
2842         (install_pc_relative): Likewise.
2843         (thumb_copy_pc_relative_16bit): Likewise.
2844         (thumb_decode_pc_relative_16bit): Likewise.
2845         (thumb_copy_pc_relative_32bit): Likewise.
2846         (thumb_copy_16bit_ldr_literal): Likewise.
2847         (thumb_copy_cbnz_cbz): Likewise.
2848         (thumb2_copy_table_branch): Likewise.
2849         (cleanup_pop_pc_16bit_all): Likewise.
2850         (thumb_copy_pop_pc_16bit): Likewise.
2851         (thumb_process_displaced_16bit_insn): Likewise.
2852         (decode_thumb_32bit_ld_mem_hints): Likewise.
2853         (thumb_process_displaced_32bit_insn): Likewise.
2854         (thumb_process_displaced_insn): Likewise.
2855         (arm_process_displaced_insn): Likewise.
2856         (arm_displaced_init_closure): Likewise.
2857         (arm_displaced_step_fixup): Add cast for closure.
2858         * arm-tdep.h: Include infrun.h.
2859         (displaced_step_closure): Rename to ...
2860         (arm_displaced_step_closure): ... this, extend
2861         displaced_step_closure.
2862         <u::svc::copy_svc_os>: Change type of parameter DSC.
2863         <cleanup>: Likewise.
2864         (arm_process_displaced_insn): Likewise.
2865         (arm_displaced_init_closure): Likewise.
2866         (displaced_read_reg): Likewise.
2867         (displaced_write_reg): Likewise.
2868         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2869         Adjust.
2870         * i386-tdep.h: Include infrun.h.
2871         (i386_displaced_step_closure): New typedef.
2872         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2873         i386_displaced_step_closure.
2874         (i386_displaced_step_fixup): Adjust.
2875         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2876         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2877         and unique_ptr.
2878         (ppc_displaced_step_fixup): Adjust.
2879         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2880         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2881         and unique_ptr.
2882         (s390_displaced_step_fixup): Adjust.
2883
2884 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2885
2886         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2887         Remove declarations.
2888
2889 2017-10-20  Tom Tromey  <tom@tromey.com>
2890
2891         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2892         std::vector.
2893         (gdb_bfd_record_inclusion): Update.
2894         (bfdp): Remove typedef.
2895
2896 2017-10-20  Tom Tromey  <tom@tromey.com>
2897
2898         * gdb_bfd.c (gdb_bfd_ref): Use new.
2899         (struct gdb_bfd_data): Add constructor, destructor, and member
2900         initializers.
2901         (gdb_bfd_unref): Use delete.
2902
2903 2017-10-20  Tom Tromey  <tom@tromey.com>
2904
2905         * exec.c (exec_file_attach): Use new_bfd_ref.
2906         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2907         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2908         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2909         new_bfd_ref.
2910         * gdb_bfd.h (new_bfd_ref): New function.
2911
2912 2017-10-20  Pedro Alves  <palves@redhat.com>
2913
2914         * main.c (captured_command_loop): Add attribute noinline.
2915
2916 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2917
2918         * interps.c (struct interp_factory): Add constructor.
2919         (interp_factory_p): Remove typedef.
2920         (DEF_VEC_P(interp_factory_p)): Remove.
2921         (interpreter_factories): Change type to std::vector.
2922         (interp_factory_register): Adjust.
2923         (interp_lookup): Adjust.
2924         (interpreter_completer): Adjust.
2925
2926 2017-10-19  Tom Tromey  <tom@tromey.com>
2927
2928         * break-catch-syscall.c (catch_syscall_completer): Use
2929         std::string, gdb::unique_xmalloc_ptr.
2930
2931 2017-10-19  Tom Tromey  <tom@tromey.com>
2932
2933         * infcall.c (call_function_by_hand_dummy): Use std::string.
2934
2935 2017-10-19  Tom Tromey  <tom@tromey.com>
2936
2937         * mi/mi-main.c (mi_cmd_execute): Update.
2938         * top.h (prepare_execute_command): Return scoped_value_mark.
2939         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2940         Add move constructor.
2941         * top.c (prepare_execute_command): Return scoped_value_mark.
2942         (execute_command): Update.
2943
2944 2017-10-19  Pedro Alves  <palves@redhat.com>
2945
2946         * xml-support.c (xml_fetch_content_from_file): Check fread's
2947         return.
2948
2949 2017-10-19  Pedro Alves  <palves@redhat.com>
2950
2951         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2952         async.
2953         (handle_error_fd): New function.
2954         (ser_base_async): Add/delete an event loop file handler for
2955         error_fd.
2956
2957 2017-10-19  Pedro Alves  <palves@redhat.com>
2958
2959         * xml-support.c (xml_fetch_content_from_file): Don't read in
2960         chunks.  Instead use fseek to determine the file's size, and read
2961         it in one go.
2962
2963 2017-11-18  Keith Seitz  <keiths@redhat.com>
2964
2965         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2966         types.
2967         Add whitespace to front of type name.
2968
2969 2017-10-18  Keith Seitz  <keiths@redhat.com>
2970
2971         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2972         DW_AT_accessibility.
2973
2974 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2975
2976         * features/tic6x-c62x-linux.c: Remove.
2977
2978 2017-10-17  Tom Tromey  <tom@tromey.com>
2979
2980         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2981         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2982         (do_mixed_source_and_assembly): Likewise.
2983
2984 2017-10-17  Tom Tromey  <tom@tromey.com>
2985
2986         * regcache.c (regcache::xfer_part): Remove assertion.
2987
2988 2017-10-17  Pedro Alves  <palves@redhat.com>
2989
2990         * xml-support.c (xml_fetch_content_from_file): Call
2991         unique_ptr::release() instead unique_ptr::get() when passing
2992         through xrealloc.
2993
2994 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2995
2996         * regcache.c (regcache::xfer_part): Remove parameters read and
2997         write, add parameter is_raw.  All callers are updated.
2998
2999 2017-10-16  Keith Seitz  <keiths@redhat.com>
3000
3001         * c-typeprint.c (enum access_specifier): Moved here from
3002         c_type_print_base.
3003         (output_access_specifier): New function.
3004         (c_type_print_base): Consider typedefs when assessing
3005         whether access labels are needed.
3006         Use output_access_specifier as needed.
3007         Output access specifier for typedefs, if needed.
3008         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3009         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3010         fields.
3011         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3012         accessor macros.
3013
3014 2017-10-16  Tom Tromey  <tom@tromey.com>
3015
3016         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3017         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3018         * target.c (target_fileio_read_stralloc): Update.
3019         * sparc64-tdep.c (adi_is_addr_mapped): Update.
3020         * target.h (target_fileio_read_stralloc): Return
3021         unique_xmalloc_ptr.
3022
3023 2017-10-16  Tom Tromey  <tom@tromey.com>
3024
3025         * xml-syscall.c (xml_init_syscalls_info): Update.
3026         * xml-support.c (xinclude_start_include): Update.
3027         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3028         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3029         (xml_fetch_content_from_file): Likewise.
3030         * osdata.c (get_osdata): Update.
3031         * target.h (target_read_stralloc, target_get_osdata): Return
3032         unique_xmalloc_ptr.
3033         * solib-aix.c (solib_aix_get_library_list): Update.
3034         * solib-target.c (solib_target_current_sos): Update.
3035         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3036         * xml-tdesc.c (fetch_available_features_from_target): Update.
3037         (target_fetch_description_xml): Update.
3038         (file_read_description_xml): Update.
3039         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3040         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3041         (remote_pid_to_exec_file): Update.
3042         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3043         (target_get_osdata): Likewise.
3044
3045 2017-10-16  Tom Tromey  <tom@tromey.com>
3046
3047         * remote.c (remote_register_number_and_offset): Use std::vector.
3048         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3049         (putpkt_binary): Use gdb::def_vector.
3050         (compare_sections_command): Use gdb::byte_vector.
3051
3052 2017-10-16  Tom Tromey  <tom@tromey.com>
3053
3054         * ppc-linux-nat.c (hwdebug_insert_point): Use
3055         gdb::unique_xmalloc_ptr, XDUP.
3056
3057 2017-10-16  Tom Tromey  <tom@tromey.com>
3058
3059         * probe.c (parse_probes): Use std::string.
3060         (info_probes_for_ops, enable_probes_command)
3061         (disable_probes_command): Remove cleanups.
3062
3063 2017-10-16  Tom Tromey  <tom@tromey.com>
3064
3065         * buildsym.c (block_compar): Remove.
3066         (end_symtab_get_static_block): Use std::vector.
3067
3068 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3069
3070         * memrange.h (struct mem_range): Define operator< and operator==.
3071         (mem_range_s): Remove.
3072         (DEF_VEC_O (mem_range_s)): Remove.
3073         (normalize_mem_ranges): Change parameter type to std::vector.
3074         * memrange.c (compare_mem_ranges): Remove.
3075         (normalize_mem_ranges): Change parameter type to std::vector,
3076         adjust to vector change.
3077         * exec.c (section_table_available_memory): Return vector, remove
3078         parameter.
3079         (section_table_read_available_memory): Adjust to std::vector
3080         change.
3081         * remote.c (remote_read_bytes): Adjust to std::vector
3082         change.
3083         * tracepoint.h (traceframe_available_memory): Change parameter
3084         type to std::vector.
3085         * tracepoint.c (traceframe_available_memory): Change parameter
3086         type to std::vector, adjust.
3087         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3088         std::vector change.
3089         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3090         unittests/memrange-selftests.c.
3091         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3092         * gdb/unittests/memrange-selftests.c: New file.
3093
3094 2017-10-16  Pedro Alves  <palves@redhat.com>
3095
3096         * elfread.c (probe_key_free): Rename range-for variable.
3097         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3098         (find_probe_by_pc, collect_probes): Rename range-for variable.
3099
3100 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3101
3102         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3103         * features/tic6x-c62x.c: Remove.
3104         * features/tic6x-c64x-linux.c: Remove.
3105         * features/tic6x-c64x.c: Remove.
3106         * features/tic6x-c64xp-linux.c: Remove.
3107         * features/tic6x-c64xp.c: Remove.
3108         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3109         initialize_tdesc_tic6x_*_linux functions.
3110         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3111         initialize_tdesc_tic6x_* functions.
3112
3113 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3114
3115         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3116         tic6x-c62x.
3117         * regformats/tic6x-c62x.dat: Remove.
3118         * regformats/tic6x-c64x.dat: Remove.
3119         * regformats/tic6x-c64xp.dat: Remove.
3120
3121 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3122
3123         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3124         (the !HAVE_LIBEXPAT version).
3125
3126 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3127
3128         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3129         const.
3130
3131 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3132
3133         * target.h: Include tracepoint.h.
3134         (enum trace_find_type): Move to tracepoint.h.
3135         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3136         * tracepoint.h: Don't include target.h
3137         (enum trace_find_type): Move from target.h.
3138         (parse_traceframe_info): Return a unique ptr.
3139         * tracepoint.c (current_traceframe_info): Change type to unique
3140         ptr.
3141         (free_traceframe_info): Remove.
3142         (clear_traceframe_info): Don't manually free
3143         current_traceframe_info.
3144         (free_result): Remove.
3145         (parse_traceframe_info): Return a unique ptr.
3146         (get_traceframe_info): Adjust to unique ptr.
3147         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3148         * remote.c (remote_traceframe_info): Return a unique ptr.
3149         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3150         ptr.
3151         * target-debug.h (target_debug_print_traceframe_info_up): New
3152         macro.
3153         * target-delegates.c: Regenerate.
3154
3155 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3156
3157         * memrange.h (struct mem_range): Add constructors.
3158         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3159         std::vector<mem_range>.
3160         * tracepoint.c (free_traceframe_info): Don't manually free
3161         vector.
3162         (traceframe_info_start_memory): Adjust to vector change.
3163         (traceframe_available_memory): Likewise.
3164         * tracefile-tfile.c (build_traceframe_info): Likewise.
3165         * ctf.c (ctf_traceframe_info): Likewise.
3166
3167 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3168
3169         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3170         std::vector<int>.
3171         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3172         (traceframe_info_start_tvar): Adjust to vector change.
3173         (parse_traceframe_info): Allocate with new.
3174         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3175         vector change.
3176         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3177         change.
3178         tfile_traceframe_info): Allocate with new.
3179         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3180         change.
3181
3182 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3183
3184         * tracepoint.c (traceframe_info): Rename to...
3185         (current_traceframe_info): ...this.
3186         (clear_traceframe_info): Adjust.
3187         (get_traceframe_info): Adjust.
3188
3189 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3190
3191         * nat/linux-osdata.c: Include algorithm.
3192         (compare_processes): Remove.
3193         (struct pid_pgid_entry): New struct.
3194         (linux_xfer_osdata_processgroups): Use std::vector instead of
3195         XNEWVEC.
3196
3197 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3198
3199         * objfiles.h: Don't include symfile.h.
3200         (struct partial_symbol): Remove forward-declaration.
3201         (struct objfile) <global_psymbols, static_psymbols>: Change type
3202         to std::vector<partial_symbol *>.
3203         * objfiles.c (objfile::objfile): Don't memset those fields.
3204         (objfile::~objfile): Don't free those fields.
3205         * psympriv.h (struct psymbol_allocation_list): Remove
3206         forward-declaration.
3207         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3208         to std::vector.
3209         (start_psymtab_common): Change parameters to std::vector.
3210         * psymtab.c: Include algorithm.
3211         (require_partial_symbols): Call shrink_to_fit.
3212         (find_pc_sect_psymbol): Adjust to vector change.
3213         (match_partial_symbol): Likewise.
3214         (lookup_partial_symbol): Likewise.
3215         (psym_relocate): Likewise.
3216         (dump_psymtab): Likewise.
3217         (recursively_search_psymtabs): Likewise.
3218         (compare_psymbols): Remove.
3219         (sort_pst_symbols): Adjust to vector change.
3220         (start_psymtab_common): Likewise.
3221         (end_psymtab_common): Likewise.
3222         (psymbol_bcache_full): De-constify return value.
3223         (add_psymbol_to_bcache): Likewise.
3224         (extend_psymbol_list): Remove.
3225         (append_psymbol_to_list): Adjust to vector change.
3226         (add_psymbol_to_list): Likewise.
3227         (init_psymbol_list): Likewise.
3228         (maintenance_info_psymtabs): Likewise.
3229         (maintenance_check_psymtabs): Likewise.
3230         * symfile.h (struct psymbol_allocation_list): Remove.
3231         * symfile.c (reread_symbols): Adjust to vector change.
3232         * dbxread.c (start_psymtab): Change type of parameters.
3233         (dbx_symfile_read): Adjust to vector change.
3234         (read_dbx_symtab): Likewise.
3235         (start_psymtab): Change type of parameters.
3236         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3237         (create_partial_symtab): Likewise.
3238         (add_partial_symbol): Likewise.
3239         (write_one_signatured_type): Likewise.
3240         (recursively_write_psymbols): Likewise.
3241         * mdebugread.c (parse_partial_symbols): Likewise.
3242         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3243         (scan_xcoff_symtab): Adjust to vector change.
3244         (xcoff_initial_scan): Likewise.
3245
3246 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3247
3248         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3249
3250 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3251
3252         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3253         Remove s390x-*-expedite, add s390x-expedite.
3254
3255 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3256
3257         * features/s390-gs-linux64.c: Regenerated.
3258         * features/s390x-gs-linux64.c: Regenerated.
3259
3260 2017-10-13  Tom Tromey  <tom@tromey.com>
3261
3262         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3263         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3264         delete.
3265         * symfile.c (symbol_file_add_with_addrs): Use new.
3266         (symbol_file_add_separate): Update comment.
3267         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3268         * jit.c (jit_object_close_impl): Use new.
3269         (jit_unregister_code): Use delete.
3270         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3271         (~objfile): Rename from free_objfile.
3272         (free_objfile_separate_debug, do_free_objfile_cleanup)
3273         (free_all_objfiles, objfile_purge_solibs): Use delete.
3274         * objfiles.h (struct objfile): Add constructor and destructor.
3275         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3276         (allocate_objfile, free_objfile): Don't declare.
3277         (struct objstats): Add initializers.
3278
3279 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3282         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3283         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3284         * gdbarch.h: Regenerate.
3285         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3286         Adjust comment.
3287         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3288         (i386_displaced_step_fixup): Adjust comment.
3289         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3290
3291 2017-10-12  Tom Tromey  <tom@tromey.com>
3292
3293         * prologue-value.h (pv_area::store_would_trash): Return bool.
3294         (pv_area::find_reg): Likewise.
3295         * prologue-value.c (pv_area::store_would_trash): Return bool.
3296         (pv_area::find_reg): Likewise.
3297
3298 2017-10-12  Tom Tromey  <tom@tromey.com>
3299
3300         * s390-linux-tdep.c (s390_store, s390_load)
3301         (s390_check_for_saved, s390_analyze_prologue): Update.
3302         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3303         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3304         * prologue-value.h (class pv_area): Move from prologue-value.c.
3305         Change names of members.  Add constructor, destructor, member
3306         functions.
3307         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3308         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3309         (pv_area_fetch, pv_area_scan): Don't declare.
3310         * prologue-value.c (struct pv_area::area_entry): Now member of
3311         pv_area.
3312         (struct pv_area): Move to prologue-value.h.
3313         (pv_area::pv_area): Rename from make_pv_area.
3314         (pv_area::~pv_area): Rename from free_pv_area.
3315         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3316         (clear_entries, find_entry, overlaps, store_would_trash, store)
3317         (fetch, find_reg, scan): Now member of pv_area.
3318         Remove "area" argument.  Update.
3319         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3320         Update.
3321         * mn10300-tdep.c (push_reg, check_for_saved)
3322         (mn10300_analyze_prologue): Update.
3323         * mep-tdep.c (is_arg_spill, check_for_saved)
3324         (mep_analyze_prologue): Update.
3325         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3326         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3327         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3328         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3329         Update.
3330         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3331         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3332
3333 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3334
3335         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3336         * linux-nat.c (linux_nat_delete_thread): New variable.
3337         (lwp_free): Invoke linux_nat_delete_thread if set.
3338         (linux_nat_set_delete_thread): New function.
3339         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3340         thread delete callback.
3341         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3342         (_initialize_arm_linux_nat): Assign thread delete callback.
3343         * s390-linux-nat.c (s390_delete_thread): New function.
3344         (_initialize_s390_nat): Assign thread delete callback.
3345         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3346         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3347         function.
3348         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3349         declaration.
3350         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3351         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3352
3353 2017-10-09  Tom Tromey  <tom@tromey.com>
3354
3355         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3356         std::string.
3357         * tui/tui-layout.c (enum tui_status): Use std::string.
3358
3359 2017-10-11  Tom Tromey  <tom@tromey.com>
3360
3361         * gdbthread.h (thread_command): Constify.
3362         * inferior.h (detach_command): Constify.
3363         * top.h (set_history, show_history): Constify.
3364         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3365         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3366         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3367         * printcmd.c (set_command): Constify.
3368         (non_const_set_command): New function.
3369         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3370         * breakpoint.c (enable_command, disable_command, delete_command)
3371         (catch_command, tcatch_command, set_breakpoint_cmd)
3372         (show_breakpoint_cmd): Constify.
3373         * macrocmd.c (macro_command): Constify.
3374         * infcmd.c (unset_command, kill_command, detach_command)
3375         (info_proc_cmd): Constify.
3376         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3377         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3378         (info_auto_load_cmd): Constify.
3379         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3380         (unset_tdesc_cmd): Constify.
3381         * ada-lang.c (set_ada_command, show_ada_command)
3382         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3383         * guile/guile.c (set_guile_command, show_guile_command)
3384         (info_guile_command): Constify.
3385         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3386         Constify.
3387         * skip.c (skip_command): Constify.
3388         * compile/compile.c (_initialize_compile): Constify.
3389         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3390         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3391         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3392         (maint_btrace_pt_show_cmd): Constify.
3393         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3394         Constify.
3395         * python/python.c (user_show_python, user_set_python): Constify.
3396         * mips-tdep.c (set_mips_command, show_mips_command)
3397         (set_mipsfpu_command): Constify.
3398         * record-btrace.c (cmd_record_btrace_start)
3399         (cmd_set_record_btrace, cmd_show_record_btrace)
3400         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3401         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3402         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3403         Constify.
3404         * symfile.c (overlay_command): Constify.
3405         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3406         * cli/cli-logging.c (set_logging_command, show_logging_command):
3407         Constify.
3408         * cli/cli-dump.c (dump_command, append_command)
3409         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3410         (tekhex_dump_command, binary_dump_command)
3411         (binary_append_command): Constify.
3412         * cli/cli-decode.c (struct cmd_list_element): Change type of
3413         "fun".
3414         * cli/cli-cmds.c (info_command, show_command, set_debug)
3415         (show_debug): Constify.
3416         (show_command): Add non-const overload.
3417         * top.c (set_history, show_history): Constify.
3418         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3419         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3420         * target.c (target_command): Constify.
3421         * sparc64-tdep.c (info_adi_command): Constify.
3422         * record-full.c (cmd_record_full_start): Constify.
3423         (set_record_full_command): Constify.  Fix typo.
3424         (show_record_full_command): Constify.
3425         * thread.c (thread_command, thread_apply_command): Constify.
3426         * memattr.c (dummy_cmd): Constify.
3427         * value.c (function_command): Constify.
3428         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3429         * probe.c (info_probes_command): Constify.
3430         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3431         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3432         (show_thread_cmd, set_thread_default_cmd)
3433         (show_thread_default_cmd): Constify.
3434         (check_empty): Constify.
3435         * tracepoint.c (tfind_command): Constify.
3436         * cp-support.c (maint_cplus_command): Constify.
3437         * windows-tdep.c (info_w32_command): Constify.
3438         * record.c (cmd_record_start, set_record_command)
3439         (show_record_command, info_record_command, cmd_record_goto):
3440         Constify.
3441         * ravenscar-thread.c (set_ravenscar_command)
3442         (show_ravenscar_command): Constify.
3443         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3444         Constify.
3445         (add_internal_problem_command): Remove casts.
3446         * arc-tdep.c (maintenance_print_arc_command): Constify.
3447         * valprint.c (set_print, show_print, set_print_raw)
3448         (show_print_raw): Constify.
3449         * maint.c (maintenance_command, maintenance_info_command)
3450         (maintenance_print_command, maintenance_set_cmd)
3451         (maintenance_show_cmd, set_per_command_cmd)
3452         (show_per_command_cmd, maintenance_check_command): Constify.
3453         * language.c (set_check, show_check): Constify.
3454         * typeprint.c (show_print_type, set_print_type): Constify.
3455         * go32-nat.c (go32_info_dos_command): Constify.
3456
3457 2017-10-11  Tom Tromey  <tom@tromey.com>
3458
3459         * breakpoint.c (prepare_re_set_context): Remove.
3460         (breakpoint_re_set_one): Update.  Don't use cleanups.
3461         (breakpoint_re_set): Use scoped_restore, std::string, and
3462         scoped_restore_current_language.
3463
3464 2017-10-11  Tom Tromey  <tom@tromey.com>
3465
3466         * breakpoint.c (commands_command_1): Use std::string.
3467         (cleanup_executing_breakpoints): Remove.
3468         (bpstat_do_actions_1): Use scoped_restore.
3469         (bpstat_check_watchpoint): Use std::string.
3470         (decode_static_tracepoint_spec): Likewise.
3471         (break_range_command): Likewise.
3472         (watch_command_1): Likewise.
3473         (compare_breakpoints): Change argument types.
3474         (clear_command): Use std::vector.
3475         (cleanup_executing_breakpoints): Remove.
3476         (update_global_location_list): Use unique_xmalloc_ptr.
3477         (strace_command): Remove unused declaration.
3478
3479 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3480
3481         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3482         * NEWS: Mention new FreeBSD/arm native configuration.
3483         * configure.host: Add arm*-*-freebsd*.
3484         * configure.nat: Likewise.
3485         * arm-fbsd-nat.c: New file.
3486
3487 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3488
3489         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3490         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3491         * NEWS: Mention new FreeBSD/arm target.
3492         * configure.tgt: Add arm*-*-freebsd*.
3493         * arm-fbsd-tdep.c: New file.
3494         * arm-fbsd-tdep.h: New file.
3495
3496 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3497
3498         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3499         `gdbarch_elfcore_write_linux_prpsinfo'.
3500         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3501         method.
3502         (elf_internal_linux_prpsinfo): Remove declaration.
3503         * gdbarch.h: Regenerate.
3504         * gdbarch.c: Regenerate.
3505
3506 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3507
3508         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3509         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3510
3511 2017-10-11  Pedro Alves  <palves@redhat.com>
3512
3513         * breakpoint.c (reattach_breakpoints): Delete.
3514         * breakpoint.h (reattach_breakpoints): Delete.
3515
3516 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3517
3518         * symfile.c (registered_sym_fns): Make struct, not typedef.
3519         (DEF_VEC_O (registered_sym_fns)): Remove.
3520         (symtab_fns): Change type to std::vector.
3521         (add_symtab_fns): Adjust.
3522         (find_sym_fns): Adjust.
3523
3524 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3525
3526         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3527         * arc-tdep.h (arc_arch_is_em): New function.
3528         (arc_arch_is_hs): Likewise.
3529
3530 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3531
3532         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3533         parentheses in the declaration.
3534         (macro_lookup_inclusion): Likewise.
3535         (macro_lookup_definition): Likewise.
3536         * p-lang.h (pascal_builtin_types): Likewise.
3537         * tui/tui-data.c (tui_win_list): Likewise.
3538         * tui/tui-data.h (tui_win_list): Likewise.
3539         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3540
3541 2017-10-11  Mark Rages  <markrages@gmail.com>
3542
3543         * target-memory.c (block_boundaries): Fix for block address not
3544         aligned on block size.
3545
3546 2017-10-10  Pedro Alves <palves@redhat.com>
3547             Tom Tromey  <tom@tromey.com>
3548
3549         * breakpoint.c (struct captured_breakpoint_query_args)
3550         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3551         (print_breakpoint): New.
3552         * breakpoint.h (print_breakpoint): Declare.
3553         * common/common-exceptions.h (enum return_reason): Remove
3554         references to catch_exceptions.
3555         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3556         Delete.
3557         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3558         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3559         * gdb.h: Delete.
3560         * gdbthread.h (thread_select): Declare.
3561         * mi/mi-cmd-break.c: Don't include gdb.h.
3562         (breakpoint_notify): Use print_breakpoint.
3563         * mi/mi-cmd-catch.c: Don't include gdb.h.
3564         * mi/mi-interp.c: Don't include gdb.h.
3565         (mi_print_breakpoint_for_event): New.
3566         (mi_breakpoint_created, mi_breakpoint_modified): Use
3567         mi_print_breakpoint_for_event.
3568         * mi/mi-main.c: Don't include gdb.h.
3569         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3570         thread_select instead of gdb_thread_select.
3571         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3572         of using gdb_list_thread_ids.
3573         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3574         FILEIO_ENOSYS here.
3575         (remote_fileio_request): Use TRY/CATCH instead of
3576         catch_exceptions.
3577         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3578         (symbol_file_add_from_memory_wrapper): Delete.
3579         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3580         * thread.c: Don't include gdb.h.
3581         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3582         (thread_alive): Use thread_select.
3583         (do_captured_thread_select): Delete, parts salvaged as ...
3584         (thread_select): ... this new function.
3585         (gdb_thread_select): Delete.
3586
3587 2017-10-10  Pedro Alves  <palves@redhat.com>
3588             Tom Tromey  <tom@tromey.com>
3589
3590         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3591         and reverse logic.
3592         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3593         No longer macros.  Instead ...
3594         (enum wp_check_result): They're now values of this new
3595         enumeration.
3596         (watchpoint_check): Change return type to wp_check_result and
3597         parameter type to bpstat.
3598         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3599         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3600         catch_errors.  Reverse logic of watchpoint_check call.
3601         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3602         pointer as parameter.
3603         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3604         * common/common-exceptions.c (throw_exception_sjlj): Update
3605         comments to avoid mentioning catch_errors.
3606         * exceptions.c (catch_errors): Delete.
3607         * exceptions.h: Update comments to avoid mentioning catch_errors.
3608         (catch_errors_ftype, catch_errors): Delete.
3609         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3610         (hook_stop_stub): Delete.
3611         (restore_selected_frame): Change return type to void, and
3612         parameter type to const frame_id &.
3613         (restore_infcall_control_state): Use TRY/CATCH instead of
3614         catch_errors.
3615         * main.c (captured_command_loop): Return void and remove
3616         parameter.  Remove references to catch_errors.
3617         (captured_main): Use TRY/CATCH instead of catch_errors.
3618         * objc-lang.c (objc_submethod_helper_data)
3619         (find_objc_msgcall_submethod_helper): Delete.
3620         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3621         catch_errors.
3622         * record-full.c (record_full_message): Return void.
3623         (record_full_message_args, record_full_message_wrapper): Delete.
3624         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3625         instead of catch_errors.
3626         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3627         parameter type to int.
3628         * solib-darwin.c (open_symbol_file_object): Ditto.
3629         * solib-dsbt.c (open_symbol_file_object): Ditto.
3630         * solib-frv.c (open_symbol_file_object): Ditto.
3631         * solib-svr4.c (open_symbol_file_object): Ditto.
3632         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3633         * solib.c (update_solib_list): Use TRY/CATCH instead of
3634         catch_errors.
3635         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3636         Change type.
3637         * symmisc.c (struct print_symbol_args): Remove.
3638         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3639         (print_symbol): Change type.
3640         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3641         and remove parameters.
3642         (catch_errors): New.
3643         (get_windows_debug_event): Adjust.
3644
3645 2017-10-09  Tom Tromey  <tom@tromey.com>
3646
3647         * mi/mi-main.c (free_splay_tree): Remove.
3648         (list_available_thread_groups): Use splay_tree_up.
3649         * common/gdb_splay_tree.h: New file.
3650
3651 2017-10-09  Tom Tromey  <tom@tromey.com>
3652
3653         * mi/mi-main.c (do_nothing): Remove.
3654         (list_available_thread_groups): Update.
3655
3656 2017-10-09  Pedro Alves  <palves@redhat.com>
3657
3658         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3659         reading registers when switching context.
3660
3661 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3662
3663         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3664         (fbsd_convert_siginfo): Likewise.
3665         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3666
3667 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3668
3669         * configure.ac (try_guile_versions): Remove guile-2.2.
3670         * configure: Regenerate.
3671
3672 2017-10-09  Tom Tromey  <tom@tromey.com>
3673
3674         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3675         (COMPILE.pre): Use $(CXX).
3676
3677 2017-10-09  Pedro Alves  <palves@redhat.com>
3678
3679         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3680         Use bool.
3681         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3682         * cp-support.h (cp_remove_params): Now returns a
3683         gdb::unique_xmalloc_ptr.
3684         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3685         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3686         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3687         returning a gdb::unique_xmalloc_ptr.
3688         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3689         * stack.c (find_frame_funname): Adjust to cp_remove_params
3690         returning a gdb::unique_xmalloc_ptr.
3691
3692 2017-10-08  Tom Tromey  <tom@tromey.com>
3693
3694         * dwarf2read.c (dwarf2_get_dwz_file): Use
3695         gdb::unique_xmalloc_ptr.
3696         (find_slot_in_mapped_hash): Likewise.
3697         (dwarf2_physname): Likewise.
3698         (create_dwo_unit_in_dwp_v1): Use std::string.
3699         (create_dwo_unit_in_dwp_v2): Likewise.
3700         (lookup_dwo_cutu): Likewise.
3701         (inherit_abstract_dies): Use std::vector.
3702         (read_array_type): Likewise.
3703         (dwarf_decode_macros): Remove unused declaration.
3704         (unsigned_int_compar): Remove.
3705         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3706         (psymtabs_addrmap_cleanup): Remove.
3707
3708 2017-10-08  Tom Tromey  <tom@tromey.com>
3709
3710         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3711         * frame.h (frame_cleanup_after_sniffer): Declare.
3712         (frame_prepare_for_sniffer): Return void.
3713         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3714         type of argument.
3715         (frame_prepare_for_sniffer): Return void.
3716
3717 2017-10-08  Tom Tromey  <tom@tromey.com>
3718
3719         * utils.h (make_cleanup_value_free): Remove.
3720         * utils.c (do_value_free, struct cleanup): Remove.
3721         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3722         Use gdb_value_up.
3723         * value.h (struct value_deleter): New.
3724         (gdb_value_up): New typedef.
3725
3726 2017-10-08  Tom Tromey  <tom@tromey.com>
3727
3728         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3729         (make_cleanup_free_search_symbols): Remove.
3730         (search_symbols): Return std::vector.
3731         (symbol_search::compare_search_syms): Now member of
3732         symbol_search.  Change arguments.
3733         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3734         (symtab_symbol_info, rbreak_command): Update.
3735         * symtab.h (struct symbol_search) <next>: Remove.
3736         Add constructors.
3737         (symbol_search::operator<): New function.
3738         (symbol_search::operator==): New function.
3739         (search_symbols): Remove std::vector.
3740         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3741         (symbol_search::compare_search_syms): Declare.
3742
3743 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3744
3745         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3746         arch/aarch64-insn.o.
3747         Remove one rule.
3748         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3749
3750 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3751
3752         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3753         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3754         arch/arm-linux.o respectively.
3755         * configure.tgt: Likewise.
3756
3757 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3758
3759         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3760         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3761
3762 2017-10-06  Pedro Alves  <palves@redhat.com>
3763
3764         * windows-nat.c: Include <algorithm>.
3765
3766 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3767
3768         * configure.tgt (i386_tobjs): New variable.
3769         (amd64_tobjs): New variable.
3770         Set $cpu_obs and $os_obs.
3771
3772 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3773
3774         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3775         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3776         (clean): Remove object files and dependency files.
3777         (distclean): Remove the directory.
3778         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3779         * configure: Re-generated.
3780         * configure.tgt: Replace amd64.o with arch/amd64.o.
3781
3782 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3783
3784         PR build/22188
3785         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3786         and SETEND.
3787
3788 2017-10-05  Pedro Alves  <palves@redhat.com>
3789
3790         * linux-nat.c (linux_child_follow_fork): When following the parent
3791         and detaching the child, consult the parent thread's architecture
3792         instead of the child's.
3793
3794 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3795
3796         * ax.h: Do not include "doublest.h".
3797         (union agent_val): Remove.
3798
3799 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3800
3801         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3802         (decimal_to_string): Return std::string object.
3803         (decimal_from_string): Accept std::string object.  Return bool.
3804         (decimal_from_integral, decimal_from_doublest): Remove.
3805         (decimal_from_longest): Add prototype.
3806         (decimal_from_ulongest): Likewise.
3807         (decimal_to_longest): Likewise.
3808         (decimal_from_doublest): Likewise.
3809         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3810         (MAX_DECIMAL_STRING): Move here.
3811         (decimal_to_string): Return std::string object.
3812         (decimal_from_string): Accept std::string object.  Return bool.
3813         (decimal_from_integral): Remove, replace by ...
3814         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3815         (decimal_to_longest): New function.
3816         (decimal_from_floating): Remove, replace by ...
3817         (decimal_from_doublest): ... this new function.
3818         (decimal_to_doublest): Update to new decimal_to_string interface.
3819
3820         * value.c (unpack_long): Use decimal_to_longest.
3821         * valops.c (value_cast): Use decimal_from_doublest instead of
3822         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3823         decimal_from_integral.
3824         * valarith.c (value_args_as_decimal): Likewise.
3825         * valprint.c (print_decimal_floating): Update to new
3826         decimal_to_string interface.
3827         * printcmd.c (printf_decfloat): Likewise.
3828         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3829
3830 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3831
3832         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3833         * gdbtypes.c: Include "floatformat.h".
3834         * value.c: Likewise.
3835         * m68k-tdep.c: Likewise.
3836
3837         * findvar.c: Do not include "floatformat.h".
3838         * amd64-darwin-tdep.c: Likewise.
3839         * arm-linux-tdep.c: Likewise.
3840         * i386-darwin-tdep.c: Likewise.
3841         * i387-tdep.c: Likewise.
3842         * m68k-linux-tdep.c: Likewise.
3843         * mep-tdep.c: Likewise.
3844         * mips-tdep.c: Likewise.
3845         * nios2-tdep.c: Likewise.
3846         * s390-linux-tdep.c: Likewise.
3847         * sparc-obsd-tdep.c: Likewise.
3848         * sparc-tdep.c: Likewise.
3849         * sparc64-tdep.c: Likewise.
3850         * spu-tdep.c: Likewise.
3851         * tic6x-tdep.c: Likewise.
3852         * tilegx-tdep.c: Likewise.
3853         * vax-tdep.c: Likewise.
3854         * xstormy16-tdep.c: Likewise.
3855         * xtensa-tdep.c: Likewise.
3856
3857         * top.c: Do not include "doublest.h".
3858         * aarch64-tdep.c: Likewise.
3859         * alpha-tdep.c: Likewise.
3860         * arm-linux-tdep.c: Likewise.
3861         * m68k-linux-tdep.c: Likewise.
3862         * tilegx-tdep.c: Likewise.
3863         * xstormy16-tdep.c: Likewise.
3864
3865 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3866
3867         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3868         (mipsn32_fbsd_sigframe): Define.
3869         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3870         for FreeBSD/mipsn32.
3871
3872 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3873
3874         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3875         AT_HWCAP.
3876
3877 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3878
3879         * MAINTAINERS (Misc): Update my email address.
3880
3881 2017-10-04  Pedro Alves  <palves@redhat.com>
3882
3883         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3884         it instead of target_gdbarch.
3885         (get_remote_state, get_remote_packet_size): Adjust
3886         get_remote_arch_state calls, passing down target_gdbarch
3887         explicitly.
3888         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3889         'gdbarch' and use it instead of target_gdbarch.
3890         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3891         passing down target_gdbarch explicitly.
3892         (struct stop_reply) <arch>: New field.
3893         (remote_parse_stop_reply): Use the stopped thread's architecture,
3894         not the current inferior's.  Save the architecture in the
3895         stop_reply.
3896         (process_stop_reply): Use the stop reply's architecture.
3897         (process_g_packet, remote_fetch_registers)
3898         (remote_prepare_to_store, store_registers_using_G)
3899         (remote_store_registers): Adjust get_remote_arch_state calls,
3900         using the regcache's architecture.
3901         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3902         passing down target_gdbarch explicitly.
3903         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3904         beneath instead of calling target_gdbarch.
3905         * target.c (default_thread_architecture): Use the specified
3906         inferior's architecture, instead of the current inferior's
3907         architecture (via target_gdbarch).
3908
3909 2017-10-04  Pedro Alves  <palves@redhat.com>
3910
3911         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3912         case.
3913         (regcache_print): Handle !target_has_registers here instead.
3914
3915 2017-10-04  Pedro Alves  <palves@redhat.com>
3916
3917         * frame.c (create_test_frame): Delete.
3918         * frame.h (create_test_frame): Delete.
3919         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3920         (class regcache_test): Delete.
3921         (test_target_has_registers, test_target_has_stack)
3922         (test_target_has_memory, test_target_prepare_to_store)
3923         (test_target_store_registers): New functions.
3924         (test_target_ops): New class.
3925         (register_to_value_test): Error out if there's already a
3926         process_stratum (or higher) target pushed.  Create a fuller mock
3927         environment, with mock target_ops, inferior, address space, thread
3928         and inferior_ptid.
3929         * progspace.c (struct address_space): Move to ...
3930         * progspace.h (struct address_space): ... here.
3931         * regcache.h (regcache::~regcache, regcache::raw_write)
3932         [GDB_SELF_TEST]: No longer virtual.
3933
3934 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3935
3936         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3937
3938 2017-10-04  Pedro Alves  <palves@redhat.com>
3939
3940         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3941         out of 'between TRY and CATCH'.
3942
3943 2017-10-04  Pedro Alves  <palves@redhat.com>
3944
3945         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3946         * common/common-exceptions.h (TRY): Open an outermost scope.
3947         Expand intro comment.
3948         (CATCH): Reindent.
3949         (END_CATCH): Close the outermost scope.
3950         * completer.c (complete_line_internal): Add missing END_CATCH.
3951
3952 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3953
3954         * NEWS (Changes since GDB 8.0): Add entry about new
3955         'set-cwd-on-gdbserver' feature.
3956         (New remote packets): Add entry for QSetWorkingDir.
3957         * common/common-inferior.h (set_inferior_cwd): New prototype.
3958         * infcmd.c (set_inferior_cwd): Remove "static".
3959         (show_cwd_command): Expand text to include remote debugging.
3960         * remote.c: Add PACKET_QSetWorkingDir.
3961         (remote_protocol_features) <QSetWorkingDir>: New entry for
3962         PACKET_QSetWorkingDir.
3963         (extended_remote_set_inferior_cwd): New function.
3964         (extended_remote_create_inferior): Call
3965         "extended_remote_set_inferior_cwd".
3966         (_initialize_remote): Call "add_packet_config_cmd" for
3967         QSetWorkingDir.
3968
3969 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3970
3971         * NEWS (New commands): Mention "set/show cwd".
3972         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3973         "cd" command's help text.
3974         * common/common-inferior.h (get_inferior_cwd): New prototype.
3975         * infcmd.c (inferior_cwd_scratch): New global variable.
3976         (set_inferior_cwd): New function.
3977         (get_inferior_cwd): Likewise.
3978         (set_cwd_command): Likewise.
3979         (show_cwd_command): Likewise.
3980         (_initialize_infcmd): Add "set/show cwd" commands.
3981         * inferior.h (class inferior) <cwd>: New field.
3982         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3983         (fork_inferior): Change inferior's cwd before its execution.
3984         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3985         to CreateProcess.
3986
3987 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3988
3989         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3990         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3991         (COMMON_OBS): Add gdb_tilde_expand.o.
3992         * common/gdb_tilde_expand.c: New file.
3993         * common/gdb_tilde_expand.h: Likewise.
3994
3995 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3996
3997         * gdbarch.sh (objfile): Remove duplicate declaration.
3998         * gdbarch.h: Regenerate.
3999
4000 2017-10-03  Tom Tromey  <tom@tromey.com>
4001
4002         * utils.c (internal_vproblem): Use string_vprintf.
4003
4004 2017-10-03  Tom Tromey  <tom@tromey.com>
4005
4006         * printcmd.c (info_symbol_command): Use std::string.
4007
4008 2017-10-03  Tom Tromey  <tom@tromey.com>
4009
4010         * top.c (gdb_safe_append_history): Use std::string.
4011
4012 2017-10-03  Tom Tromey  <tom@tromey.com>
4013
4014         * event-top.c (stdin_event_handler): Update.
4015         * main.c (captured_main_1): Update.
4016         * top.h (make_delete_ui_cleanup): Remove.
4017         (struct ui): Add constructor and destructor.
4018         (new_ui, delete_ui): Remove.
4019         * top.c (make_delete_ui_cleanup): Remove.
4020         (new_ui_command): Use std::unique_ptr.
4021         (delete_ui_cleanup): Remove.
4022         (ui::ui): Rename from new_ui.  Update.
4023         (free_ui): Remove.
4024         (ui::~ui): Rename from delete_ui.  Update.
4025
4026 2017-10-03  Tom Tromey  <tom@tromey.com>
4027
4028         * symfile.c (load_progress): Use gdb::byte_vector.
4029
4030 2017-10-03  Tom Tromey  <tom@tromey.com>
4031
4032         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4033         declaration.
4034         * printcmd.c (x_command): Remove unused declaration.
4035         * symfile.c (symbol_file_command): Remove unused declaration.
4036
4037 2017-10-03  Tom Tromey  <tom@tromey.com>
4038
4039         * utils.c (internal_vproblem): Use std::string.
4040         (defaulted_query): Likewise.
4041
4042 2017-10-03  Tom Tromey  <tom@tromey.com>
4043
4044         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4045         * top.c (execute_command_to_string): Update.
4046         * utils.c (make_cleanup_restore_page_info): Remove.
4047         (do_restore_page_info_cleanup): Remove.
4048         (set_batch_flag_and_restore_page_info):
4049         New.
4050         (make_cleanup_restore_page_info): Remove.
4051         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4052         (~set_batch_flag_and_restore_page_info): New
4053         (make_cleanup_restore_uinteger): Remove.
4054         (make_cleanup_restore_integer): Remove.
4055         (struct restore_integer_closure): Remove.
4056         (restore_integer): Remove.
4057         * utils.h (struct set_batch_flag_and_restore_page_info): New
4058         class.
4059         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4060         (make_cleanup_restore_page_info): Remove.
4061         (make_cleanup_restore_uinteger) Remove.
4062         (make_cleanup_restore_integer) Remove.
4063
4064 2017-10-03  Tom Tromey  <tom@tromey.com>
4065
4066         * record-full.h (record_full_gdb_operation_disable_set): Return
4067         scoped_restore_tmpl<int>.
4068         * infrun.c (adjust_pc_after_break): Update.
4069         (handle_signal_stop): Update.
4070         * record-full.c (record_full_gdb_operation_disable_set): Return
4071         scoped_restore_tmpl<int>.
4072         (record_full_wait_1, record_full_insert_breakpoint)
4073         (record_full_remove_breakpoint, record_full_save)
4074         (record_full_goto_insn): Update.
4075
4076 2017-10-02  Tom Tromey  <tom@tromey.com>
4077
4078         PR rust/22236:
4079         * rust-lang.c (rust_val_print_str): New function.
4080         (val_print_struct): Call it.
4081         (rust_subscript): Preserve name of slice type.
4082
4083 2017-10-02  Tom Tromey  <tom@tromey.com>
4084
4085         * rust-lang.c (rust_subscript): Handle slices in
4086         EVAL_AVOID_SIDE_EFFECTS case.
4087
4088 2017-10-02  Tom Tromey  <tom@tromey.com>
4089
4090         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4091
4092 2017-10-02  Tom Tromey  <tom@tromey.com>
4093
4094         * rust-lang.h (rust_slice_type): Add "extern".
4095
4096 2017-10-02  Tom Tromey  <tom@tromey.com>
4097             Pedro Alves  <palves@redhat.com>
4098
4099         * ada-lang.h (ada_exc_info::operator<): Make const.
4100         (ada_exc_info::operator==): Make const.
4101         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4102         Make const.
4103
4104 2017-09-29  Tom Tromey  <tom@tromey.com>
4105
4106         * target.c (read_whatever_is_readable): Change type of "result".
4107         Update.
4108         (free_memory_read_result_vector): Remove.
4109         (read_memory_robust): Change return type.  Update.
4110         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4111         bin2hex, std::string.
4112         * target.h (memory_read_result_s): Remove typedef.
4113         (free_memory_read_result_vector): Remove.
4114         (read_memory_robust): Return std::vector.
4115
4116 2017-09-29  Tom Tromey  <tom@tromey.com>
4117
4118         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4119
4120 2017-09-29  Tom Tromey  <tom@tromey.com>
4121
4122         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4123         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4124         operator< and operator==.
4125         (ada_exceptions_list): Return a std::vector.
4126         * ada-lang.c (ada_exc_info::operator<): Rename from
4127         compare_ada_exception_info.
4128         (ada_exc_info::operator==): New.
4129         (sort_remove_dups_ada_exceptions_list): Change type of
4130         "exceptions".
4131         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4132         (ada_add_global_exceptions): Likewise.
4133         (ada_exceptions_list_1): Return a std::vector.
4134         (ada_exceptions_list): Likewise.
4135
4136 2017-09-29  Tom Tromey  <tom@tromey.com>
4137
4138         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4139         'std::set *'.
4140         (print_one_inferior): Update.
4141         (free_vector_of_ints): Remove.
4142         (list_available_thread_groups): Change "ids" to std::set.
4143         (mi_cmd_list_thread_groups): Update.
4144         (struct collect_cores_data) <core>: Now a std::set.
4145         (collect_cores): Update.
4146         (unique): Remove.
4147         (print_one_inferior): Update.
4148
4149 2017-09-29  Tom Tromey  <tom@tromey.com>
4150
4151         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4152         (mi_execute_async_cli_command): Likewise.
4153         (mi_cmd_trace_frame_collected): Use field_fmt.
4154
4155 2017-09-29  Tom Tromey  <tom@tromey.com>
4156
4157         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4158         gdb::byte_vector.
4159
4160 2017-09-29  Tom Tromey  <tom@tromey.com>
4161
4162         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4163
4164 2017-09-29  Tom Tromey  <tom@tromey.com>
4165
4166         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4167
4168 2017-09-29  Tom Tromey  <tom@tromey.com>
4169
4170         * varobj.h (varobj_gen_name): Return std::string.
4171         * varobj.c (varobj_gen_name): Return std::string.
4172         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4173         (mi_cmd_var_delete): Don't copy "name".
4174
4175 2017-09-29  Tom Tromey  <tom@tromey.com>
4176
4177         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4178         (mi_cmd_break_insert_1): Update.
4179
4180 2017-09-29  Tom Tromey  <tom@tromey.com>
4181
4182         * target.h (make_scoped_defer_target_commit_resume): Update.
4183         * target.c (make_scoped_defer_target_commit_resume): Rename from
4184         make_cleanup_defer_target_commit_resume.  Return a
4185         scoped_restore.
4186         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4187
4188 2017-09-29  Tom Tromey  <tom@tromey.com>
4189
4190         * main.c (captured_main_1): Remove unused declaration.
4191         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4192
4193 2017-09-29  Tom Tromey  <tom@tromey.com>
4194
4195         * symtab.c (search_symbols): Remove unused outer cleanup.
4196         (make_source_files_completion_list): Remove unused declaration.
4197
4198 2017-09-29  Tom Tromey  <tom@tromey.com>
4199
4200         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4201
4202 2017-09-29  Tom Tromey  <tom@tromey.com>
4203
4204         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4205         gdb::byte_vector.
4206
4207 2017-09-29  Tom Tromey  <tom@tromey.com>
4208
4209         * complaints.c (vcomplaint): Use std::string.
4210
4211 2017-09-29  Tom Tromey  <tom@tromey.com>
4212
4213         * tracepoint.c (trace_variable_command): Use std::string.
4214         (encode_actions_1): Remove unused declarations.
4215         (create_tsv_from_upload): Use std::string.
4216
4217 2017-09-29  Tom Tromey  <tom@tromey.com>
4218
4219         * cp-support.c (gdb_demangle): Use std::string.
4220
4221 2017-09-29  Tom Tromey  <tom@tromey.com>
4222
4223         * stack.c (parse_frame_specification): Use std::string
4224         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4225
4226 2017-09-29  Tom Tromey  <tom@tromey.com>
4227
4228         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4229
4230 2017-09-29  Tom Tromey  <tom@tromey.com>
4231
4232         * utils.c (vfprintf_maybe_filtered): Use std::string.
4233         (vfprintf_unfiltered): Likewise.
4234
4235 2017-09-29  Tom Tromey  <tom@tromey.com>
4236
4237         * event-top.c (top_level_prompt): Return std::string.
4238         (display_gdb_prompt): Update.
4239
4240 2017-09-29  Tom Tromey  <tom@tromey.com>
4241
4242         * unittests/common-utils-selftests.c (format): New function.
4243         (string_vprintf_tests): New function.
4244         (_initialize_common_utils_selftests): Register new tests.
4245         * common/common-utils.c (string_vprintf): New function.
4246         * common/common-utils.h (string_vprintf): Declare.
4247
4248 2017-09-29  Pedro Alves  <palves@redhat.com>
4249
4250         * common/rsp-low.c (unpack_varlen_hex): Constify.
4251         * common/rsp-low.h (unpack_varlen_hex): Constify.
4252         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4253         Constify.
4254         * remote.c (remote_set_permissions, read_ptid)
4255         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4256         (remote_static_tracepoint_marker_at)
4257         (remote_static_tracepoint_markers_by_strid)
4258         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4259         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4260         (parse_tracepoint_definition, parse_tsv_definition)
4261         (parse_static_tracepoint_marker_definition): Constify.
4262         * tracepoint.h (parse_static_tracepoint_marker_definition)
4263         (parse_trace_status, parse_tracepoint_status)
4264         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4265
4266 2017-09-29  Pedro Alves  <palves@redhat.com>
4267
4268         * remote.c (target_buf, target_buf_size): Delete.
4269         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4270         Use the connection's packet buffer instead.
4271         All callers adjusted.
4272         (_initialize_remote): Remove references to target_buf and
4273         target_buf_size.
4274
4275 2017-09-28  Pedro Alves  <palves@redhat.com>
4276
4277         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4278         unittests/common-utils-selftests.c.
4279         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4280         (COMMON_OBS): Remove utils-selftests.o.
4281         * utils-selftests.c: Move to ...
4282         * unittests/common-utils-selftests.c: ... here and rename self
4283         test to "string_printf".
4284
4285 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4286
4287         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4288         having NULL cus or tus.
4289
4290 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4291
4292         * arm-tdep.c: (convert_from_extended): Remove.
4293         (convert_to_extended): Likewise.
4294         (arm_extract_return_value): Use convert_typed_floating.
4295         (arm_store_return_value): Likewise.
4296
4297         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4298         * sh-tdep.c: Do not include "floatformat.h".
4299         (sh_littlebyte_bigword_type): New function.
4300         (sh_register_convert_to_virtual): Use convert_typed_floating.
4301         (sh_register_convert_to_raw): Likewise.
4302         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4303         (sh64_littlebyte_bigword_type): New function.
4304         (sh64_extract_return_value): Use convert_typed_floating.
4305         (sh64_register_convert_to_virtual): Likewise.
4306         (sh64_register_convert_to_raw): Likewise.
4307
4308 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4309
4310         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4311         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4312
4313         * gdbtypes.h (union type_specific): Make field floatformat hold
4314         just a single struct floatformat, not an array.
4315         (floatformat_from_type): Move here.
4316         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4317         changed TYPE_FLOATFORMAT definition.
4318         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4319         (recursive_dump_type): Likewise.
4320         (init_float_type): Install correct floatformat for byte order.
4321         (arch_float_type): Likewise.
4322
4323 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4324
4325         * gdbtypes.c (init_type): Change incoming argument from
4326         length-in-bytes to length-in-bits.  Assert length is a
4327         multiple of TARGET_CHAR_BITS.
4328         (arch_type, arch_flags_type): Likewise.
4329         (init_integer_type): Update call to init_type.
4330         (init_character_type): Likewise.
4331         (init_boolean_type): Likewise.
4332         (init_float_type): Likewise.
4333         (init_decfloat_type): Likewise.
4334         (init_complex_type): Likewise.
4335         (init_pointer_type): Likewise.
4336         (objfile_type): Likewise.
4337         (arch_integer_type): Update call to arch_type.
4338         (arch_character_type): Likewise.
4339         (arch_boolean_type): Likewise.
4340         (arch_float_type): Likewise.
4341         (arch_decfloat_type): Likewise.
4342         (arch_complex_type): Likewise.
4343         (arch_pointer_type): Likewise.
4344         (gdbtypes_post_init): Likewise.
4345
4346         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4347         (read_base_type): Likewise.
4348         * mdebugread.c (basic_type): Likewise.
4349         * stabsread.c (dbx_init_float_type): Likewise.
4350         (rs6000_builtin_type): Likewise.
4351         (read_range_type): Likewise.  Also, fix call to init_integer_type
4352         with erroneous length argument.
4353
4354         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4355         * d-lang.c (build_d_types): Likewise.
4356         * f-lang.c (build_fortran_types): Likewise.
4357         * go-lang.c (build_go_types): Likewise.
4358         * opencl-lang.c (build_opencl_types): Likewise.
4359         * jit.c (finalize_symtab): Likewise.
4360         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4361         (build_std_type_info_type): Likewise.
4362         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4363         update call to arch_flags_type.
4364
4365         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4366         arch_type.
4367         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4368         * windows-tdep.c (windows_get_tlb_type): Likewise.
4369
4370         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4371         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4372         * m32c-tdep.c (make_types): Likewise.
4373         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4374         (rl78_psw_type): Update call to arch_flags_type.
4375         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4376         * rx-tdep.c (rx_psw_type): Likewise.
4377         (rx_fpsw_type): Likewise.
4378         * sparc-tdep.c (sparc_psr_type): Likewise.
4379         (sparc_fsr_type): Likewise.
4380         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4381         (sparc64_ccr_type): Likewise.
4382         (sparc64_fsr_type): Likewise.
4383         (sparc64_fprs_type): Likewise.
4384
4385 2017-09-27  Tom Tromey  <tom@tromey.com>
4386
4387         * findcmd.c (find_command): Constify.
4388
4389 2017-09-27  Tom Tromey  <tom@tromey.com>
4390
4391         * ada-tasks.c (task_command_1, task_command): Constify.
4392
4393 2017-09-27  Tom Tromey  <tom@tromey.com>
4394
4395         * symtab.c (maintenance_print_symbol_cache)
4396         (maintenance_flush_symbol_cache)
4397         (maintenance_print_symbol_cache_statistics): Constify.
4398
4399 2017-09-27  Tom Tromey  <tom@tromey.com>
4400
4401         * inferior.c (detach_inferior_command, kill_inferior_command)
4402         (inferior_command): Constify.
4403
4404 2017-09-27  Tom Tromey  <tom@tromey.com>
4405
4406         * regcache.c (regcache_print, maintenance_print_registers)
4407         (maintenance_print_raw_registers)
4408         (maintenance_print_cooked_registers)
4409         (maintenance_print_register_groups)
4410         (maintenance_print_remote_registers): Constify.
4411
4412 2017-09-27  Tom Tromey  <tom@tromey.com>
4413
4414         * printcmd.c (map_display_numbers, undisplay_command)
4415         (enable_disable_display_command, enable_display_command)
4416         (disable_display_command): Constify.
4417
4418 2017-09-27  Tom Tromey  <tom@tromey.com>
4419
4420         * breakpoint.h (delete_command): Don't declare.
4421         * breakpoint.c (delete_command, enable_once_command)
4422         (enable_count_command, enable_delete_command, breakpoint_1)
4423         (maintenance_info_breakpoints, stopin_command, stopat_command)
4424         (delete_command, delete_trace_command, save_breakpoints)
4425         (save_breakpoints_command, save_tracepoints_command): Constify.
4426
4427 2017-09-27  Tom Tromey  <tom@tromey.com>
4428
4429         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4430         (skip_ws, extract_identifier, macro_define_command)
4431         (macro_undef_command, macro_list_command): Constify.
4432
4433 2017-09-27  Tom Tromey  <tom@tromey.com>
4434
4435         * infcmd.c (environment_info, set_environment_command)
4436         (unset_environment_command, path_info, info_proc_cmd_1)
4437         (info_proc_cmd_mappings, info_proc_cmd_stat)
4438         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4439         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4440
4441 2017-09-27  Tom Tromey  <tom@tromey.com>
4442
4443         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4444         Constify.
4445
4446 2017-09-27  Tom Tromey  <tom@tromey.com>
4447
4448         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4449
4450 2017-09-27  Tom Tromey  <tom@tromey.com>
4451
4452         * demangle.c (demangle_command): Constify.
4453
4454 2017-09-27  Tom Tromey  <tom@tromey.com>
4455
4456         * progspace.c (maintenance_info_program_spaces_command):
4457         Constify.
4458
4459 2017-09-27  Tom Tromey  <tom@tromey.com>
4460
4461         * compile/compile.c (check_raw_argument, compile_file_command)
4462         (compile_code_command, compile_print_command): Constify.
4463
4464 2017-09-27  Tom Tromey  <tom@tromey.com>
4465
4466         * reggroups.c (maintenance_print_reggroups): Constify.
4467
4468 2017-09-27  Tom Tromey  <tom@tromey.com>
4469
4470         * dwarf2read.c (save_gdb_index_command): Constify.
4471
4472 2017-09-27  Tom Tromey  <tom@tromey.com>
4473
4474         * stap-probe.c (info_probes_stap_command): Constify.
4475
4476 2017-09-27  Tom Tromey  <tom@tromey.com>
4477
4478         * fork-child.c (unset_exec_wrapper_command): Constify.
4479
4480 2017-09-27  Tom Tromey  <tom@tromey.com>
4481
4482         * btrace.c (get_uint, get_context_size, no_chunk)
4483         (maint_btrace_packet_history_cmd)
4484         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4485         (maint_info_btrace_cmd): Constify.
4486
4487 2017-09-27  Tom Tromey  <tom@tromey.com>
4488
4489         * reverse.c (delete_bookmark_command): Constify.
4490
4491 2017-09-27  Tom Tromey  <tom@tromey.com>
4492
4493         * remote.c (set_memory_packet_size)
4494         (set_memory_write_packet_size, show_memory_write_packet_size)
4495         (set_memory_read_packet_size, show_memory_read_packet_size)
4496         (compare_sections_command, packet_command, remote_put_command)
4497         (remote_get_command, remote_delete_command): Constify.
4498
4499 2017-09-27  Tom Tromey  <tom@tromey.com>
4500
4501         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4502         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4503         (set_mipsfpu_auto_command): Constify.
4504
4505 2017-09-27  Tom Tromey  <tom@tromey.com>
4506
4507         * cli/cli-cmds.h (cd_command): Constify.
4508         * cli/cli-cmds.c (cd_command): Constify.
4509
4510 2017-09-27  Tom Tromey  <tom@tromey.com>
4511
4512         * thread.c (thread_name_command, thread_find_command): Constify.
4513
4514 2017-09-27  Tom Tromey  <tom@tromey.com>
4515
4516         * probe.c (enable_probes_command, disable_probes_command):
4517         Constify.
4518
4519 2017-09-27  Tom Tromey  <tom@tromey.com>
4520
4521         * symfile.c (symbol_file_command): Constify.
4522         * gdbcore.h (deprecated_file_changed_hook): Constify.
4523         * exec.c (deprecated_file_changed_hook, exec_file_command)
4524         (file_command): Constify.
4525         * defs.h (symbol_file_command): Constify.
4526
4527 2017-09-27  Tom Tromey  <tom@tromey.com>
4528
4529         * remote-fileio.c (set_system_call_allowed)
4530         (show_system_call_allowed): Constify.
4531
4532 2017-09-27  Tom Tromey  <tom@tromey.com>
4533
4534         * tracepoint.c (delete_trace_variable_command)
4535         (tfind_end_command, tfind_start_command, tfind_pc_command)
4536         (tfind_tracepoint_command, tfind_line_command)
4537         (tfind_range_command, tfind_outside_command): Constify.
4538
4539 2017-09-27  Tom Tromey  <tom@tromey.com>
4540
4541         * ax-gdb.c (maint_agent_printf_command, agent_command)
4542         (agent_eval_command): Constify.
4543
4544 2017-09-27  Tom Tromey  <tom@tromey.com>
4545
4546         * tracepoint.c (info_scope_command): Constify.
4547         * python/python.c (gdbpy_decode_line): Constify.
4548         * python/py-breakpoint.c (bppy_init): Constify.
4549         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4550         * location.h: (new_linespec_location)
4551         (string_to_event_location_basic, string_to_event_location):
4552         Constify.
4553         * location.c (new_linespec_location)
4554         (string_to_event_location_basic, string_to_event_location):
4555         Constify.
4556         * linespec.h (decode_line_with_current_source)
4557         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4558         * linespec.c (linespec_lex_to_end)
4559         (decode_line_with_current_source)
4560         (decode_line_with_last_displayed): Constify.
4561         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4562         Constify.
4563         * cli/cli-cmds.c (edit_command, list_command): Constify.
4564         * breakpoint.h (until_break_command, watch_command_wrapper)
4565         (awatch_command_wrapper, rwatch_command_wrapper)
4566         (init_ada_exception_breakpoint): Constify.
4567         * breakpoint.c (break_command_1, dprintf_command)
4568         (break_range_command, watch_command_wrapper)
4569         (rwatch_command_wrapper, awatch_command_wrapper)
4570         (until_break_command, init_ada_exception_breakpoint)
4571         (strace_marker_create_sals_from_location, trace_command)
4572         (ftrace_command, strace_command, struct tracepoint): Constify.
4573         * ax-gdb.c (agent_command_1): Constify.
4574         * ada-lang.c (ada_exception_sal): Constify.
4575
4576 2017-09-27  Tom Tromey  <tom@tromey.com>
4577
4578         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4579         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4580         (get_context_size, no_chunk, get_insn_history_modifiers)
4581         (cmd_record_insn_history, get_call_history_modifiers)
4582         (cmd_record_call_history): Constify.
4583
4584 2017-09-27  Tom Tromey  <tom@tromey.com>
4585
4586         * source.c (show_substitute_path_command)
4587         (unset_substitute_path_command, set_substitute_path_command):
4588         Constify.
4589
4590 2017-09-27  Tom Tromey  <tom@tromey.com>
4591
4592         * typeprint.c (maintenance_print_type): Constify.
4593         * maint.c (maintenance_dump_me, maintenance_demangle)
4594         (maintenance_time_display, maintenance_info_sections)
4595         (maintenance_print_statistics, maintenance_deprecate)
4596         (maintenance_undeprecate): Constify.
4597         (maintenance_do_deprecate): Constify.  Use std::string.
4598         (maintenance_selftest): Constify.
4599         * gdbtypes.h (maintenance_print_type): Constify.
4600
4601 2017-09-27  Tom Tromey  <tom@tromey.com>
4602
4603         * hppa-tdep.c (unwind_command): Constify.
4604
4605 2017-09-27  Tom Tromey  <tom@tromey.com>
4606
4607         * target-descriptions.c (unset_tdesc_filename_cmd)
4608         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4609         Constify.
4610
4611 2017-09-27  Tom Tromey  <tom@tromey.com>
4612
4613         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4614
4615 2017-09-27  Tom Tromey  <tom@tromey.com>
4616
4617         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4618
4619 2017-09-27  Tom Tromey  <tom@tromey.com>
4620
4621         * tui/tui-regs.c (tui_reg_command): Constify.
4622
4623 2017-09-27  Tom Tromey  <tom@tromey.com>
4624
4625         * skip.c (skip_file_command, skip_function_command)
4626         (skip_enable_command, skip_disable_command, skip_delete_command):
4627         Constify.
4628
4629 2017-09-27  Tom Tromey  <tom@tromey.com>
4630
4631         * record-btrace.c (cmd_record_btrace_bts_start)
4632         (cmd_record_btrace_pt_start): Constify.
4633
4634 2017-09-27  Tom Tromey  <tom@tromey.com>
4635
4636         * symmisc.c (maintenance_print_symbols)
4637         (maintenance_print_msymbols, maintenance_print_objfiles)
4638         (maintenance_info_symtabs, maintenance_check_symtabs)
4639         (maintenance_expand_symtabs, maintenance_info_line_tables):
4640         Constify.
4641
4642 2017-09-27  Tom Tromey  <tom@tromey.com>
4643
4644         * top.c (new_ui_command): Constify.
4645
4646 2017-09-27  Tom Tromey  <tom@tromey.com>
4647
4648         * symfile.c (add_symbol_file_command)
4649         (remove_symbol_file_command, list_overlays_command)
4650         (map_overlay_command, unmap_overlay_command)
4651         (overlay_auto_command, overlay_manual_command)
4652         (overlay_off_command, overlay_load_command): Constify.
4653
4654 2017-09-27  Tom Tromey  <tom@tromey.com>
4655
4656         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4657         (info_spu_mailbox_command, info_spu_dma_command)
4658         (info_spu_proxydma_command): Constify.
4659
4660 2017-09-27  Tom Tromey  <tom@tromey.com>
4661
4662         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4663
4664 2017-09-27  Tom Tromey  <tom@tromey.com>
4665
4666         * cli/cli-script.c (user_defined_command): Constify.
4667
4668 2017-09-27  Tom Tromey  <tom@tromey.com>
4669
4670         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4671         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4672         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4673         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4674         (dump_binary_value, append_binary_memory, append_binary_value):
4675         Constify.
4676         (struct dump_context) <func>: Constify.
4677         (add_dump_command): Update.
4678
4679 2017-09-27  Tom Tromey  <tom@tromey.com>
4680
4681         * cli/cli-cmds.c (show_version, show_configuration)
4682         (source_command, show_user): Constify.
4683
4684 2017-09-27  Tom Tromey  <tom@tromey.com>
4685
4686         * target.c (maintenance_print_target_stack): Constify.
4687
4688 2017-09-27  Tom Tromey  <tom@tromey.com>
4689
4690         * interps.c (interpreter_exec_cmd): Constify.
4691
4692 2017-09-27  Tom Tromey  <tom@tromey.com>
4693
4694         * record-full.c (cmd_record_full_restore): Constify.
4695
4696 2017-09-27  Tom Tromey  <tom@tromey.com>
4697
4698         * memattr.c (enable_mem_command, disable_mem_command)
4699         (delete_mem_command): Constify.
4700
4701 2017-09-27  Tom Tromey  <tom@tromey.com>
4702
4703         * value.c (show_convenience): Constify.
4704
4705 2017-09-27  Tom Tromey  <tom@tromey.com>
4706
4707         * gdbcore.h (core_file_command): Update.
4708         * corefile.c (core_file_command): Constify.
4709
4710 2017-09-27  Tom Tromey  <tom@tromey.com>
4711
4712         * user-regs.c (maintenance_print_user_registers): Constify.
4713
4714 2017-09-27  Tom Tromey  <tom@tromey.com>
4715
4716         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4717
4718 2017-09-27  Tom Tromey  <tom@tromey.com>
4719
4720         * cp-support.c (first_component_command): Constify.
4721
4722 2017-09-27  Tom Tromey  <tom@tromey.com>
4723
4724         * psymtab.c (maintenance_print_psymbols)
4725         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4726         Constify.
4727
4728 2017-09-27  Tom Tromey  <tom@tromey.com>
4729
4730         * windows-tdep.c (display_tib): Constify.
4731
4732 2017-09-27  Tom Tromey  <tom@tromey.com>
4733
4734         * linux-fork.c (delete_checkpoint_command)
4735         (detach_checkpoint_command): Constify.
4736
4737 2017-09-27  Tom Tromey  <tom@tromey.com>
4738
4739         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4740
4741 2017-09-27  Tom Tromey  <tom@tromey.com>
4742
4743         * arc-tdep.c (dump_arc_instruction_command): Constify.
4744
4745 2017-09-27  Tom Tromey  <tom@tromey.com>
4746
4747         * valprint.c (set_radix, show_radix): Constify.
4748
4749 2017-09-27  Tom Tromey  <tom@tromey.com>
4750
4751         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4752
4753 2017-09-27  Tom Tromey  <tom@tromey.com>
4754
4755         * command.h (not_just_help_class_command): Update.
4756         * cli/cli-decode.h (not_just_help_class_command): Update.
4757         * cli/cli-decode.c (not_just_help_class_command): Constify.
4758
4759 2017-09-27  Tom Tromey  <tom@tromey.com>
4760
4761         * gdb_bfd.c (maintenance_info_bfds): Constify.
4762
4763 2017-09-27  Tom Tromey  <tom@tromey.com>
4764
4765         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4766         overloads.
4767         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4768         (do_const_cfunc): New function.
4769         (cmd_cfunc_eq): New overload.
4770         (cli_user_command_p): Check do_const_cfunc.
4771         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4772         const_cfunc.
4773         * command.h (add_cmd): Add const overload and no-function
4774         overload.
4775         (set_cmd_cfunc): Add const overload.
4776         (cmd_const_cfunc_ftype): Declare.
4777         (cmd_cfunc_eq): Add const overload.
4778         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4779         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4780         overload.
4781
4782 2017-09-27  Tom Tromey  <tom@tromey.com>
4783
4784         * macroexp.c (get_next_token_for_substitution): New function.
4785         (substitute_args): Call it.  Check for __VA_OPT__.
4786
4787 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4788             Pedro Alves <palves@redhat.com>
4789
4790         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4791         producer_is_icc_lt_14.
4792         (producer_is_icc_lt_14): New function.
4793         (check_producer): Add code for checking version of ICC.
4794         (producer_is_icc): Move to producer.c.
4795         (read_structure_type): Restrict ICC workaround to ICC<14.
4796         * producer.c: Include selftest.h.
4797         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4798         New functions.
4799         * producer.h (producer_is_icc): New declaration.
4800
4801 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4802
4803         * Makefile.in (SFILES): Add producer.c.
4804         (COMMON_OBS): Add producer.o
4805         * amd64-tdep.c (producer.h): Add new include.
4806         * dwarf2read.c (producer.h): Add new include.
4807         * producer.c: New file.
4808         * producer.h: New file.
4809         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4810         producer.c.
4811         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4812         producer.h.
4813
4814 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4815
4816         * configure.ac: Search ncursesw before ncurses.
4817         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4818         * gdb_curses.h: Include <ncursesw/ncurses.h>
4819         * config.in, configure: Regenerate.
4820
4821 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4822
4823         PR gdb/22185
4824         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4825         obsolete.
4826         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4827         Remove i386sol2 support.
4828         * configure.nat <i386sol2>: Remove.
4829         <sol2-64>: Fold into ...
4830         <sol2>: ... this.
4831         Move common settings to default section.
4832         Add sol-thread.o.
4833         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4834         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4835         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4836         <i[34567]86-*-solaris*>: Remove.
4837         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4838
4839         * configure.ac: Remove wctype in libw check.
4840         (_MSE_INT_H): Don't define on Solaris 7-9.
4841         <solaris*>: Remove libthread_db.so.1 check.
4842         * configure: Regenerate.
4843         * config.in: Regenerate.
4844
4845         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4846         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4847         (gdb_ps_size_t): Remove.
4848         Use base types in users.
4849         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4850
4851         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4852
4853 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4854
4855         PR build/22206
4856         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4857         (adi_is_addr_mapped): Likewise.
4858         (PSR_ICC): Don't redefine.
4859         (PSR_IMPL): Likewise.
4860
4861 2017-09-25  Tom Tromey  <tom@tromey.com>
4862
4863         * regcache.c (regcache::dump): Use string_printf.
4864
4865 2017-09-25  Tom Tromey  <tom@tromey.com>
4866
4867         * regcache.c (class regcache_invalidator): New.
4868         (struct register_to_invalidate): Remove.
4869         (make_cleanup_regcache_invalidate): Remove.
4870         (regcache::raw_write): Use regcache_invalidator.
4871
4872 2017-09-25  Tom Tromey  <tom@tromey.com>
4873
4874         * spu-tdep.c (spu2ppu_sniffer): Update.
4875         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4876         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4877         Remove.
4878         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4879         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4880         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4881         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4882         (frame_pop): Update.
4883
4884 2017-09-25  Tom Tromey  <tom@tromey.com>
4885
4886         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4887         * regcache.h (regcache_xfree): Don't declare.
4888         * regcache.c (regcache_xfree): Remove.
4889         (do_regcache_xfree): Use delete.
4890         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4891         * linux-fork.c (free_fork): Use delete.
4892         (fork_save_infrun_state): Likewise.
4893         * jit.c (jit_dealloc_cache): Use delete.
4894         * infrun.c (discard_infcall_suspend_state): Use delete.
4895
4896 2017-09-25  Tom Tromey  <tom@tromey.com>
4897
4898         * regcache.h (regcache_xmalloc): Don't declare.
4899         (regcache_raw_set_cached_value): Update comment.
4900         * regcache.c (regcache_xmalloc): Remove.
4901         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4902         * jit.c (jit_frame_sniffer): Use new.
4903         * frame.c (frame_save_as_regcache): Use new.
4904
4905 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4906
4907         * NEWS: Advertise support for guarded-storage registers on IBM z.
4908
4909 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4910
4911         * s390-linux-nat.c (have_regset_gs): New static variable.
4912         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4913         control block and guarded-storage broadcast control regsets.
4914         (s390_read_description): Detect whether the target has
4915         guarded-storage support, return appropriate tdesc.
4916         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4917         (features/s390x-gs-linux64.c): Likewise.
4918         (struct gdbarch_tdep) <have_gs>: New field.
4919         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4920         (s390_gsbc_regset): New variables.
4921         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4922         and s390_gsbc_regset, if applicable.
4923         (s390_core_read_description): Check whether core file was from a
4924         target with guarded-storage support; include appropriate regsets.
4925         (s390_gdbarch_init): Add registers for guarded-storage support.
4926         (_initialize_s390_tdep): Initialize new target descriptions that
4927         include registers for guarded-storage support.
4928         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4929         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4930         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4931         (S390_NUM_REGS): Adjust macro definition.
4932         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4933         (tdesc_s390x_gs_linux64): New declarations.
4934
4935 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4936
4937         * features/s390-gs-linux64.xml: New file.
4938         * features/s390-gs.xml: New file.
4939         * features/s390-gsbc.xml: New file.
4940         * features/s390x-gs-linux64.xml: New file.
4941         * features/Makefile (WHICH): Add s390-gs-linux64 and
4942         s390x-gs-linux64.
4943         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4944         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4945         * features/s390-gs-linux64.c: New generated file.
4946         * features/s390x-gs-linux64.c: New file.
4947         * regformats/s390-gs-linux64.dat: New file.
4948         * regformats/s390x-gs-linux64.dat: New file.
4949
4950 2017-09-23  Tom Tromey  <tom@tromey.com>
4951
4952         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4953
4954 2017-09-22  Tom Tromey  <tom@tromey.com>
4955
4956         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4957         type to scoped_restore_tmpl.
4958         <scoped_input_handler>: Initialize m_quit_handler directly.
4959
4960 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4961
4962         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4963         (cd_command): Likewise.  Free "current_directory" before
4964         assigning to it.
4965         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4966         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4967         * top.c (gdb_dirbuf): Remove global declaration.
4968         * top.h (gdb_dirbuf): Likewise.
4969
4970 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4971
4972         * gnulib/aclocal.m4: Regenerate.
4973         * gnulib/config.in: Regenerate.
4974         * gnulib/configure: Regenerate.
4975         * gnulib/import/Makefile.am: Regenerate.
4976         * gnulib/import/Makefile.in: Regenerate.
4977         * gnulib/import/assure.h: New file.
4978         * gnulib/import/at-func.c: Likewise
4979         * gnulib/import/chdir-long.c: New file.
4980         * gnulib/import/chdir-long.h: New file.
4981         * gnulib/import/cloexec.c: New file.
4982         * gnulib/import/cloexec.h: New file.
4983         * gnulib/import/close.c: New file.
4984         * gnulib/import/closedir.c: New file.
4985         * gnulib/import/dirent-private.h: New file.
4986         * gnulib/import/dup-safer.c: New file.
4987         * gnulib/import/dup.c: New file.
4988         * gnulib/import/dup2.c: New file.
4989         * gnulib/import/error.c: New file.
4990         * gnulib/import/error.h: New file.
4991         * gnulib/import/exitfail.c: New file.
4992         * gnulib/import/exitfail.h: New file.
4993         * gnulib/import/fchdir.c: New file.
4994         * gnulib/import/fcntl.c: New file.
4995         * gnulib/import/fcntl.in.h: New file.
4996         * gnulib/import/fd-hook.c: New file.
4997         * gnulib/import/fd-hook.h: New file.
4998         * gnulib/import/fd-safer.c: New file.
4999         * gnulib/import/fdopendir.c: New file.
5000         * gnulib/import/filename.h: New file.
5001         * gnulib/import/filenamecat-lgpl.c: New file.
5002         * gnulib/import/filenamecat.h: New file.
5003         * gnulib/import/fstat.c: New file.
5004         * gnulib/import/fstatat.c: New file.
5005         * gnulib/import/getcwd-lgpl.c: New file.
5006         * gnulib/import/getcwd.c: New file.
5007         * gnulib/import/getdtablesize.c: New file.
5008         * gnulib/import/getlogin_r.c: New file.
5009         * gnulib/import/getprogname.c: New file.
5010         * gnulib/import/getprogname.h: New file.
5011         * gnulib/import/gettext.h: New file.
5012         * gnulib/import/glob-libc.h: New file.
5013         * gnulib/import/glob.c: New file.
5014         * gnulib/import/glob.in.h: New file.
5015         * gnulib/import/intprops.h: New file.
5016         * gnulib/import/m4/chdir-long.m4: New file.
5017         * gnulib/import/m4/close.m4: New file.
5018         * gnulib/import/m4/closedir.m4: New file.
5019         * gnulib/import/m4/d-ino.m4: New file.
5020         * gnulib/import/m4/d-type.m4: New file.
5021         * gnulib/import/m4/dup.m4: New file.
5022         * gnulib/import/m4/dup2.m4: New file.
5023         * gnulib/import/m4/error.m4: New file.
5024         * gnulib/import/m4/fchdir.m4: New file.
5025         * gnulib/import/m4/fcntl.m4: New file.
5026         * gnulib/import/m4/fcntl_h.m4: New file.
5027         * gnulib/import/m4/fdopendir.m4: New file.
5028         * gnulib/import/m4/filenamecat.m4: New file.
5029         * gnulib/import/m4/fstat.m4: New file.
5030         * gnulib/import/m4/fstatat.m4: New file.
5031         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5032         * gnulib/import/m4/getcwd-path-max.m4: New file.
5033         * gnulib/import/m4/getcwd.m4: New file.
5034         * gnulib/import/m4/getdtablesize.m4: New file.
5035         * gnulib/import/m4/getlogin_r.m4: New file.
5036         * gnulib/import/m4/getprogname.m4: New file.
5037         * gnulib/import/m4/glob.m4: New file.
5038         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5039         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5040         * gnulib/import/m4/mempcpy.m4: New file.
5041         * gnulib/import/m4/memrchr.m4: New file.
5042         * gnulib/import/m4/mode_t.m4: New file.
5043         * gnulib/import/m4/msvc-inval.m4: New file.
5044         * gnulib/import/m4/msvc-nothrow.m4: New file.
5045         * gnulib/import/m4/open.m4: New file.
5046         * gnulib/import/m4/openat.m4: New file.
5047         * gnulib/import/m4/opendir.m4: New file.
5048         * gnulib/import/m4/readdir.m4: New file.
5049         * gnulib/import/m4/realloc.m4: New file.
5050         * gnulib/import/m4/rewinddir.m4: New file.
5051         * gnulib/import/m4/save-cwd.m4: New file.
5052         * gnulib/import/m4/strdup.m4: New file.
5053         * gnulib/import/m4/strerror.m4: New file.
5054         * gnulib/import/m4/unistd-safer.m4: New file.
5055         * gnulib/import/mempcpy.c: New file.
5056         * gnulib/import/memrchr.c: New file.
5057         * gnulib/import/msvc-inval.c: New file.
5058         * gnulib/import/msvc-inval.h: New file.
5059         * gnulib/import/msvc-nothrow.c: New file.
5060         * gnulib/import/msvc-nothrow.h: New file.
5061         * gnulib/import/open.c: New file.
5062         * gnulib/import/openat-die.c: New file.
5063         * gnulib/import/openat-priv.h: New file.
5064         * gnulib/import/openat-proc.c: New file.
5065         * gnulib/import/openat.c: New file.
5066         * gnulib/import/openat.h: New file.
5067         * gnulib/import/opendir.c: New file.
5068         * gnulib/import/pipe-safer.c: New file.
5069         * gnulib/import/readdir.c: New file.
5070         * gnulib/import/realloc.c: New file.
5071         * gnulib/import/rewinddir.c: New file.
5072         * gnulib/import/save-cwd.c: New file.
5073         * gnulib/import/save-cwd.h: New file.
5074         * gnulib/import/strdup.c: New file.
5075         * gnulib/import/strerror-override.c: New file.
5076         * gnulib/import/strerror-override.h: New file.
5077         * gnulib/import/strerror.c: New file.
5078         * gnulib/import/unistd--.h: New file.
5079         * gnulib/import/unistd-safer.h: New file.
5080         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5081         "getcwd" and "glob".
5082         * ser-tcp.c: Undefine "close" before redefining it.
5083
5084 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5085
5086         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5087         get rid of res_val.
5088
5089 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5090
5091         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5092         <sol2,sparc>: Likewise.
5093         <sol2-64,i386>: Likewise.
5094
5095         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5096         -Wdeprecated-declarations on *-*-solaris*.
5097         * configure: Regenerate.
5098
5099         * procfs.c: Include "nat/inferior.h".
5100         (procfs_info_proc): Fix typo.
5101
5102 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5103
5104         * remote.c (vector): Include.
5105         (struct private_thread_info): Add field, thread_handle.
5106         (free_private_thread_info): Deallocate storage associated with
5107         thread handle.
5108         (get_private_info_thread): Initialize `thread_handle' field.
5109         (struct thread_item): Add field, thread_handle.
5110         (clear_threads_listing_context): Deallocate storage associated
5111         with thread handle.
5112         (start_thread): Add support for "handle" attribute.
5113         (thread_attributes): Add "handle".
5114         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5115         field.
5116         (remote_update_thread_list): Update thread_handle.
5117         (remote_thread_handle_to_thread_info): New function.
5118         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5119
5120 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5121
5122         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5123         function.
5124         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5125         * python/python-internal.h (thread_object_type): Declare.
5126
5127 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5128
5129         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5130         (target_thread_handle_to_thread_info): Declare.
5131         * target.c (target_thread_handle_to_thread_info): New function.
5132         * target-delegates.c: Regenerate.
5133         * gdbthread.h (find_thread_by_handle): Declare.
5134         * thread.c (find_thread_by_handle): New function.
5135         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5136         function.
5137         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5138
5139 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5140
5141         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5142
5143 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5144
5145         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5146
5147 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5148
5149         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5150         to gdb_target_obs.
5151
5152 2017-09-20  Tom Tromey  <tom@tromey.com>
5153
5154         * breakpoint.c (struct counted_command_line): Remove.
5155         (breakpoint_commands): Update.
5156         (alloc_counted_command_line, incref_counted_command_line)
5157         (decref_counted_command_line, do_cleanup_counted_command_line)
5158         (make_cleanup_decref_counted_command_line): Remove.
5159         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5160         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5161         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5162         (save_breakpoints): Update.
5163         * breakpoint.h (counted_command_line): Now a typedef to
5164         shared_ptr.
5165         (struct breakpoint) <commands>: Now a counted_command_line.
5166         (struct bpstats) <command>: Likewise.
5167
5168 2017-09-20  Tom Tromey  <tom@tromey.com>
5169
5170         * breakpoint.c (struct commands_info, do_map_commands_command):
5171         Remove.
5172         (commands_command_1): Update.
5173         (iterate_over_related_breakpoints): Take a function_view.
5174         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5175         (delete_command): Update.
5176         (map_breakpoint_numbers): Take a function_view.
5177         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5178         (disable_command): Update.
5179         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5180         (enable_command): Update.
5181         (struct disp_data, do_enable_breakpoint_disp)
5182         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5183         (do_map_enable_delete_breakpoint): Remove.
5184         (enable_once_command, enable_count_command, enable_delete_command)
5185         (delete_trace_variable_command): Update.
5186
5187 2017-09-20  Tom Tromey  <tom@tromey.com>
5188
5189         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5190         (bpstat_clear): Use delete.
5191         (bpstats): New constructors.
5192         (bpstat_copy, bpstat_stop_status): Use new.
5193         (dprintf_after_condition_true): Update.
5194         * breakpoint.h (bpstats::bpstats): Add constructors.
5195         (bpstats::~bpstats): Add destructor.
5196
5197 2017-09-20  Pedro Alves  <palves@redhat.com>
5198
5199         * eval.c (make_params): Delete, refactored as ...
5200         (class fake_method): ... this new type's ctor.
5201         (fake_method::~fake_method): New.
5202         (evaluate_subexp_standard): Use 'fake_method'.
5203
5204 2017-09-20  Tom Tromey  <tom@tromey.com>
5205
5206         * windows-nat.c (get_windows_debug_event, windows_wait)
5207         (do_initial_windows_stuff, windows_attach): Update.
5208         * utils.c (vwarning, internal_vproblem): Update.
5209         (ui_unregister_input_event_handler_cleanup)
5210         (prepare_to_handle_input): Remove.
5211         (class scoped_input_handler): New.
5212         (defaulted_query, prompt_for_continue): Update.
5213         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5214         Update.
5215         * top.c (undo_terminal_modifications_before_exit): Update.
5216         * target/target.h (target_terminal_init, target_terminal_inferior)
5217         (target_terminal_ours): Don't declare.
5218         (class target_terminal): New.
5219         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5220         (target_terminal_ours_for_output)
5221         (make_cleanup_restore_target_terminal): Don't declare.
5222         (target_terminal_info): Remove.
5223         * target.c (enum terminal_state, terminal_state): Remove.
5224         (target_terminal::terminal_state): Define.
5225         (target_terminal::init): Rename from target_terminal_init.
5226         (target_terminal::inferior): Rename from
5227         target_terminal_inferior.
5228         (target_terminal::ours): Rename from target_terminal_ours.
5229         (target_terminal::ours_for_output): Rename from
5230         target_terminal_ours_for_output.
5231         (target_terminal::info): New method.
5232         (cleanup_restore_target_terminal)
5233         (make_cleanup_restore_target_terminal): Remove.
5234         * solib.c (handle_solib_event): Update.
5235         * remote.c (remote_serial_quit_handler): Update.
5236         (remote_terminal_inferior, remote_wait_as): Update.
5237         * record-full.c (record_full_wait_1): Update.
5238         * nto-procfs.c (procfs_create_inferior): Update.
5239         * nat/fork-inferior.c (startup_inferior): Update.
5240         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5241         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5242         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5243         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5244         (mi_breakpoint_created, mi_breakpoint_deleted)
5245         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5246         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5247         (mi_user_selected_context_changed, report_initial_inferior):
5248         Update.
5249         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5250         (linux_nat_terminal_inferior): Update.
5251         * infrun.c (follow_fork_inferior)
5252         (handle_vfork_child_exec_or_exit, do_target_resume)
5253         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5254         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5255         Update.
5256         * inflow.c (child_terminal_init, info_terminal_command): Update.
5257         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5258         (attach_command): Update.
5259         * infcall.c (call_thread_fsm_should_stop): Update.
5260         * gnu-nat.c (gnu_attach): Update.
5261         * extension.c (struct active_ext_lang_state)
5262         (restore_active_ext_lang): Update.
5263         * exceptions.c (print_flush): Update.
5264         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5265         (struct quit_handler_cleanup_data, restore_quit_handler)
5266         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5267         Remove.
5268         * cp-support.c (gdb_demangle): Update.
5269         * breakpoint.c (update_inserted_breakpoint_locations)
5270         (insert_breakpoint_locations, handle_jit_event)
5271         (disable_breakpoints_in_unloaded_shlib): Update.
5272         * annotate.c (annotate_breakpoints_invalid)
5273         (annotate_frames_invalid): Update.
5274
5275 2017-09-20  Tom Tromey  <tom@tromey.com>
5276
5277         * main.c (catch_command_errors): Rename from
5278         catch_command_errors_const.
5279         (captured_main_1): Update.
5280
5281 2017-09-20  Pedro Alves  <palves@redhat.com>
5282
5283         * cli/cli-cmds.c (list_command): Use print_sal_location.
5284         (print_sal_location): New function.
5285         (ambiguous_line_spec): Use print_sal_location.
5286         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5287         * symtab.c (find_function_start_sal): Likewise.
5288         * symtab.h (symtab_and_line::symbol): New field.
5289
5290 2017-09-20  Pedro Alves  <palves@redhat.com>
5291
5292         * linespec.c (minsym_found): Handle non-text minsyms.
5293         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5294
5295 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5296
5297         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5298         backslash.
5299
5300 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5301
5302         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5303         vmovups instead vmovaps.
5304         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5305
5306 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5307
5308         * NEWS (Changes since GDB 8.0): Add starti.
5309         * infcmd.c (enum run_break): New.
5310         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5311         case.
5312         (run_command): Use enum run_how.
5313         (start_command): Likewise.
5314         (starti_command): New function.
5315         (RUN_ARGS_HELP): New macro.
5316         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5317         commands.  Add starti command.
5318
5319 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5320
5321         * Makefile.in (monitor.o): Remove the rule.
5322
5323 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5324
5325         * annotate.h (struct annotate_arg_emitter): Use
5326         DISABLE_COPY_AND_ASSIGN.
5327         * common/refcounted-object.h (refcounted_object): Likewise.
5328         * completer.h (struct completion_result): Likewise.
5329         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5330         * filename-seen-cache.h (filename_seen_cache): Likewise.
5331         * gdbcore.h (thread_section_name): Likewise.
5332         * gdb_regex.h (compiled_regex): Likewise.
5333         * gdbthread.h (scoped_restore_current_thread): Likewise.
5334         * inferior.h (scoped_restore_current_inferior): Likewise.
5335         * jit.c (jit_reader): Likewise.
5336         * linespec.h (struct linespec_result): Likewise.
5337         * mi/mi-parse.h (struct mi_parse): Likewise.
5338         * nat/fork-inferior.c (execv_argv): Likewise.
5339         * progspace.h (scoped_restore_current_program_space): Likewise.
5340         * python/python-internal.h (class gdbpy_enter): Likewise.
5341         * regcache.h (regcache): Likewise.
5342         * target-descriptions.c (struct tdesc_reg): Likewise.
5343         (struct tdesc_type): Likewise.
5344         (struct tdesc_feature): Likewise.
5345         * ui-out.h (ui_out_emit_type): Likewise.
5346
5347 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5348
5349         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5350         label abort_expression.
5351
5352 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5353
5354         * common/buffer.c (buffer_xml_printf): Adjust.
5355         * common/xml-utils.c (xml_escape_text): Change return type to
5356         std::string, update code accordingly.
5357         * common/xml-utils.h (xml_escape_text): Change return type to
5358         std::string.
5359         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5360         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5361         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5362         Adjust.
5363
5364 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5365
5366         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5367         (SUBDIR_UNITTESTS_OBS): Add new object file.
5368         * unittests/xml-utils-selftests.c: New file.
5369
5370 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5371
5372         * common/selftest.h (selftest): New struct/interface.
5373         (register_test): Add name parameter, add new overload.
5374         (run_tests): Add filter parameter.
5375         (for_each_selftest_ftype): New typedef.
5376         (for_each_selftest): New declaration.
5377         * common/selftest.c (tests): Change type to
5378         map<string, unique_ptr<selftest>>.
5379         (simple_selftest): New struct.
5380         (register_test): New function.
5381         (register_test): Add name parameter and use it.
5382         (run_tests): Add filter parameter and use it.  Add prints.
5383         Adjust to vector -> map change.
5384         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5385         registering selftests.
5386         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5387         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5388         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5389         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5390         * findvar.c (_initialize_findvar): Likewise.
5391         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5392         * maint.c (maintenance_selftest): Update call to run_tests.
5393         (maintenance_info_selftests): New function.
5394         (_initialize_maint_cmds): Register "maintenance info selftests"
5395         command.  Update "maintenance selftest" doc.
5396         * regcache.c (_initialize_regcache): Add names when registering
5397         selftests.
5398         * rust-exp.y (_initialize_rust_exp): Likewise.
5399         * selftest-arch.c (gdbarch_selftest): New struct.
5400         (gdbarch_tests): Remove.
5401         (register_test_foreach_arch): Add name parameter.  Call
5402         register_test.
5403         (tests_with_arch): Remove, move most content to
5404         gdbarch_selftest::operator().
5405         (_initialize_selftests_foreach_arch): Remove.
5406         * selftest-arch.h (register_test_foreach_arch): Add name
5407         parameter.
5408         (run_tests_with_arch): New declaration.
5409         * utils-selftests.c (_initialize_utils_selftests): Add names
5410         when registering selftests.
5411         * utils.c (_initialize_utils): Likewise.
5412         * unittests/array-view-selftests.c
5413         (_initialize_array_view_selftests): Likewise.
5414         * unittests/environ-selftests.c (_initialize_environ_selftests):
5415         Likewise.
5416         * unittests/function-view-selftests.c
5417         (_initialize_function_view_selftests): Likewise.
5418         * unittests/offset-type-selftests.c
5419         (_initialize_offset_type_selftests): Likewise.
5420         * unittests/optional-selftests.c
5421         (_initialize_optional_selftests): Likewise.
5422         * unittests/scoped_restore-selftests.c
5423         (_initialize_scoped_restore_selftests): Likewise.
5424         * NEWS: Document "maintenance selftest" and "maint info
5425         selftests".
5426
5427 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5428
5429         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5430         scoped_restore.
5431
5432 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5433
5434         * mi/mi-main.c (mi_load_progress): Make uiout variable
5435         a unique_ptr.
5436
5437 2017-09-15  Pedro Alves  <palves@redhat.com>
5438
5439         * compile/compile-c-types.c (convert_enum, convert_int)
5440         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5441
5442 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5443
5444         * dwarf2read.c (copy_string): Remove.
5445         (parse_macro_definition): Replace copy_string with savestring.
5446
5447 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5448
5449         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5450         gdb_target_obs.
5451         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5452         Likewise.
5453         (i[34567]86-*-linux*): Likewise.
5454
5455 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5456
5457         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5458         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5459         <stack>: Change type to std::vector.
5460         <stack_len, stack_allocated>: Remove.
5461         <grow_stack>: Remove.
5462         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5463         (dwarf_expr_context::~dwarf_expr_context): Remove.
5464         (dwarf_expr_context::grow_stack): Remove.
5465         (dwarf_expr_context::push): Adjust.
5466         (dwarf_expr_context::pop): Adjust.
5467         (dwarf_expr_context::fetch): Adjust.
5468         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5469         (dwarf_expr_context::stack_empty_p): Adjust.
5470         (dwarf_expr_context::execute_stack_op): Adjust.
5471
5472 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5473
5474         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5475         return type to bool.
5476         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5477
5478 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5479
5480         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5481         Change type to bool.
5482         (dwarf_stack_value) <in_stack_memory>: Likewise.
5483         (dwarf_expr_context) <push_address>: Change parameter type to
5484         bool.
5485         <fetch_in_stack_memory>: Change return type to bool.
5486         <push>: Change parameter type to bool.
5487         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5488         to bool.
5489         (dwarf_expr_context::push_address): Likewise.
5490         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5491         to bool.
5492         (dwarf_expr_context::execute_stack_op): Adjust.
5493         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5494
5495 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5496
5497         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5498         (struct dwarf_expr_context) <n_pieces>: Remove.
5499         <pieces>: Change type to std::vector.
5500         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5501         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5502         pieces.
5503         (dwarf_expr_context::add_piece): Adjust.
5504         * dwarf2loc.c (struct piece_closure): Initialize fields.
5505         <n_pieces>: Remove.
5506         <pieces>: Change type to std::vector.
5507         (allocate_piece_closure): Adjust, change parameter to
5508         std::vector rvalue and std::move it to piece_closure.
5509         (rw_pieced_value): Adjust.
5510         (check_pieced_synthetic_pointer): Adjust.
5511         (indirect_synthetic_pointer): Adjust.
5512         (coerce_pieced_ref): Adjust.
5513         (free_pieced_value_closure):  Adjust.  Use delete to free
5514         piece_closure.
5515         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5516         to allocate_piece_closure.
5517         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5518
5519 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5520
5521         * probe.h (probe_ops_cp): Remove typedef.
5522         (DEF_VEC_P (probe_ops_cp)): Remove.
5523         (all_probe_ops): Change type to std::vector.
5524         * probe.c (info_probes_for_ops): Adjust to vector change.
5525         (probe_linespec_to_ops): Likewise.
5526         (all_probe_ops): Change type to std::vector.
5527         (_initialize_probe): Adjust to vector change.
5528         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5529         * elfread.c (elf_get_probes): Likewise.
5530         * stap-probe.c (_initialize_stap_probe): Likewise.
5531
5532 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5533
5534         * probe.h (struct bound_probe): Define constructors.
5535         * probe.c (bound_probe_s): Remove typedef.
5536         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5537         (collect_probes): Change return type to std::vector, remove
5538         cleanup.
5539         (compare_probes): Return bool, change parameter type.  Change
5540         semantic to "less than".
5541         (gen_ui_out_table_header_info): Change parameter to std::vector
5542         and update.
5543         (exists_probe_with_pops): Likewise.
5544         (info_probes_for_ops): Update to std::vector change.
5545         (enable_probes_command): Likewise.
5546         (disable_probes_command): Likewise.
5547
5548 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5549
5550         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5551         vec to std::vector.
5552         * probe.c (parse_probes_in_pspace): Update.
5553         (find_probes_in_objfile): Update.
5554         (find_probe_by_pc): Update.
5555         (collect_probes): Update.
5556         (probe_any_get_probes): Update.
5557         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5558         return type to reference to std::vector.
5559         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5560         std::vector and update.
5561         (dtrace_process_dof): Likewise.
5562         (dtrace_get_probes): Likewise.
5563         * elfread.c (elf_get_probes): Change return type to std::vector,
5564         store an std::vector in bfd_data.
5565         (probe_key_free): Update to std::vector.
5566         * stap-probe.c (handle_stap_probe): Change parameter to
5567         std::vector and update.
5568         (stap_get_probes): Likewise.
5569         * symfile-debug.c (debug_sym_get_probes): Change return type to
5570         std::vector and update.
5571
5572 2017-09-11  Tom Tromey  <tom@tromey.com>
5573
5574         * breakpoint.c (program_breakpoint_here_p): Update.
5575         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5576         from make_show_memory_breakpoints_cleanup.  Return a
5577         scoped_restore_tmpl<int>.
5578         (restore_show_memory_breakpoints): Remove.
5579         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5580         * mem-break.c (memory_validate_breakpoint): Update.
5581         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5582         (ia64_memory_remove_breakpoint): Update.
5583         (ia64_breakpoint_from_pc): Update.
5584         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5585         from make_show_memory_breakpoints_cleanup.
5586
5587 2017-09-11  Tom Tromey  <tom@tromey.com>
5588
5589         * d-namespace.c (d_lookup_symbol): Use std::string.
5590         (find_symbol_in_baseclass): Likewise.
5591
5592 2017-09-11  Tom Tromey  <tom@tromey.com>
5593
5594         * ctf.c (ctf_start): Use std::string.
5595
5596 2017-09-11  Tom Tromey  <tom@tromey.com>
5597
5598         * ada-lang.c (is_known_support_routine): Update.
5599         (ada_unhandled_exception_name_addr_from_raise): Update.
5600         * guile/scm-frame.c (gdbscm_frame_name): Update.
5601         * python/py-frame.c (frapy_name): Update.
5602         (frapy_function): Update.
5603         * stack.h (find_frame_funname): Update.
5604         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5605         (print_frame): Update.
5606
5607 2017-09-11  Tom Tromey  <tom@tromey.com>
5608
5609         * findcmd.c (put_bits): Take a gdb::byte_vector.
5610         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5611         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5612         cleanups.
5613         (find_command): Update.
5614
5615 2017-09-11  Tom Tromey  <tom@tromey.com>
5616
5617         * cli/cli-script.c (class scoped_restore_hook_in): New.
5618         (clear_hook_in_cleanup): Remove.
5619         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5620         scoped_restore_hook_in.
5621
5622 2017-09-11  Tom Tromey  <tom@tromey.com>
5623
5624         * cli/cli-script.c (restore_interp): Remove.
5625         (read_command_lines): Use scoped_restore_interp.
5626         * interps.c (scoped_restore_interp::set_temp): Rename from
5627         interp_set_temp.
5628         * interps.h (class scoped_restore_interp): New.
5629         (interp_set_temp): Remove.
5630
5631 2017-09-11  Tom Tromey  <tom@tromey.com>
5632
5633         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5634         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5635         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5636         scoped_restore.
5637         (mi_cmd_break_insert_1): Update.
5638         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5639         scoped_restore.
5640
5641 2017-09-11  Tom Tromey  <tom@tromey.com>
5642
5643         * demangle.c (demangle_command): Update.
5644         * breakpoint.c (disable_command): Update.
5645         (enable_command): Update.
5646         (find_location_by_number): Make "number" const.  Use
5647         get_number_trailer.
5648         * cli/cli-utils.c (extract_arg): Return std::string.
5649         * probe.c (parse_probe_linespec): Update.  Change types.
5650         (collect_probes): Take string arguments.
5651         (parse_probe_linespec): Likewise.
5652         (info_probes_for_ops): Update.
5653         (enable_probes_command): Update.
5654         (disable_probes_command): Update.
5655         * break-catch-sig.c (catch_signal_split_args): Update.
5656         * mi/mi-parse.c (mi_parse): Update.
5657
5658 2017-09-11  Tom Tromey  <tom@tromey.com>
5659
5660         * language.h (language_enum): Make argument const.
5661         * language.c (language_enum): Make argument const.
5662
5663 2017-09-11  Tom Tromey  <tom@tromey.com>
5664
5665         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5666         as function.
5667         (skip_to_space): Rename from skip_to_space_const.
5668         * common/common-utils.c (skip_to_space): New function.
5669         (skip_to_space): Rename from skip_to_space_const.
5670         * cli/cli-utils.h (get_number): Rename from get_number_const.
5671         (extract_arg): Rename from extract_arg_const.
5672         * cli/cli-utils.c (get_number): Rename from get_number_const.
5673         (extract_arg): Rename from extract_arg_const.
5674         (number_or_range_parser::get_number): Use ::get_number.
5675         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5676         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5677         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5678         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5679         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5680         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5681         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5682         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5683
5684 2017-09-11  Tom Tromey  <tom@tromey.com>
5685
5686         * python/python.c (do_start_initialization): Use
5687         py-event-types.def to initialize types.
5688         Define all object type structures.
5689         * python/python-internal.h: Don't declare event initialization
5690         functions.
5691         * python/py-threadevent.c (thread_event_object_type): Don't
5692         define.
5693         * python/py-stopevent.c (stop_event_object_type): Don't define.
5694         * python/py-signalevent.c (signal_event_object_type): Don't
5695         declare or define.
5696         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5697         (clear_objfiles_event_object_type): Don't declare or define.
5698         * python/py-infevents.c (inferior_call_pre_event_object_type)
5699         (inferior_call_post_event_object_type)
5700         (register_changed_event_object_type)
5701         (memory_changed_event_object_type): Don't declare or define.
5702         * python/py-inferior.c (new_thread_event_object_type)
5703         (new_inferior_event_object_type)
5704         (inferior_deleted_event_object_type): Don't declare or define.
5705         * python/py-exitedevent.c (exited_event_object_type): Don't
5706         declare or define.
5707         * python/py-evts.c (gdbpy_initialize_py_events): Use
5708         py-all-events.def.
5709         * python/py-events.h (thread_event_object_type): Don't declare.
5710         (events_object): Use py-all-events.def.
5711         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5712         py-event-types.def.
5713         * python/py-event-types.def: New file.
5714         * python/py-continueevent.c (create_continue_event_object): Don't
5715         declare or define.
5716         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5717         declare or define.
5718         * python/py-all-events.def: New file.
5719
5720 2017-09-11  Tom Tromey  <tom@tromey.com>
5721
5722         * python/py-threadevent.c (create_thread_event_object): Return
5723         gdbpy_ref.
5724         * python/py-stopevent.h (create_stop_event_object)
5725         (create_breakpoint_event_object, create_signal_event_object):
5726         Update.
5727         * python/py-stopevent.c (create_stop_event_object): Return
5728         gdbpy_ref.
5729         (emit_stop_event): Update.
5730         * python/py-signalevent.c (create_signal_event_object): Return
5731         gdbpy_ref.
5732         * python/py-infevents.c (create_inferior_call_event_object):
5733         Update.
5734         * python/py-event.h (create_event_object)
5735         (create_thread_event_object): Update.
5736         * python/py-event.c (create_event_object): Return gdbpy_ref.
5737         * python/py-continueevent.c: Return gdbpy_ref.
5738         * python/py-bpevent.c (create_breakpoint_event_object): Return
5739         gdbpy_ref.
5740
5741 2017-09-11  Tom Tromey  <tom@tromey.com>
5742
5743         PR python/15622:
5744         * NEWS: Add entry.
5745         * python/python.c (do_start_initialization): Initialize new event
5746         types.
5747         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5748         (gdbpy_initialize_inferior_deleted_event)
5749         (gdbpy_initialize_new_thread_event): Declare.
5750         * python/py-threadevent.c (create_thread_event_object): Add option
5751         "thread" parameter.
5752         * python/py-inferior.c (new_thread_event_object_type)
5753         (new_inferior_event_object_type)
5754         (inferior_deleted_event_object_type): Declare.
5755         (python_new_inferior, python_inferior_deleted): New functions.
5756         (add_thread_object): Emit new_thread event.
5757         (gdbpy_initialize_inferior): Attach new functions to corresponding
5758         observers.
5759         (new_thread, new_inferior, inferior_deleted): Define new event
5760         types.
5761         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5762         registries.
5763         * python/py-events.h (events_object) <new_inferior,
5764         inferior_deleted, new_thread>: New fields.
5765         * python/py-event.h (create_thread_event_breakpoint): Add optional
5766         "thread" parameter.
5767
5768 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5769
5770         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5771         check current_ui instead.
5772         (internal_vproblem): Likewise.
5773
5774 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5775
5776         * thread.c (print_thread_info_1): Remove unnecessary calls to
5777         uiout->is_mi_like_p.
5778
5779 2017-09-09  Tom Tromey  <tom@tromey.com>
5780
5781         * namespace.h (add_using_directive): Update.
5782         * namespace.c (add_using_directive): Change type of excludes to
5783         std::vector.
5784         * dwarf2read.c (read_import_statement): Use std::vector.
5785         (read_namespace): Update.
5786         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5787
5788 2017-09-09  Tom Tromey  <tom@tromey.com>
5789
5790         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5791
5792 2017-09-09  Tom Tromey  <tom@tromey.com>
5793
5794         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5795
5796 2017-09-09  Tom Tromey  <tom@tromey.com>
5797
5798         * stack.c (func_command): Use gdb::def_vector.
5799
5800 2017-09-09  Tom Tromey  <tom@tromey.com>
5801
5802         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5803         ui_out_emit_list, ui_out_emit_tuple.
5804         (mi_cmd_var_update): Likewise.
5805
5806 2017-09-09  Tom Tromey  <tom@tromey.com>
5807
5808         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5809         ui_out_redirect_pop.
5810         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5811         ui_out_redirect_pop.
5812         * utils.c (do_ui_out_redirect_pop)
5813         (make_cleanup_ui_out_redirect_pop): Remove.
5814         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5815         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5816         * ui-out.h (ui_out_redirect_pop): New class.
5817
5818 2017-09-09  Tom Tromey  <tom@tromey.com>
5819
5820         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5821         (list_available_thread_groups, mi_cmd_list_thread_groups)
5822         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5823         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5824         Likewise.
5825
5826 2017-09-09  Tom Tromey  <tom@tromey.com>
5827
5828         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5829         ui_out_emit_tuple.
5830
5831 2017-09-09  Tom Tromey  <tom@tromey.com>
5832
5833         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5834         * stack.c (print_frame): Use ui_out_emit_tuple.
5835         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5836         (info_spu_mailbox_command, info_spu_dma_command)
5837         (info_spu_proxydma_command): Likewise.
5838         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5839         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5840         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5841         ui_out_emit_tuple.
5842         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5843
5844 2017-09-09  Tom Tromey  <tom@tromey.com>
5845
5846         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5847         (class ui_out_emit_table): Update comment.
5848         * ui-out.c (do_cleanup_table_end)
5849         (make_cleanup_ui_out_table_begin_end): Remove.
5850         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5851         (info_spu_dma_cmdlist): Likewise.
5852         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5853         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5854         ui_out_emit_table.
5855
5856 2017-09-09  Tom Tromey  <tom@tromey.com>
5857
5858         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5859         ui_out_emit_list, gdb::optional.
5860
5861 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5862
5863         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5864         prototype.
5865         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5866         prototype.
5867         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5868         prototype.
5869         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5870         * ada-exp.y: Remove _initialize_ada_exp prototype.
5871         * ada-lang.c: Remove _initialize_ada_language prototype.
5872         * ada-tasks.c: Remove _initialize_tasks prototype.
5873         * addrmap.c: Remove _initialize_addrmap prototype.
5874         * agent.c: Remove _initialize_agent prototype.
5875         * aix-thread.c: Remove _initialize_aix_thread prototype.
5876         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5877         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5878         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5879         prototype.
5880         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5881         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5882         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5883         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5884         prototype.
5885         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5886         prototype.
5887         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5888         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5889         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5890         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5891         prototype.
5892         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5893         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5894         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5895         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5896         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5897         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5898         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5899         prototype.
5900         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5901         prototype.
5902         * annotate.c: Remove _initialize_annotate prototype.
5903         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5904         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5905         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5906         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5907         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5908         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5909         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5910         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5911         prototype.
5912         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5913         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5914         * auto-load.c: Remove _initialize_auto_load prototype.
5915         * auxv.c: Remove _initialize_auxv prototype.
5916         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5917         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5918         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5919         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5920         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5921         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5922         prototype.
5923         * break-catch-throw.c: Remove _initialize_break_catch_throw
5924         prototype.
5925         * breakpoint.c: Remove _initialize_breakpoint prototype.
5926         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5927         * btrace.c: Remove _initialize_btrace prototype.
5928         * charset.c: Remove _initialize_charset prototype.
5929         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5930         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5931         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5932         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5933         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5934         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5935         * coffread.c: Remove _initialize_coffread prototype.
5936         * compile/compile.c: Remove _initialize_compile prototype.
5937         * complaints.c: Remove _initialize_complaints prototype.
5938         * completer.c: Remove _initialize_completer prototype.
5939         * copying.awk: Remove _initialize_copying prototype.
5940         * copying.c: Regenerate.
5941         * core-regset.c: Remove _initialize_core_regset prototype.
5942         * corefile.c: Remove _initialize_core prototype.
5943         * corelow.c: Remove _initialize_corelow prototype.
5944         * cp-abi.c: Remove _initialize_cp_abi prototype.
5945         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5946         * cp-support.c: Remove _initialize_cp_support prototype.
5947         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5948         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5949         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5950         * ctf.c: Remove _initialize_ctf prototype.
5951         * d-lang.c: Remove _initialize_d_language prototype.
5952         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5953         prototype.
5954         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5955         * dbxread.c: Remove _initialize_dbxread prototype.
5956         * dcache.c: Remove _initialize_dcache prototype.
5957         * demangle.c: Remove _initialize_demangler prototype.
5958         * disasm-selftests.c: Remove _initialize_disasm_selftests
5959         prototype.
5960         * disasm.c: Remove _initialize_disasm prototype.
5961         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5962         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5963         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5964         prototype.
5965         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5966         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5967         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5968         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5969         * elfread.c: Remove _initialize_elfread prototype.
5970         * exec.c: Remove _initialize_exec prototype.
5971         * extension.c: Remove _initialize_extension prototype.
5972         * f-lang.c: Remove _initialize_f_language prototype.
5973         * f-valprint.c: Remove _initialize_f_valprint prototype.
5974         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5975         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5976         * filesystem.c: Remove _initialize_filesystem prototype.
5977         * findcmd.c: Remove _initialize_mem_search prototype.
5978         * fork-child.c: Remove _initialize_fork_child prototype.
5979         * frame-base.c: Remove _initialize_frame_base prototype.
5980         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5981         * frame.c: Remove _initialize_frame prototype.
5982         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5983         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5984         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5985         * gcore.c: Remove _initialize_gcore prototype.
5986         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5987         * gdbarch.c: Regenerate.
5988         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5989         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5990         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5991         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5992         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5993         * go-lang.c: Remove _initialize_go_language prototype.
5994         * go32-nat.c: Remove _initialize_go32_nat prototype.
5995         * guile/guile.c: Remove _initialize_guile prototype.
5996         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5997         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5998         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5999         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6000         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6001         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6002         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6003         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6004         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6005         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6006         prototype.
6007         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6008         prototype.
6009         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6010         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6011         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6012         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6013         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6014         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6015         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6016         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6017         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6018         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6019         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6020         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6021         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6022         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6023         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6024         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6025         prototype.
6026         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6027         prototype.
6028         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6029         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6030         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6031         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6032         * infcall.c: Remove _initialize_infcall prototype.
6033         * infcmd.c: Remove _initialize_infcmd prototype.
6034         * inferior.c: Remove _initialize_inferiors prototype.
6035         * inflow.c: Remove _initialize_inflow prototype.
6036         * infrun.c: Remove _initialize_infrun prototype.
6037         * interps.c: Remove _initialize_interpreter prototype.
6038         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6039         * jit.c: Remove _initialize_jit prototype.
6040         * language.c: Remove _initialize_language prototype.
6041         * linux-fork.c: Remove _initialize_linux_fork prototype.
6042         * linux-nat.c: Remove _initialize_linux_nat prototype.
6043         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6044         * linux-thread-db.c: Remove _initialize_thread_db prototype.
6045         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6046         * m2-lang.c: Remove _initialize_m2_language prototype.
6047         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6048         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6049         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6050         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6051         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6052         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6053         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6054         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6055         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6056         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6057         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6058         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6059         * machoread.c: Remove _initialize_machoread prototype.
6060         * macrocmd.c: Remove _initialize_macrocmd prototype.
6061         * macroscope.c: Remove _initialize_macroscope prototype.
6062         * maint.c: Remove _initialize_maint_cmds prototype.
6063         * mdebugread.c: Remove _initialize_mdebugread prototype.
6064         * memattr.c: Remove _initialize_mem prototype.
6065         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6066         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6067         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6068         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6069         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6070         * microblaze-linux-tdep.c: Remove
6071         _initialize_microblaze_linux_tdep prototype.
6072         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6073         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6074         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6075         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6076         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6077         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6078         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6079         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6080         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6081         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6082         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6083         prototype.
6084         * mipsread.c: Remove _initialize_mipsread prototype.
6085         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6086         prototype.
6087         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6088         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6089         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6090         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6091         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6092         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6093         prototype.
6094         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6095         * nto-procfs.c: Remove _initialize_procfs prototype.
6096         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6097         * objc-lang.c: Remove _initialize_objc_language prototype.
6098         * objfiles.c: Remove _initialize_objfiles prototype.
6099         * observer.c: Remove observer_test_first_notification_function,
6100         observer_test_second_notification_function,
6101         observer_test_third_notification_function, and
6102         _initialize_observer prototypes.
6103         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6104         * osabi.c: Remove _initialize_gdb_osabi prototype.
6105         * osdata.c: Remove _initialize_osdata prototype.
6106         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6107         * parse.c: Remove _initialize_parse prototype.
6108         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6109         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6110         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6111         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6112         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6113         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6114         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6115         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6116         * printcmd.c: Remove _initialize_printcmd prototype.
6117         * probe.c: Remove _initialize_probe prototype.
6118         * proc-api.c: Remove _initialize_proc_api prototype.
6119         * proc-events.c: Remove _initialize_proc_events prototype.
6120         * proc-service.c: Remove _initialize_proc_service prototype.
6121         * procfs.c: Remove _initialize_procfs prototype.
6122         * psymtab.c: Remove _initialize_psymtab prototype.
6123         * python/python.c: Remove _initialize_python prototype.
6124         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6125         * record-btrace.c: Remove _initialize_record_btrace prototype.
6126         * record-full.c: Remove _initialize_record_full prototype.
6127         * record.c: Remove _initialize_record prototype.
6128         * regcache.c: Remove _initialize_regcache prototype.
6129         * reggroups.c: Remove _initialize_reggroup prototype.
6130         * remote-notif.c: Remove _initialize_notif prototype.
6131         * remote-sim.c: Remove _initialize_remote_sim prototype.
6132         * remote.c: Remove _initialize_remote prototype.
6133         * reverse.c: Remove _initialize_reverse prototype.
6134         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6135         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6136         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6137         prototype.
6138         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6139         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6140         * rust-exp.y: Remove _initialize_rust_exp prototype.
6141         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6142         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6143         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6144         * score-tdep.c: Remove _initialize_score_tdep prototype.
6145         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6146         prototype.
6147         * ser-go32.c: Remove _initialize_ser_dos prototype.
6148         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6149         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6150         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6151         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6152         * serial.c: Remove _initialize_serial prototype.
6153         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6154         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6155         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6156         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6157         * skip.c: Remove _initialize_step_skip prototype.
6158         * sol-thread.c: Remove _initialize_sol_thread prototype.
6159         * solib-aix.c: Remove _initialize_solib_aix prototype.
6160         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6161         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6162         * solib-frv.c: Remove _initialize_frv_solib prototype.
6163         * solib-spu.c: Remove _initialize_spu_solib prototype.
6164         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6165         * solib-target.c: Remove _initialize_solib_target prototype.
6166         * solib.c: Remove _initialize_solib prototype.
6167         * source.c: Remove _initialize_source prototype.
6168         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6169         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6170         prototype.
6171         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6172         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6173         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6174         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6175         prototype.
6176         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6177         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6178         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6179         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6180         prototype.
6181         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6182         prototype.
6183         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6184         prototype.
6185         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6186         prototype.
6187         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6188         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6189         prototype.
6190         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6191         prototype.
6192         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6193         prototype.
6194         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6195         prototype.
6196         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6197         prototype.
6198         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6199         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6200         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6201         * stabsread.c: Remove _initialize_stabsread prototype.
6202         * stack.c: Remove _initialize_stack prototype.
6203         * stap-probe.c: Remove _initialize_stap_probe prototype.
6204         * std-regs.c: Remove _initialize_frame_reg prototype.
6205         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6206         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6207         * symfile.c: Remove _initialize_symfile prototype.
6208         * symmisc.c: Remove _initialize_symmisc prototype.
6209         * symtab.c: Remove _initialize_symtab prototype.
6210         * target-dcache.c: Remove _initialize_target_dcache prototype.
6211         * target-descriptions.c: Remove _initialize_target_descriptions
6212         prototype.
6213         * thread.c: Remove _initialize_thread prototype.
6214         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6215         prototype.
6216         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6217         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6218         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6219         prototype.
6220         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6221         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6222         * tracefile.c: Remove _initialize_tracefile prototype.
6223         * tracepoint.c: Remove _initialize_tracepoint prototype.
6224         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6225         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6226         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6227         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6228         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6229         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6230         * tui/tui.c: Remove _initialize_tui prototype.
6231         * typeprint.c: Remove _initialize_typeprint prototype.
6232         * user-regs.c: Remove _initialize_user_regs prototype.
6233         * utils.c: Remove _initialize_utils prototype.
6234         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6235         * valarith.c: Remove _initialize_valarith prototype.
6236         * valops.c: Remove _initialize_valops prototype.
6237         * valprint.c: Remove _initialize_valprint prototype.
6238         * value.c: Remove _initialize_values prototype.
6239         * varobj.c: Remove _initialize_varobj prototype.
6240         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6241         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6242         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6243         * windows-nat.c: Remove _initialize_windows_nat,
6244         _initialize_check_for_gdb_ini, and _initialize_loadable
6245         prototypes.
6246         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6247         * xcoffread.c: Remove _initialize_xcoffread prototype.
6248         * xml-support.c: Remove _initialize_xml_support prototype.
6249         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6250         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6251         prototype.
6252         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6253         prototype.
6254         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6255
6256 2017-09-08  Keith Seitz  <keiths@redhat.com>
6257
6258         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6259         field.
6260
6261 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6262
6263         * f-valprint.c (f_val_print): Remove check for one byte
6264         sized integers. Remove printing of character type.
6265
6266 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6267             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6268             Bernhard Heckel  <bernhard.heckel@intel.com>
6269
6270         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6271         to maintain proper indentation when printing pointers/refs.
6272
6273 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6274
6275         GDB 8.0.1 released.
6276
6277 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6278
6279         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6280
6281 2017-09-05  Tom Tromey  <tom@tromey.com>
6282
6283         * parse.c (funcall_chain): Now a std::vector.
6284         (start_arglist, end_arglist): Simplify.
6285         (free_funcalls): Remove.
6286         (parse_exp_in_context_1): Remove cleanup.
6287
6288 2017-09-05  Tom Tromey  <tom@tromey.com>
6289
6290         * go-exp.y (go_parse): Don't create a cleanup.
6291
6292 2017-09-05  Tom Tromey  <tom@tromey.com>
6293
6294         * d-exp.y (PrimaryExpression): Use std::string.
6295         (d_parse): Don't create a cleanup.
6296
6297 2017-09-05  Tom Tromey  <tom@tromey.com>
6298
6299         * utils.c (do_clear_parser_state): Remove.
6300         (make_cleanup_clear_parser_state): Remove.
6301         * p-exp.y (pascal_parse): Use scoped_restore.
6302         * m2-exp.y (m2_parse): Use scoped_restore.
6303         * f-exp.y (f_parse): Use scoped_restore.
6304         * d-exp.y (d_parse): Use scoped_restore.
6305         * c-exp.y (c_parse): Use scoped_restore.
6306         * ada-exp.y (ada_parse): Use scoped_restore.
6307         * utils.h (make_cleanup_clear_parser_state): Remove.
6308
6309 2017-09-06  Keith Seitz  <keiths@redhat.com>
6310
6311         * dwarf2read.c (dw2_linkage_name_attr): New function.
6312         (dw2_linkage_name): New function.
6313         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6314         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6315         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6316
6317 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6318
6319         * config/djgpp/djconfig.sh: Correct shell portability issue.
6320
6321 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6322
6323         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6324
6325 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6326
6327         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6328         * NEWS: Mention new FreeBSD/mips native configuration.
6329         * configure.host: Add aarch64*-*-freebsd*.
6330         * configure.nat: Likewise.
6331         * aarch64-fbsd-nat.c: New file.
6332
6333 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6334
6335         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6336         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6337         * NEWS: Mention new FreeBSD/aarch64 target.
6338         * configure.tgt: Add aarch64*-*-freebsd*.
6339         * aarch64-fbsd-tdep.c: New file.
6340         * aarch64-fbsd-tdep.h: New file.
6341
6342 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6343
6344         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6345
6346 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6347
6348         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6349         of TLS symbols.
6350
6351 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6352
6353         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6354         call.
6355
6356 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6357
6358         * infrun.c (follow_exec): Call add_thread after
6359         target_find_description.
6360
6361 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6362
6363         * infrun.c (handle_inferior_event_1): When exec'ing, read
6364         stop_pc after follow_exec.
6365
6366 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6367
6368         * remote.c (process_g_packet): Update error message.
6369
6370 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6371
6372         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6373         targets.
6374
6375 2017-09-05  Pedro Alves  <palves@redhat.com>
6376
6377         * eval.c (eval_call, evaluate_funcall): New functions, factored
6378         out from ...
6379         (evaluate_subexp_standard): ... this.
6380
6381 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6382
6383         * amd64-tdep.c (amd64_target_description): Create target
6384         descriptions.
6385         (_initialize_amd64_tdep): Don't call functions
6386         initialize_tdesc_amd64_*.  Add self tests.
6387         * arch/amd64.c (amd64_create_target_description): Add parameter
6388         is_linux.  Call set_tdesc_osabi if is_linux is true.
6389         * arch/amd64.h (amd64_create_target_description): Update the
6390         declaration.
6391         * arch/i386.c (i386_create_target_description): Add parameter
6392         is_linux.  Call set_tdesc_osabi if is_linux is true.
6393         * arch/i386.h (i386_create_target_description): Update
6394         declaration.
6395         * configure.tgt: Add i386.o to gdb_target_obs.
6396         * features/Makefile (XMLTOC): Remove i386/*.xml.
6397         * features/i386/amd64-avx-avx512.c: Remove.
6398         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6399         * features/i386/amd64-avx-mpx.c: Remove.
6400         * features/i386/amd64-avx.c: Remove.
6401         * features/i386/amd64-mpx.c: Remove.
6402         * features/i386/amd64.c: Remove.
6403         * features/i386/i386-avx-avx512.c: Remove.
6404         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6405         * features/i386/i386-avx-mpx.c: Remove.
6406         * features/i386/i386-avx.c: Remove.
6407         * features/i386/i386-mmx.c: Remove.
6408         * features/i386/i386-mpx.c: Remove.
6409         * features/i386/i386.c: Remove.
6410         * i386-tdep.c: Don't include features/i386/i386*.c., include
6411         target-descriptions.h and arch/i386.h.
6412         (i386_target_description): Create target descriptions.
6413         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6414         functions.  Do self tests.
6415
6416 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6417
6418         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6419         * features/i386/amd64-avx-avx512-linux.c: Removed.
6420         * features/i386/amd64-avx-linux.c: Removed.
6421         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6422         * features/i386/amd64-avx-mpx-linux.c: Removed.
6423         * features/i386/amd64-linux.c: Removed.
6424         * features/i386/amd64-mpx-linux.c: Removed.
6425         * features/i386/x32-avx-avx512-linux.c: Removed.
6426         * features/i386/x32-avx-linux.c: Removed.
6427         * features/i386/x32-linux.c: Removed.
6428
6429 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6430
6431         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6432         features/i386/*.c.
6433         (amd64_linux_read_description): Call
6434         amd64_create_target_description.
6435         * arch/amd64.c: New file.
6436         * arch/amd64.h: New file.
6437         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6438         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6439
6440 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6441
6442         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6443         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6444         (amd64_linux_read_description): Create target descriptions.
6445         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6446         functions.  Add unit tests.
6447         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6448         x32-core.xml.
6449         * features/i386/64bit-avx.c: Generated.
6450         * features/i386/64bit-avx512.c: Generated.
6451         * features/i386/64bit-core.c: Generated.
6452         * features/i386/64bit-linux.c: Generated.
6453         * features/i386/64bit-mpx.c: Generated.
6454         * features/i386/64bit-pkeys.c: Generated.
6455         * features/i386/64bit-segments.c: Generated.
6456         * features/i386/64bit-sse.c: Generated.
6457         * features/i386/x32-core.c: Generated.
6458         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6459         c files for amd64-linux and x32-linux.
6460
6461 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6462
6463         * amd64-linux-tdep.c (amd64_linux_read_description): New
6464         function.
6465         (amd64_linux_core_read_description): Call
6466         amd64_linux_read_description.
6467         (amd64_linux_init_abi): Likewise.
6468         (amd64_x32_linux_init_abi): Likewise.
6469         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6470         * x86-linux-nat.c (x86_linux_read_description): Call
6471         amd64_linux_read_description.
6472
6473 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6474
6475         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6476         comments.
6477
6478 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6479
6480         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6481         * features/i386/i386-avx-avx512-linux.c: Remove.
6482         * features/i386/i386-avx-linux.c: Remove.
6483         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6484         * features/i386/i386-avx-mpx-linux.c: Remove.
6485         * features/i386/i386-linux.c: Remove.
6486         * features/i386/i386-mmx-linux.c: Remove.
6487         * features/i386/i386-mpx-linux.c: Remove.
6488
6489 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6490
6491         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6492         (SFILES): Add arch/i386.c.
6493         (HFILES_NO_SRCDIR): Add arch/i386.h.
6494         * arch/i386.c: New file.
6495         * arch/i386.h: New file.
6496         * arch/tdesc.h (allocate_target_description): Declare.
6497         (set_tdesc_architecture): Declare.
6498         (set_tdesc_osabi): Declare.
6499         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6500         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6501         include arch/i386.h.
6502         (i386_linux_read_description): Remove code and call
6503         i386_create_target_description.
6504         (set_tdesc_architecture): New function.
6505         (set_tdesc_osabi): New function.
6506         * target-descriptions.h (allocate_target_description): Remove.
6507
6508 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6509
6510         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6511         * target-descriptions.c (tdesc_create_feature): Likewise, and
6512         adjust code.
6513         * features/i386/32bit-avx.c: Re-generated.
6514         * features/i386/32bit-avx512.c: Re-generated.
6515         * features/i386/32bit-core.c: Re-generated.
6516         * features/i386/32bit-linux.c: Re-generated.
6517         * features/i386/32bit-mpx.c: Re-generated.
6518         * features/i386/32bit-pkeys.c: Re-generated.
6519         * features/i386/32bit-sse.c: Re-generated.
6520
6521 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6522
6523         * regformats/regdef.h (struct reg): Override operator == and !=.
6524
6525 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6526
6527         * arch/tdesc.h: New file.
6528         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6529         * target-descriptions.c: Update comments.
6530         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6531         declarations.
6532         * features/i386/32bit-avx.c: Re-generated.
6533         * features/i386/32bit-avx512.c: Re-generated.
6534         * features/i386/32bit-core.c: Re-generated.
6535         * features/i386/32bit-linux.c: Re-generated.
6536         * features/i386/32bit-mpx.c: Re-generated.
6537         * features/i386/32bit-pkeys.c: Re-generated.
6538         * features/i386/32bit-sse.c: Re-generated.
6539
6540 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6541
6542         * regformats/regdat.sh: Update generated code.
6543
6544 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6545
6546         * regformats/regdat.sh: Adjust code order.
6547
6548 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6549
6550         * expprint.c (dump_subexp_body_standard): Use constant format
6551         string in fprintf_filtered call.
6552
6553 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6554
6555         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6556         NetBSD/i386.
6557         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6558
6559 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6560
6561         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6562
6563 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6564
6565         * bsd-kvm.o: Define _KMEMUSER.
6566         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6567         * configure: Regenerate.
6568
6569 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6570
6571         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6572         * i386-fbsd-nat.c: Likewise.
6573
6574 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6575
6576         * unittests/array-view-selftests.c: Add include of <array>.
6577
6578 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6579
6580         * spu-tdep.c (flush_ea_cache): Add missing argument to
6581         call_function_by_hand.
6582
6583 2017-09-04  Pedro Alves  <palves@redhat.com>
6584
6585         * NEWS (Safer support for debugging with no debug info): New.
6586
6587 2017-09-04  Pedro Alves  <palves@redhat.com>
6588
6589         * c-exp.y (function_method, function_method_void): Add current
6590         instance flags to TYPE_INSTANCE.
6591         * dwarf2read.c (check_modifier): New.
6592         (compute_delayed_physnames): Assert that only C++ adds delayed
6593         physnames.  Mark fn_fields as const/volatile depending on
6594         physname.
6595         * eval.c (make_params): New type_instance_flags parameter.  Use
6596         it as the new type's instance flags.
6597         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6598         flags element and pass it to make_params.
6599         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6600         instance flags element.
6601         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6602         * gdbtypes.h: Include "enum-flags.h".
6603         (type_instance_flags): New enum-flags type.
6604         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6605         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6606         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6607         (follow_type_instance_flags): New function.
6608         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6609         * parser-defs.h (follow_type_instance_flags): Declare.
6610         * valops.c (value_struct_elt_for_reference): const/volatile must
6611         match too.
6612
6613 2017-09-04  Pedro Alves  <palves@redhat.com>
6614
6615         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6616         function/method scopes; lookup the nested name as a function local
6617         static variable.
6618
6619 2017-09-04  Pedro Alves  <palves@redhat.com>
6620
6621         (%type <voidval>): Add function_method.
6622         * c-exp.y (exp): New production for calls with no arguments.
6623         (function_method, function_method_void_or_typelist): New
6624         productions.
6625         (exp): New production for "method()::static_var".
6626         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6627         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6628         Handle OP_FUNC_STATIC_VAR.
6629         * parse.c (operator_length_standard):
6630         Handle OP_FUNC_STATIC_VAR.
6631
6632 2017-09-04  Pedro Alves  <palves@redhat.com>
6633
6634         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6635         handling.
6636         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6637         Ditto.
6638         * parse.c (operator_length_standard, operator_check_standard):
6639         Ditto.
6640         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6641
6642 2017-09-04  Pedro Alves  <palves@redhat.com>
6643
6644         * ax-gdb.c: Include "typeprint.h".
6645         (gen_expr_for_cast): New function.
6646         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6647         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6648         type is unknown.
6649         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6650         nodebug_data_symbol.
6651         * eval.c: Include "typeprint.h".
6652         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6653         Error out if symbol has unknown type.
6654         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6655         evaluate_subexp_for_cast.
6656         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6657         OP_VAR_MSYM_VALUE.
6658         (evaluate_subexp_for_cast): New function.
6659         * gdbtypes.c (init_nodebug_var_type): New function.
6660         (objfile_type): Use it to initialize types of variables with no
6661         debug info.
6662         * typeprint.c (error_unknown_type): New.
6663         * typeprint.h (error_unknown_type): New declaration.
6664         * compile/compile-c-types.c (convert_type_basic): Handle
6665         TYPE_CODE_ERROR; warn and fallback to int for variables with
6666         unknown type.
6667
6668 2017-09-04  Pedro Alves  <palves@redhat.com>
6669
6670         * eval.c (evaluate_var_value): New function, factored out from ...
6671         (evaluate_subexp_standard): ... here.
6672
6673 2017-09-04  Pedro Alves  <palves@redhat.com>
6674
6675         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6676         Remove useless assignments to 'op'.
6677
6678 2017-09-04  Pedro Alves  <palves@redhat.com>
6679
6680         * eval.c (eval_skip_value): New function.
6681         (evaluate_subexp_standard): Use it.
6682
6683 2017-09-04  Pedro Alves  <palves@redhat.com>
6684
6685         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6686         function name from symbol/minsym and pass it to
6687         error_call_unknown_return_type.
6688
6689 2017-09-04  Pedro Alves  <palves@redhat.com>
6690
6691         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6692         * ax-gdb.c (gen_msym_var_ref): New function.
6693         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6694         * eval.c (evaluate_var_msym_value): New function.
6695         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6696         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6697         to call_function_by_hand.
6698         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6699         Handle OP_VAR_MSYM_VALUE.
6700         (union exp_element) <msymbol>: New field.
6701         * minsyms.h (struct type): Forward declare.
6702         (find_minsym_type_and_address): Declare.
6703         * parse.c (write_exp_elt_msym): New function.
6704         (write_exp_msymbol): Delete, refactored as ...
6705         (find_minsym_type_and_address): ... this new function.
6706         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6707         (operator_length_standard, operator_check_standard): Handle
6708         OP_VAR_MSYM_VALUE.
6709         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6710
6711 2017-09-04  Pedro Alves  <palves@redhat.com>
6712
6713         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6714         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6715         unknown.
6716         * ada-typeprint.c (print_func_type): Handle functions with unknown
6717         return type.
6718         * c-typeprint.c (c_type_print_base): Handle functions and methods
6719         with unknown return type.
6720         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6721         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6722         * compile/compile-c-types.c: Include "objfiles.h".
6723         (convert_func): For functions with unknown return type, warn and
6724         default to int.
6725         * compile/compile-object-run.c (compile_object_run): Adjust call
6726         to call_function_by_hand_dummy.
6727         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6728         call_function_by_hand.
6729         * eval.c (evaluate_subexp_standard): Adjust calls to
6730         call_function_by_hand.  Handle functions and methods with unknown
6731         return type.  Pass expect_type to call_function_by_hand.
6732         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6733         return type.
6734         * gcore.c (call_target_sbrk): Adjust call to
6735         call_function_by_hand.
6736         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6737         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6738         an integer address type instead of nodebug.
6739         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6740         call_function_by_hand.
6741         * infcall.c (error_call_unknown_return_type): New function.
6742         (call_function_by_hand): New "default_return_type" parameter.
6743         Pass it down.
6744         (call_function_by_hand_dummy): New "default_return_type"
6745         parameter.  Use it instead of defaulting to int.  If there's no
6746         default and the return type is unknown, throw an error.  If
6747         there's a default return type, and the called function has no
6748         debug info, then assume the function is prototyped.
6749         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6750         New "default_return_type" parameter.
6751         (error_call_unknown_return_type): New declaration.
6752         * linux-fork.c (call_lseek): Cast return type of lseek.
6753         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6754         call_function_by_hand.
6755         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6756         calls to call_function_by_hand.
6757         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6758         return type.
6759         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6760         (value_nsstring, print_object_command): Adjust calls to
6761         call_function_by_hand.
6762         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6763         functions with unknown return type.
6764         (pascal_type_print_func_varspec_suffix): New function.
6765         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6766         TYPE_CODE_METHOD>: Use it.
6767         * python/py-value.c (valpy_call): Adjust call to
6768         call_function_by_hand.
6769         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6770         call_function_by_hand.
6771         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6772         call_function_by_hand.
6773         * valops.c (value_allocate_space_in_inferior): Adjust call to
6774         call_function_by_hand.
6775         * typeprint.c (type_print_unknown_return_type): New function.
6776         * typeprint.h (type_print_unknown_return_type): New declaration.
6777
6778 2017-09-04  Pedro Alves  <palves@redhat.com>
6779
6780         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6781         types with more than one parameter as prototyped.
6782
6783 2017-09-04  Pedro Alves  <palves@redhat.com>
6784
6785         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6786         (disassemble_command): Use gdb_disassembly_flags instead of bare
6787         int.
6788         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6789         (dump_insns, do_mixed_source_and_assembly_deprecated)
6790         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6791         Use gdb_disassembly_flags instead of bare int.
6792         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6793         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6794         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6795         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6796         (enum gdb_disassembly_flag): ... values of this new enumeration.
6797         (gdb_disassembly_flags): Define.
6798         (gdb_disassembly)
6799         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6800         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6801         gdb_disassembly_flags instead of bare int.
6802         * record-btrace.c (btrace_insn_history)
6803         (record_btrace_insn_history, record_btrace_insn_history_range)
6804         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6805         instead of bare int.
6806         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6807         Use gdb_disassembly_flags instead of bare int.
6808         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6809         Define.
6810         * target-delegates.c: Regenerate.
6811         * target.c (target_insn_history, target_insn_history_from)
6812         (target_insn_history_range): Use gdb_disassembly_flags instead of
6813         bare int.
6814         * target.h: Include "disasm.h".
6815         (struct target_ops) <to_insn_history, to_insn_history_from,
6816         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6817         int.
6818         (target_insn_history, target_insn_history_from)
6819         (target_insn_history_range): Use gdb_disassembly_flags instead of
6820         bare int.
6821
6822 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6823
6824         * cli/cli-script.c (build_command_line): For if/while commands,
6825         check whether args is empty.
6826
6827 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6828
6829         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6830         (enum command_control_type): Likewise.
6831         (struct command_line): Likewise.
6832         (free_command_lines): Likewise.
6833         (struct command_lines_deleter): Likewise.
6834         (command_line_up): Likewise.
6835         (read_command_lines): Likewise.
6836         (read_command_lines_1): Likewise.
6837         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6838         (enum command_control_type): Likewise.
6839         (struct command_line): Likewise.
6840         (free_command_lines): Likewise.
6841         (struct command_lines_deleter): Likewise.
6842         (command_line_up): Likewise.
6843         (read_command_lines): Likewise.
6844         (read_command_lines_1): Likewise.
6845         * breakpoint.h: Include cli/cli-script.h.
6846         * extension-priv.h: Likewise.
6847         * gdbcmd.h: Likewise.
6848
6849 2017-09-04  Pedro Alves  <palves@redhat.com>
6850
6851         * ada-lang.c (is_known_support_routine): Move sal declaration to
6852         where it is initialized.
6853         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6854         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6855         (clear_command, update_static_tracepoint): Remove init_sal
6856         references.  Move declarations closer to initializations.
6857         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6858         initializations.
6859         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6860         references.  Move sal declarations closer to initializations.
6861         * frame.c (find_frame_sal): Return a symtab_and_line via function
6862         return instead of output parameter.  Remove init_sal references.
6863         * frame.h (find_frame_sal): Return a symtab_and_line via function
6864         return instead of output parameter.
6865         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6866         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6867         instead of memset.
6868         (gdbscm_find_pc_line): Remove init_sal reference.
6869         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6870         references.  Move declarations closer to initializations.
6871         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6872         initializations.
6873         (finish_backward): Remove init_sal references.  Move declarations
6874         closer to initializations.
6875         * infrun.c (process_event_stop_test, handle_step_into_function)
6876         (insert_hp_step_resume_breakpoint_at_frame)
6877         (insert_step_resume_breakpoint_at_caller): Likewise.
6878         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6879         (symbol_to_sal): Likewise.
6880         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6881         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6882         to its initialization.
6883         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6884         init_sal references.  Move declarations closer to initializations.
6885         * source.c (get_current_source_symtab_and_line): Remove brace
6886         initialization.
6887         (set_current_source_symtab_and_line): Now takes the sal by const
6888         reference.  Remove brace initialization.
6889         (line_info): Remove init_sal reference.
6890         * source.h (set_current_source_symtab_and_line): Now takes a
6891         symtab_and_line via const reference.
6892         * stack.c (set_current_sal_from_frame): Adjust.
6893         (print_frame_info): Adjust.
6894         (get_last_displayed_sal): Return the sal via function return
6895         instead of via output parameter.  Simplify.
6896         (frame_info): Adjust.
6897         * stack.h (get_last_displayed_sal): Return the sal via function
6898         return instead of via output parameter.
6899         * symtab.c (init_sal): Delete.
6900         (find_pc_sect_line): Remove init_sal references.  Move
6901         declarations closer to initializations.
6902         (find_function_start_sal): Remove init_sal references.  Move
6903         declarations closer to initializations.
6904         * symtab.h (struct symtab_and_line): In-class initialize all
6905         fields.
6906         * tracepoint.c (set_traceframe_context)
6907         (print_one_static_tracepoint_marker): Remove init_sal references.
6908         Move declarations closer to initializations.
6909         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6910         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6911         declarations closer to initializations.
6912         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6913         init_sal references.  Adjust.
6914
6915 2017-09-04  Pedro Alves  <palves@redhat.com>
6916
6917         * ax-gdb.c (agent_command_1): Use range-for.
6918         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6919         * breakpoint.c: Include "common/array-view.h".
6920         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6921         parameter from struct symtabs_and_lines to
6922         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6923         (breakpoint_sals_to_pc): Change sals parameter from struct
6924         symtabs_and_lines to std::vector reference.
6925         (check_fast_tracepoint_sals): Change sals parameter from struct
6926         symtabs_and_lines to std::array_view.  Use range-for.
6927         (decode_static_tracepoint_spec): Return a std::vector instead of
6928         symtabs_and_lines.  Update.
6929         (create_breakpoint): Update.
6930         (break_range_command, until_break_command, clear_command): Update.
6931         (base_breakpoint_decode_location, bkpt_decode_location)
6932         (bkpt_probe_create_sals_from_location)
6933         (bkpt_probe_decode_location, tracepoint_decode_location)
6934         (tracepoint_probe_decode_location)
6935         (strace_marker_create_sals_from_location): Return a std::vector
6936         instead of symtabs_and_lines.
6937         (strace_marker_create_breakpoints_sal): Update.
6938         (strace_marker_decode_location): Return a std::vector instead of
6939         symtabs_and_lines.  Update.
6940         (update_breakpoint_locations): Change struct symtabs_and_lines
6941         parameters to gdb::array_view.  Adjust.
6942         (location_to_sals): Return a std::vector instead of
6943         symtabs_and_lines.  Update.
6944         (breakpoint_re_set_default): Use std::vector instead of struct
6945         symtabs_and_lines.
6946         (decode_location_default): Return a std::vector instead of
6947         symtabs_and_lines.  Update.
6948         * breakpoint.h: Include "common/array-view.h".
6949         (struct breakpoint_ops) <decode_location>: Now returns a
6950         std::vector instead of returning a symtabs_and_lines via output
6951         parameter.
6952         (update_breakpoint_locations): Change sals parameters to use
6953         gdb::array_view.
6954         * cli/cli-cmds.c (edit_command, list_command): Update to use
6955         std::vector and gdb::array_view.
6956         (ambiguous_line_spec): Adjust to use gdb::array_view and
6957         range-for.
6958         (compare_symtabs): Rename to ...
6959         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6960         const reference and adjust.
6961         (filter_sals): Rewrite using std::vector and standard algorithms.
6962         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6963         (jump_command): Update to use std::vector.
6964         * linespec.c (struct linespec_state) <canonical_names>: Update
6965         comment.
6966         (add_sal_to_sals_basic): Delete.
6967         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6968         (decode_line_2, create_sals_line_offset)
6969         (convert_address_location_to_sals, convert_linespec_to_sals)
6970         (convert_explicit_location_to_sals, parse_linespec)
6971         (event_location_to_sals, decode_line_full, decode_line_1)
6972         (decode_line_with_current_source)
6973         (decode_line_with_last_displayed, decode_objc)
6974         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6975         (linespec_result::~linespec_result): Adjust to use std::vector
6976         instead of symtabs_and_lines.
6977         * linespec.h (linespec_sals::sals): Now a std::vector.
6978         (struct linespec_result): Use std::vector, bool, and in-class
6979         initialization.
6980         (decode_line_1, decode_line_with_current_source)
6981         (decode_line_with_last_displayed): Return std::vector.
6982         * macrocmd.c (info_macros_command): Use std::vector.
6983         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6984         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6985         std::vector.
6986         * probe.h (parse_probes): Return a std::vector.
6987         * python/python.c (gdbpy_decode_line): Use std::vector and
6988         gdb::array_view.
6989         * source.c (select_source_symtab, line_info): Use std::vector.
6990         * stack.c (func_command): Use std::vector.
6991         * symtab.h (struct symtabs_and_lines): Delete.
6992         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6993
6994 2017-09-04  Pedro Alves  <palves@redhat.com>
6995
6996         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6997         unittests/array-view-selftests.c.
6998         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6999         * common/array-view.h: New file.
7000         * unittests/array-view-selftests.c: New file.
7001
7002 2017-09-04  Pedro Alves  <palves@redhat.com>
7003
7004         * cli/cli-cmds.c (edit_command): Pass message to
7005         ambiguous_line_spec.
7006         (list_command): Pass message to ambiguous_line_spec.  Say
7007         "first"/"last" instead of "start" and "end" to be consistent with
7008         the manual.
7009         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
7010         them to print formatted message.
7011
7012 2017-09-04  Pedro Alves  <palves@redhat.com>
7013
7014         * btrace.c (ftrace_add_pt): Pass btrace_insn to
7015         ftrace_update_insns by reference instead of pointer.
7016
7017 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7018
7019         * i386-go32-tdep.c: Include x86-xstate.h.
7020         (i386_go32_init_abi): Call i386_target_description.
7021         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7022         if xcr0 is X86_XSTATE_X87_MASK.
7023         * i386-tdep.h (tdesc_i386): Remove the declaration.
7024         (tdesc_i386_mmx): Likewise.
7025
7026 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7027
7028         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7029         X86_XSTATE_SSE_MASK instead of 0.
7030
7031 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7032
7033         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7034         i386_target_description.
7035         * i386-fbsd-nat.c (i386fbsd_read_description): Call
7036         i386_target_description.
7037         * i386-tdep.c (i386_gdbarch_init): Likewise.
7038
7039 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7040
7041         * amd64-darwin-tdep.c: Include "x86-xstate.h".
7042         (x86_darwin_init_abi_64): Call amd64_target_description.
7043         * amd64-dicos-tdep.c: Likewise.
7044         * amd64-fbsd-nat.c: Likewise.
7045         * amd64-fbsd-tdep.c: Likewise.
7046         * amd64-nbsd-tdep.c: Likewise.
7047         * amd64-obsd-tdep.c: Likewise.
7048         * amd64-sol2-tdep.c: Likewise.
7049         * amd64-windows-tdep.c: Likewise.
7050         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7051
7052 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7053
7054         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7055         (btrace_function) <insn>: Change type to use std::vector.
7056         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7057         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7058         ftrace_update_insns, ftrace_compute_global_level_offset,
7059         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7060         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7061         change to std::vector.
7062         (ftrace_update_insns): Adjust to change to std::vector, change
7063         type of INSN parameter.
7064         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7065         * record-btrace.c (btrace_call_history_insn_range,
7066         btrace_compute_src_line_range,
7067         record_btrace_frame_prev_register): Adjust to change to
7068         std::vector.
7069         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7070         to change to std::vector.
7071
7072 2017-09-03  Tom Tromey  <tom@tromey.com>
7073
7074         * corefile.c (reopen_exec_file): Use std::string.
7075
7076 2017-09-03  Tom Tromey  <tom@tromey.com>
7077
7078         * compile/compile.c (compile_register_name_mangled): Return
7079         std::string.
7080         * compile/compile-loc2c.c (pushf_register_address): Update.
7081         (pushf_register): Update.
7082         * compile/compile-c-types.c (convert_array): Update.
7083         * compile/compile-c-symbols.c (generate_vla_size): Update.
7084         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7085         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7086         (convert_one_symbol): Update.
7087         (generate_c_for_for_one_variable): Update.
7088         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7089         std::string.
7090         (generate_register_struct): Update.
7091         * compile/compile-internal.h (c_get_range_decl_name): Return a
7092         std::string.
7093         (compile_register_name_mangled): Return std::string.
7094
7095 2017-09-03  Tom Tromey  <tom@tromey.com>
7096
7097         * utils.c (perror_string): Return a std::string.
7098         (throw_perror_with_name, perror_warning_with_name): Update.
7099
7100 2017-09-03  Tom Tromey  <tom@tromey.com>
7101
7102         * demangle.c (demangle_command): Use std::string,
7103         unique_xmalloc_ptr.
7104
7105 2017-09-03  Tom Tromey  <tom@tromey.com>
7106
7107         * cli/cli-setshow.c (do_set_command): Use std::string.
7108
7109 2017-09-03  Tom Tromey  <tom@tromey.com>
7110
7111         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7112
7113 2017-09-03  Tom Tromey  <tom@tromey.com>
7114
7115         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7116
7117 2017-09-03  Tom Tromey  <tom@tromey.com>
7118
7119         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7120         gdb::unique_xmalloc_ptr.
7121
7122 2017-09-03  Tom Tromey  <tom@tromey.com>
7123
7124         * thread.c (print_thread_info_1): Use string_printf.
7125         (thread_apply_command, thread_apply_all_command): Use
7126         std::string.
7127
7128 2017-09-03  Tom Tromey  <tom@tromey.com>
7129
7130         * valprint.c (val_print_string): Update.
7131         * gdbcore.h (memory_error_message): Return std::string.
7132         * corefile.c (memory_error_message): Return std::string.
7133         (memory_error): Update.
7134         * breakpoint.c (insert_bp_location): Update.
7135
7136 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7137
7138         * target/waitstatus.h (target_waitstatus_to_string): Change
7139         return type to std::string.
7140         * target/waitstatus.c (target_waitstatus_to_string): Return
7141         std::string.
7142         * target.h (target_waitstatus_to_string): Remove declaration.
7143         * infrun.c (resume, clear_proceed_status_thread,
7144         print_target_wait_results, do_target_wait, save_waitstatus,
7145         stop_all_threads): Adjust.
7146         * record-btrace.c (record_btrace_wait): Adjust.
7147         * target-debug.h
7148         (target_debug_print_struct_target_waitstatus_p): Adjust.
7149
7150 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7151
7152         PR gdb/22046
7153         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7154         detection.
7155
7156 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7157
7158         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7159         for setting/unsetting environment variables on the remote target.
7160         (New remote packets): Add entries for QEnvironmentHexEncoded,
7161         QEnvironmentUnset and QEnvironmentReset.
7162         * common/environ.c (gdb_environ::operator=): Extend method to
7163         handle m_user_set_env_list and m_user_unset_env_list.
7164         (gdb_environ::clear): Likewise.
7165         (match_var_in_string): Change type of first parameter from 'char
7166         *' to 'const char *'.
7167         (gdb_environ::set): Extend method to handle
7168         m_user_set_env_list and m_user_unset_env_list.
7169         (gdb_environ::unset): Likewise.
7170         (gdb_environ::clear_user_set_env): New method.
7171         (gdb_environ::user_set_envp): Likewise.
7172         (gdb_environ::user_unset_envp): Likewise.
7173         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7174         m_user_unset_env_list on move constructor/assignment.
7175         (unset): Add new default parameter 'update_unset_list = true'.
7176         (clear_user_set_env): New method.
7177         (user_set_envp): Likewise.
7178         (user_unset_envp): Likewise.
7179         (m_user_set_env_list): New std::set.
7180         (m_user_unset_env_list): Likewise.
7181         * common/rsp-low.c (hex2str): New function.
7182         (bin2hex): New overload for bin2hex function.
7183         * common/rsp-low.c (hex2str): New prototype.
7184         (str2hex): New overload prototype.
7185         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7186         QEnvironmentUnset and QEnvironmentReset.
7187         (remote_protocol_features): Add QEnvironmentHexEncoded,
7188         QEnvironmentUnset and QEnvironmentReset packets.
7189         (send_environment_packet): New function.
7190         (extended_remote_environment_support): Likewise.
7191         (extended_remote_create_inferior): Call
7192         extended_remote_environment_support.
7193         (_initialize_remote): Add QEnvironmentHexEncoded,
7194         QEnvironmentUnset and QEnvironmentReset packet configs.
7195         * unittests/environ-selftests.c (gdb_selftest_env_var):
7196         New variable.
7197         (test_vector_initialization): New function.
7198         (test_init_from_host_environ): Likewise.
7199         (test_reinit_from_host_environ): Likewise.
7200         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7201         Likewise.
7202         (test_unset_set_empty_vector): Likewise.
7203         (test_vector_clear): Likewise.
7204         (test_std_move): Likewise.
7205         (test_move_constructor):
7206         (test_self_move): Likewise.
7207         (test_set_unset_reset): Likewise.
7208         (run_tests): Rewrite in terms of the functions above.
7209
7210 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7211
7212         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7213         (adi_available): Use a temp variable of type CORE_ADDR as argument
7214         3 when calling target_auxv_search.
7215         (adi_normalize_address): Use masks and xor operators to calculate
7216         normalized address.
7217         (adi_read_versions, adi_write_versions, adi_print_versions)
7218         (do_examine, do_assign): Use paddress.
7219
7220 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7221
7222         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7223         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7224         out of loop and add supply of FIR.
7225         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7226         add collect of FIR.
7227
7228 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7229
7230         PR gdb/21827
7231         * cli/cli-script.c (define_command): Don't convert command name
7232         to lower case.
7233
7234 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7235
7236         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7237         Update all callers accordingly. Remove all code blocks handling
7238         the case where DISPP is not NULL.
7239
7240 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7241
7242         PR symtab/22003
7243         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7244         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7245         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7246
7247 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7248
7249         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7250         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7251         (read_comp_units_from_section): New parameter abbrev_section, use
7252         read_and_check_comp_unit_head, allocate signatured_type if needed.
7253         (create_all_comp_units): Update read_comp_units_from_section caller.
7254
7255 2017-08-23  Pedro Alves  <palves@redhat.com>
7256
7257         PR remote/21852
7258         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7259         to null_ptid and switch to thread without reading the registers
7260         after adding the inferior.
7261
7262 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7263
7264         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7265         compile-gcc.
7266         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7267         (compile_to_object): Implement compile_gcc.
7268         (_initialize_compile): Install "set compile-gcc".  Initialize
7269         compile_gcc.
7270
7271 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7272
7273         * compile/compile.c (compile_to_object): Conditionally call
7274         set_verbose.  Conditionally call compile or compile_v0.
7275
7276 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7277
7278         * sparc64-tdep.h: (adi_normalize_address): New export.
7279         * sparc-nat.h: (open_adi_tag_fd): New export.
7280         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7281         * sparc64-linux-tdep.c:
7282         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7283         (sparc64_linux_handle_segmentation_fault): New function.
7284         (sparc64_linux_init_abi): Register
7285         sparc64_linux_handle_segmentation_fault
7286         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7287         (sparc64_addr_bits_remove): New function.
7288         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7289         (MAX_PROC_NAME_SIZE): New macro.
7290         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7291         (sparc64adilist): New variable.
7292         (adi_proc_list): New variable.
7293         (find_adi_info): New function.
7294         (add_adi_info): New function.
7295         (get_adi_info_proc): New function.
7296         (get_adi_info): New function.
7297         (info_adi_command): New function.
7298         (read_maps_entry): New function.
7299         (adi_available): New function.
7300         (adi_normalize_address): New function.
7301         (adi_align_address): New function.
7302         (adi_convert_byte_count): New function.
7303         (adi_tag_fd): New function.
7304         (adi_is_addr_mapped): New function.
7305         (adi_read_versions): New function.
7306         (adi_write_versions): New function.
7307         (adi_print_versions): New function.
7308         (do_examine): New function.
7309         (do_assign): New function.
7310         (adi_examine_command): New function.
7311         (adi_assign_command): New function.
7312         (_initialize_sparc64_adi_tdep): New function.
7313
7314 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7315
7316         * breakpoint.c (breakpoints_info): Rename to ...
7317         (info_breakpoints_command): ... this.
7318         (watchpoints_info): Rename to ...
7319         (info_watchpoints_command): ... this.
7320         (tracepoints_info): Rename to ...
7321         (info_tracepoints_command): ... this.
7322         (_initialize_breakpoint): Adjust.
7323         * dcache.c (dcache_info): Rename to ...
7324         (info_display_command): ... this.
7325         (_initialize_dcache): Adjust.
7326         * frame.h (args_info): Rename to ...
7327         (info_args_command): ... this.
7328         (locals_info): Rename to ...
7329         (info_locals_command): ... this.
7330         * infcmd.c (nofp_registers_info): Rename to ...
7331         (info_registers_command): ... this.
7332         (float_info): Rename to ...
7333         (info_float_command): ... this.
7334         (program_info): Rename to ...
7335         (info_program_command): ... this.
7336         (all_registers_info): Rename to ...
7337         (info_all_registers_command): ... this.
7338         (vector_info): Rename to ...
7339         (info_vector_command): ... this.
7340         (float_info): Rename to ...
7341         (info_float_command): ... this.
7342         (_initialize_infcmd): Adjust.
7343         * inferior.h (term_info): Rename to ...
7344         (info_terminal_command): ... this.
7345         * inflow.c (term_info): Rename to ...
7346         (info_terminal_command): ... this.
7347         (_initialize_inflow): Adjust.
7348         * infrun.c (signals_info): Rename to ...
7349         (info_signals_command): ... this.
7350         (_initialize_infrun): Adjust.
7351         * objc-lang.c (classes_info): Rename to ...
7352         (info_classes_command): ... this.
7353         (selectors_info): Rename to ...
7354         (info_selectors_command): ... this.
7355         (_initialize_objc_language): Adjust.
7356         * printcmd.c (sym_info): Rename to ...
7357         (info_symbol_command): ... this.
7358         (address_info): Rename to ...
7359         (info_address_command): ... this.
7360         (display_info): Rename to ...
7361         (info_display_command): ... this.
7362         (_initialize_printcmd): Adjust.
7363         * reverse.c (bookmarks_info): Rename to ...
7364         (info_breakpoints_command): ... this.
7365         (_initialize_reverse): Adjust.
7366         * ser-go32.c (dos_info): Rename to ...
7367         (info_serial_command): ... this.
7368         (_initialize_ser_dos): Adjust.
7369         * skip.c (skip_info): Rename to ...
7370         (info_skip_command): ... this.
7371         (_initialize_step_skip): Adjust.
7372         * source.c (line_info): Rename to ...
7373         (info_line_command): ... this.
7374         (source_info): Rename to ...
7375         (info_source_command)
7376         * stack.c (frame_info): Rename to ...
7377         (info_frame_command): ... this.
7378         (locals_info): Rename to ...
7379         (info_locals_command): ... this.
7380         (args_info): Rename to ...
7381         (info_args_command): ... this.
7382         (_initialize_stack): Adjust.
7383         * symtab.c (sources_info): Rename to ...
7384         (info_sources_command): ... this.
7385         (variables_info): Rename to ...
7386         (info_variables_command): ... this.
7387         (functions_info): Rename to ...
7388         (info_functions_command): ... this.
7389         (types_info): Rename to ...
7390         (info_types_command): ... this.
7391         (_initialize_symtab): Adjust.
7392         * target.c (target_info): Rename to ...
7393         (info_target_command): ... this.
7394         (initialize_targets): Adjust.
7395         * tracepoint.c (tvariables_info): Rename to ...
7396         (info_tvariables_command): ... this.
7397         (scope_info): Rename to ...
7398         (info_scope_command): ... this.
7399         (trace_dump_actions): Adjust.
7400         (_initialize_tracepoint): Adjust.
7401
7402 2017-08-22  Tom Tromey  <tom@tromey.com>
7403
7404         * breakpoint.h (install_breakpoint): Update.
7405         * breakpoint.c (add_solib_catchpoint): Update.
7406         (install_breakpoint): Change argument to a std::unique_ptr.
7407         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7408         (create_breakpoint_sal, create_breakpoint): Update.
7409         (watch_command_1, catch_exec_command_1)
7410         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7411         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7412         Return the breakpoint.
7413         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7414         (new_single_step_breakpoint): Update.
7415         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7416         std::unique_ptr.
7417         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7418         std::unique_ptr.
7419         * break-catch-sig.c (create_signal_catchpoint): Use
7420         std::unique_ptr.
7421         * ada-lang.c (create_ada_exception_catchpoint): Use
7422         std::unique_ptr.
7423
7424 2017-08-22  Tom Tromey  <tom@tromey.com>
7425
7426         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7427
7428 2017-08-22  Tom Tromey  <tom@tromey.com>
7429
7430         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7431         (lookup_partial_symbol): Update.
7432
7433 2017-08-22  Tom Tromey  <tom@tromey.com>
7434
7435         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7436         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7437         (find_and_open_source, symtab_to_fullname): Update.
7438         * psymtab.c (psymtab_to_fullname): Update.
7439
7440 2017-08-22  Tom Tromey  <tom@tromey.com>
7441
7442         * exec.c (exec_file_attach): Update.
7443         * linux-thread-db.c (try_thread_db_load): Update.
7444         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7445         * utils.c (gdb_realpath): Change return type.
7446         (gdb_realpath_keepfile): Update.
7447         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7448         (_initialize_utils): Register the new self test.
7449         * source.c (openp): Update.
7450         (find_and_open_source): Update.
7451         * nto-tdep.c (nto_find_and_open_solib): Update.
7452         * main.c (set_gdb_data_directory): Update.
7453         (captured_main_1): Update.
7454         * dwarf2read.c (dwarf2_get_dwz_file): Update
7455         (dw2_map_symbol_filenames): Update.
7456         * auto-load.c (auto_load_safe_path_vec_update): Update.
7457         (filename_is_in_auto_load_safe_path_vec): Change type of
7458         "filename_realp".
7459         (auto_load_objfile_script): Update.
7460         (file_is_auto_load_safe): Update.  Use std::string.
7461         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7462
7463 2017-08-22  Tom Tromey  <tom@tromey.com>
7464
7465         * utils.c (gdb_realpath_keepfile): Return a
7466         gdb::unique_xmalloc_ptr.
7467         * exec.c (exec_file_attach): Update.
7468         * utils.h (gdb_realpath_keepfile): Return a
7469         gdb::unique_xmalloc_ptr.
7470
7471 2017-08-22  Tom Tromey  <tom@tromey.com>
7472
7473         * compile/compile.c (compile_file_command): Use
7474         gdb::unique_xmalloc_ptr, std::string.
7475         * utils.c (gdb_abspath): Change return type.
7476         * source.c (openp): Update.
7477         * objfiles.c (allocate_objfile): Update.
7478         * main.c (set_gdb_data_directory): Update.
7479         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7480
7481 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7482
7483         * cli-cmds.c (list_commands): List actual code around more than
7484         one location.
7485
7486 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7487
7488         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7489
7490 2017-08-21  Pedro Alves  <palves@redhat.com>
7491
7492         PR gdb/19487
7493         * c-exp.y (variable production): Handle function aliases.
7494         * minsyms.c (msymbol_is_text): New function.
7495         * minsyms.h (msymbol_is_text): Declare.
7496         * symtab.c (find_function_alias_target): New function.
7497         * symtab.h (find_function_alias_target): Declare.
7498
7499 2017-08-21  Pedro Alves  <palves@redhat.com>
7500
7501         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7502         typedefs.
7503         * typeprint.c (whatis_exp): If handling "whatis", and expression
7504         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7505         typedefs here.
7506         * valops.c (value_cast): Save "to" type before resolving
7507         stubs/typedefs.  Use that type as resulting value's type.
7508
7509 2017-08-18  Tom Tromey  <tom@tromey.com>
7510             Pedro Alves  <palves@redhat.com>
7511
7512         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7513         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7514         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7515         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7516         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7517         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7518         (linux_get_siginfo_data): Add "thread" argument.  Use
7519         scoped_restore.
7520         * linux-nat.c (linux_child_follow_fork)
7521         (check_stopped_by_watchpoint): Use scoped_restore.
7522         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7523         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7524         (restore_inferior_ptid, save_inferior_ptid): Remove.
7525         * btrace.c (btrace_fetch): Use scoped_restore.
7526         * bsd-uthread.c (bsd_uthread_fetch_registers)
7527         (bsd_uthread_store_registers): Use scoped_restore.
7528         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7529         scoped_restore.
7530         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7531         (aix_thread_xfer_partial): Use scoped_restore.
7532         * inferior.h (save_inferior_ptid): Remove.
7533
7534 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7535
7536         PR tdep/21818
7537         * arm-tdep.c (gdb_print_insn_arm): Mark
7538         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7539
7540 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7541
7542         * NEWS: Mention GDBserver's new option "--selftest".
7543         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7544         * selftest.c: Move it to common/selftest.c.
7545         * selftest.h: Move it to common/selftest.h.
7546         * selftest-arch.c (reset): New function.
7547         (tests_with_arch): Call reset.
7548
7549 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7550
7551         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7552         instead of exception_fprintf and printf_filtered.
7553
7554 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7555
7556         * selftest.c (register_self_test): Rename it to
7557         selftests::register_test.
7558         (run_self_tests): selftest::run_tests.
7559         * selftest.h: Update declarations.
7560         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7561         selftests::register_test_foreach_arch.
7562         * selftest-arch.h: Update declaration.
7563         * aarch64-tdep.c: Update.
7564         * arm-tdep.c: Likewise.
7565         * disasm-selftests.c: Likewise.
7566         * dwarf2loc.c: Likewise.
7567         * dwarf2-frame.c: Likewise.
7568         * findvar.c: Likewise.
7569         * gdbarch-selftests.c: Likewise.
7570         * maint.c (maintenance_selftest): Likewise.
7571         * regcache.c: Likewise.
7572         * rust-exp.y: Likewise.
7573         * selftest-arch.c: Likewise.
7574         * unittests/environ-selftests.c: Likewise.
7575         * unittests/function-view-selftests.c: Likewise.
7576         * unittests/offset-type-selftests.c: Likewise.
7577         * unittests/optional-selftests.c: Likewise.
7578         * unittests/scoped_restore-selftests.c: Likewise.
7579         * utils-selftests.c: Likewise.
7580
7581 2017-08-17  Pedro Alves  <palves@redhat.com>
7582
7583         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7584         local.
7585
7586 2017-08-17  Pedro Alves  <palves@redhat.com>
7587
7588         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7589         field.
7590         (reset_die_in_process): Delete, replaced by ...
7591         (process_die_scope): ... this new class.  Make it responsible for
7592         freeing cu->line_header too.
7593         (process_die): Use process_die_scope.
7594         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7595         cu->line_header_die_owner.  Don't release the line header if it's
7596         owned by the CU.
7597         (setup_type_unit_groups): Make the CU/DIE own the line header.
7598         Don't release the line header here.
7599
7600 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7601
7602         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7603
7604 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7605
7606         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7607         Single-Key mode
7608
7609 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7610
7611         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7612         mode command list.
7613
7614 2017-08-15  Stafford Horne  <shorne@gmail.com>
7615
7616         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7617
7618 2017-08-15  Stafford Horne  <shorne@gmail.com>
7619
7620         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7621
7622 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7623
7624         PR gdb/21954
7625         * infcmd.c (unset_environment_command): Use the 'clear' method on
7626         the environment instead of resetting it.
7627
7628 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7629
7630         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7631         platforms.
7632
7633 2017-08-14  Tom Tromey  <tom@tromey.com>
7634
7635         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7636         (print_binary_chars): Likewise.
7637         (BITS_IN_BYTES): Remove.
7638
7639 2017-08-14  Tom Tromey  <tom@tromey.com>
7640
7641         PR gdb/21675
7642         * valprint.c (LOW_ZERO): Change value to 034.
7643         (print_octal_chars): Add static_asserts for octal constants.
7644         * printcmd.c (print_scalar_formatted): Add 'd' case.
7645
7646 2017-08-11  Tom Tromey  <tom@tromey.com>
7647
7648         * symfile.c (add_symbol_file_command): Use std::vector.
7649
7650 2017-08-14  Tom Tromey  <tom@tromey.com>
7651
7652         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7653         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7654         std::move.
7655         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7656
7657 2017-08-11  Pedro Alves  <palves@redhat.com>
7658
7659         * infrun.c (process_event_stop_test): Adjust
7660         function_name_is_marked_for_skip call.
7661         * skip.c: Include <list>.
7662         (skiplist_entry): Make it a class with private fields, and
7663         getters/setters.
7664         (skiplist_entry_chain): Delete.
7665         (skiplist_entries): New.
7666         (skiplist_entry_count): Delete.
7667         (highest_skiplist_entry_num): New.
7668         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7669         (add_skiplist_entry): Delete.
7670         (skiplist_entry::skiplist_entry): New.
7671         (skiplist_entry::add_entry): New.
7672         (skip_file_command, skip_function): Adjust.
7673         (compile_skip_regexp): Delete.
7674         (skip_command): Don't compile regexp here.  Adjust to use
7675         skiplist_entry::add_entry.
7676         (skip_info): Adjust to use range-for and getters.
7677         (skip_enable_command, skip_disable_command): Adjust to use
7678         range-for and setters.
7679         (skip_delete_command): Adjust to use std::list.
7680         (add_skiplist_entry): Delete.
7681         (skip_file_p): Delete, refactored as ...
7682         (skiplist_entry::do_skip_file_p): ... this new method.
7683         (skip_gfile_p): Delete, refactored as ...
7684         (skiplist_entry::do_gskip_file_p): ... this new method.
7685         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7686         (skiplist_entry::skip_function_p): ... this new method.
7687         (function_name_is_marked_for_skip): Now returns bool, and takes
7688         the function sal by const reference.  Adjust to use range-for and
7689         skiplist_entry methods.
7690         (_initialize_step_skip): Remove references to
7691         skiplist_entry_chain, skiplist_entry_count.
7692         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7693         takes the function sal by const reference.
7694
7695 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7696
7697         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7698         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7699         (dwarf2_frame_cache):
7700         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7701         RETURN_MASK_ALL and set *this_case to NULL.
7702         * frame-unwind.h: Update comments.
7703
7704 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7705
7706         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7707         (dwarf2_frame_state_copy_regs): Remove.
7708         (dwarf2_frame_state_free_regs): Remove.
7709         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7710         (dwarf2_restore_rule): Call method .alloc_regs instead of
7711         dwarf2_frame_state_alloc_regs.
7712         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7713         constructor.  Call std::move.
7714         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7715         (dwarf2_frame_cache): Likewise.
7716
7717         [GDB_SELF_TEST]: Include selftest.h and
7718         selftest-arch.h.
7719         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7720         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7721         execute_cfa_program_test.
7722
7723         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7724         copy ctor, assignment operator, move assignment.
7725         <alloc_regs>: New method.
7726         <swap>: New method.
7727         (struct dwarf2_frame_state): Delete dtor.
7728         (dwarf2_frame_state_alloc_regs): Remove declaration.
7729         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7730         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7731
7732 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7733
7734         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7735         (dwarf2_frame_state::dwarf2_frame_state): New.
7736         (dwarf2_frame_state::~dwarf2_frame_state): New.
7737         (dwarf2_fetch_cfa_info): Update.
7738         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7739         rather than a pointer.  Update code.
7740         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7741         dtor.
7742         <data_align, code_align, retaddr_column>: Change them to const.
7743         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7744         to bool.
7745
7746 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7747
7748         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7749         <loc.exp>: New field.
7750         * dwarf2-frame.c (execute_cfa_program): Update.
7751         (dwarf2_frame_prev_register): Update.
7752
7753 2017-08-10  Pedro Alves  <palves@redhat.com>
7754
7755         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7756
7757 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7758
7759         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7760         (fbsd_pending_children): Use std::list.
7761         (fbsd_remember_child): Likewise.
7762         (fbsd_is_child_pending): Likewise.
7763         (fbsd_pending_vfork_done): Use std::forward_list.
7764         (fbsd_add_vfork_done): Likewise.
7765         (fbsd_is_vfork_done_pending): Likewise.
7766         (fbsd_next_vfork_done): Likewise.
7767
7768 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7769
7770         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7771         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7772         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7773         for `mapfilename'.
7774         (fbsd_xfer_partial): Use gdb::byte_vector.
7775         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7776
7777 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7778
7779         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7780         "filestuff.h".
7781         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7782
7783 2017-08-09  Tom Tromey  <tom@tromey.com>
7784
7785         * skip.c (skiplist_entry): New constructor.
7786         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7787         (skiplist_entry::file_is_glob): Now bool.
7788         (skiplist_entry::file, skiplist_entry::function): Now
7789         std::string.
7790         (make_skip_entry): Return a unique_ptr.  Use new.
7791         (free_skiplist_entry, free_skiplist_entry_cleanup)
7792         (make_free_skiplist_entry_cleanup): Remove.
7793         (skip_command, skip_disable_command, add_skiplist_entry)
7794         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7795         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7796         (function_name_is_marked_for_skip): Update.
7797         (skip_delete_command): Update.  Use delete.
7798
7799 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7800
7801         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7802         (aarch64_linux_core_read_description): New function.
7803         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7804
7805 2017-08-09  Pedro Alves  <palves@redhat.com>
7806
7807         * cp-name-parser.y (cp_comp_to_string): Return a
7808         gdb::unique_xmalloc_ptr<char>.
7809         * cp-support.c (replace_typedefs_qualified_name)
7810         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7811         (cp_canonicalize_string_full): Use op= instead of explicit
7812         convertion.
7813         (cp_class_name_from_physname, method_name_from_physname)
7814         (cp_func_name, cp_remove_params): Adjust to use
7815         gdb::unique_xmalloc_ptr<char>.
7816         * cp-support.h (cp_comp_to_string): Return a
7817         gdb::unique_xmalloc_ptr<char>.
7818         * python/py-type.c (typy_lookup_type): Adjust to use
7819         gdb::unique_xmalloc_ptr<char>.
7820
7821 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7822
7823         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7824
7825 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7826             Yao Qi  <yao.qi@linaro.org>
7827
7828         * cp-support.c (cp_canonicalize_string_full): Use
7829         gdb::unique_xmalloc_ptr<char>.
7830         (cp_canonicalize_string): Likewise.
7831
7832 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7833
7834         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7835         * regformats/i386/amd64-avx-avx512.dat: Remove.
7836         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7837         * regformats/i386/amd64-avx-mpx.dat:Remove.
7838         * regformats/i386/amd64-avx.dat: Remove.
7839         * regformats/i386/amd64-mpx.dat: Remove.
7840         * regformats/i386/i386-avx-avx512.dat: Remove.
7841         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7842         * regformats/i386/i386-avx-mpx.dat: Remove.
7843         * regformats/i386/i386-mmx.dat: Remove.
7844         * regformats/i386/i386-mpx.dat: Remove.
7845
7846 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7847
7848         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7849         * amd64-tdep.c: Don't include features/i386/x32*.c.
7850         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7851         functions.
7852         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7853         and i386/x32-avx-avx512.
7854         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7855         and i386/x32.xml.
7856         * features/i386/x32-avx-avx512.c: Removed.
7857         * features/i386/x32-avx-avx512.xml: Removed.
7858         * features/i386/x32-avx.c: Removed.
7859         * features/i386/x32-avx.xml: Removed.
7860         * features/i386/x32.c: Removed.
7861         * features/i386/x32.xml: Removed.
7862         * regformats/i386/x32-avx-avx512.dat: Removed.
7863         * regformats/i386/x32-avx.dat: Removed.
7864         * regformats/i386/x32.dat: Removed.
7865
7866 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7867
7868         PR breakpoints/21886
7869         * mem-break.c (default_memory_insert_breakpoint): Use
7870         `->placed_address' rather than `->reqstd_address' for the
7871         breakpoint location.
7872
7873 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7874
7875         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7876         assertions.
7877
7878 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7879
7880         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7881         a union of `tdep_info', `tdesc_data' and `id'.
7882         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7883         rather than `info.tdep_info'.
7884         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7885         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7886         * i386-tdep.c (i386_gdbarch_init): Likewise.
7887         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7888         * mips-tdep.c (mips_gdbarch_init): Likewise.
7889         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7890         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7891         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7892         `info.tdep_info'.
7893         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7894         `info.tdep_info'.
7895         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7896         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7897         `info.tdep_info'.
7898         * spu-tdep.c (spu_gdbarch_init): Likewise.
7899         * gdbarch.h: Regenerate.
7900
7901 2017-08-07  Leszek Swirski  <leszeks@google.com>
7902
7903         PR symtab/20899
7904         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7905
7906 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7907
7908         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7909         (gdbsim_open): Rename gdb_argv args object to argv.
7910
7911 2017-08-05  Tom Tromey  <tom@tromey.com>
7912
7913         * compile/compile-object-load.c (compile_object_load): Use
7914         gdb::unique_xmalloc_ptr.
7915         * cli/cli-dump.c (scan_filename): Rename from
7916         scan_filename_with_cleanup.  Change return type.
7917         (scan_expression): Rename from scan_expression_with_cleanup.
7918         Change return type.
7919         (dump_memory_to_file, dump_value_to_file, restore_command):
7920         Use gdb::unique_xmalloc_ptr.  Update.
7921         * cli/cli-cmds.c (find_and_open_script): Use
7922         gdb::unique_xmalloc_ptr.
7923         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7924         * symmisc.c (maintenance_print_symbols)
7925         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7926         * symfile.c (symfile_bfd_open, generic_load)
7927         (add_symbol_file_command, remove_symbol_file_command): Use
7928         gdb::unique_xmalloc_ptr.
7929         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7930         * psymtab.c (maintenance_print_psymbols): Use
7931         gdb::unique_xmalloc_ptr.
7932         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7933         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7934         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7935         (reload_shared_libraries_1): Likewise.
7936
7937 2017-08-05  Tom Tromey  <tom@tromey.com>
7938
7939         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7940         (rust_op_vector, rust_set_vector): New typedefs.
7941         (current_parser): New global.
7942         (work_obstack): Change to pointer type.  Update all users.
7943         (rust_ast, pstate): Remove globals.
7944         (struct rust_parser): New.
7945         (%union) <params, field_inits>: Change type.
7946         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7947         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7948         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7949         (convert_params_to_types, convert_params_to_expression): Change
7950         type of "params".
7951         (ast_string): Change type of "fields".
7952         (rust_parse): Make a rust_parser.  Remove cleanups.
7953         (rust_lex_tests): Make and install an auto_obstack.
7954
7955 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7956
7957         * configure.srv (ipa_x32_linux_regobj): New.
7958         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7959         instead of X86_TDESC_AVX512.
7960         (initialize_low_tracepoint): Call
7961         init_registers_x32_avx_avx512_linux.
7962
7963 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7964
7965         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7966
7967 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7968
7969         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7970
7971 2017-08-03  Tom Tromey  <tom@tromey.com>
7972
7973         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7974         Remove.
7975         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7976
7977 2017-08-03  Tom Tromey  <tom@tromey.com>
7978
7979         * python/py-param.c (compute_enum_values): Use gdb_argv.
7980
7981 2017-08-03  Tom Tromey  <tom@tromey.com>
7982
7983         * utils.h (struct gdb_argv_deleter): New.
7984         (gdb_argv): New class.
7985         * utils.c (gdb_argv::reset): New method.
7986         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7987         * tracefile.c (tsave_command): Use gdb_argv.
7988         * top.c (new_ui_command): Use gdb_argv.
7989         * symmisc.c (maintenance_print_symbols)
7990         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7991         * symfile.c (symbol_file_command, generic_load)
7992         (remove_symbol_file_command): Use gdb_argv.
7993         * stack.c (backtrace_command): Use gdb_argv.
7994         * source.c (add_path, show_substitute_path_command)
7995         (unset_substitute_path_command, set_substitute_path_command):
7996         Use gdb_argv.
7997         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7998         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7999         * remote.c (extended_remote_run, remote_put_command)
8000         (remote_get_command, remote_delete_command): Use gdb_argv.
8001         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8002         (gdbsim_open): Use gdb_argv.
8003         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8004         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8005         * procfs.c (procfs_info_proc): Use gdb_argv.
8006         * interps.c (interpreter_exec_cmd): Use gdb_argv.
8007         * infrun.c (handle_command): Use gdb_argv.
8008         * inferior.c (add_inferior_command, clone_inferior_command):
8009         Use gdb_argv.
8010         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8011         * exec.c (exec_file_command): Use gdb_argv.
8012         * cli/cli-cmds.c (alias_command): Use gdb_argv.
8013         * compile/compile.c (build_argc_argv): Use gdb_argv.
8014
8015 2017-08-03  Tom Tromey  <tom@tromey.com>
8016
8017         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8018
8019 2017-08-03  Tom Tromey  <tom@tromey.com>
8020
8021         * python/python.c (compute_python_string): Return std::string.
8022         (gdbpy_eval_from_control_command): Update.
8023         (do_start_initialization): Use std::string.
8024         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8025         xstrprintf.
8026         * python/py-breakpoint.c (local_setattro): Use string_printf, not
8027         xstrprintf.
8028
8029 2017-08-03  Tom Tromey  <tom@tromey.com>
8030
8031         * top.h (do_restore_instream_cleanup): Remove.
8032         * top.c (do_restore_instream_cleanup): Remove.
8033         (read_command_file): Use scoped_restore.
8034         * cli/cli-script.c (execute_user_command): Use scoped_restore.
8035
8036 2017-08-03  Tom Tromey  <tom@tromey.com>
8037
8038         * cli/cli-script.c (execute_user_command)
8039         (execute_control_command): Use scoped_restore.
8040
8041 2017-08-03  Tom Tromey  <tom@tromey.com>
8042
8043         * cli/cli-script.c (do_restore_user_call_depth): Remove.
8044         (execute_user_command): Remove user_call_depth; use
8045         user_args_stack's size instead.
8046
8047 2017-08-03  Tom Tromey  <tom@tromey.com>
8048
8049         * top.h (in_user_command): Remove.
8050         * top.c (in_user_command): Remove.
8051         * cli/cli-script.c (do_restore_user_call_depth)
8052         (execute_user_command): Update.
8053
8054 2017-08-03  Tom Tromey  <tom@tromey.com>
8055
8056         * valops.c (search_struct_method): Use gdb::byte_vector.
8057         * valarith.c (value_concat): Use std::vector.
8058         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8059         (simple_search_memory): Likewise.
8060         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8061         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8062         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8063         * elfread.c (elf_rel_plt_read): Use std::string.
8064         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8065         * cli/cli-dump.c (restore_section_callback): Use
8066         gdb::byte_vector.
8067
8068 2017-08-03  Tom Tromey  <tom@tromey.com>
8069
8070         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8071
8072 2017-08-03  Tom Tromey  <tom@tromey.com>
8073
8074         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8075         (tui_register_format): Use scoped_restore.
8076
8077 2017-08-03  Tom Tromey  <tom@tromey.com>
8078
8079         * reverse.c (exec_direction_default): Remove.
8080         (exec_reverse_once): Use scoped_restore.
8081         * remote.c (restore_remote_timeout): Remove.
8082         (remote_flash_erase, remote_flash_write, remote_flash_done)
8083         (readchar, remote_serial_write): Use scoped_restore.
8084         * cli/cli-script.c (struct source_cleanup_lines_args)
8085         (source_cleanup_lines): Remove.
8086         (script_from_file): Use scoped_restore.
8087         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8088         (source_command): Use scoped_restore.
8089
8090 2017-08-03  Tom Tromey  <tom@tromey.com>
8091
8092         * utils.h (make_cleanup_free_so): Remove.
8093         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8094         * solist.h (struct so_deleter): New.
8095         (so_list_up): New typedef.
8096         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8097
8098 2017-08-03  Tom Tromey  <tom@tromey.com>
8099
8100         * utils.h (make_cleanup_restore_current_language): Remove.
8101         * utils.c (do_restore_current_language)
8102         (make_cleanup_restore_current_language): Remove.
8103         * parse.c (parse_exp_in_context_1)
8104         (parse_expression_with_language): Use
8105         scoped_restore_current_language.
8106         * mi/mi-main.c (mi_cmd_execute): Use
8107         scoped_restore_current_language.
8108         * language.h (scoped_restore_current_language): New class.
8109
8110 2017-08-03  Tom Tromey  <tom@tromey.com>
8111
8112         * compile/compile.c (cleanup_unlink_file): Remove.
8113         (compile_to_object): Use gdb::unlinker.
8114         (eval_compile_command): Likewise.
8115
8116 2017-08-03  Tom Tromey  <tom@tromey.com>
8117
8118         * utils.h (make_cleanup_fclose): Remove.
8119         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8120
8121 2017-08-03  Tom Tromey  <tom@tromey.com>
8122
8123         * top.c (open_terminal_stream): Return gdb_file_up.
8124         (new_ui_command): Update.
8125
8126 2017-08-03  Tom Tromey  <tom@tromey.com>
8127
8128         * source.c (print_source_lines_base, forward_search_command)
8129         (reverse_search_command): Use gdb_file_up.
8130
8131 2017-08-03  Tom Tromey  <tom@tromey.com>
8132
8133         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8134
8135 2017-08-03  Tom Tromey  <tom@tromey.com>
8136
8137         * cli/cli-cmds.c (find_and_open_script): Change return type.
8138         Remove "streamp" and "full_path" parameters.
8139         (source_script_with_search): Update.
8140         * auto-load.c (source_script_file): Update.
8141         * cli/cli-cmds.h (find_and_open_script): Change type.
8142         (open_script): New struct.
8143
8144 2017-08-03  Tom Tromey  <tom@tromey.com>
8145
8146         * xml-support.c (xml_fetch_content_from_file): Update.
8147         * ui-file.c (stdio_file::open): Update.
8148         * tracefile-tfile.c (tfile_start): Update.
8149         * remote.c (remote_file_put, remote_file_get): Update.
8150         * nat/linux-procfs.c (linux_proc_get_int)
8151         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8152         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8153         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8154         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8155         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8156         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8157         * linux-nat.c (linux_proc_pending_signals): Update.
8158         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8159         (file_closer): Remove.
8160         * compile/compile.c (compile_to_object): Update.
8161         * common/filestuff.h (struct gdb_file_deleter): New.
8162         (gdb_file_up): New typedef.
8163         (gdb_fopen_cloexec): Change return type.
8164         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8165         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8166         (dump_binary_file, restore_binary_file): Update.
8167         * auto-load.c (auto_load_objfile_script_1): Update.
8168
8169 2017-08-03  Tom Tromey  <tom@tromey.com>
8170
8171         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8172         (info_static_tracepoint_markers_command): Likewise.
8173         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8174         * skip.c (skip_info): Use ui_out_emit_table.
8175         * progspace.c (print_program_space): Use ui_out_emit_table.
8176         * osdata.c (info_osdata): Use ui_out_emit_table.
8177         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8178         ui_out_emit_table.
8179         * linux-thread-db.c (info_auto_load_libthread_db): Use
8180         ui_out_emit_table.
8181         * inferior.c (print_inferior): Use ui_out_emit_table.
8182         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8183         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8184         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8185         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8186         * ui-out.h (class ui_out_emit_table): New.
8187
8188 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8189
8190         * mips-tdep.c (mips_fpu_type_str): New function.
8191         (mips_dump_tdep): Call it.
8192
8193 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8194
8195         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8196         `->mips_fpu_type'.
8197
8198 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8199
8200         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8201
8202 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8203
8204         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8205
8206 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8207
8208         * cli/cli-cmds.c (maintenancechecklist): New variable.
8209         * gdbcmd.h (maintenancechecklist): Declare it.
8210         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8211         Call i386_linux_read_description with different masks.
8212         * maint.c (maintenance_check_command): New function.
8213         (_initialize_maint_cmds): Call add_prefix_cmd.
8214         * target-descriptions.c (tdesc_reg): override operator != and ==.
8215         (tdesc_type): Likewise.
8216         (tdesc_feature): Likewise.
8217         (target_desc): Likewise.
8218         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8219         (maintenance_check_xml_descriptions): New function.
8220         (_initialize_target_descriptions) Add command "xml-descriptions".
8221         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8222
8223 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8224
8225         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8226         Include features/i386/32bit-*.c.
8227         (i386_linux_read_description): Generate target description if it
8228         doesn't exist.
8229         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8230         functions.
8231         * features/i386/32bit-linux.c: Re-generated.
8232         * features/i386/32bit-sse.c: Likewise.
8233         * target-descriptions.c (print_c_feature::visit): Print code to
8234         set register number if needed.
8235         (print_c_feature) <m_next_regnum>: New field.
8236
8237 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8238
8239         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8240         (FEATURE_XMLFILES): New.
8241         (FEATURE_CFILES): New.
8242         New rules.
8243         (clean-cfiles): Remove generated c files.
8244         * features/i386/32bit-avx.c: Generated.
8245         * features/i386/32bit-avx512.c: Generated.
8246         * features/i386/32bit-core.c: Generated.
8247         * features/i386/32bit-linux.c: Generated.
8248         * features/i386/32bit-mpx.c: Generated.
8249         * features/i386/32bit-pkeys.c: Generated.
8250         * features/i386/32bit-sse.c: Generated.
8251         * target-descriptions.c: Include algorithm.
8252         (tdesc_element_visitor): Add method visit_end.
8253         (print_c_tdesc): Implement visit_end.
8254         (print_c_tdesc:: m_filename_after_features): Move it to
8255         protected.
8256         (print_c_feature): New class.
8257         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8258         name starts with "i386/32bit-".
8259
8260 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8261
8262         * target-descriptions.c (tdesc_element_visitor): New class.
8263         (tdesc_element): New class.
8264         (tdesc_reg): Inherit from tdesc_element.
8265         (tdesc_reg::accept): New function.
8266         (tdesc_type): Inherit from tdesc_element.
8267         (tdesc_type::accept): New function.
8268         (tdesc_feature): Inherit from tdesc_element.
8269         (tdesc_feature::accept): New function.
8270         (target_desc): Inherit from tdesc_element.
8271         (target_desc::target_desc): New.
8272         (target_desc::~target_desc): New.
8273         (target_desc::accept): New.
8274         (allocate_target_description): Use new.
8275         (free_target_description): Use delete.
8276         (print_c_tdesc): New class.
8277         (maint_print_c_tdesc_cmd): Adjust.
8278
8279         * features/aarch64.c: Re-generated.
8280         * features/arc-arcompact.c: Re-generated.
8281         * features/arc-v2.c: Re-generated.
8282         * features/arm/arm-with-iwmmxt.c: Re-generated.
8283         * features/arm/arm-with-m.c: Re-generated.
8284         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8285         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8286         * features/arm/arm-with-neon.c: Re-generated.
8287         * features/arm/arm-with-vfpv2.c: Re-generated.
8288         * features/arm/arm-with-vfpv3.c: Re-generated.
8289         * features/i386/amd64-avx-avx512.c: Re-generated.
8290         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8291         * features/i386/amd64-avx.c: Re-generated.
8292         * features/i386/amd64-avx-linux.c: Re-generated.
8293         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8294         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8295         * features/i386/amd64-avx-mpx.c: Re-generated.
8296         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8297         * features/i386/amd64.c: Re-generated.
8298         * features/i386/amd64-linux.c: Re-generated.
8299         * features/i386/amd64-mpx.c: Re-generated.
8300         * features/i386/amd64-mpx-linux.c: Re-generated.
8301         * features/i386/i386-avx-avx512.c: Re-generated.
8302         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8303         * features/i386/i386-avx.c: Re-generated.
8304         * features/i386/i386-avx-linux.c: Re-generated.
8305         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8306         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8307         * features/i386/i386-avx-mpx.c: Re-generated.
8308         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8309         * features/i386/i386.c: Re-generated.
8310         * features/i386/i386-linux.c: Re-generated.
8311         * features/i386/i386-mmx.c: Re-generated.
8312         * features/i386/i386-mmx-linux.c: Re-generated.
8313         * features/i386/i386-mpx.c: Re-generated.
8314         * features/i386/i386-mpx-linux.c: Re-generated.
8315         * features/i386/x32-avx-avx512.c: Re-generated.
8316         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8317         * features/i386/x32-avx.c: Re-generated.
8318         * features/i386/x32-avx-linux.c: Re-generated.
8319         * features/i386/x32.c: Re-generated.
8320         * features/i386/x32-linux.c: Re-generated.
8321         * features/microblaze.c: Re-generated.
8322         * features/microblaze-with-stack-protect.c: Re-generated.
8323         * features/mips64-dsp-linux.c: Re-generated.
8324         * features/mips64-linux.c: Re-generated.
8325         * features/mips-dsp-linux.c: Re-generated.
8326         * features/mips-linux.c: Re-generated.
8327         * features/nds32.c: Re-generated.
8328         * features/nios2.c: Re-generated.
8329         * features/nios2-linux.c: Re-generated.
8330         * features/rs6000/powerpc-32.c: Re-generated.
8331         * features/rs6000/powerpc-32l.c: Re-generated.
8332         * features/rs6000/powerpc-403.c: Re-generated.
8333         * features/rs6000/powerpc-403gc.c : Re-generated.
8334         * features/rs6000/powerpc-405.c: Re-generated.
8335         * features/rs6000/powerpc-505.c: Re-generated.
8336         * features/rs6000/powerpc-601.c: Re-generated.
8337         * features/rs6000/powerpc-602.c: Re-generated.
8338         * features/rs6000/powerpc-603.c: Re-generated.
8339         * features/rs6000/powerpc-604.c: Re-generated.
8340         * features/rs6000/powerpc-64.c: Re-generated.
8341         * features/rs6000/powerpc-64l.c: Re-generated.
8342         * features/rs6000/powerpc-7400.c: Re-generated.
8343         * features/rs6000/powerpc-750.c: Re-generated.
8344         * features/rs6000/powerpc-860.c: Re-generated.
8345         * features/rs6000/powerpc-altivec32.c: Re-generated.
8346         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8347         * features/rs6000/powerpc-altivec64.c: Re-generated.
8348         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8349         * features/rs6000/powerpc-cell32l.c: Re-generated.
8350         * features/rs6000/powerpc-cell64l.c: Re-generated.
8351         * features/rs6000/powerpc-e500.c: Re-generated.
8352         * features/rs6000/powerpc-e500l.c: Re-generated.
8353         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8354         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8355         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8356         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8357         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8358         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8359         * features/rs6000/powerpc-vsx32.c: Re-generated.
8360         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8361         * features/rs6000/powerpc-vsx64.c: Re-generated.
8362         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8363         * features/rs6000/rs6000.c: Re-generated.
8364         * features/s390-linux32.c: Re-generated.
8365         * features/s390-linux32v1.c: Re-generated.
8366         * features/s390-linux32v2.c: Re-generated.
8367         * features/s390-linux64.c: Re-generated.
8368         * features/s390-linux64v1.c: Re-generated.
8369         * features/s390-linux64v2.c: Re-generated.
8370         * features/s390-te-linux64.c: Re-generated.
8371         * features/s390-tevx-linux64.c: Re-generated.
8372         * features/s390-vx-linux64.c: Re-generated.
8373         * features/s390x-linux64.c: Re-generated.
8374         * features/s390x-linux64v1.c: Re-generated.
8375         * features/s390x-linux64v2.c: Re-generated.
8376         * features/s390x-te-linux64.c: Re-generated.
8377         * features/s390x-tevx-linux64.c: Re-generated.
8378         * features/s390x-vx-linux64.c: Re-generated.
8379         * features/sparc/sparc32-solaris.c: Re-generated.
8380         * features/sparc/sparc64-solaris.c: Re-generated.
8381         * features/tic6x-c62x.c: Re-generated.
8382         * features/tic6x-c62x-linux.c: Re-generated.
8383         * features/tic6x-c64x.c: Re-generated.
8384         * features/tic6x-c64x-linux.c: Re-generated.
8385         * features/tic6x-c64xp.c: Re-generated.
8386         * features/tic6x-c64xp-linux.c: Re-generated.
8387
8388 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8389
8390         * i386-linux-tdep.c (i386_linux_read_description): New function.
8391         (i386_linux_core_read_description): Call
8392         i386_linux_read_description.
8393         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8394         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8395         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8396         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8397         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8398         * x86-linux-nat.c (x86_linux_read_description): Call
8399         i386_linux_read_description.
8400
8401 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8402
8403         * NEWS: Mention it.
8404         * features/Makefile (%.c: %.xml): Pass the xml file name to
8405         command "maint print c-tdesc".
8406         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8407         name from 'arg'.
8408
8409 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8410
8411         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8412         in-class initialization.
8413         (tdesc_create_feature): Call new instead of XCNEW.
8414         (free_target_description): Ue delete.
8415
8416 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8417
8418         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8419
8420 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8421
8422         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8423         constant.
8424         (amd64_x32_init_abi): Likewise.
8425         * amd64-tdep.h (amd64_init_abi): Update declaration.
8426         (amd64_x32_init_abi): Likewise.
8427
8428 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8429
8430         PR tdep/21717
8431         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8432         condition for FPSCR.
8433         (arm_linux_store_inferior_registers): Likewise.
8434
8435 2017-07-22  Tom Tromey  <tom@tromey.com>
8436
8437         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8438         <syscalls_counts>: Now a std::vector.
8439         (get_catch_syscall_inferior_data): Use "new".
8440         (catch_syscall_inferior_data_cleanup): Use "delete".
8441         (insert_catch_syscall, remove_catch_syscall)
8442         (clear_syscall_counts): Update.
8443
8444 2017-07-22  Tom Tromey  <tom@tromey.com>
8445
8446         * break-catch-syscall.c (syscall_catchpoint)
8447         <syscalls_to_be_caught>: Now a std::vector<int>
8448         (~syscall_catchpoint): Remove.
8449         (insert_catch_syscall, remove_catch_syscall)
8450         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8451         (print_mention_catch_syscall, print_recreate_catch_syscall):
8452         Update.
8453         (create_syscall_event_catchpoint): Change type of "filter"
8454         parameter.
8455         (catch_syscall_split_args): Return a std::vector.
8456         (catch_syscall_command_1, catching_syscall_number_1): Update.
8457
8458 2017-07-22  Tom Tromey  <tom@tromey.com>
8459
8460         * break-catch-throw.c (struct exception_catchpoint)
8461         <exception_rx>: Now a std::string.
8462         (~exception_catchpoint): Remove.
8463         (print_one_detail_exception_catchpoint): Update.
8464         (handle_gnu_v3_exceptions): Change type of except_rx.
8465         (extract_exception_regexp): Return a std::string.
8466         (catch_exception_command_1): Update.
8467
8468 2017-07-22  Tom Tromey  <tom@tromey.com>
8469
8470         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8471         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8472         std::vector.
8473         <catch_all>: Now a bool.
8474         (~signal_catchpoint): Remove.
8475         (signal_catchpoint_insert_location)
8476         (signal_catchpoint_remove_location)
8477         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8478         (signal_catchpoint_print_mention)
8479         (signal_catchpoint_print_recreate)
8480         (signal_catchpoint_explains_signal): Update.
8481         (create_signal_catchpoint): Change type of "filter" and
8482         "catch_all".
8483         (catch_signal_split_args): Return a std::vector.  Change type of
8484         "catch_all".
8485         (catch_signal_command): Update.
8486
8487 2017-07-20  Pedro Alves  <palves@redhat.com>
8488
8489         * ada-lang.c (ada_language_defn): Make extern.
8490         (_initialize_ada_language): Remove add_language call.
8491         * c-lang.c (c_language_defn, cplus_language_defn)
8492         (asm_language_defn, minimal_language_defn): Make extern.
8493         (_initialize_c_language): Delete.
8494         * completer.c (compare_cstrings): Delete, moved to utils.h.
8495         * d-lang.c (d_language_defn): Make extern.
8496         (_initialize_d_language): Remove add_language calls.
8497         * defs.h (enum language): Add comment.
8498         * f-lang.c (f_language_defn): Make extern.
8499         (_initialize_f_language): Remove add_language call.
8500         * go-lang.c (go_language_defn): Make extern.
8501         (_initialize_go_language): Remove add_language call.
8502         * language.c: Include <algorithm>.
8503         (languages): Redefine as const array.
8504         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8505         (set_language_command): Handle "local".  Use for-range loop.
8506         (set_language): Remove loop.
8507         (language_enum): Rewrite.
8508         (language_def, language_str): Remove loops.
8509         (add_language): Delete.
8510         (add_set_language_command): New, based on add_languages.
8511         (skip_language_trampoline): Adjust.
8512         (local_language_defn): Delete.
8513         (language_gdbarch_post_init): Adjust.
8514         (_initialize_language): Remove add_language calls.  Call
8515         add_set_language_command.
8516         * language.h (add_language): Delete.
8517         (auto_language_defn)
8518         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8519         (asm_language_defn, c_language_defn, cplus_language_defn)
8520         (d_language_defn, f_language_defn, go_language_defn)
8521         (m2_language_defn, objc_language_defn, opencl_language_defn)
8522         (pascal_language_defn, rust_language_defn): Declare.
8523         * m2-lang.c (m2_language_defn): Make extern.
8524         (_initialize_m2_language): Remove add_language call.
8525         * objc-lang.c (objc_language_defn): Make extern.
8526         (_initialize_objc_language): Remove add_language call.
8527         * opencl-lang.c (opencl_language_defn): Make extern.
8528         (_initialize_opencl_language): Remove add_language call.
8529         * p-lang.c (pascal_language_defn): Make extern.
8530         (_initialize_pascal_language): Delete.
8531         * rust-lang.c (rust_language_defn): Make extern.
8532         (_initialize_rust_language): Delete.
8533         * utils.h (compare_cstrings): New static inline function.
8534
8535 2017-07-20  Pedro Alves  <palves@redhat.com>
8536
8537         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8538         (get_var_value): Constify parameters.
8539         (get_int_var_value): Change prototype.
8540         (to_fixed_range_type): Adjust.
8541         * ada-lang.h (get_int_var_value): Change prototype.
8542
8543 2017-07-20  Pedro Alves  <palves@redhat.com>
8544
8545         * dwarf2read.c (dw2_lookup_symbol): Use
8546         SYMBOL_MATCHES_SEARCH_NAME.
8547         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8548
8549 2017-07-20  Pedro Alves  <palves@redhat.com>
8550
8551         * block.c (block_iter_name_step, block_iter_name_first)
8552         (block_iter_name_next): Delete.
8553         (block_lookup_symbol_primary): Adjust to use
8554         dict_iter_match_first/dict_iter_match_next.
8555         * block.h (block_iter_name_first, block_iter_name_next): Delete
8556         declarations.
8557         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8558         dict_iter_match_first/dict_iter_match_next.
8559
8560 2017-07-20  Pedro Alves  <palves@redhat.com>
8561
8562         * cp-support.c (cp_find_first_component_aux): Add missing case for
8563         end of string.
8564
8565 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8566
8567         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8568         of dwo_cu's dwo_file.
8569
8570 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8571
8572         * remote.c (store_registers_using_G): Remove one line comment.
8573
8574 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8575
8576         * regcache.c (regcache_cpy): Simplify it.
8577         (regcache::cpy_no_passthrough): Remove it.
8578         * regcache.h (cpy_no_passthrough): Remove it.
8579         (regcache_dup, regcache_cpy): Update comments.
8580
8581 2017-07-18  Pedro Alves  <palves@redhat.com>
8582
8583         * remote-sim.c (sim_command_completer): Adjust to work with a
8584         completion_tracker instead of a VEC.
8585
8586 2017-07-17  Pedro Alves  <palves@redhat.com>
8587
8588         * completer.c (complete_source_filenames): New function.
8589         (complete_address_and_linespec_locations): New function.
8590         (location_completer): Use complete_address_and_linespec_locations.
8591         (completion_tracker::build_completion_result): Honor the tracker's
8592         request to suppress append.
8593         * completer.h (completion_tracker::suppress_append_ws)
8594         (completion_tracker::set_suppress_append_ws): New methods.
8595         (completion_tracker::m_suppress_append_ws): New field.
8596         (complete_source_filenames): New declaration.
8597         * linespec.c (linespec_complete_what): New.
8598         (struct ls_parser) <complete_what, completion_word,
8599         completion_quote_char, completion_quote_end, completion_tracker>:
8600         New fields.
8601         (string_find_incomplete_keyword_at_end): New.
8602         (linespec_lexer_lex_string): Record quote char.  If in completion
8603         mode, don't throw.
8604         (linespec_lexer_consume_token): Advance the completion word point.
8605         (linespec_lexer_peek_token): Save/restore completion info.
8606         (save_stream_and_consume_token): New.
8607         (set_completion_after_number): New.
8608         (linespec_parse_basic): Set what to complete next depending on
8609         token.  Handle function and label completions specially.
8610         (parse_linespec): Disable objc shortcut in completion mode.  Set
8611         what to complete next depending on token type.  Skip keyword if in
8612         completion mode.
8613         (complete_linespec_component, linespec_complete): New.
8614         * linespec.h (linespec_complete): Declare.
8615
8616 2017-07-17  Pedro Alves  <palves@redhat.com>
8617
8618         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8619         Handle 'operator<' / 'operator<<'.
8620
8621 2017-07-17  Pedro Alves  <palves@redhat.com>
8622
8623         * completer.c (collect_explicit_location_matches): Handle
8624         MATCH_LABEL.
8625         (convert_explicit_location_to_linespec): New, factored out from
8626         ...
8627         (convert_explicit_location_to_sals): ... this.
8628         (complete_label): New.
8629         (linespec_complete_label, find_label_symbols_in_block): New.
8630         (find_label_symbols): Add completion_mode parameter and adjust to
8631         call find_label_symbols_in_block.
8632         * linespec.h (linespec_complete_label): Declare.
8633
8634 2017-07-17  Pedro Alves  <palves@redhat.com>
8635
8636         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8637         complete_symbol_mode parameter.
8638         * cli/cli-cmds.c (complete_command): Get the completion result out
8639         of the handle_brkchars tracker if used a custom word point.
8640         * completer.c: Include "linespec.h".
8641         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8642         (advance_to_expression_complete_word_point): New.
8643         (completion_tracker::completes_to_completion_word): New.
8644         (complete_files_symbols): Pass down
8645         complete_symbol_mode::EXPRESSION.
8646         (explicit_options, probe_options): New.
8647         (collect_explicit_location_matches): Complete on the
8648         explictit_loc->foo instead of word.  Use
8649         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8650         keyword and options completions.
8651         (backup_text_ptr): Delete.
8652         (skip_keyword): New.
8653         (complete_explicit_location): Remove 'word' parameter.  Add
8654         language, quoted_arg_start and quoted_arg_end parameters.
8655         Rewrite, parsing left to right.
8656         (location_completer): Rewrite.
8657         (location_completer_handle_brkchars): New function.
8658         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8659         (enum complete_line_internal_reason): Adjust comments.
8660         (completion_tracker::discard_completions): New.
8661         (completer_handle_brkchars_func_for_completer): Handle
8662         location_completer.
8663         (gdb_custom_word_point_brkchars)
8664         (gdb_org_rl_basic_quote_characters): New.
8665         (gdb_completion_word_break_characters_throw)
8666         (completion_find_completion_word): Handle trackers that use a
8667         custom word point.
8668         (completion_tracker::advance_custom_word_point_by): New.
8669         (completion_tracker::build_completion_result): Don't rely on
8670         readline appending the quote char.
8671         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8672         use a custom word point.
8673         (gdb_rl_attempted_completion_function): Restore
8674         rl_basic_quote_characters.
8675         * completer.h (class completion_tracker): Extend intro comment.
8676         (completion_tracker::set_quote_char)
8677         (completion_tracker::quote_char)
8678         (completion_tracker::set_use_custom_word_point)
8679         (completion_tracker::use_custom_word_point)
8680         (completion_tracker::custom_word_point)
8681         (completion_tracker::set_custom_word_point)
8682         (completion_tracker::advance_custom_word_point_by)
8683         (completion_tracker::completes_to_completion_word)
8684         (completion_tracker::discard_completions): New methods.
8685         (completion_tracker::m_quote_char)
8686         (completion_tracker::m_use_custom_word_point)
8687         (completion_tracker::m_custom_word_point): New fields.
8688         (advance_to_expression_complete_word_point): Declare.
8689         * f-lang.c (f_collect_symbol_completion_matches): Add
8690         complete_symbol_mode parameter.
8691         * language.h (struct language_defn)
8692         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8693         parameter.
8694         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8695         (linespec_complete_function): New function.
8696         (linespec_lexer_lex_keyword): Adjust.
8697         * linespec.h (linespec_keywords, linespec_complete_function): New
8698         declarations.
8699         * location.c (find_end_quote): New function.
8700         (explicit_location_lex_one): Add explicit_completion_info
8701         parameter.  Save quoting info.  Don't throw if being called for
8702         completion.  Don't handle Ada operators here.
8703         (is_cp_operator, skip_op_false_positives, first_of)
8704         (explicit_location_lex_one_function): New function.
8705         (string_to_explicit_location): Replace 'dont_throw' parameter with
8706         an explicit_completion_info pointer parameter.  Handle it.  Don't
8707         use explicit_location_lex_one to lex function names.  Use
8708         explicit_location_lex_one_function instead.
8709         * location.h (struct explicit_completion_info): New.
8710         (string_to_explicit_location): Replace 'dont_throw' parameter with
8711         an explicit_completion_info pointer parameter.
8712         * symtab.c (default_collect_symbol_completion_matches_break_on):
8713         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8714         (default_collect_symbol_completion_matches)
8715         (collect_symbol_completion_matches): Add complete_symbol_mode
8716         parameter.
8717         (collect_symbol_completion_matches_type): Pass down
8718         complete_symbol_mode::EXPRESSION.
8719         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8720         parameter.  Handle LINESPEC mode.
8721         * symtab.h (complete_symbol_mode): New.
8722         (default_collect_symbol_completion_matches_break_on)
8723         (default_collect_symbol_completion_matches)
8724         (collect_symbol_completion_matches)
8725         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8726         parameter.
8727
8728 2017-07-17  Pedro Alves  <palves@redhat.com>
8729
8730         * utils.c (enum class strncmp_iw_mode): New.
8731         (strcmp_iw): Rename to ...
8732         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8733         parameters.  Handle them.
8734         (strncmp_iw): New.
8735         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8736         * utils.h (strncmp_iw): Declare.
8737         (strcmp_iw): Move describing comments here.
8738
8739 2017-07-17  Pedro Alves  <palves@redhat.com>
8740
8741         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8742         CP_OPERATOR_STR.
8743         * c-typeprint.c (is_type_conversion_operator): Use
8744         CP_OPERATOR_STR.
8745         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8746         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8747         CP_OPERATOR_LEN.
8748         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8749         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8750         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8751         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8752         CP_OPERATOR_STR.
8753         * location.c: Include "cp-support.h".
8754         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8755         CP_OPERATOR_STR.
8756         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8757         CP_OPERATOR_LEN.
8758
8759 2017-07-17  Pedro Alves  <palves@redhat.com>
8760
8761         * cli/cli-cmds.c (complete_command): Use a completion tracker
8762         along with completion_find_completion_word for handle_brkchars
8763         phase.
8764         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8765         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8766         (struct gdb_rl_completion_word_info): New.
8767         (gdb_rl_find_completion_word): New.
8768         (completion_find_completion_word): New.
8769         * completer.h (completion_find_completion_word): Declare.
8770
8771 2017-07-17  Pedro Alves  <palves@redhat.com>
8772
8773         * ada-lang.c (symbol_completion_match): Adjust comments.
8774         (symbol_completion_add): Replace vector parameter with
8775         completion_tracker parameter.  Use it.
8776         (ada_make_symbol_completion_list): Rename to...
8777         (ada_collect_symbol_completion_matches): ... this.  Add
8778         completion_tracker parameter and use it.
8779         (ada_language_defn): Adjust.
8780         * break-catch-syscall.c (catch_syscall_completer): Adjust
8781         prototype and work with completion_tracker instead of VEC.
8782         * breakpoint.c (condition_completer): Adjust prototype and work
8783         with completion_tracker instead of VEC.
8784         * c-lang.c (c_language_defn, cplus_language_defn)
8785         (asm_language_defn, minimal_language_defn): Adjust to renames.
8786         * cli/cli-cmds.c (complete_command): Rework using
8787         completion_tracker.  Catch exceptions when completing.
8788         * cli/cli-decode.c (integer_unlimited_completer)
8789         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8790         with completion_tracker instead of VEC.
8791         * command.h (struct completion_tracker): Forward declare.
8792         (completer_ftype, completer_handle_brkchars_ftype): Change
8793         types.
8794         (complete_on_cmdlist, complete_on_enum): Adjust.
8795         * completer.c: Include <algorithm>.
8796         (struct gdb_completer_state): New.
8797         (current_completion): New global.
8798         (readline_line_completion_function): Delete.
8799         (noop_completer, filename_completer)
8800         (filename_completer_handle_brkchars, complete_files_symbols)
8801         (linespec_location_completer): Adjust to work with a
8802         completion_tracker instead of a VEC.
8803         (string_or_empty): New.
8804         (collect_explicit_location_matches): Adjust to work with a
8805         completion_tracker instead of a VEC.
8806         (explicit_location_completer): Rename to ...
8807         (complete_explicit_location): ... this and adjust to work with a
8808         completion_tracker instead of a VEC.
8809         (location_completer): Adjust to work with a completion_tracker
8810         instead of a VEC.
8811         (add_struct_fields): Adjust to work with a completion_list instead
8812         of VEC.
8813         (expression_completer): Rename to ...
8814         (complete_expression): ... this and adjust to work with a
8815         completion_tracker instead of a VEC.  Use complete_files_symbols.
8816         (expression_completer): Reimplement on top of complete_expression.
8817         (symbol_completer): Adjust to work with a completion_tracker
8818         instead of a VEC.
8819         (enum complete_line_internal_reason): Add describing comments.
8820         (complete_line_internal_normal_command): Adjust to work with a
8821         completion_tracker instead of a VEC.
8822         (complete_line_internal): Rename to ...
8823         (complete_line_internal_1): ... this and adjust to work with a
8824         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8825         handle_brkchars phase.
8826         (new_completion_tracker): Delete.
8827         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8828         complete_line_internal_1.
8829         (free_completion_tracker): Delete.
8830         (INITIAL_COMPLETION_HTAB_SIZE): New.
8831         (completion_tracker::completion_tracker)
8832         (completion_tracker::~completion_tracker): New.
8833         (maybe_add_completion): Delete.
8834         (completion_tracker::maybe_add_completion)
8835         (completion_tracker::add_completion)
8836         (completion_tracker::add_completions): New.
8837         (throw_max_completions_reached_error): Delete.
8838         (complete_line): Adjust to work with a completion_tracker instead
8839         of a VEC.  Don't create a completion_tracker_t or check for max
8840         completions here.
8841         (command_completer, command_completer_handle_brkchars)
8842         (signal_completer, reg_or_group_completer_1)
8843         (reg_or_group_completer, default_completer_handle_brkchars):
8844         Adjust to work with a completion_tracker.
8845         (gdb_completion_word_break_characters_throw): New.
8846         (gdb_completion_word_break_characters): Reimplement.
8847         (line_completion_function): Delete.
8848         (completion_tracker::recompute_lowest_common_denominator)
8849         (expand_preserving_ws)
8850         (completion_tracker::build_completion_result)
8851         (completion_result::completion_result)
8852         (completion_result::completion_result)
8853         (completion_result::~completion_result)
8854         (completion_result::completion_result)
8855         (completion_result::release_match_list, compare_cstrings)
8856         (completion_result::sort_match_list)
8857         (completion_result::reset_match_list)
8858         (gdb_rl_attempted_completion_function_throw)
8859         (gdb_rl_attempted_completion_function): New.
8860         * completer.h (completion_list, struct completion_result)
8861         (class completion_tracker): New.
8862         (complete_line): Add completion_tracker parameter.
8863         (readline_line_completion_function): Delete.
8864         (gdb_rl_attempted_completion_function): New.
8865         (noop_completer, filename_completer, expression_completer)
8866         (location_completer, symbol_completer, command_completer)
8867         (signal_completer, reg_or_group_completer): Update prototypes.
8868         (completion_tracker_t, new_completion_tracker)
8869         (make_cleanup_free_completion_tracker): Delete.
8870         (enum maybe_add_completion_enum): Delete.
8871         (maybe_add_completion): Delete.
8872         (throw_max_completions_reached_error): Delete.
8873         * corefile.c (complete_set_gnutarget): Adjust to work with a
8874         completion_tracker instead of a VEC.
8875         * cp-abi.c (cp_abi_completer): Adjust to work with a
8876         completion_tracker instead of a VEC.
8877         * d-lang.c (d_language_defn): Adjust.
8878         * disasm.c (disassembler_options_completer): Adjust to work with a
8879         completion_tracker instead of a VEC.
8880         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8881         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8882         with a completion_tracker instead of a VEC.
8883         (f_language_defn): Adjust.
8884         * go-lang.c (go_language_defn): Adjust.
8885         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8886         Adjust to work with a completion_tracker instead of a VEC.
8887         * infrun.c (handle_completer): Likewise.
8888         * interps.c (interpreter_completer): Likewise.
8889         * interps.h (interpreter_completer): Likewise.
8890         * language.c (unknown_language_defn, auto_language_defn)
8891         (local_language_defn): Adjust.
8892         * language.h (language_defn::la_make_symbol_completion_list):
8893         Rename to ...
8894         (language_defn::la_collect_symbol_completion_matches): ... this
8895         and adjust to work with a completion_tracker instead of a VEC.
8896         * m2-lang.c (m2_language_defn): Adjust.
8897         * objc-lang.c (objc_language_defn): Adjust.
8898         * opencl-lang.c (opencl_language_defn): Adjust.
8899         * p-lang.c (pascal_language_defn): Adjust.
8900         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8901         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8902         with a completion_tracker.
8903         * rust-lang.c (rust_language_defn): Adjust.
8904         * symtab.c (free_completion_list, do_free_completion_list)
8905         (return_val, completion_tracker): Delete.
8906         (completion_list_add_name, completion_list_add_symbol)
8907         (completion_list_add_msymbol, completion_list_objc_symbol)
8908         (completion_list_add_fields, add_symtab_completions): Add
8909         completion_tracker parameter and use it.
8910         (default_make_symbol_completion_list_break_on_1): Rename to...
8911         (default_collect_symbol_completion_matches_break_on): ... this.
8912         Add completion_tracker parameter and use it instead of allocating
8913         a completion tracker here.
8914         (default_make_symbol_completion_list_break_on): Delete old
8915         implementation.
8916         (default_make_symbol_completion_list): Delete.
8917         (default_collect_symbol_completion_matches): New.
8918         (make_symbol_completion_list): Delete.
8919         (collect_symbol_completion_matches): New.
8920         (make_symbol_completion_type): Rename to ...
8921         (collect_symbol_completion_matches_type): ... this.  Add
8922         completion_tracker parameter and use it instead of VEC.
8923         (make_file_symbol_completion_list_1): Rename to...
8924         (collect_file_symbol_completion_matches): ... this.  Add
8925         completion_tracker parameter and use it instead of VEC.
8926         (make_file_symbol_completion_list): Delete.
8927         (add_filename_to_list): Use completion_list instead of a VEC.
8928         (add_partial_filename_data::list): Now a completion_list.
8929         (make_source_files_completion_list): Work with a completion_list
8930         instead of a VEC.
8931         * symtab.h: Include "completer.h".
8932         (default_make_symbol_completion_list_break_on)
8933         (default_make_symbol_completion_list, make_symbol_completion_list)
8934         (make_symbol_completion_type, make_file_symbol_completion_list)
8935         (make_source_files_completion_list): Delete.
8936         (default_collect_symbol_completion_matches_break_on)
8937         (default_collect_symbol_completion_matches)
8938         (collect_symbol_completion_matches)
8939         (collect_symbol_completion_matches_type)
8940         (collect_file_symbol_completion_matches)
8941         (make_source_files_completion_list): New.
8942         * top.c (init_main): Don't install a rl_completion_entry_function
8943         hook.  Install a rl_attempted_completion_function hook instead.
8944         * tui/tui-layout.c (layout_completer): Adjust to work with a
8945         completion_tracker.
8946         * tui/tui-regs.c (tui_reggroup_completer):
8947         * tui/tui-win.c (window_name_completer, focus_completer)
8948         (winheight_completer): Adjust to work with a completion_tracker.
8949         * value.c: Include "completer.h".
8950         (complete_internalvar): Adjust to work with a completion_tracker.
8951         * value.h (complete_internalvar): Likewise.
8952
8953 2017-07-17  Pedro Alves  <palves@redhat.com>
8954
8955         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8956         renames.
8957         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8958         comments to completer_ftype's declaration.
8959         <completer_handle_brkchars>: Change type to
8960         completer_handle_brkchars_ftype.
8961         * command.h (completer_ftype): Add describing comment and give
8962         names to parameters.
8963         (completer_ftype_void): Rename to ...
8964         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8965         (set_cmd_completer_handle_brkchars): Adjust.
8966         * completer.c (filename_completer_handle_brkchars): New function.
8967         (complete_line_internal_normal_command): New function, factored
8968         out from ...
8969         (complete_line_internal): ... here.
8970         (command_completer_handle_brkchars)
8971         (default_completer_handle_brkchars)
8972         (completer_handle_brkchars_func_for_completer): New functions.
8973         * completer.h (set_gdb_completion_word_break_characters): Delete
8974         declaration.
8975         (completer_handle_brkchars_func_for_completer): New declaration.
8976         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8977         completer_handle_brkchars_func_for_completer.
8978
8979 2017-07-17  Pedro Alves  <palves@redhat.com>
8980
8981         * completer.c (symbol_completer): New function, based on
8982         make_symbol_completion_list_fn.
8983         * completer.h (symbol_completer): New declaration.
8984         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8985         * python/py-cmd.c (completers): Adjust.
8986         * symtab.c (make_symbol_completion_list_fn): Delete.
8987         * symtab.h (make_symbol_completion_list_fn): Delete.
8988         * cli/cli-decode.c (add_cmd): Adjust.
8989
8990 2017-07-17  Pedro Alves  <palves@redhat.com>
8991
8992         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8993         * dwarf2read.c: Include "filename-seen-cache.h".
8994         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8995         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8996         * filename-seen-cache.c: New file.
8997         * filename-seen-cache.h: New file.
8998         * symtab.c: Include "filename-seen-cache.h".
8999         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9000         (create_filename_seen_cache, clear_filename_seen_cache)
9001         (delete_filename_seen_cache, filename_seen): Delete, parts moved
9002         to filename-seen-cache.h/filename-seen-cache.c.
9003         (output_source_filename, sources_info)
9004         (maybe_add_partial_symtab_filename)
9005         (make_source_files_completion_list): Adjust to use
9006         filename_seen_cache.
9007
9008 2017-07-17  Pedro Alves  <palves@redhat.com>
9009
9010         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9011         fields.
9012         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9013         dwarf2_debug_sections*)): New.
9014         (dwarf2_per_objfile::dwarf2_per_objfile(const
9015         dwarf2_per_objfile&)): Declare as deleted.
9016         (dwarf2_per_objfile::operator=): Declare as deleted.
9017         (dwarf2_per_objfile::dwarf2_per_objfile)
9018         (dwarf2_per_objfile::~dwarf2_per_objfile)
9019         (dwarf2_per_objfile::free_cached_comp_units): New.
9020         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9021         ctor.  Call dwarf2_per_objfile's ctor manually.
9022         (dwarf2_locate_sections): Deleted/refactored as ...
9023         (dwarf2_per_objfile::locate_sections): ... this new method.
9024         (free_cached_comp_units): Defer to
9025         dwarf2_per_objfile::free_cached_comp_units.
9026         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9027
9028 2017-07-14  Tom Tromey  <tom@tromey.com>
9029
9030         PR rust/21764:
9031         * rust-exp.y (convert_ast_to_expression): Add "want_type"
9032         parameter.
9033         <UNOP_SIZEOF>: Split into separate case.
9034         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
9035
9036 2017-07-14  Tom Tromey  <tom@tromey.com>
9037
9038         PR rust/21763:
9039         * symtab.c (symbol_matches_domain): Add language_rust to special
9040         case.
9041         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9042         treat LOC_TYPEDEF symbols as variables.
9043
9044 2017-07-14  Pedro Alves  <palves@redhat.com>
9045
9046         * symtab.c (make_file_symbol_completion_list_1): Iterate over
9047         symtabs matching all symtabs with SRCFILE as file name instead of
9048         only considering the first hit, with lookup_symtab.
9049
9050 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9051
9052         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9053         operator_name parameters.
9054         (gen_expr): Update function call.
9055
9056 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9057
9058         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9059         parameter.
9060         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9061         Likewise.
9062         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9063         parameter, use agent_expr::gdbarch instead, update function
9064         calls.
9065         (locexpr_tracepoint_var_ref): Likewise.
9066         (loclist_tracepoint_var_ref): Likewise.
9067         * ax-gdb.c (gen_trace_static_fields): Likewise.
9068         (gen_traced_pop): Likewise.
9069         (gen_frame_args_address): Likewise.
9070         (gen_frame_locals_address): Likewise.
9071         (gen_var_ref): Likewise.
9072         (gen_struct_ref_recursive): Likewise.
9073         (gen_static_field): Likewise.
9074         (gen_maybe_namespace_elt): Likewise.
9075         (gen_expr): Likewise.
9076         (gen_trace_for_var): Likewise.
9077         (gen_trace_for_expr): Likewise.
9078         (gen_trace_for_return_address): Likewise.
9079
9080 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9081
9082         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9083         parameter.
9084         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9085
9086 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9087
9088         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9089         from ax, update calls.
9090         (gen_usual_arithmetic): Likewise.
9091         (gen_integral_promotions): Likewise.
9092         (gen_bitfield_ref): Likewise.
9093         (gen_primitive_field): Likewise.
9094         (gen_struct_ref_recursive): Likewise.
9095         (gen_struct_ref): Likewise.
9096         (gen_maybe_namespace_elt): Likewise.
9097         (gen_struct_elt_for_reference): Likewise.
9098         (gen_namespace_elt): Likewise.
9099         (gen_aggregate_elt_ref): Likewise.
9100         (gen_expr): Get gdbarch from ax, update calls.
9101         (gen_expr_binop_rest): Likewise.
9102
9103 2017-07-13  Pedro Alves  <palves@redhat.com>
9104
9105         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9106         as default tdesc.
9107         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9108         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9109         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9110         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9111         tdep.
9112         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9113         Get final tdesc from the tdep.
9114         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9115         default tdesc.
9116         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9117         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9118         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9119         Use it as default tdesc.
9120         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9121         down to amd_init_abi.  No longer handle fallback tdesc here.
9122         * amd64-tdep.h (tdesc_x32): Declare.
9123         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9124         parameter.
9125         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9126         as default tdesc.
9127
9128 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9129
9130         * s390-linux-tdep.c (s390_process_record): Add support for
9131         instructions new in arch12.
9132
9133 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9134
9135         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9136         PT_GETFSBASE and PT_GETGSBASE.
9137         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9138         PT_SETGSBASE.
9139
9140 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9141
9142         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9143         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9144         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9145         those rules.
9146         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9147         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9148         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9149         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9150         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9151         * features/i386/amd64.xml: Add 64bit-segments.xml.
9152         * features/i386/amd64-avx-avx512.c: Regenerated.
9153         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9154         * features/i386/amd64-avx-mpx.c: Regenerated.
9155         * features/i386/amd64-avx.c: Regenerated.
9156         * features/i386/amd64-mpx.c: Regenerated.
9157         * features/i386/amd64.c: Regenerated.
9158         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9159         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9160         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9161         * regformats/i386/amd64-avx.dat: Regenerated.
9162         * regformats/i386/amd64-mpx.dat: Regenerated.
9163         * regformats/i386/amd64.dat: Regenerated.
9164
9165 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9166
9167         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9168         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9169
9170 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9171
9172         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9173         unsetenv.
9174         * gnulib/aclocal.m4: Regenerate.
9175         * gnulib/config.in: Regenerate.
9176         * gnulib/configure: Regenerate.
9177         * gnulib/import/Makefile.am: Regenerate.
9178         * gnulib/import/Makefile.in: Regenerate.
9179         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9180         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9181         * gnulib/import/m4/environ.m4: New file.
9182         * gnulib/import/m4/setenv.m4: New file.
9183         * gnulib/import/setenv.c: New file.
9184         * gnulib/import/unsetenv.c: New file.
9185
9186 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9187
9188         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9189         address when op is DW_OP_addr.
9190
9191 2017-07-09  Tom Tromey  <tom@tromey.com>
9192
9193         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9194         check and apply to outer type.
9195
9196 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9197
9198         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9199         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9200         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9201         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9202
9203 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9204
9205         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9206
9207 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9208
9209         * corelow.c (get_core_siginfo): Remove.
9210         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9211         instead of get_core_siginfo.
9212         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9213         * gdbarch.h: Re-generate.
9214         * gdbarch.c: Re-generate.
9215         * linux-tdep.c (linux_core_xfer_siginfo): New.
9216         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9217
9218 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9219
9220         * corelow.c (thread_section_name): Move to ...
9221         * gdbcore.h (thread_section_name): ... here.
9222
9223 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9224
9225         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9226         (struct siginfo32): New.
9227         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9228         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9229         via ptrace(PT_LWPINFO).
9230
9231 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9232
9233         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9234         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9235         (fbsd_get_siginfo_type): New.
9236         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9237         (_initialize_fbsd_tdep): New.
9238
9239 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9240
9241         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9242         a singular dwo_unit*) to support multiple CUs in the same way that
9243         multiple TUs are supported.
9244         (create_cus_hash_table): Replace create_dwo_cu with a function for
9245         parsing multiple CUs from a DWO file.
9246         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9247         create_dwo_cu.
9248         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9249         htab_find, rather than comparing the signature to a singleton CU in
9250         the dwo_file.
9251
9252 2017-07-06  Pedro Alves  <palves@redhat.com>
9253
9254         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9255
9256 2017-07-04  Pedro Alves  <palves@redhat.com>
9257
9258         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9259         * gdbtypes.h (TYPE_STATIC): Delete.
9260         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9261         is_synchronized, is_native>: Delete.
9262         <dummy>: Bump.
9263         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9264         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9265         (TYPE_FN_FIELD_ABSTRACT): Delete.
9266
9267 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9268
9269         * buffer.h (buffer_finish): Fix spelling mistakes.
9270
9271 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9272
9273         * .dir-locals.el: Automatically switch to C-style comments in
9274         versions of Emacs that support the feature.
9275
9276 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9277             Pedro Alves  <palves@redhat.com>
9278
9279         PR cli/21688
9280         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9281         (process_next_line): New variable 'inline_cmd'.
9282         Adjust 'if' clauses for "python", "compile" and "guile" to use
9283         'command_name_equals' and check for '!inline_cmd'.
9284
9285 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9286
9287         PR cli/21688
9288         * cli/cli-script.c (command_name_equals_not_inline): New function.
9289         (process_next_line): Adjust 'if' clauses for "python", "compile"
9290         and "guile" to use command_name_equals_not_inline.
9291
9292 2017-06-29  Pedro Alves  <palves@redhat.com>
9293
9294         * completer.c (expression_completer): Call
9295         linespec_location_completer instead of location_completer.
9296
9297 2017-06-29  Pedro Alves  <palves@redhat.com>
9298
9299         * completer.c (expression_completer): Remove code that recomputes
9300         'text' from 'word'.
9301
9302 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9303
9304         * regformats/regdat.sh: Generate code with
9305         "ifndef IN_PROCESS_AGENT".
9306
9307 2017-06-28  Pedro Alves  <palves@redhat.com>
9308
9309         * command.h: Include "common/scoped_restore.h".
9310
9311 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9312
9313         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9314         instead of obstack_grow.
9315
9316 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9317
9318         PR gdb/21337
9319         * symfile.c (reread_symbols): Call objfiles_changed just before
9320         read_symbols.
9321
9322 2017-06-27  Pedro Alves  <palves@redhat.com>
9323
9324         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9325         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9326         (completion_list_add_symbol, completion_list_add_msymbol):
9327         ... these new functions.
9328         (add_symtab_completions)
9329         (default_make_symbol_completion_list_break_on_1): Adjust.
9330
9331 2017-06-27  Pedro Alves  <palves@redhat.com>
9332
9333         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9334         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9335         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9336         dtor.
9337         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9338         'storage_obstack' field an auto_obstack.  In-class initialize all
9339         non-bitfield fields.  Make minsyms_read bool.
9340         * symfile.c (read_symbols): Adjust.
9341
9342 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9343
9344         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9345         (gdbsim_store_register): Likewise.
9346
9347 2017-06-27  Pedro Alves  <palves@redhat.com>
9348
9349         * c-exp.y (name_obstack): Now an auto_obstack.
9350         (yylex): Use auto_obstack::clear.
9351         (c_parse): Use auto_obstack::clear instead of reinitializing and
9352         freeing the obstack.
9353         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9354         * d-exp.y (name_obstack): Now an auto_obstack.
9355         (yylex): Use auto_obstack::clear.
9356         (d_parse): Use auto_obstack::clear instead of reinitializing and
9357         freeing the obstack.
9358         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9359         auto_obstack.
9360         * dwarf2read.c (create_addrmap_from_index)
9361         (dwarf2_build_psymtabs_hard)
9362         (update_enumeration_type_from_children): Likewise.
9363         * gdb_obstack.h (auto_obstack): New type.
9364         * go-exp.y (name_obstack): Now an auto_obstack.
9365         (build_packaged_name): Use auto_obstack::clear.
9366         (go_parse): Use auto_obstack::clear instead of reinitializing and
9367         freeing the obstack.
9368         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9369         auto_obstack.
9370         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9371         * rust-exp.y (work_obstack): Now an auto_obstack.
9372         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9373         reinitializing and freeing the obstack.
9374         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9375         (host_char_to_target): Use auto_obstack.
9376         * utils.h (make_cleanup_obstack_free): Delete declaration.
9377         * valprint.c (generic_emit_char, generic_printstr): Use
9378         auto_obstack.
9379
9380 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9381
9382         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9383         thread.
9384         (darwin_init_thread_list): Don't update dummy thread.
9385         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9386
9387 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9388
9389         * record-full.c (netorder16): Remove.
9390
9391 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9392
9393         * common/diagnostics.h: Define macros for GCC.
9394         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9395         * common/vec.h: Include diagnostics.h.
9396         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9397         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9398         warning.
9399
9400 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9401
9402         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9403         New macro.
9404         * ada-lex.l: Ignore deprecated register warnings.
9405
9406 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9407
9408         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9409         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9410
9411 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9412
9413         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9414         its own line.
9415
9416 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9417
9418         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9419
9420 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9421
9422         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9423         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9424         (xtensa_register_read_masked): Likewise.
9425
9426 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9427
9428         * common/environ.c (gdb_environ::unset): Update comment.
9429
9430 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9431
9432         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9433         registers.
9434
9435 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9436
9437         * record-full.c (record_full_exec_insn): Use byte_vector.
9438
9439 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9440
9441         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9442         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9443
9444 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9445
9446         * remote.c (cached_reg): Move from here...
9447         * regcache.h (cached_reg): ...to here.
9448         * python/py-unwind.c (struct reg_info): Remove.
9449         (cached_frame_info): Use cached_reg_t.
9450         (pyuw_prev_register): Likewise.
9451         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9452         (pyuw_dealloc_cache): Free all registers.
9453
9454 2017-06-22  Pedro Alves  <palves@redhat.com>
9455             Simon Marchi  <simon.marchi@ericsson.com>
9456
9457         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9458         warning.
9459         * common/diagnostics.h: New file.
9460
9461 2017-06-22  Pedro Alves  <palves@redhat.com>
9462
9463         * common/agent.h: Add include guards.
9464
9465 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9466
9467         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9468         talk about addressable units instead of bytes.
9469
9470 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9471
9472         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9473         of '::const_iterator'.
9474
9475 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9476
9477         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9478         'unittests/environ-selftests.c'.
9479         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9480         * charset.c (find_charset_names): Declare object 'iconv_env'.
9481         Update code to use 'iconv_env' object.  Remove call to
9482         'free_environ'.
9483         * common/environ.c: Include <utility>.
9484         (make_environ): Delete function.
9485         (free_environ): Delete function.
9486         (gdb_environ::clear): New function.
9487         (gdb_environ::operator=): New function.
9488         (gdb_environ::get): Likewise.
9489         (environ_vector): Delete function.
9490         (set_in_environ): Delete function.
9491         (gdb_environ::set): New function.
9492         (unset_in_environ): Delete function.
9493         (gdb_environ::unset): New function.
9494         (gdb_environ::envp): Likewise.
9495         * common/environ.h: Include <vector>.
9496         (struct gdb_environ): Delete; transform into...
9497         (class gdb_environ): ... this class.
9498         (free_environ): Delete prototype.
9499         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9500         environ_vector): Likewise.
9501         * infcmd.c (run_command_1): Update code to call
9502         'envp' from 'gdb_environ' class.
9503         (environment_info): Update code to call methods from 'gdb_environ'
9504         class.
9505         (unset_environment_command): Likewise.
9506         (path_info): Likewise.
9507         (path_command): Likewise.
9508         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9509         (inferior::inferior): Initialize 'environment' using the host's
9510         information.
9511         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9512         Include "environ.h".
9513         (class inferior) <environment>: Change type from 'struct
9514         gdb_environ' to 'gdb_environ'.
9515         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9516         methods from 'gdb_environ' class.
9517         * solib.c (solib_find_1): Likewise
9518         * unittests/environ-selftests.c: New file.
9519
9520 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9521
9522         * features/i386/i386-linux.xml: Exchange the order of including
9523         32bit-linux.xml and 32bit-sse.xml.
9524         * features/i386/i386-linux.c: Regenerated.
9525
9526 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9527
9528         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9529         Delete copy ctor and assignment operator.
9530         (tdesc_type): Likewise.
9531         (tdesc_feature): Likewise.
9532         (tdesc_free_reg): Remove.
9533         (tdesc_create_reg): Use new.
9534         (tdesc_free_type): Remove.
9535         (tdesc_create_vector): Use new.
9536         (tdesc_create_union): Likewise.
9537         (tdesc_create_flags): Likewise.
9538         (tdesc_create_enum): Likewise.
9539         (tdesc_free_feature): Delete.
9540         (free_target_description): Use delete.
9541
9542 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9543
9544         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9545         registers.
9546
9547 2017-06-19  Pedro Alves  <palves@redhat.com>
9548
9549         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9550         after gdb::unlinker.
9551
9552 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9553
9554         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9555         gdb_environ to access an environment variable.
9556
9557 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9558
9559         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9560         gdb_byte*.
9561
9562 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9563
9564         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9565
9566 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9567
9568         * configure: Re-generate.
9569         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9570
9571 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9572
9573         * configure: Re-generate.
9574         * warning.m4: Pass -Werror to compiler when checking for
9575         supported warning flags.
9576
9577 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9578
9579         * Makefile.in (COMPILE.pre): Add "-x c++".
9580
9581 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9582             Pedro Alves  <palves@redhat.com>
9583             Yao Qi  <yao.qi@linaro.org>
9584
9585         * defs.h (RequireLongest): New.
9586         (extract_integer): Declare function template.
9587         (extract_signed_integer): Remove the declaration, but define it
9588         static inline.
9589         (extract_unsigned_integer): Likewise.
9590         (store_integer): Declare function template.
9591         (store_signed_integer): Remove the declaration, but define it
9592         static inline.
9593         (store_unsigned_integer): Likewise.
9594         * findvar.c (extract_integer): New function template.
9595         (extract_signed_integer): Remove.
9596         (extract_unsigned_integer): Remove.
9597         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9598         instantiations.
9599         (store_integer): New function template.
9600         (store_signed_integer): Remove.
9601         (store_unsigned_integer): Remove.
9602         (store_integer): Explicit instantiations.
9603         * regcache.c (regcache_raw_read_signed): Update.
9604         (regcache::raw_read): New function.
9605         (regcache::raw_read_signed): Remove.
9606         (regcache::raw_read_unsigned): Remove.
9607         (regcache_raw_read_unsigned): Update.
9608         (regcache_raw_write_unsigned): Update.
9609         (regcache::raw_write_signed): Remove.
9610         (regcache::raw_write): New function.
9611         (regcache_cooked_read_signed): Update.
9612         (regcache::raw_write_unsigned): Remove.
9613         (regcache::cooked_read_signed): Remove.
9614         (regcache_cooked_read_unsigned): Update.
9615         (regcache::cooked_read_unsigned): Remove.
9616         (regcache_cooked_write_signed): Update.
9617         (regcache_cooked_write_unsigned): Update.
9618         * regcache.h (regcache) <raw_read_signed>: Remove.
9619         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9620         <raw_read, raw_write>: New.
9621         <cooked_read_signed, cooked_write_signed>: Remove.
9622         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9623         <cooked_read, cooked_write>: New.
9624         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9625         (sh64_pseudo_register_write): Update.
9626
9627 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9628
9629         * arc-tdep.c (arc_disassembler_options): New variable.
9630         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9631         of default_print_insn.
9632         (arc_delayed_print_insn): Set info->section when needed,
9633         use default_print_insn to retrieve a disassembler.
9634
9635 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9636
9637         PR gdb/21574
9638         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9639         to mention $SHELL and startup-with-shell.
9640
9641 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9642
9643         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9644
9645 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9646
9647         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9648         default_print_insn instead of print_insn_aarch64.
9649         * arm-tdep.c (gdb_print_insn_arm): Call
9650         default_print_insn instead of print_insn_big_arm
9651         and print_insn_little_arm.
9652         * i386-tdep.c (i386_print_insn): Call default_print_insn
9653         instead of print_insn_i386.
9654         * ia64-tdep.c (ia64_print_insn): Call
9655         default_print_insn instead of print_insn_ia64.
9656         * mips-tdep.c (gdb_print_insn_mips): Call
9657         default_print_insn instead of print_insn_big_mips
9658         and print_insn_little_mips.
9659         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9660         instead of print_insn_spu.
9661
9662 2017-06-14  Pedro Alves  <palves@redhat.com>
9663
9664         * ada-lang.c: Include "common/byte-vector.h".
9665         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9666         * charset.c (wchar_iterator::iterate): Resize the vector instead
9667         of reserving it.
9668         * common/byte-vector.h: Include "common/def-vector.h".
9669         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9670         * cli/cli-dump.c: Include "common/byte-vector.h".
9671         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9672         * common/byte-vector.h: New file.
9673         * common/def-vector.h: New file.
9674         * common/default-init-alloc.h: New file.
9675         * dwarf2loc.c: Include "common/byte-vector.h".
9676         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9677         instead of reserving it.
9678         * dwarf2read.c: Include "common/byte-vector.h".
9679         (data_buf::m_vec): Now a gdb::byte_vector.
9680         * gdb_regex.c: Include "common/def-vector.h".
9681         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9682         * mi/mi-main.c: Include "common/byte-vector.h".
9683         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9684         * printcmd.c: Include "common/byte-vector.h".
9685         (print_scalar_formatted): Use gdb::byte_vector.
9686         * valprint.c: Include "common/byte-vector.h".
9687         (maybe_negate_by_bytes, print_decimal_chars): Use
9688         gdb::byte_vector.
9689
9690 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9691
9692         * darwin-nat.c: Include "nat/fork-inferior.h".
9693
9694 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9695
9696         * configure.nat: Factor out Darwin bits that are not
9697         architecture-specific.  Add fork-inferior.o.
9698
9699 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * configure.nat: Factor out AIX bits that are not
9702         architecture-specific.  Add fork-inferior.o.
9703
9704 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9705
9706         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9707         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9708         wrappers that just call rw_pieced_value.
9709
9710 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9711
9712         * dwarf2loc.c (write_pieced_value): When writing the data for a
9713         memory piece, use write_memory_with_notification instead of
9714         write_memory.
9715
9716 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9717
9718         * valops.c (read_value_memory): Change embedded_offset to
9719         represent a bit offset instead of a byte offset.
9720         * value.h (read_value_memory): Adjust comment.
9721
9722 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9723
9724         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9725         dest_offset_bits and source_offset_bits.
9726         (write_pieced_value): Likewise.
9727
9728 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9729
9730         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9731         given by DW_OP_bit_piece.
9732         (write_pieced_value): Likewise.
9733
9734 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9735
9736         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9737         some other preparations to the places where sufficient information
9738         is available.
9739         (write_pieced_value): Likewise.
9740
9741 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9742
9743         * dwarf2loc.c (bits_to_bytes): New function.
9744         (read_pieced_value): Fix offset calculations for register pieces
9745         on big-endian targets.
9746         (write_pieced_value): Likewise.
9747
9748 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9749
9750         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9751         (write_pieced_value): Likewise.
9752
9753 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9754
9755         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9756         transfer the source value's least significant bits, instead of its
9757         lowest-addressed ones.  Rename type_len to max_offset.
9758         (read_pieced_value): Mirror above changes to write_pieced_value as
9759         applicable.
9760
9761 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9762
9763         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9764         truncate full bytes from dest_offset_bits before using it as an
9765         offset into the buffer.
9766
9767 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9768
9769         * dwarf2loc.c (write_pieced_value): Include transfer size in
9770         byte-wise check.
9771
9772 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9773
9774         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9775         calculation of this_size.
9776
9777 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9778
9779         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9780         when targeting a bit-field.
9781         (write_pieced_value): Likewise.
9782
9783 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9784
9785         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9786         (allocate_piece_closure): Drop addr_size parameter.
9787         (dwarf2_evaluate_loc_desc_full): Adjust call to
9788         allocate_piece_closure.
9789
9790 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9791
9792         PR gdb/21226
9793         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9794         the LSB end, independent of endianness.
9795
9796 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9797
9798         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9799         size capping.
9800
9801 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9802
9803         * mips-linux-nat.c: Move include features/mips*-linux.c to
9804         mips-linux-tdep.c.
9805         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9806         to mips-linux-tdep.c.
9807         * mips-linux-tdep.c: Include features/mips*-linux.c
9808         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9809         functions.
9810         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9811         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9812         (tdesc_mips64_dsp_linux): Declare.
9813
9814 2017-06-12  Tom Tromey  <tom@tromey.com>
9815
9816         * valprint.h (val_print_type_code_int): Remove.
9817         * valprint.c (generic_val_print_int): Always call
9818         val_print_scalar_formatted.
9819         (val_print_type_code_int): Remove.
9820         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9821         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9822         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9823         * ada-valprint.c (ada_val_print_num): Use
9824         val_print_scalar_formatted.
9825
9826 2017-06-12  Tom Tromey  <tom@tromey.com>
9827
9828         * printcmd.c (print_scalar_formatted): Unify the two switches.
9829         Don't convert scalars to LONGEST.
9830
9831 2017-06-12  Tom Tromey  <tom@tromey.com>
9832
9833         PR exp/16225:
9834         * valprint.h (print_decimal_chars): Update.
9835         * valprint.c (maybe_negate_by_bytes): New function.
9836         (print_decimal_chars): Add "is_signed" argument.
9837         * printcmd.c (print_scalar_formatted): Update.
9838
9839 2017-06-12  Tom Tromey  <tom@tromey.com>
9840
9841         PR exp/16225:
9842         * valprint.h (print_binary_chars, print_hex_chars): Update.
9843         * valprint.c (val_print_type_code_int): Update.
9844         (print_binary_chars): Add "zero_pad" argument.
9845         (emit_octal_digit): New function.
9846         (print_octal_chars): Don't zero-pad.
9847         (print_decimal_chars): Likewise.
9848         (print_hex_chars): Add "zero_pad" argument.
9849         * sh64-tdep.c (sh64_do_fp_register): Update.
9850         * regcache.c (regcache::dump): Update.
9851         * printcmd.c (print_scalar_formatted): Update.
9852         * infcmd.c (default_print_one_register_info): Update.
9853
9854 2017-06-12  Pedro Alves  <palves@redhat.com>
9855             Alan Hayward  <alan.hayward@arm.com>
9856
9857         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9858         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9859         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9860         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9861         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9862
9863 2017-06-12  Pedro Alves  <palves@redhat.com>
9864
9865         * dwarf2read.c (mapped_symtab::data): Now a vector of
9866         symtab_index_entry instead of vector of
9867         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9868         whether an element's name is NULL instead of checking whether the
9869         element itself is NULL.
9870         (find_slot): Change return type.  Adjust.
9871         (hash_expand, , add_index_entry, uniquify_cu_indices)
9872         (write_hash_table): Adjust.
9873
9874 2017-06-12  Pedro Alves  <palves@redhat.com>
9875
9876         * dwarf2read.c (recursively_count_psymbols): New function.
9877         (write_psymtabs_to_index): Call it to compute number of psyms and
9878         pass estimate size of psyms_seen to unordered_set's ctor.
9879
9880 2017-06-12  Pedro Alves  <palves@redhat.com>
9881
9882         * dwarf2read.c (write_hash_table): Check if key already exists
9883         before emplacing.
9884
9885 2017-06-12  Pedro Alves  <palves@redhat.com>
9886
9887         * dwarf2read.c (data_buf::append_space): Rename to...
9888         (data_buf::grow): ... this, and make private.  Adjust all callers.
9889         (data_buf::append_uint): New method.
9890         (add_address_entry, write_one_signatured_type)
9891         (write_psymtabs_to_index): Use it.
9892
9893 2017-06-12  Pedro Alves  <palves@redhat.com>
9894
9895         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9896         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9897         (data_buf::file_write): Call ::fwrite directly.
9898
9899 2017-06-12  Pedro Alves  <palves@redhat.com>
9900
9901         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9902         std::vector::erase.
9903
9904 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9905
9906         Code cleanup: C++ify .gdb_index producer.
9907         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9908         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9909         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9910         (create_strtab, add_string): Remove.
9911         (file_write, data_buf): New.
9912         (struct symtab_index_entry): Use std::vector for cu_indices.
9913         (struct mapped_symtab): Use std::vector for data.
9914         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9915         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9916         Remove.
9917         (find_slot): Change return type.  Update it to the new data structures.
9918         (hash_expand, add_index_entry): Update it to the new data structures.
9919         (offset_type_compare): Remove.
9920         (uniquify_cu_indices): Update it to the new data structures.
9921         (c_str_view, c_str_view_hasher, vector_hasher): New.
9922         (add_indices_to_cpool): Remove.
9923         (write_hash_table): Update it to the new data structures.
9924         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9925         (eq_psymtab_cu_index): Remove.
9926         (psym_index_map): New typedef.
9927         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9928         reference and std::unordered_map for cu_index_htab.
9929         (add_address_entry, add_address_entry_worker, write_address_map)
9930         (write_psymbols): Update it to the new data structures.
9931         (write_obstack): Remove.
9932         (struct signatured_type_index_data): Change types_list to a data_buf
9933         reference and psyms_seen to a std::unordered_set reference.
9934         (write_one_signatured_type, recursively_write_psymbols)
9935         (write_psymtabs_to_index): Update it to the new data structures.
9936
9937 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9938
9939         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9940         separate-debug-file commands.
9941         * symfile.h (separate_debug_file_debug): New global.
9942         * symfile.c (separate_debug_file_debug): New global.
9943         (separate_debug_file_exists, find_separate_debug_file): Add
9944         debug output.
9945         (_initialize_symfile): Add "set debug separate-debug-file"
9946         command.
9947         * build-id.c (build_id_to_debug_bfd,
9948         find_separate_debug_file_by_buildid): Add debug output.
9949
9950 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9951
9952         * gdbarch.sh (displaced_step_free_closure): Remove.
9953         * gdbarch.h, gdbarch.c: Re-generate.
9954         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9955         displaced_step_free_closure.
9956         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9957         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9958         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9959         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9960         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9961         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9962         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9963         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9964         * infrun.c (displaced_step_clear): Call xfree instead of
9965         gdbarch_displaced_step_free_closure.
9966
9967 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9968
9969         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9970         NULL".
9971
9972 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9973
9974         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9975         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9976         (mn10300_push_dummy_call): Likewise.
9977
9978 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9979
9980         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9981
9982 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9983
9984         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9985
9986 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9987
9988         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9989         able to start inferiors using a shell.
9990         (New remote packets): Announce new packet "QStartupWithShell".
9991         * remote.c: Add PACKET_QStartupWithShell.
9992         (extended_remote_create_inferior): Handle new
9993         PACKET_QStartupWithShell.
9994         (remote_protocol_features) <QStartupWithShell>: New entry for
9995         PACKET_QStartupWithShell.
9996         (_initialize_remote): Call "add_packet_config_cmd" for
9997         QStartupShell.
9998
9999 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10000             Pedro Alves  <palves@redhat.com>
10001
10002         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10003         and "nat/fork-inferior.h".
10004         * common/common-inferior.h: New file, with contents from
10005         "gdb/inferior.h".
10006         * commom/common-utils.c: Include "common-utils.h".
10007         (stringify_argv): New function.
10008         * common/common-utils.h (stringify_argv): New prototype.
10009         * configure.nat: Add "fork-inferior.o" as a dependency for
10010         "*linux*", "fbsd*" and "nbsd*" hosts.
10011         * corefile.c (get_exec_file): Update comment.
10012         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10013         instead of "startup_inferior".
10014         (darwin_create_inferior): Call "add_thread_silent" after
10015         "fork_inferior".
10016         * fork-child.c: Cleanup unnecessary includes.
10017         (SHELL_FILE): Move to "common/common-fork-child.c".
10018         (environ): Likewise.
10019         (exec_wrapper): Initialize.
10020         (get_exec_wrapper): New function.
10021         (breakup_args): Move to "common/common-fork-child.c"; rename to
10022         "breakup_args_for_exec".
10023         (escape_bang_in_quoted_argument): Move to
10024         "common/common-fork-child.c".
10025         (saved_ui): New variable.
10026         (prefork_hook): New function.
10027         (postfork_hook): Likewise.
10028         (postfork_child_hook): Likewise.
10029         (gdb_startup_inferior): Likewise.
10030         (fork_inferior): Move to "common/common-fork-child.c".  Update
10031         function to support gdbserver.
10032         (startup_inferior): Likewise.
10033         * gdbcore.h (get_exec_file): Remove declaration.
10034         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10035         instead of "startup_inferior".  Call "add_thread_silent" after
10036         "fork_inferior".
10037         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10038         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10039         instead of "startup_inferior".  Call "add_thread_silent" after
10040         "fork_inferior".
10041         * inferior.h: Include "common-inferior.h".
10042         (trace_start_error): Move to "common/common-utils.h".
10043         (trace_start_error_with_name): Likewise.
10044         (fork_inferior): Move prototype to "nat/fork-inferior.h".
10045         (startup_inferior): Likewise.
10046         (gdb_startup_inferior): New prototype.
10047         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10048         * nat/fork-inferior.h: New file.
10049         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10050         instead of "startup_inferior".  Call "add_thread_silent" after
10051         "fork_inferior".
10052         * target.h (target_terminal_init): Move prototype to
10053         "target/target.h".
10054         (target_terminal_inferior): Likewise.
10055         (target_terminal_ours): Likewise.
10056         * target/target.h (target_terminal_init): New prototype, moved
10057         from "target.h".
10058         (target_terminal_inferior): Likewise.
10059         (target_terminal_ours): Likewise.
10060         * utils.c (gdb_flush_out_err): New function.
10061
10062 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10063
10064         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10065         * common/common-gdbthread.h: New file, with parts from
10066         "gdb/gdbthread.h".
10067         * gdbthread.h: Include "common-gdbthread.h".
10068         (switch_to_thread): Moved to "common/common-gdbthread.h".
10069
10070 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10071
10072         * Makefile.in (SFILES): Add "common/job-control.c".
10073         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10074         (COMMON_OBS): Add "job-control.o".
10075         * common/job-control.c: New file, with contents from
10076         "gdb/inflow.c".
10077         * common/job-control.h: New file, with contents from "terminal.h".
10078         * fork-child.c: Include "job-control.h".
10079         * inflow.c: Include "job-control.h".
10080         (gdb_setpgid): Move to "common/common-inflow.c".
10081         (_initialize_inflow): Move setting of "job_control" to
10082         "handle_job_control".
10083         * terminal.h (job_control): Moved to "common/common-terminal.h".
10084         (gdb_setpgid): Likewise.
10085         * top.c: Include "job_control.h".
10086         * utils.c: Likewise.
10087         (job_control): Moved to "job-control.c".
10088
10089 2017-06-07  Pedro Alves  <palves@redhat.com>
10090
10091         * Makefile.in (SFILES): Add gdb_regex.c.
10092         (COMMON_OBS): Add gdb_regex.o.
10093         * ada-lang.c (ada_add_standard_exceptions)
10094         (ada_add_exceptions_from_frame, name_matches_regex)
10095         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10096         parameter type to compiled_regex.  Adjust.
10097         (ada_exceptions_list): Use compiled_regex.
10098         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10099         std::unique_ptr<compiled_regex>.
10100         (exception_catchpoint::~exception_catchpoint): Remove regfree
10101         call.
10102         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10103         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10104         * breakpoint.c (solib_catchpoint::compiled): Now a
10105         std::unique_ptr<compiled_regex>.
10106         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10107         (check_status_catch_solib): Adjust to use compiled_regex.
10108         (add_solib_catchpoint): Adjust to use compiled_regex.
10109         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10110         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10111         compiled_regex reference.  Adjust to use it.
10112         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10113         declaration.  Include "gdb_regex.h".
10114         (apropos_cmd): Change regex parameter to compiled_regex reference.
10115         * gdb_regex.c: New file.
10116         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10117         declarations.
10118         (class compiled_regex): New.
10119         * linux-tdep.c: Include "common/gdb_optional.h".
10120         (struct mapping_regexes): New, factored out from
10121         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10122         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10123         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10124         * probe.c: Include "common/gdb_optional.h".
10125         (collect_probes): Use compiled_regex and gdb::optional and remove
10126         cleanups.
10127         * skip.c: Include "common/gdb_optional.h".
10128         (skiplist_entry::compiled_function_regexp): Now a
10129         gdb::optional<compiled_regex>.
10130         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10131         (free_skiplist_entry): Remove regfree call.
10132         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10133         compiled_regex and gdb::optional.
10134         * symtab.c: Include "common/gdb_optional.h".
10135         (search_symbols): Use compiled_regex and gdb::optional.
10136         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10137         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10138         to gdb_regex.c.
10139
10140 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10141
10142         * regcache.c (regcache::save): Avoid buffer use.
10143         (regcache::dump): Likewise.
10144
10145 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10146
10147         * sh-tdep.c (sh_pseudo_register_read): Remove
10148         MAX_REGISTER_SIZE.
10149         (sh_pseudo_register_write): Likewise.
10150         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10151         (sh64_pseudo_register_write): Likewise
10152
10153 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10154
10155         * aarch64-tdep.c (aarch64_store_return_value): Use
10156         V_REGISTER_SIZE.
10157         (aarch64_pseudo_read_value): Likewise.
10158         (aarch64_pseudo_write): Likewise.
10159
10160 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10161
10162         * regformats/regdef.h (set_register_cache): Remove the
10163         declaration.
10164
10165 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10166
10167         * frame.c (frame_unwind_register_signed): Use
10168         frame_unwind_register_value.
10169
10170 2017-06-06  Pedro Alves  <palves@redhat.com>
10171
10172         PR breakpoints/21553
10173         * breakpoint.c (create_breakpoints_sal_default)
10174         (init_breakpoint_sal, create_breakpoint_sal): Use
10175         gdb::unique_xmalloc_ptr for string parameters.
10176         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10177         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10178         (base_breakpoint_create_breakpoints_sal)
10179         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10180         (strace_marker_create_breakpoints_sal)
10181         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10182         string parameters.
10183         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10184         gdb::unique_xmalloc_ptr for string parameters.
10185         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10186         parameters.
10187
10188 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10189
10190         * alpha-tdep.c (alpha_register_to_value): Use
10191         get_frame_register_value.
10192         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10193
10194 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10195
10196         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10197         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10198         (ia64_value_to_register): Likewise.
10199         (ia64_extract_return_value): Likewise.
10200         (ia64_store_return_value): Likewise.
10201         (ia64_push_dummy_call): Likewise.
10202
10203 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10204
10205         GDB 8.0 released.
10206
10207 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10208
10209         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10210
10211 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10212
10213         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10214         parameter.
10215         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10216
10217 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10218
10219         * event-loop.c (poll_timers): Unallocate timer using delete
10220         instead of xfree.
10221
10222 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10223
10224         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10225         (struct breakpoint) <~breakpoint>: New.
10226         (struct watchpoint): Inherit from breakpoint.
10227         <~watchpoint>: New.
10228         <base>: Remove.
10229         (struct tracepoint): Inherit from breakpoint.
10230         <base>: Remove.
10231         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10232         (struct longjmp_breakpoint): Inherit from breakpoint.
10233         <~longjmp_breakpoint>: New.
10234         <base>: Remove.
10235         (new_breakpoint_from_type): Remove casts.
10236         (watchpoint_in_thread_scope): Remove reference to base field.
10237         (watchpoint_del_at_next_stop): Likewise.
10238         (update_watchpoint): Likewise.
10239         (watchpoint_check): Likewise.
10240         (bpstat_check_watchpoint): Likewise.
10241         (set_longjmp_breakpoint): Likewise.
10242         (struct fork_catchpoint): Inherit from breakpoint.
10243         <base>: Remove.
10244         (struct solib_catchpoint): Inherit from breakpoint.
10245         <~solib_catchpoint>: New.
10246         <base>: Remove.
10247         (dtor_catch_solib): Change to ...
10248         (solib_catchpoint::~solib_catchpoint): ... this.
10249         (breakpoint_hit_catch_solib): Remove reference to base field.
10250         (add_solib_catchpoint): Likewise.
10251         (create_fork_vfork_event_catchpoint): Likewise.
10252         (struct exec_catchpoint): Inherit from breakpoint.
10253         <~exec_catchpoint>: New.
10254         <base>: Remove.
10255         (dtor_catch_exec): Change to ...
10256         (exec_catchpoint::~exec_catchpoint): ... this.
10257         (dtor_watchpoint): Change to ...
10258         (watchpoint::~watchpoint): ... this.
10259         (watch_command_1): Remove reference to base field.
10260         (catch_exec_command_1): Likewise.
10261         (base_breakpoint_dtor): Change to ...
10262         (breakpoint::~breakpoint): ... this.
10263         (base_breakpoint_ops): Remove dtor field value.
10264         (longjmp_bkpt_dtor): Change to ...
10265         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10266         (strace_marker_create_breakpoints_sal): Remove reference to base
10267         field.
10268         (delete_breakpoint): Don't manually call breakpoint destructor.
10269         (create_tracepoint_from_upload): Remove reference to base field.
10270         (trace_pass_set_count): Likewise.
10271         (initialize_breakpoint_ops): Don't initialize
10272         momentary_breakpoint_ops, don't set dtors.
10273         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10274         <~ada_catchpoint>: New.
10275         <base>: Remove.
10276         (create_excep_cond_exprs): Remove reference to base field.
10277         (dtor_exception): Change to ...
10278         (ada_catchpoint::~ada_catchpoint): ... this.
10279         (dtor_catch_exception): Remove.
10280         (dtor_catch_exception_unhandled): Remove.
10281         (dtor_catch_assert): Remove.
10282         (create_ada_exception_catchpoint): Remove reference to base
10283         field.
10284         (initialize_ada_catchpoint_ops): Don't set dtors.
10285         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10286         breakpoint.
10287         <~signal_catchpoint>: New.
10288         <base>: Remove.
10289         (signal_catchpoint_dtor): Change to ...
10290         (signal_catchpoint::~signal_catchpoint): ... this.
10291         (create_signal_catchpoint): Remove reference to base field.
10292         (initialize_signal_catchpoint_ops): Don't set dtor.
10293         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10294         from breakpoint.
10295         <~syscall_catchpoint>: New.
10296         <base>: Remove.
10297         (dtor_catch_syscall): Change to ...
10298         (syscall_catchpoint::~syscall_catchpoint): ... this.
10299         (create_syscall_event_catchpoint): Remove reference to base
10300         field.
10301         (initialize_syscall_catchpoint_ops): Don't set dtor.
10302         * break-catch-throw.c (struct exception_catchpoint): Inherit
10303         from breakpoint.
10304         <~exception_catchpoint>: New.
10305         <base>: Remove.
10306         (dtor_exception_catchpoint): Change to ...
10307         (exception_catchpoint::~exception_catchpoint): ... this.
10308         (handle_gnu_v3_exceptions): Remove reference to base field.
10309         (initialize_throw_catchpoint_ops): Don't set dtor.
10310         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10311         field.
10312         * remote.c (remote_get_tracepoint_status): Likewise.
10313         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10314         * tracefile.c (tracefile_fetch_registers): Likewise.
10315         * tracepoint.c (actions_command): Likewise.
10316         (validate_actionline): Likewise.
10317         (tfind_1): Likewise.
10318         (get_traceframe_location): Likewise.
10319         (find_matching_tracepoint_location): Likewise.
10320         (parse_tracepoint_status): Likewise.
10321         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10322
10323 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10324
10325         * breakpoint.c (struct longjmp_breakpoint): New struct.
10326         (is_tracepoint_type): Change return type to bool.
10327         (is_longjmp_type): New function.
10328         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10329         (set_raw_breakpoint_without_location): Use
10330         new_breakpoint_from_type.
10331         (set_raw_breakpoint): Likewise.
10332
10333 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10334
10335         * breakpoint.c (new_breakpoint_from_type): New function.
10336         (create_breakpoint_sal): Use new_breakpoint_from_type and
10337         unique_ptr.
10338         (create_breakpoint): Likewise.
10339
10340 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10341
10342         * memattr.c (mem_info_command): Rename to ...
10343         (info_mem_command): ... this.
10344         (mem_enable_command): Rename to ...
10345         (enable_mem_command): ... this.
10346         (mem_disable_command): Rename to ...
10347         (disable_mem_command): ... this.
10348         (mem_delete_command): Rename to ...
10349         (delete_mem_command): ... this.
10350         (_initialize_mem): Adjust function names.
10351
10352 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10353
10354         * btrace.c (handle_pt_insn_events): New.
10355         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10356         STATUS.  Split into this and ...
10357         (handle_pt_insn_event_flags): ... this.
10358
10359 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10360
10361         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10362         and struct pt_insn.resynced.
10363         * configure: Regenerated.
10364         * config.in: Regenerated.
10365
10366 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10367
10368         * btrace.c (ftrace_find_call_by_number): New function.
10369         (ftrace_new_function): Store objects, not pointers.
10370         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10371         ftrace_new_gap, ftrace_update_function,
10372         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10373         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10374         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10375         btrace_ends_with_single_insn, btrace_call_get): Account for
10376         btrace_thread_info::functions now storing objects.
10377         * btrace.h (struct btrace_thread_info): Add constructor.
10378         (struct btrace_thread_info) <functions>: Make std::vector.
10379         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10380         Initialize with default values.
10381         * record-btrace.c (record_btrace_frame_sniffer): Account for
10382         btrace_thread_info::functions now storing objects.
10383
10384 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10385
10386         * btrace.c: Remove typedef bfun_s.
10387         (ftrace_new_gap): Directly add gaps to the list of gaps.
10388         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10389         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10390         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10391         instead of gdb VEC.
10392
10393 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10394
10395         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10396         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10397         with btrace_thread_info::next_segment and
10398         btrace_thread_info::prev_segment.
10399         * btrace.h: Remove struct btrace_func_link.
10400         (struct btrace_function): Replace pair of function segment pointers
10401         with pair of indices.
10402         * python/py-record-btrace.c (btpy_call_prev_sibling,
10403         btpy_call_next_sibling): Replace references to
10404         btrace_thread_info::segment with btrace_thread_info::next_segment and
10405         btrace_thread_info::prev_segment.
10406         * record-btrace.c (record_btrace_frame_this_id): Use
10407         btrace_find_call_by_number.
10408
10409 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10410
10411         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10412         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10413         btrace_insn_next, btrace_insn_prev): Remove references to
10414         btrace_thread_info::flow.
10415         * btrace.h (struct btrace_function): Remove FLOW.
10416
10417 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10418
10419         * btrace.c (ftrace_find_call_by_number): New function.
10420         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10421         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10422         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10423         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10424         index.
10425         * btrace.h (struct btrace_function): Turn UP into an index.
10426         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10427         as an index.
10428         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10429         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10430         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10431
10432 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10433
10434         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10435         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10436         ftrace_update_function, ftrace_compute_global_level_offset,
10437         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10438         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10439         btrace_insn_end, btrace_is_empty): Remove references to
10440         btrace_thread_info::begin and btrace_thread_info::end.
10441         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10442         (struct btrace_thread_info) <functions>: Adjust comment.
10443         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10444         btrace_thread_info::begin.
10445
10446 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10447
10448         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10449         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10450         ftrace_update_function): Remove arguments that implicitly were always
10451         BTINFO->END.
10452         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10453         Don't pass BTINFO->END.
10454
10455 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10456
10457         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10458         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10459         btrace_find_insn_by_number): Replace function segment pointer with
10460         index.
10461         (btrace_insn_cmp): Simplify.
10462         * btrace.h: (struct btrace_insn_iterator) Rename index to
10463         insn_index.  Replace function segment pointer with index into function
10464         segment vector.
10465         * record-btrace.c (record_btrace_call_history): Replace function
10466         segment pointer use with index.
10467         (record_btrace_frame_sniffer): Retrieve function call segment through
10468         vector.
10469         (record_btrace_set_replay): Remove defunc't safety check.
10470
10471 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10472
10473         * btrace.c (btrace_ends_with_single_insn): New function.
10474         (btrace_call_get, btrace_call_number, btrace_call_begin,
10475         btrace_call_end, btrace_call_next, btrace_call_prev,
10476         btrace_find_call_by_number): Use index into call segment vector
10477         instead of pointer.
10478         (btrace_call_cmp): Simplify.
10479         * btrace.h (struct btrace_call_iterator): Replace function call segment
10480         pointer with index into vector.
10481         * record-btrace.c (record_btrace_call_history): Use index instead of
10482         pointer.
10483
10484 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10485
10486         * btrace.c (btrace_insn_begin, btrace_insn_end,
10487         btrace_find_insn_by_number): Add btinfo to iterator.
10488         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10489
10490 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10491
10492         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10493         and save pointers directly.
10494         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10495         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10496         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10497         changed signature of functions.
10498         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10499         (btrace_fetch): Remove code that adds btrace_function pointers to
10500         vector of btrace_functions.
10501         (btrace_clear): Simplify freeing vector of btrace_functions.
10502
10503 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10504
10505         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10506         Replace VEC_* with std::vector functions.
10507         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10508         (struct btrace_thread_info)<functions>: Change type to std::vector.
10509
10510 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10511
10512         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10513         "Removed targets and native configurations" up.  Merge duplicate
10514         "New commands" sub-sections.  Add "New options" sub-sections.
10515
10516 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10517
10518         * defs.h (copy_integer_to_size): New declaration.
10519         * findvar.c (copy_integer_to_size): New function.
10520         (do_cint_test): New selftest function.
10521         (copy_integer_to_size_test): Likewise.
10522         (_initialize_findvar): Likewise.
10523         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10524         (mips_fbsd_collect_reg): Use raw_collect_integer.
10525         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10526         (mips64_fill_gregset): Use raw_collect_integer
10527         (mips64_fill_fpregset): Use raw_supply_integer.
10528         * regcache.c (regcache::raw_supply_integer): New function.
10529         (regcache::raw_collect_integer): Likewise.
10530         * regcache.h: (regcache::raw_supply_integer): New declaration.
10531         (regcache::raw_collect_integer): Likewise.
10532
10533 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10534
10535         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10536         (COMMON_OBS): Add gdbarch-selftests.o.
10537         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10538         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10539         * gdbarch-selftests.c: New file.
10540         * regcache.h (regcache) <~regcache>: Mark it virtual if
10541         GDB_SELF_TEST.
10542         <raw_write>: Likewise.
10543
10544 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10545
10546         * regcache.c (current_regcache): Change it to
10547         regcache::current_regcache.
10548         (regcache_observer_target_changed): Update.
10549         (regcache_thread_ptid_changed): Make it a regcache static
10550         method.
10551         (regcache_thread_ptid_changed): Update.
10552         (class regcache_access): New.
10553         (current_regcache_test): Update.
10554         (_initialize_regcache): Update.
10555         * regcache.h: Include forward_list.
10556         (regcache): Declare regcache_thread_ptid_changed and declare
10557         registers_changed_ptid as friend.
10558
10559 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10560
10561         * i387-tdep.c (i387_register_to_value): Use register_size
10562         instead of TYPE_LENGTH.
10563         * m68k-tdep.c (m68k_register_to_value): Likewise.
10564
10565 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10566
10567         * i387-tdep.c (i387_convert_register_p): Return false if type
10568         code isn't TYPE_CODE_FLT.
10569
10570 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10571
10572         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10573         length is 4.
10574         (alpha_register_to_value): Remove type length check.
10575         (alpha_value_to_register): Likewise.
10576
10577 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10578
10579         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10580         TYPE_CODE_FLT.
10581
10582 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10583
10584         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10585         TYPE_CODE_FLT or not.
10586
10587 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10588
10589         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10590         * avr-tdep.c (avr_gdbarch_init): Likewise.
10591         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10592         * cris-tdep.c (cris_gdbarch_init): Likewise.
10593         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10594         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10595         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10596         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10597         * mep-tdep.c (mep_gdbarch_init): Likewise.
10598         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10599         * mips-tdep.c (mips_gdbarch_init): Likewise.
10600         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10601         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10602         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10603         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10604         * v850-tdep.c (v850_gdbarch_init): Likewise.
10605
10606 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10607
10608         * selftest-arch.c (tests_with_arch): Call registers_changed
10609         and reinit_frame_cache.
10610         * selftest.c (run_self_tests): Likewise.
10611
10612 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10613
10614         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10615         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10616
10617 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10618
10619         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10620         set_gdbarch_print_insn.
10621
10622 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10623
10624         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10625         set_gdbarch_print_insn.
10626
10627 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10628
10629         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10630         set_gdbarch_print_insn.
10631         * arc-tdep.c (arc_gdbarch_init): Likewise.
10632         * arch-utils.c: include dis-asm.h.
10633         (default_print_insn): New function.
10634         * arch-utils.h (default_print_insn): Declare.
10635         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10636         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10637         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10638         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10639         * frv-tdep.c (frv_gdbarch_init): Likewise.
10640         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10641         * gdbarch.sh (print_insn): Use default_print_insn.
10642         * gdbarch.c: Regenerated.
10643         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10644         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10645         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10646         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10647         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10648         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10649         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10650         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10651         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10652         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10653         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10654         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10655         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10656         * mt-tdep.c (mt_gdbarch_init): Likewise.
10657         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10658         * nios2-tdep.c (nios2_print_insn): Remove.
10659         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10660         * rx-tdep.c (rx_gdbarch_init): Likewise.
10661         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10662         * score-tdep.c (score_print_insn): Remove.
10663         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10664         * sh-tdep.c (sh_gdbarch_init): Likewise.
10665         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10666         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10667         * tic6x-tdep.c (tic6x_print_insn): Remove.
10668         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10669         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10670         * v850-tdep.c (v850_gdbarch_init): Likewise.
10671         * vax-tdep.c (vax_gdbarch_init): Likewise.
10672         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10673         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10674
10675 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10676
10677         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10678         (MIPS_FP0_REGNUM): Remove.
10679         (MIPS_FSR_REGNUM): Remove.
10680         (mips_fbsd_supply_fpregs): Use mips_regnum.
10681         (mips_fbsd_supply_gregs): Likewise.
10682         (mips_fbsd_collect_fpregs): Likewise.
10683         (mips_fbsd_collect_gregs): Likewise.
10684
10685 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10686
10687         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10688         (getpfpregs_supplies): New function.
10689         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10690         getfpregs_supplies.
10691         (mips_fbsd_store_inferior_registers): Likewise.
10692
10693 2017-05-22  Pedro Alves <palves@redhat.com>
10694
10695         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10696         maintainer.
10697
10698 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10699
10700         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10701         (store_register): Likewise.
10702         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10703         (get_decimal_float_return_value): Likewise.
10704         (do_ppc_sysv_return_value): Likewise.
10705         (ppc64_sysv_abi_push_integer): Likewise.
10706         (ppc64_sysv_abi_push_freg): Likewise.
10707         (ppc64_sysv_abi_return_value_base): Likewise.
10708         (ppc64_sysv_abi_return_value): Likewise.
10709         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10710         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10711         * rs6000-nat.c: Likewise.
10712         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10713         (rs6000_value_to_register): Likewise.
10714         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10715
10716 2017-05-21  Tom Tromey  <tom@tromey.com>
10717
10718         PR rust/21466:
10719         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10720         arrays as "[T]", not "[T; ]".
10721
10722 2017-05-19  Tom Tromey  <tom@tromey.com>
10723
10724         PR rust/21484:
10725         * rust-lang.c (exp_descriptor_rust): New function.
10726         (rust_language_defn): Use it.
10727         * p-lang.c (pascal_language_defn): Update.
10728         * opencl-lang.c (opencl_language_defn): Update.
10729         * objc-lang.c (objc_language_defn): Update.
10730         * m2-lang.c (m2_language_defn): Update.
10731         * language.h (struct language_defn)
10732         <la_watch_location_expression>: New member.
10733         * language.c (unknown_language_defn, auto_language_defn)
10734         (local_language_defn): Update.
10735         * go-lang.c (go_language_defn): Update.
10736         * f-lang.c (f_language_defn): Update.
10737         * d-lang.c (d_language_defn): Update.
10738         * c-lang.h (c_watch_location_expression): Declare.
10739         * c-lang.c (c_watch_location_expression): New function.
10740         (c_language_defn, cplus_language_defn, asm_language_defn)
10741         (minimal_language_defn): Use it.
10742         * breakpoint.c (watch_command_1): Call
10743         la_watch_location_expression.
10744         * ada-lang.c (ada_language_defn): Update.
10745
10746 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10747
10748         PR tui/21482
10749         * gdb_curses.h (NOMACROS): Define.
10750         (NCURSES_NOMACROS): Define.
10751
10752 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10753
10754         PR tui/21482
10755         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10756         arg to char *.
10757         * tui/tui-wingeneral.c (box_win): Likewise.
10758         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10759         (tui_show_source_line): Likewise.
10760         (tui_show_exec_info_content): Likewise.
10761
10762 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10763
10764         * sparc-tdep.c (sparc_structure_return_p)
10765         (sparc_arg_on_registers_p): New functions.
10766         (sparc32_store_arguments): Use them.
10767         * sparc64-tdep.c (sparc64_16_byte_align_p)
10768         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10769         Handle TYPE_CODE_ARRAY.
10770
10771 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10772
10773         * cli/cli-decode.c (add_alias_cmd): New function.
10774         * command.h (add_alias_cmd): Declare.
10775         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10776         instead call add_alias_cmd.
10777
10778 2017-05-17  Pedro Alves  <palves@redhat.com>
10779
10780         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10781         (nat_makefile_frag): ... this.  All references updated.
10782         * configure.ac: Likewise.
10783         * configure.nat: Likewise.  Enhance comments.
10784         * configure: Regenerate.
10785
10786 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10787
10788         * procfs.c (procfs_create_inferior): Change prototype to match
10789         definition.
10790
10791 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10792
10793         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10794         C++ compiler warning.
10795
10796 2017-05-12  Tom Tromey  <tom@tromey.com>
10797
10798         PR rust/21483:
10799         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10800         recurse, just call value_struct_elt directly.
10801
10802 2017-05-12  Tom Tromey  <tom@tromey.com>
10803
10804         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10805         OP_RUST_ARRAY>: Fix.
10806
10807 2017-05-12  Tom Tromey  <tom@tromey.com>
10808
10809         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10810
10811 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10812
10813         * regcache.c: Include <forward_list>.
10814         (struct regcache_list): Remove.
10815         (current_regcache): Update.
10816         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10817         (regcache_thread_ptid_changed): Likewise.
10818         (registers_changed_ptid): Likewise.
10819         (current_regcache_size): Likewise.
10820
10821 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10822
10823         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10824         (current_regcache_size): New function.
10825         (current_regcache_test): New function.
10826         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10827
10828 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10829
10830         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10831         (print_gp_register_row): Use get_frame_register_value.
10832
10833 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10834
10835         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10836         (mips_supply_fpregset): Likewise.
10837         (mips64_supply_gregset): Likewise.
10838
10839 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10840
10841         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10842         regcache->raw_supply_zeroed.
10843
10844 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10845
10846         * configure.nat: Rearrange 'case' statements to match
10847         host before cpu.
10848
10849 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10850
10851         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10852         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10853         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10854         "@nat_extra_makefile_frag@".
10855         (Makefile): Remove dependency on "@frags@".
10856         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10857         (data-directory/Makefile): Likewise.
10858         * config/aarch64/linux.mh: Deleted; moved contents to
10859         "gdb/configure.nat".
10860         * config/alpha/alpha-linux.mh: Likewise.
10861         * config/alpha/nbsd.mh: Likewise.
10862         * config/arm/linux.mh: Likewise.
10863         * config/arm/nbsdelf.mh: Likewise.
10864         * config/i386/cygwin.mh: Likewise.
10865         * config/i386/cygwin64.mh: Likewise.
10866         * config/i386/darwin.mh: Likewise.
10867         * config/i386/fbsd.mh: Likewise.
10868         * config/i386/fbsd64.mh: Likewise.
10869         * config/i386/go32.mh: Likewise.
10870         * config/i386/i386gnu.mh: Likewise.
10871         * config/i386/i386sol2.mh: Likewise.
10872         * config/i386/linux.mh: Likewise.
10873         * config/i386/linux64.mh: Likewise.
10874         * config/i386/mingw.mh: Likewise.
10875         * config/i386/mingw64.mh: Likewise.
10876         * config/i386/nbsd64.mh: Likewise.
10877         * config/i386/nbsdelf.mh: Likewise.
10878         * config/i386/nto.mh: Likewise.
10879         * config/i386/obsd.mh: Likewise.
10880         * config/i386/obsd64.mh: Likewise.
10881         * config/i386/sol2-64.mh: Likewise.
10882         * config/ia64/linux.mh: Likewise.
10883         * config/m32r/linux.mh: Likewise.
10884         * config/m68k/linux.mh: Likewise.
10885         * config/m68k/nbsdelf.mh: Likewise.
10886         * config/m68k/obsd.mh: Likewise.
10887         * config/m88k/obsd.mh: Likewise.
10888         * config/mips/fbsd.mh: Likewise.
10889         * config/mips/linux.mh: Likewise.
10890         * config/mips/nbsd.mh: Likewise.
10891         * config/mips/obsd64.mh: Likewise.
10892         * config/pa/linux.mh: Likewise.
10893         * config/pa/nbsd.mh: Likewise.
10894         * config/pa/obsd.mh: Likewise.
10895         * config/powerpc/aix.mh: Likewise.
10896         * config/powerpc/fbsd.mh: Likewise.
10897         * config/powerpc/linux.mh: Likewise.
10898         * config/powerpc/nbsd.mh: Likewise.
10899         * config/powerpc/obsd.mh: Likewise.
10900         * config/powerpc/ppc64-linux.mh: Likewise.
10901         * config/powerpc/spu-linux.mh: Likewise.
10902         * config/s390/linux.mh: Likewise.
10903         * config/sh/nbsd.mh: Likewise.
10904         * config/sparc/fbsd.mh: Likewise.
10905         * config/sparc/linux.mh: Likewise.
10906         * config/sparc/linux64.mh: Likewise.
10907         * config/sparc/nbsd64.mh: Likewise.
10908         * config/sparc/nbsdelf.mh: Likewise.
10909         * config/sparc/obsd64.mh: Likewise.
10910         * config/sparc/sol2.mh: Likewise.
10911         * config/tilegx/linux.mh: Likewise.
10912         * config/vax/nbsdelf.mh: Likewise.
10913         * config/vax/obsd.mh: Likewise.
10914         * config/xtensa/linux.mh: Likewise.
10915         * config/i386/i386gnu.mn: New file, with excerpts from
10916         "config/i386/i386gnu.mh".
10917         * configure: Regenerate.
10918         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10919         *.mh files under "gdb/config".
10920         * configure.nat: New file, with contents from the
10921         "gdb/config/*/*.mh" files.
10922
10923 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10924
10925         * btrace.c (btrace_clear): Free insn vector.
10926
10927 2017-05-05  Pedro Alves  <palves@redhat.com>
10928
10929         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10930         * configure: Regenerate.
10931
10932 2017-05-04  Pedro Alves  <palves@redhat.com>
10933
10934         * Makefile.in (SFILES): Add progspace-and-thread.c.
10935         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10936         (COMMON_OBS): Add progspace-and-thread.o.
10937         * breakpoint.c: Include "progspace-and-thread.h".
10938         (update_inserted_breakpoint_locations)
10939         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10940         Use scoped_restore_current_pspace_and_thread.
10941         (create_std_terminate_master_breakpoint): Use
10942         scoped_restore_current_program_space.
10943         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10944         (print_breakpoint_location): Use
10945         scoped_restore_current_program_space.
10946         (bp_loc_is_permanent): Use
10947         scoped_restore_current_pspace_and_thread.
10948         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10949         (download_tracepoint_locations): Use
10950         scoped_restore_current_pspace_and_thread.
10951         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10952         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10953         (enum step_over_calls_kind): Moved from inferior.h.
10954         (class scoped_restore_current_thread): New class.
10955         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10956         declaration.
10957         (scoped_restore_current_thread): New class.
10958         * infcmd.c: Include "common/gdb_optional.h".
10959         (continue_1, proceed_after_attach): Use
10960         scoped_restore_current_thread.
10961         (notice_new_inferior): Use scoped_restore_current_thread.
10962         * inferior.c: Include "progspace-and-thread.h".
10963         (restore_inferior, save_current_inferior): Delete.
10964         (add_inferior_command, clone_inferior_command): Use
10965         scoped_restore_current_pspace_and_thread.
10966         * inferior.h (scoped_restore_current_inferior): New class.
10967         * infrun.c: Include "progspace-and-thread.h" and
10968         "common/gdb_optional.h".
10969         (follow_fork_inferior): Use
10970         scoped_restore_current_pspace_and_thread.
10971         (scoped_restore_exited_inferior): New class.
10972         (handle_vfork_child_exec_or_exit): Use
10973         scoped_restore_exited_inferior,
10974         scoped_restore_current_pspace_and_thread,
10975         scoped_restore_current_thread and scoped_restore.
10976         (fetch_inferior_event): Use scoped_restore_current_thread.
10977         * linespec.c (decode_line_full, decode_line_1): Use
10978         scoped_restore_current_program_space.
10979         * mi/mi-main.c: Include "progspace-and-thread.h".
10980         (exec_continue): Use scoped_restore_current_thread.
10981         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10982         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10983         * proc-service.c (ps_pglobal_lookup): Use
10984         scoped_restore_current_program_space.
10985         * progspace-and-thread.c: New file.
10986         * progspace-and-thread.h: New file.
10987         * progspace.c (release_program_space, clone_program_space): Use
10988         scoped_restore_current_program_space.
10989         (restore_program_space, save_current_program_space)
10990         (save_current_space_and_thread): Delete.
10991         (switch_to_program_space_and_thread): Moved to
10992         progspace-and-thread.c.
10993         * progspace.h (save_current_program_space)
10994         (save_current_space_and_thread): Delete declarations.
10995         (scoped_restore_current_program_space): New class.
10996         * remote.c (remote_btrace_maybe_reopen): Use
10997         scoped_restore_current_thread.
10998         * symtab.c: Include "progspace-and-thread.h".
10999         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11000         * thread.c (print_thread_info_1): Use
11001         scoped_restore_current_thread.
11002         (struct current_thread_cleanup): Delete.
11003         (do_restore_current_thread_cleanup)
11004         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11005         (scoped_restore_current_thread::~scoped_restore_current_thread):
11006         ... this new dtor.
11007         (make_cleanup_restore_current_thread): Rename/convert to ...
11008         (scoped_restore_current_thread::scoped_restore_current_thread):
11009         ... this new ctor.
11010         (thread_apply_all_command): Use scoped_restore_current_thread.
11011         (thread_apply_command): Use scoped_restore_current_thread.
11012         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11013         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11014
11015 2017-05-04  Pedro Alves  <palves@redhat.com>
11016
11017         * thread.c (make_cleanup_restore_current_thread): Move
11018         find_thread_ptid call before the is_stopped call.  Assert that the
11019         thread is found.  Replace is_stopped call by checking the thread's
11020         state directly.  Remove unnecessary NULL-thread check.
11021
11022 2017-05-04  Pedro Alves  <palves@redhat.com>
11023
11024         * corelow.c (thread_section_name): New class.
11025         (get_core_register_section, get_core_siginfo): Use it.
11026
11027 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11028
11029         * corelow.c (sniff_core_bfd): Remove extra semicolon.
11030         (get_core_register_section): Remove xfree of NULL pointer.
11031
11032 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
11033
11034         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11035         * regcache.c (regcache::raw_supply_zeroed): New function.
11036         * regcache.h (regcache::raw_supply_zeroed): New declaration.
11037
11038 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
11039
11040         * gdbarch.sh: Remove commented out definition of
11041         TARGET_CHAR_BIT.
11042         * gdbarch.h: Re-generate.
11043
11044 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
11045
11046         * configure: Regenerate.
11047
11048 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11049
11050         * solib-target.c (solib_target_relocate_section_addresses):
11051         Remove num_section_bases, num_bases, segment_bases variables.
11052
11053 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11054
11055         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11056
11057 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11058
11059         * solib-target.c: Include <vector>
11060         (struct lm_info_target) <~lm_info_target>: Remove.
11061         <segment_bases, section_bases>: Change type to
11062         std::vector<CORE_ADDR>.
11063         (library_list_start_segment, library_list_start_section,
11064         library_list_end_library,
11065         solib_target_relocate_section_addresses): Adjust.
11066
11067 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11068
11069         * gdbarch.sh (software_single_step): Change return type to
11070         std::vector<CORE_ADDR>.
11071         * gdbarch.c, gdbarch.h: Re-generate.
11072         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11073         Adjust.
11074         (arm_deal_with_atomic_sequence_raw): Adjust.
11075         (thumb_get_next_pcs_raw): Adjust.
11076         (arm_get_next_pcs_raw): Adjust.
11077         (arm_get_next_pcs): Adjust.
11078         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11079         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11080         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11081         (alpha_software_single_step): Adjust.
11082         * alpha-tdep.h (alpha_software_single_step): Adjust.
11083         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11084         * arm-tdep.c (arm_software_single_step): Adjust.
11085         (arm_breakpoint_kind_from_current_state): Adjust.
11086         * arm-tdep.h (arm_software_single_step): Adjust.
11087         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11088         * cris-tdep.c (cris_software_single_step): Adjust.
11089         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11090         (micromips_deal_with_atomic_sequence): Adjust.
11091         (deal_with_atomic_sequence): Adjust.
11092         (mips_software_single_step): Adjust.
11093         * mips-tdep.h (mips_software_single_step): Adjust.
11094         * moxie-tdep.c (moxie_software_single_step): Adjust.
11095         * nios2-tdep.c (nios2_software_single_step): Adjust.
11096         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11097         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11098         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11099         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11100         * sparc-tdep.c (sparc_software_single_step): Adjust.
11101         * spu-tdep.c (spu_software_single_step): Adjust.
11102         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11103
11104 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11105
11106         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11107         * gdbarch.h: Re-generate.
11108
11109 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11110
11111         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11112         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11113         * python/py-instruction.c, python/py-instruction.h: New file.
11114         * python/py-record.c: Add py-instruction.h include.
11115         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11116         gdb.RecordInstruction.
11117         * python/python-internal.h: Add gdbpy_initialize_instruction
11118         declaration.
11119         * python/python.c (do_start_initialization): Add
11120         gdbpy_initialize_instruction.
11121
11122 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11123
11124         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11125         Remove.
11126         (btrace_func_from_recpy_func): New function.
11127         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11128         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11129         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11130         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11131         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11132         Also, use new helper functions.
11133         (btpy_list_item): Use new helper functions.
11134         (recpy_bt_function_call_history): Use new type name.
11135         (btpy_call_getset): Remove.
11136         (gdbpy_initialize_btrace): Remove code to initialize
11137         gdb.BtraceFunctionCall.
11138         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11139         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11140         recpy_bt_func_prev, recpy_bt_func_next): New export.
11141         * python/py-record.c (recpy_func_type): New static object.
11142         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11143         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11144         recpy_func_next): New function.
11145         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11146         (recpy_func_getset): New static object.
11147         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11148         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11149
11150 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11151
11152         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11153         (btpy_object, btpy_insn_type, btpy_new): Remove.
11154         (btpy_list_object): Use gdb.RecordInstruction type instead of
11155         gdb.BtraceInstruction type.
11156         (btrace_insn_from_recpy_insn): New function.
11157         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11158         btpy_new.
11159         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11160         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11161         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11162         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11163         instead of btpy_object.
11164         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11165         btpy_insn_data, btpy_insn_decode): Rename to ...
11166         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11167         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11168         recpy_bt_insn_decode): This.  Also, use new helper functions.
11169         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11170         recpy_insn_type.
11171         (btpy_insn_getset): Remove.
11172         (gdbpy_initialize_btrace): Remove code to initialize
11173         gdb.BtraceInstruction.  Use recpy_element_object.
11174         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11175         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11176         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11177         * python/py-record.c (recpy_insn_type): New static object.
11178         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11179         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11180         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11181         New function.
11182         (recpy_insn_getset): New static object.
11183         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11184         * python/py-record.h (recpy_element_object): New typedef.
11185         (recpy_insn_type, recpy_insn_new): New export.
11186
11187 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11188
11189         * py-record-btrace.c (btpy_insn_new): Removed.
11190         (btpy_insn_or_gap_new): New function.
11191         (btpy_insn_error): Removed.
11192         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11193         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11194         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11195         btpy_insn_or_gap_new instead of btpy_insn_new.
11196         (btpy_insn_getset): Remove btpy_insn_error.
11197         * py-record.c (recpy_gap_type): New static object.
11198         (recpy_gap_object): New typedef.
11199         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11200         recpy_gap_reason_string): New function.
11201         (recpy_gap_getset): New static object.
11202         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11203         * py-record.h (recpy_gap_new): New export.
11204
11205 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11206
11207         * python/py-record.c (recpy_ptid): Remove.
11208         (recpy_record_getset): Remove recpy_ptid.
11209
11210 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11211
11212         * btrace.c (btrace_fetch): Set inferior_ptid.
11213         * python/py-record-btrace.c: Add "py-record.h" include.
11214         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11215         recpy_bt_end, recpy_bt_instruction_history,
11216         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11217         in gdb.Record object instead of current ptid.
11218         * python/py-record.c: Include new "py-record.h" file.
11219         (recpy_record_object): Moved to py-record.h.
11220         * python/py-record.h: New file.
11221
11222 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11223
11224         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11225         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11226         indentation.
11227
11228 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11229
11230         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11231         the past maintainers section.
11232
11233 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11234
11235         * infcmd.c (get_return_value): Use regcache ctor, and remove
11236         cleanup.
11237
11238 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11239             Pedro Alves  <palves@redhat.com>
11240
11241         * regcache.c (regcache::regcache): New tag dispatch ctor.
11242         (do_cooked_read): Moved above.
11243         (regcache_dup): Use the tag dispatch ctor..
11244         * regcache.h (regcache): Declare ctor, delete copy ctor and
11245         assignment operator, remove friend regcache_dup.
11246
11247 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11248
11249         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11250         call method save instead of regcache_cpy.
11251         * regcache.h (struct regcache): Make regcache_dup a friend.
11252
11253 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11254
11255         * regcache.c (struct regcache): Move to regcache.h
11256         (regcache::arch): New method.
11257         (regcache_get_ptid): Update.
11258         (get_regcache_arch): Call arch method.
11259         (get_regcache_aspace): Call method aspace.
11260         (register_buffer): Change it to method.
11261         (regcache_save): Change it to regcache::save.
11262         (regcache_restore): Likewise.
11263         (regcache_cpy_no_passthrough): Remove the declaration.
11264         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11265         (regcache_cpy_no_passthrough): Change it to method
11266         cpy_no_passthrough.
11267         (regcache_register_status): Change it to method
11268         get_register_status.
11269         (regcache_invalidate): Change it to method invalidate.
11270         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11271         (regcache_raw_update): Change it to method raw_update.
11272         (regcache_raw_read): Likewise.
11273         (regcache_raw_read_signed): Likewise.
11274         (regcache_raw_read_unsigned): Likewise.
11275         (regcache_raw_write_signed): Likewise.
11276         (regcache_raw_write_unsigned): Likewise.
11277         (regcache_cooked_read): Likewise.
11278         (regcache_cooked_read_value): Likewise.
11279         (regcache_cooked_read_signed): Likewise.
11280         (regcache_cooked_read_unsigned): Likewise.
11281         (regcache_cooked_write_signed): Likewise.
11282         (regcache_cooked_write_unsigned): Likewise.
11283         (regcache_raw_set_cached_value): Likewise.
11284         (regcache_raw_write): Likewise.
11285         (regcache_cooked_write): Likewise.
11286         (regcache_xfer_part): Likewise.
11287         (regcache_raw_read_part): Likewise.
11288         (regcache_raw_write_part): Likewise.
11289         (regcache_cooked_read_part): Likewise.
11290         (regcache_cooked_write_part): Likewise.
11291         (regcache_raw_supply): Likewise.
11292         (regcache_raw_collect): Likewise.
11293         (regcache_transfer_regset): Likewise.
11294         (regcache_supply_regset): Likewise.
11295         (regcache_collect_regset): Likewise.
11296         (regcache_debug_print_register): Likewise.
11297         (enum regcache_dump_what): Move it to regcache.h.
11298         (regcache_dump): Change it to method dump.
11299         * regcache.h (enum regcache_dump_what): New.
11300         (class regcache): New.
11301         * target.c (target_fetch_registers): Call method
11302         debug_print_register.
11303         (target_store_registers): Likewise.
11304
11305 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11306
11307         * windows-nat.c (struct lm_info_windows): Initialize field.
11308         (windows_make_so): Allocate lm_info_windows with new.
11309         (windows_free_so): Free lm_info_windows with delete.
11310
11311 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11312
11313         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11314         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11315         cleanup.
11316         (darwin_free_so): Free lm_info_darwin with delete.
11317
11318 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11319
11320         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11321         <l_addr_p>: Change type to bool.
11322         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11323         (svr4_free_so): Free lm_info_svr4 with delete.
11324         (svr4_copy_library_list): Replace memcpy with call to copy
11325         constructor.
11326         (library_list_start_library, svr4_default_sos): Allocate
11327         lm_info_svr4 with new.
11328
11329 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11330
11331         * solib-target.c (struct lm_info_target): Add destructor,
11332         initialize fields.
11333         <name>: Change type to std::string.
11334         (library_list_start_library): Allocate lm_info_target with new.
11335         (solib_target_free_library_list): Free lm_info_target with
11336         delete.
11337         (solib_target_current_sos): Adapt to std::string.
11338         (solib_target_free_so): Free lm_info_target with delete.
11339
11340 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11341
11342         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11343         fields.
11344         (frv_current_sos): Allocate lm_info_frv with new.
11345         (frv_relocate_main_executable): Free lm_info_frv with delete,
11346         allocate with new.
11347         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11348
11349 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11350
11351         * solib-frv.c (struct lm_info_frv): Fix indentation.
11352
11353 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11354
11355         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11356         map field.
11357         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11358         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11359         and allocate with new.
11360         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11361
11362 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11363
11364         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11365         <filename, member_name>: Change type to std::string.
11366         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11367         (library_list_start_library): Allocate lm_info_aix with new.
11368         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11369         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11370         with copy constructor.
11371
11372 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11373
11374         * solist.h (struct lm_info): Remove.
11375         (struct lm_info_base): New class.
11376         (struct so_list) <lm_info>: Change type to lm_info_base *.
11377         * nto-tdep.c (struct lm_info): Remove.
11378         (lm_addr): Adjust.
11379         * solib-aix.c (struct lm_info): Rename to ...
11380         (struct lm_info_aix): ... this.  Extend lm_info_base.
11381         (lm_info_p): Rename to ...
11382         (lm_info_aix_p): ... this, and adjust.
11383         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11384         solib_aix_parse_libraries, library_list_start_library,
11385         solib_aix_free_library_list, solib_aix_parse_libraries,
11386         solib_aix_get_library_list,
11387         solib_aix_relocate_section_addresses, solib_aix_free_so,
11388         solib_aix_get_section_offsets,
11389         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11390         Adjust.
11391         (struct solib_aix_inferior_data) <library_list>: Adjust.
11392         * solib-darwin.c (struct lm_info): Rename to ...
11393         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11394         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11395         * solib-dsbt.c (struct lm_info): Rename to ...
11396         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11397         (struct dsbt_info) <main_executable_lm_info): Adjust.
11398         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11399         dsbt_relocate_section_addresses): Adjust.
11400         * solib-frv.c (struct lm_info): Rename to ...
11401         (struct lm_info_frv): ... this.  Extend lm_info_base.
11402         (main_executable_lm_info): Adjust.
11403         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11404         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11405         find_canonical_descriptor_in_load_object,
11406         frv_fdpic_find_canonical_descriptor): Adjust.
11407         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11408         to lm_info_svr4.
11409         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11410         svr4_clear_so, svr4_copy_library_list,
11411         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11412         svr4_current_sos, svr4_fetch_objfile_link_map,
11413         solist_update_incremental): Adjust.
11414         * solib-svr4.h (struct lm_info_svr4): Move here from
11415         solib-svr4.c.
11416         * solib-target.c (struct lm_info): Rename to ...
11417         (struct lm_info_target): ... this.  Extend lm_info_base.
11418         (lm_info_p): Rename to ...
11419         (lm_info_target_p): ... this.
11420         (solib_target_parse_libraries, library_list_start_segment,
11421         library_list_start_section, library_list_start_library,
11422         library_list_end_library, solib_target_free_library_list,
11423         solib_target_current_sos, solib_target_free_so,
11424         solib_target_relocate_section_addresses): Adjust.
11425         * windows-nat.c (struct lm_info): Rename to ...
11426         (struct lm_info_windows): ... this.  Extend lm_info_base.
11427         (windows_make_so, handle_load_dll, handle_unload_dll,
11428         windows_xfer_shared_libraries): Adjust.
11429
11430 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11431
11432         * solib-darwin.c (struct darwin_so_list): Remove.
11433         (darwin_current_sos): Allocate an so_list object instead of a
11434         darwin_so_list, separately allocate an lm_info object.
11435         (darwin_free_so): Free lm_info.
11436
11437 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11438
11439         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11440         with fprintf_filtered.
11441
11442 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11443
11444         * regcache.c (regcache::regcache): New function.
11445         (regcache::~regcache): New function.
11446         (regcache_xmalloc_1): Remove.
11447         (regcache_xmalloc): Call new regcache.
11448         (regcache_xfree): Call delete regcache.
11449         (get_thread_arch_aspace_regcache): Call new regcache.
11450
11451 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11452
11453         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11454         lwp instead of ptid_get_lwp.
11455
11456 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11457
11458         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11459         lwp_info instead of getting from inferior_ptid.
11460
11461 2017-04-27  Keith Seitz  <keiths@redhat.com>
11462
11463         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11464         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11465         (CV_CONVERSION_BADNESS): Define.
11466         (rank_one_type): Remove overly restrictive rvalue reference
11467         rank checks.
11468         Add cv-qualifier checks and subranks for type equality.
11469         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11470         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11471         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11472
11473 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11474
11475         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11476         count when creating the object.
11477
11478 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11479             Ulrich Weigand  <uweigand@de.ibm.com>
11480
11481         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11482         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11483         is used in AIX.
11484         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11485         (process_xcoff_symbol): Likewise.
11486         (scan_xcoff_symtab): Likewise.
11487
11488 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11489
11490         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11491         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11492         (ia64_access_reg): Use get_frame_register_unsigned.
11493         (ia64_access_rse_reg): Likewise.
11494         (ia64_libunwind_frame_prev_register): Likewise.
11495
11496 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11497
11498         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11499         * gdbarch.c: Regenerated.
11500         * gdbarch.h: Regenerated.
11501         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11502         visibility external.
11503         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11504         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11505         (enum cfa_how_kind): Move to ...
11506         (struct dwarf2_frame_state_reg_info): Likewise.
11507         (struct dwarf2_frame_state): Likewise.
11508         * dwarf2-frame.h: ... here.
11509         (dwarf2_frame_state_alloc_regs): New declaration.
11510         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11511         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11512
11513 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11514
11515         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11516         regcache_raw_read_unsigned.
11517         (xtensa_pseudo_register_write): Likewise.
11518
11519 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11520
11521         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11522         (nds32_pseudo_register_write): Likewise.
11523
11524 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11525
11526         * regcache.c (struct regcache) <readonly_p>: Change its type
11527         to bool.
11528         (regcache_xmalloc_1): Update parameter type and callers update.
11529
11530 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11531
11532         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11533         set_gdbarch_wchar_bit.
11534         * arm-tdep.c (arm_gdbarch_init): Likewise.
11535
11536 2017-04-25  Pedro Alves  <palves@redhat.com>
11537
11538         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11539         (BothAreRelocatable, memcopy, memmove): Don't define.
11540         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11541         macros.
11542
11543 2017-04-25  Pedro Alves  <palves@redhat.com>
11544
11545         * common/common-defs.h: Include "common/poison.h".
11546         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11547         and adjust.
11548         * common/poison.h: New file.
11549         * common/traits.h: Include <type_traits>.
11550         (Not, Or, Requires): New, moved from common/function-view.h.
11551
11552 2017-04-25  Pedro Alves  <palves@redhat.com>
11553
11554         * breakpoint.h (struct breakpoint): In-class initialize all
11555         fields.  Make boolean fields "bool".
11556         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11557         memset call and initializations no longer necessary.
11558
11559 2017-04-25  Pedro Alves  <palves@redhat.com>
11560
11561         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11562         reference.
11563         (pt_btrace_insn): New function.
11564         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11565
11566 2017-04-25  Pedro Alves  <palves@redhat.com>
11567
11568         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11569         "base" field and inherit from "bp_location" instead.  Add
11570         non-default ctor.
11571         (allocate_location_exception): Use new non-default ctor.
11572         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11573         (init_bp_location): Convert to ...
11574         (bp_location::bp_location): ... this new ctor, and remove memset
11575         call.
11576         (base_breakpoint_allocate_location): Use the new non-default ctor.
11577         * breakpoint.h (bp_location): Now a class.  Declare default and
11578         non-default ctors.  In-class initialize all members.
11579         (init_bp_location): Remove declaration.
11580
11581 2017-04-25  Pedro Alves  <palves@redhat.com>
11582
11583         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11584         assignment operator.
11585
11586 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11587
11588         * doublest.c (convert_doublest_to_floatformat): Call
11589         floatformat_totalsize_bytes.
11590
11591 2017-04-22  Tom Tromey  <tom@tromey.com>
11592
11593         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11594         ui_out_emit_list.
11595         * stack.c (print_frame): Use ui_out_emit_list.
11596         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11597         ui_out_emit_list.
11598         * mi/mi-main.c (print_one_inferior)
11599         (mi_cmd_data_list_register_names)
11600         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11601         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11602         ui_out_emit_list.
11603         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11604         (mi_output_solib_attribs): Use ui_out_emit_list,
11605         ui_out_emit_tuple.
11606         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11607         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11608         (mi_cmd_stack_list_args, list_args_or_locals): Use
11609         ui_out_emit_list.
11610         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11611         * breakpoint.c (print_solib_event, output_thread_groups): Use
11612         ui_out_emit_list.
11613
11614 2017-04-22  Tom Tromey  <tom@tromey.com>
11615
11616         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11617         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11618         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11619
11620 2017-04-22  Tom Tromey  <tom@tromey.com>
11621
11622         * tracepoint.c (tvariables_info_1)
11623         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11624
11625 2017-04-22  Tom Tromey  <tom@tromey.com>
11626
11627         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11628         annotate_arg_emitter.
11629         * breakpoint.c (print_mention_watchpoint)
11630         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11631         * annotate.h (struct annotate_arg_emitter): New.
11632
11633 2017-04-22  Tom Tromey  <tom@tromey.com>
11634
11635         * record-btrace.c (record_btrace_insn_history)
11636         (record_btrace_insn_history_range, record_btrace_call_history)
11637         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11638         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11639         ui_out_emit_tuple.
11640         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11641         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11642         * skip.c (skip_info): Use ui_out_emit_tuple.
11643         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11644         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11645         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11646         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11647         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11648         ui_out_emit_tuple.
11649         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11650         (output_register, mi_cmd_data_read_memory)
11651         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11652         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11653         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11654         Use ui_out_emit_tuple.
11655         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11656         ui_out_emit_tuple.
11657         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11658         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11659         * linux-thread-db.c (info_auto_load_libthread_db): Use
11660         ui_out_emit_tuple.
11661         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11662         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11663         * disasm.c (do_mixed_source_and_assembly_deprecated)
11664         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11665         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11666         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11667         * breakpoint.c (print_one_breakpoint_location)
11668         (print_one_breakpoint): Use ui_out_emit_tuple.
11669         * auto-load.c (print_script, info_auto_load_cmd): Use
11670         ui_out_emit_tuple.
11671         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11672
11673 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11674
11675         * thread.c (print_thread_info_1): Remove dead code.
11676
11677 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11678
11679         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11680         GDB_SELF_TEST.
11681         * arm-tdep.c (selftests::arm_record_test): Likewise.
11682
11683 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11684
11685         * regcache.c (regcache_restore): Remove argument 2.  Replace
11686         argument 3 with regcache.  Get register status from
11687         src->register_status and get register contents from
11688         register_buffer (src, regnum).
11689         (regcache_cpy): Update.
11690
11691 2017-04-19  Pedro Alves  <palves@redhat.com>
11692
11693         * gdbthread.h (thread): Add missing closing parenthesis in
11694         comment.
11695
11696 2017-04-19  Pedro Alves  <palves@redhat.com>
11697
11698         * common/refcounted-object.h: New file.
11699         * gdbthread.h: Include "common/refcounted-object.h".
11700         (thread_info): Inherit from refcounted_object and add comments.
11701         (thread_info::incref, thread_info::decref)
11702         (thread_info::m_refcount): Delete.
11703         (thread_info::deletable): Use the refcounted_object::refcount()
11704         method.
11705         * inferior.c (current_inferior_): Add comment.
11706         (set_current_inferior): Increment/decrement refcounts.
11707         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11708         not-deletable instead of comparing with the current inferior.
11709         (initialize_inferiors): Increment the initial inferior's refcount.
11710         * inferior.h (struct inferior): Forward declare.
11711         Include "common/refcounted-object.h".
11712         (current_inferior, set_current_inferior): Move declaration to
11713         before struct inferior's definition, and fix comment.
11714         (inferior): Inherit from refcounted_object.  Add comments.
11715         * thread.c (switch_to_thread_no_regs): Reference the thread's
11716         inferior pointer directly instead of doing a ptid lookup.
11717         (switch_to_no_thread): New function.
11718         (switch_to_thread(thread_info *)): New function, factored out
11719         from ...
11720         (switch_to_thread(ptid_t)): ... this.
11721         (restore_current_thread): Delete.
11722         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11723         fields, and add 'inf' field.
11724         (do_restore_current_thread_cleanup): Check whether old->inf is
11725         alive instead of looking up an inferior by ptid.  Use
11726         switch_to_thread and switch_to_no_thread.
11727         (restore_current_thread_cleanup_dtor): Use old->inf directly
11728         instead of lookup up an inferior by id.  Decref the inferior.
11729         Don't restore 'removable'.
11730         (make_cleanup_restore_current_thread): Same the inferior pointer
11731         in old, instead of the inferior number.  Incref the inferior.
11732         Don't save/clear 'removable'.
11733
11734 2017-04-19  Pedro Alves  <palves@redhat.com>
11735
11736         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11737         unittests/scoped_restore-selftests.c.
11738         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11739         * common/scoped_restore.h (scoped_restore_base): Make "class".
11740         (scoped_restore_base::release): New public method.
11741         (scoped_restore_base::scoped_restore_base): New protected ctor.
11742         (scoped_restore_base::m_saved_var): New protected field.
11743         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11744         scoped_restore_base base class instead of m_saved_var directly.
11745         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11746         (scoped_restore_tmpl::scoped_restore_tmpl(const
11747         scoped_restore_tmpl<T>&)): Likewise.
11748         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11749         method.
11750         (scoped_restore_tmpl::saved_var): New method.
11751         (scoped_restore_tmpl::m_saved_var): Delete.
11752         * inferior.h (inferior::detaching): Now a bool.
11753         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11754         cleanup.
11755         * unittests/scoped_restore-selftests.c: New file.
11756
11757 2017-04-19  Pedro Alves  <palves@redhat.com>
11758
11759         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11760         Re-sort in alphabetic order.
11761
11762 2017-04-18  Pedro Alves  <palves@redhat.com>
11763
11764         * xml-support.c (obstack_xml_printf): Delete.
11765         * xml-support.h (obstack_xml_printf): Delete.
11766
11767 2017-04-18  Pedro Alves  <palves@redhat.com>
11768
11769         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11770         vdebug, verror, body_text, start_element, end_element, name,
11771         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11772         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11773         is_xinclude>: Make private and add m_ prefix.
11774         (gdb_xml_parser::body_text): New method, based on ...
11775         (gdb_xml_body_text): ... this.  Adjust.
11776         (gdb_xml_parser::vdebug): New method, based on ...
11777         (gdb_xml_debug): ... this.  Adjust.
11778         (gdb_xml_parser::verror): New method, based on ...
11779         (gdb_xml_error): ... this.  Adjust.
11780         (gdb_xml_parser::start_element): New method, based on ...
11781         (gdb_xml_start_element): ... this.  Adjust.
11782         (gdb_xml_start_element_wrapper): Defer to
11783         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11784         (gdb_xml_parser::end_element): New method, based on ...
11785         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11786         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11787         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11788         (gdb_xml_parser::use_dtd): New method, based on ...
11789         (gdb_xml_use_dtd): ... this.  Adjust.
11790         (gdb_xml_parser::parse): New method, based on ...
11791         (gdb_xml_parse): ... this.  Adjust.
11792         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11793         (xinclude_start_include): Adjust to call the parser's name method.
11794         (xml_xinclude_default, xml_xinclude_start_doctype)
11795         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11796         method.
11797         (xml_process_xincludes): Adjust to call parser methods.
11798         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11799         declarations.
11800
11801 2017-04-18  Pedro Alves  <palves@redhat.com>
11802
11803         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11804         gdb::optional<std::string>.
11805         * xml-support.c: Include <string>.
11806         (scope_level::scope_level(scope_level &&))
11807         (scope_level::~scope_level): Delete.
11808         (scope_level::body): Now a std::string.
11809         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11810         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11811         parameter.
11812         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11813         (xinclude_parsing_data::output): Now a std::string reference.
11814         (xinclude_start_include): Adjust.
11815         (xml_xinclude_default): Adjust.
11816         (xml_process_xincludes): Add 'output' parameter, and return bool.
11817         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11818         and return bool.
11819         * xml-tdesc.c: Include <unordered_map> and <string>.
11820         (tdesc_xml_cache): Delete.
11821         (tdesc_xml_cache_s): Delete.
11822         (xml_cache): Now an std::unordered_map.
11823         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11824         (target_fetch_description_xml): Change return type to
11825         gdb::optional<std::string>, and adjust.
11826         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11827         (target_fetch_description_xml): Change return type to
11828         gdb::optional<std::string>.
11829
11830 2017-04-18  Pedro Alves  <palves@redhat.com>
11831
11832         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11833         unittests/optional-selftests.c.
11834         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11835         * unittests/optional-selftests.c: New file.
11836         * unittests/optional/assignment/1.cc: New file.
11837         * unittests/optional/assignment/2.cc: New file.
11838         * unittests/optional/assignment/3.cc: New file.
11839         * unittests/optional/assignment/4.cc: New file.
11840         * unittests/optional/assignment/5.cc: New file.
11841         * unittests/optional/assignment/6.cc: New file.
11842         * unittests/optional/assignment/7.cc: New file.
11843         * unittests/optional/cons/copy.cc: New file.
11844         * unittests/optional/cons/default.cc: New file.
11845         * unittests/optional/cons/move.cc: New file.
11846         * unittests/optional/cons/value.cc: New file.
11847         * unittests/optional/in_place.cc: New file.
11848         * unittests/optional/observers/1.cc: New file.
11849         * unittests/optional/observers/2.cc: New file.
11850
11851 2017-04-18  Pedro Alves  <palves@redhat.com>
11852
11853         * common/gdb_optional.h: Include common/traits.h.
11854         (in_place_t): New type.
11855         (in_place): New constexpr variable.
11856         (optional::optional): Remove member initialization of
11857         m_instantiated.
11858         (optional::optional(in_place_t...)): New constructor.
11859         (optional::~optional): Use reset.
11860         (optional::optional(const optional&)): New.
11861         (optional::optional(const optional&&)): New.
11862         (optional::optional(T &)): New.
11863         (optional::optional(T &&)): New.
11864         (operator::operator=(const optional &)): New.
11865         (operator::operator=(optional &&)): New.
11866         (operator::operator= (const T &))
11867         (operator::operator= (T &&))
11868         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11869         (operator::reset): New.
11870         (operator::m_instantiated):: Add in-class initializer.
11871         * common/traits.h: Include <type_traits>.
11872         (struct And): New types.
11873
11874 2017-04-18  Pedro Alves  <palves@redhat.com>
11875
11876         * xml-support.c: Include <vector>.
11877         (scope_level::scope_level(const gdb_xml_element *))
11878         (scope_level::scope_level(scope_level&&)): New.
11879         (scope_level::~scope_level): New.
11880         (scope_level_s): Delete.
11881         (gdb_xml_parser::scopes): Now a std::vector.
11882         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11883         Use std::vector.
11884         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11885         scope cleanup code.
11886         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11887         of the scopes member.  Use std::vector::emplace_back.
11888
11889 2017-04-18  Pedro Alves  <palves@redhat.com>
11890
11891         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11892         a bool.
11893         (gdb_xml_end_element): Change type of first parameter.
11894         (gdb_xml_cleanup): Rename to ...
11895         (gdb_xml_parser::~gdb_xml_parser): ... this.
11896         (gdb_xml_create_parser_and_cleanup): Delete with ...
11897         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11898         to this new ctor.
11899         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11900         using gdb_xml_create_parser_and_cleanup.
11901         (xinclude_parsing_data): Add ctor/dtor.
11902         (xml_xinclude_cleanup): Delete.
11903         (xml_process_xincludes): Create a local xinclude_parsing_data
11904         instead of heap-allocating one.  Create a local gdb_xml_parser
11905         instead of heap-allocating one with
11906         gdb_xml_create_parser_and_cleanup.
11907
11908 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11909
11910         PR threads/20743
11911         * fbsd-nat.c (resume_one_thread_cb): Remove.
11912         (resume_all_threads_cb): Remove.
11913         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11914         iterate_over_threads.
11915
11916 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11917
11918         * NEWS: Create a new section for the next release branch.
11919         Rename the section of the current branch, now that it has
11920         been cut.
11921
11922 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11923
11924         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11925         * version.in: Bump version to 8.0.50.DATE-git.
11926
11927 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11928
11929         PR gdb/21385
11930         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11931         independently of the host, and fix build breakage on Cygwin.
11932
11933 2017-04-13  Pedro Alves  <palves@redhat.com>
11934
11935         * inferior.c (free_inferior): Convert to ...
11936         (inferior::~inferior): ... this dtor.
11937         (inferior::inferior): New ctor, factored out from ...
11938         (add_inferior_silent): ... here.  Allocate the inferior with a new
11939         expression.
11940         (delete_inferior): Call delete instead of free_inferior.
11941         * inferior.h (gdb_environ, continuation): Forward declare.
11942         (inferior): Now a class.  Add in-class initialization to all
11943         members.  Make boolean fields bool, except 'detaching'.
11944         (inferior::inferior): New explicit ctor.
11945         (inferior::~inferior): New.
11946
11947 2017-04-13  Pedro Alves  <palves@redhat.com>
11948
11949         * inferior.c (init_inferior_list): Delete.
11950         * inferior.h (init_inferior_list): Delete.
11951
11952 2017-04-13  Pedro Alves  <palves@redhat.com>
11953
11954         PR threads/13217
11955         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11956         (top level): Call it twice, with different thread sets.
11957
11958 2017-04-13  Pedro Alves  <palves@redhat.com>
11959
11960         * thread.c: Include <algorithm>.
11961         (thread_array_cleanup): Delete.
11962         (scoped_inc_dec_ref): New class.
11963         (live_threads_count): New function.
11964         (set_thread_refcount): Delete.
11965         (tp_array_compar_ascending): Now a bool.
11966         (tp_array_compar): Convert to a std::sort comparison function.
11967         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11968         and live_threads_count.
11969
11970 2017-04-13  Pedro Alves  <palves@redhat.com>
11971
11972         * infrun.c (follow_fork_inferior): Also switch the current
11973         inferior.
11974
11975 2017-04-13  Pedro Alves  <palves@redhat.com>
11976
11977         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11978         before calling create_internal_breakpoint.
11979
11980 2017-04-13  Pedro Alves  <palves@redhat.com>
11981
11982         * fork-child.c (execv_argv): New class.
11983         (breakup_args): Refactored as ...
11984         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11985         Copy arguments to storage and replace separators with NULL
11986         terminators in place.
11987         (escape_bang_in_quoted_argument): Adjust to return bool.
11988         (execv_argv::execv_argv): New ctor.
11989         (execv_argv::init_for_shell): New method, factored out from
11990         fork_inferior.  Don't strdup strings into the vector.
11991         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11992         Remove free_vector_argv call.
11993
11994 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11995
11996         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11997         tdep->rx_psw_type.
11998
11999 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12000
12001         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12002         * rx-tdep.c (rx_gdbarch_init): Likewise.
12003
12004 2017-04-13  Pedro Alves  <palves@redhat.com>
12005
12006         * breakpoint.h (struct breakpoint): Reindent.
12007
12008 2017-04-13  Pedro Alves  <palves@redhat.com>
12009
12010         * breakpoint.c (bp_location): Rename to ...
12011         (bp_locations): ... this.  All references updated.
12012         (bp_location_count): Rename to ...
12013         (bp_locations_count): ... this.  All references updated.
12014         (bp_location_placed_address_before_address_max): Rename to ...
12015         (bp_locations_placed_address_before_address_max): ... this.  All
12016         references updated.
12017         (bp_location_shadow_len_after_address_max): Rename to ...
12018         (bp_locations_shadow_len_after_address_max): ... this.  All
12019         references updated.
12020         (bp_location_compare_addrs): Rename to ...
12021         (bp_locations_compare_addrs): ... this.  All references updated.
12022         (bp_location_compare):Rename to ...
12023         (bp_locations_compare): ... this.  All references updated.
12024         (bp_location_target_extensions_update): Rename to ...
12025         (bp_locations_target_extensions_update): ... this.  All references
12026         updated.
12027
12028 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12029
12030         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12031         * common/common.m4: Check headers 'termios.h', 'termio.h' and
12032         'sgtty.h'.
12033         * common/gdb_termios.h: New file, with parts of "terminal.h".
12034         * inflow.c: Include "gdb_termios.h".
12035         * ser-unix.c: Include "gdb_termios.h".
12036         * terminal.h: Move terminal-related defines to
12037         "common/gdb_termios.h".
12038
12039 2017-04-12  Tom Tromey  <tom@tromey.com>
12040
12041         * probe.c (parse_probes): Update.
12042         * location.h (delete_event_location): Don't declare.
12043         (event_location_deleter::operator()): Update.
12044         * location.c (event_location_deleter::operator()): Rename from
12045         delete_event_location.
12046         * linespec.h (linespec_result) <location>: Change type to
12047         event_location_up.
12048         * linespec.c (canonicalize_linespec, event_location_to_sals)
12049         (decode_objc): Update.
12050         (linespec_result): Don't call delete_event_location.
12051         * breakpoint.c (create_breakpoints_sal)
12052         (bkpt_probe_create_sals_from_location)
12053         (strace_marker_create_sals_from_location): Update.
12054
12055 2017-04-12  Tom Tromey  <tom@tromey.com>
12056
12057         * linespec.h (struct linespec_result): Add constructor and
12058         destructor.
12059         (init_linespec_result, destroy_linespec_result)
12060         (make_cleanup_destroy_linespec_result): Don't declare.
12061         * linespec.c (init_linespec_result): Remove.
12062         (linespec_result::~linespec_result): Rename from
12063         destroy_linespec_result.  Update.
12064         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12065         Remove.
12066         * breakpoint.c (create_breakpoint, break_range_command)
12067         (decode_location_default): Update.
12068         * ax-gdb.c (agent_command_1): Update.
12069
12070 2017-04-12  Tom Tromey  <tom@tromey.com>
12071
12072         * remote.c (remote_download_tracepoint): Update.
12073         * python/py-breakpoint.c (bppy_get_location): Update.
12074         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12075         (gdbscm_breakpoint_location): Update.
12076         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12077         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12078         Change type to event_location_up.
12079         * breakpoint.c (create_overlay_event_breakpoint)
12080         (create_longjmp_master_breakpoint)
12081         (create_std_terminate_master_breakpoint)
12082         (create_exception_master_breakpoint)
12083         (breakpoint_event_location_empty_p, print_breakpoint_location)
12084         (print_one_breakpoint_location, create_thread_event_breakpoint)
12085         (init_breakpoint_sal, create_breakpoint)
12086         (print_recreate_ranged_breakpoint, break_range_command)
12087         (init_ada_exception_breakpoint, say_where): Update.
12088         (base_breakpoint_dtor): Don't call delete_event_location.
12089         (bkpt_print_recreate, tracepoint_print_recreate)
12090         (dprintf_print_recreate, update_static_tracepoint)
12091         (breakpoint_re_set_default): Update.
12092
12093 2017-04-12  Tom Tromey  <tom@tromey.com>
12094
12095         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12096         type of "to_do".  Update.
12097         (compute_stack_depth): Use std::vector.
12098
12099 2017-04-12  Tom Tromey  <tom@tromey.com>
12100
12101         * printcmd.c (find_instruction_backward): Use std::vector.
12102
12103 2017-04-12  Tom Tromey  <tom@tromey.com>
12104
12105         * symfile.c (objfilep): Remove typedef.
12106         (reread_symbols): Use a std::vector.
12107
12108 2017-04-12  Tom Tromey  <tom@tromey.com>
12109
12110         * mi/mi-main.c (exec_direction_forward): Remove.
12111         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12112         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12113         scoped_restore.
12114         * guile/guile.c (guile_repl_command, guile_command)
12115         (gdbscm_execute_gdb_command): Use scoped_restore.
12116         * go-exp.y (go_parse): Use scoped_restore.
12117         * d-exp.y (d_parse): Use scoped_restore.
12118         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12119         * c-exp.y (c_parse): Use scoped_restore.
12120
12121 2017-04-12  Tom Tromey  <tom@tromey.com>
12122
12123         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12124         (mi_parse): Update return type.
12125         (mi_parse_free): Remove.
12126         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12127         (mi_parse::~mi_parse): Rename from mi_parse_free.
12128         (mi_parse_cleanup): Remove.
12129         (mi_parse): Return a unique_ptr.  Use new.
12130         * mi/mi-main.c (mi_execute_command): Update.
12131
12132 2017-04-12  Tom Tromey  <tom@tromey.com>
12133
12134         * location.c (explicit_location_lex_one): Return a
12135         unique_xmalloc_ptr.
12136         (string_to_explicit_location): Update.  Remove cleanups.
12137
12138 2017-04-12  Tom Tromey  <tom@tromey.com>
12139
12140         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12141         (compare_value_and_voffset): Change type.  Update.
12142         (compute_vtable_size): Change type of "offset_vec".
12143         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12144         (gnuv3_get_typeid): Remove extraneous declaration.
12145
12146 2017-04-12  Tom Tromey  <tom@tromey.com>
12147
12148         * charset.h (wchar_iterator): Fix comment.
12149
12150 2017-04-12  Tom Tromey  <tom@tromey.com>
12151
12152         * charset.c (iconv_wrapper): New class.
12153         (cleanup_iconv): Remove.
12154         (convert_between_encodings): Use it.
12155
12156 2017-04-12  Tom Tromey  <tom@tromey.com>
12157
12158         * symfile.h (increment_reading_symtab): Update type.
12159         * symfile.c (decrement_reading_symtab): Remove.
12160         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12161         * psymtab.c (psymtab_to_symtab): Update.
12162         * dwarf2read.c (dw2_instantiate_symtab): Update.
12163
12164 2017-04-12  Tom Tromey  <tom@tromey.com>
12165
12166         * jit.c (struct jit_reader): Declare separately.  Add constructor
12167         and destructor.  Change type of "handle".
12168         (loaded_jit_reader): Define separately.
12169         (jit_reader_load): Update.  New "new".
12170         (jit_reader_unload_command): Use "delete".
12171         * gdb-dlfcn.h (struct dlclose_deleter): New.
12172         (gdb_dlhandle_up): New typedef.
12173         (gdb_dlopen, gdb_dlsym): Update types.
12174         (gdb_dlclose): Remove.
12175         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12176         (gdb_dlsym): Change type of "handle".
12177         (make_cleanup_dlclose): Remove.
12178         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12179         * compile/compile-c-support.c (load_libcc): Update.
12180
12181 2017-04-12  Tom Tromey  <tom@tromey.com>
12182
12183         * symtab.h (find_pcs_for_symtab_line): Change return type.
12184         * symtab.c (find_pcs_for_symtab_line): Change return type.
12185         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12186         type of "vec".  Update.
12187         (ltpy_get_pcs_for_line): Update.
12188         * linespec.c (decode_digits_ordinary): Update.
12189
12190 2017-04-12  Tom Tromey  <tom@tromey.com>
12191
12192         * tracepoint.c (actions_command): Update.
12193         * python/python.c (python_command, python_interactive_command):
12194         Update.
12195         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12196         * guile/guile.c (guile_command): Update.
12197         * defs.h (read_command_lines, read_command_lines_1): Return
12198         command_line_up.
12199         (command_lines_deleter): New struct.
12200         (command_line_up): New typedef.
12201         * compile/compile.c (compile_code_command)
12202         (compile_print_command): Update.
12203         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12204         command_line_up.
12205         (make_cleanup_free_command_lines): Remove.
12206         * cli/cli-script.c (get_command_line, read_command_lines_1)
12207         (copy_command_lines): Return command_line_up.
12208         (while_command, if_command, read_command_lines, define_command)
12209         (document_command): Update.
12210         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12211         Remove.
12212         * breakpoint.h (breakpoint_set_commands): Change type of
12213         "commands".
12214         * breakpoint.c (breakpoint_set_commands): Change type of
12215         "commands".  Update.
12216         (do_map_commands_command, update_dprintf_command_list)
12217         (create_tracepoint_from_upload): Update.
12218
12219 2017-04-12  Tom Tromey  <tom@tromey.com>
12220
12221         * tracepoint.c (scope_info): Update.
12222         * spu-tdep.c (spu_catch_start): Update.
12223         * python/python.c (gdbpy_decode_line): Update.
12224         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12225         * python/py-breakpoint.c (bppy_init): Update.
12226         * probe.c (parse_probes): Update.
12227         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12228         * location.h (event_location_deleter): New struct.
12229         (event_location_up): New typedef.
12230         (new_linespec_location, new_address_location, new_probe_location)
12231         (new_explicit_location, copy_event_location)
12232         (string_to_event_location, string_to_event_location_basic)
12233         (string_to_explicit_location): Update return type.
12234         (make_cleanup_delete_event_location): Remove.
12235         * location.c (new_linespec_location, new_address_location)
12236         (new_probe_location, new_explicit_location, copy_event_location):
12237         Return event_location_up.
12238         (delete_event_location_cleanup)
12239         (make_cleanup_delete_event_location): Remove.
12240         (string_to_explicit_location, string_to_event_location_basic)
12241         (string_to_event_location): Return event_location_up.
12242         * linespec.c (canonicalize_linespec, event_location_to_sals)
12243         (decode_line_with_current_source)
12244         (decode_line_with_last_displayed, decode_objc): Update.
12245         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12246         * completer.c (location_completer): Update.
12247         * cli/cli-cmds.c (edit_command, list_command): Update.
12248         * breakpoint.c (create_overlay_event_breakpoint)
12249         (create_longjmp_master_breakpoint)
12250         (create_std_terminate_master_breakpoint)
12251         (create_exception_master_breakpoint)
12252         (create_thread_event_breakpoint): Update.
12253         (init_breakpoint_sal): Update.  Remove some dead code.
12254         (create_breakpoint_sal): Change type of "location".  Update.
12255         (create_breakpoints_sal, create_breakpoint, break_command_1)
12256         (dprintf_command, break_range_command, until_break_command)
12257         (init_ada_exception_breakpoint)
12258         (strace_marker_create_sals_from_location)
12259         (update_static_tracepoint, trace_command, ftrace_command)
12260         (strace_command, create_tracepoint_from_upload): Update.
12261         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12262         * ax-gdb.c (agent_command_1): Update.
12263
12264 2017-04-12  Pedro Alves  <palves@redhat.com>
12265
12266         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12267         * configure.tgt: Handle i[34567]86-*-go32* and
12268         i[34567]86-*-msdosdjgpp*.
12269         * i386-tdep.c (i386_svr4_reg_to_regnum):
12270         Make extern.
12271         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12272         i386-go32-tdep.c.
12273         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12274         * i386-go32-tdep.c: New file.
12275         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12276         declarations.
12277
12278 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12279
12280         * aix-thread.c (pd_status2str): Change return type to const char *.
12281
12282 2017-04-12  Pedro Alves  <palves@redhat.com>
12283
12284         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12285         calls to set_gdbarch_gnu_triplet_regexp.
12286
12287 2017-04-12  Pedro Alves  <palves@redhat.com>
12288
12289         PR gdb/21323
12290         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12291         New enum value.
12292         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12293         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12294         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12295         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12296         * gdbarch.h, gdbarch.c: Regenerate.
12297         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12298         gdbarch_wchar_bit and gdbarch_wchar_signed.
12299         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12300         * arm-tdep.c (arm_gdbarch_init): Likewise.
12301         * avr-tdep.c (avr_gdbarch_init): Likewise.
12302         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12303         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12304         * i386-tdep.c (i386_go32_init_abi): Likewise.
12305         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12306         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12307         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12308         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12309         * sh-tdep.c (sh_gdbarch_init): Likewise.
12310         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12311         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12312         * windows-tdep.c (windows_init_abi): Likewise.
12313         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12314
12315 2017-04-12  Pedro Alves  <palves@redhat.com>
12316
12317         PR c++/21323
12318         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12319         cplus_primitive_type_char32_t>: New enum values.
12320         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12321         and cplus_primitive_type_char32_t.
12322         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12323         32, use the archtecture's built-in type for char16_t and char32_t,
12324         respectively.  Otherwise, fallback to init_integer_type as before,
12325         but make the type unsigned, and issue a complaint.
12326         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12327
12328 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12329
12330         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12331         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12332
12333 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12334
12335         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12336         'const char *'.
12337
12338 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12339
12340         * common/common-utils.c (free_vector_argv): New function.
12341         * common/common-utils.h: Include <vector>.
12342         (free_vector_argv): New prototype.
12343         * darwin-nat.c (darwin_create_inferior): Rewrite function
12344         prototype in order to constify "exec_file" and accept a
12345         "std::string" for "allargs".
12346         * fork-child.c: Include <vector>.
12347         (breakup_args): Rewrite function, using C++.
12348         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12349         and accept "std::string" for "allargs".  Update the code to
12350         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12351         and "execvp".
12352         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12353         order to constify "exec_file" and accept a "std::string" for
12354         "allargs".
12355         * go32-nat.c (go32_create_inferior): Likewise.
12356         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12357         * infcmd.c (run_command_1): Constify "exec_file".  Use
12358         "std::string" for inferior arguments.
12359         * inferior.h (fork_inferior): Update prototype.
12360         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12361         prototype in order to constify "exec_file" and accept a
12362         "std::string" for "allargs".
12363         * nto-procfs.c (procfs_create_inferior): Likewise.
12364         * procfs.c (procfs_create_inferior): Likewise.
12365         * remote-sim.c (gdbsim_create_inferior): Likewise.
12366         * remote.c (extended_remote_run): Update code to accept
12367         "std::string" as argument.
12368         (extended_remote_create_inferior): Rewrite function prototype in
12369         order to constify "exec_file" and accept a "std::string" for
12370         "allargs".
12371         * rs6000-nat.c (super_create_inferior): Likewise.
12372         (rs6000_create_inferior): Likewise.
12373         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12374         * windows-nat.c (windows_create_inferior): Likewise.
12375
12376 2017-04-11  Pedro Alves  <palves@redhat.com>
12377
12378         * thread.c: Fix whitespace throughout.
12379
12380 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12381
12382         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12383
12384 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12385
12386         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12387
12388 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12389
12390         PR gdb/21364
12391         * osdata.c (info_osdata): Check if 'type' is an empty string
12392         instead of NULL.
12393
12394 2017-04-10  Pedro Alves  <palves@redhat.com>
12395
12396         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12397         (ptid_to_global_thread_id, in_thread_list)
12398         (do_captured_list_thread_ids, set_resumed, set_running)
12399         (set_executing, set_stop_requested, finish_thread_state)
12400         (validate_registers_access, can_access_registers_ptid)
12401         (print_thread_info_1, switch_to_thread)
12402         (do_restore_current_thread_cleanup)
12403         (make_cleanup_restore_current_thread, thread_command)
12404         (thread_name_command): Use operator== instead of ptid_equal.
12405
12406 2017-04-10  Pedro Alves  <palves@redhat.com>
12407
12408         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12409         (current_thread_cleanup_chain): Delete.
12410         (restore_current_thread_cleanup_dtor)
12411         (make_cleanup_restore_current_thread): Remove references to
12412         current_thread_cleanup_chain.
12413
12414 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12415
12416         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12417         REG_UNKNOWN.
12418
12419 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12420
12421         PR gdb/19942
12422         * gdbthread.h (thread_info::deletable): New method.
12423         (thread_info::incref): New method.
12424         (thread_info::decref): New method.
12425         (thread_info::refcount): Move it to private.
12426         * infrun.c (save_stop_context): Call inc_refcount.
12427         (release_stop_context_cleanup): Likewise.
12428         * thread.c (set_thread_exited): New function.
12429         (init_thread_list): Delete "tp" only it is deletable, otherwise
12430         call set_thread_exited.
12431         (delete_thread_1): Call set_thread_exited.
12432         (current_thread_cleanup) <inferior_pid>: Remove.
12433         <thread>: New field.
12434         (restore_current_thread_ptid_changed): Removed.
12435         (do_restore_current_thread_cleanup): Adjust.
12436         (restore_current_thread_cleanup_dtor): Don't call
12437         find_thread_ptid.
12438         (set_thread_refcount): Use dec_refcount.
12439         (make_cleanup_restore_current_thread): Adjust.
12440         (thread_apply_all_command): Call inc_refcount.
12441         (_initialize_thread): Don't call
12442         observer_attach_thread_ptid_changed.
12443
12444 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12445
12446         * thread.c (delete_thread_1): Hoist code on marking thread as
12447         exited.
12448
12449 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12450
12451         * windows-nat.c (windows_detach): Initialize ptid with
12452         minus_one_ptid.
12453
12454 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12455
12456         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12457
12458 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12459
12460         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12461         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12462         (bfin_pseudo_register_write): Likewise
12463
12464 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12465
12466         * common/ptid.h (struct ptid): Change to...
12467         (class ptid_t): ... this.
12468         <ptid_t>: New constructors.
12469         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12470         matches>: New methods.
12471         <make_null, make_minus_one>: New static methods.
12472         <pid>: Rename to...
12473         <m_pid>: ...this.
12474         <lwp>: Rename to...
12475         <m_lwp>: ...this.
12476         <tid>: Rename to...
12477         <m_tid>: ...this.
12478         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12479         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12480         as references, move comment to class ptid_t.
12481         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12482         ptid_t static methods.
12483         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12484         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12485         Take ptid arguments as references, implement using ptid_t methods.
12486         * unittests/ptid-selftests.c: New file.
12487         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12488         unittests/ptid-selftests.c.
12489         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12490
12491 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12492
12493         * python/python.c (python_run_simple_file): Cast mode literal to
12494         non-const char pointer as expected by PyFile_FromString.
12495
12496 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12497
12498         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12499         minus_one_ptid and null_ptid.
12500
12501 2017-04-05  Pedro Alves  <palves@redhat.com>
12502
12503         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12504         * configure: Regenerate.
12505
12506 2017-04-05  Pedro Alves  <palves@redhat.com>
12507
12508         * ada-exp.y (yyerror): Constify.
12509         * ada-lang.c (bound_name, get_selections)
12510         (ada_variant_discrim_type)
12511         (ada_variant_discrim_name, ada_value_struct_elt)
12512         (ada_lookup_struct_elt_type, is_unchecked_variant)
12513         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12514         (catch_ada_exception_command_split)
12515         (catch_ada_assert_command_split, catch_assert_command)
12516         (ada_op_name): Constify.
12517         * ada-lang.h (ada_yyerror, get_selections)
12518         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12519         * arc-tdep.c (arc_print_frame_cache): Constify.
12520         * arm-tdep.c (arm_skip_stub): Constify.
12521         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12522         (gen_aggregate_elt_ref): Constify.
12523         * bcache.c (print_bcache_statistics): Constify.
12524         * bcache.h (print_bcache_statistics): Constify.
12525         * break-catch-throw.c (catch_exception_command_1):
12526         * breakpoint.c (struct ep_type_description::description):
12527         Constify.
12528         (add_solib_catchpoint): Constify.
12529         (catch_fork_command_1): Add cast.
12530         (add_catch_command): Constify.
12531         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12532         Constify.
12533         * bsd-uthread.c (bsd_uthread_state): Constify.
12534         * buildsym.c (patch_subfile_names): Constify.
12535         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12536         Constify.
12537         * c-exp.y (yyerror): Constify.
12538         (token::oper): Constify.
12539         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12540         * c-varobj.c (cplus_describe_child): Constify.
12541         * charset.c (find_charset_names): Add cast.
12542         (find_charset_names): Constify array and add const_cast.
12543         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12544         (edit_command): Constify.
12545         * cli/cli-decode.c (lookup_cmd): Constify.
12546         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12547         Constify.
12548         (struct dump_context): Constify.
12549         (add_dump_command, restore_command): Constify.
12550         * cli/cli-script.c (get_command_line): Constify.
12551         * cli/cli-script.h (get_command_line): Constify.
12552         * cli/cli-utils.c (check_for_argument): Constify.
12553         * cli/cli-utils.h (check_for_argument): Constify.
12554         * coff-pe-read.c (struct read_pe_section_data): Constify.
12555         * command.h (lookup_cmd): Constify.
12556         * common/print-utils.c (decimal2str): Constify.
12557         * completer.c (gdb_print_filename): Constify.
12558         * corefile.c (set_gnutarget): Constify.
12559         * cp-name-parser.y (yyerror): Constify.
12560         * cp-valprint.c (cp_print_class_member): Constify.
12561         * cris-tdep.c (cris_register_name, crisv32_register_name):
12562         Constify.
12563         * d-exp.y (yyerror): Constify.
12564         (struct token::oper): Constify.
12565         * d-lang.h (d_yyerror): Constify.
12566         * dbxread.c (struct header_file_location::name): Constify.
12567         (add_old_header_file, add_new_header_file, last_function_name)
12568         (dbx_next_symbol_text, add_bincl_to_list)
12569         (find_corresponding_bincl_psymtab, set_namestring)
12570         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12571         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12572         * defs.h (command_line_input, print_address_symbolic)
12573         (deprecated_readline_begin_hook): Constify.
12574         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12575         Constify.
12576         * event-top.c (handle_line_of_input): Constify and add cast.
12577         * exceptions.c (catch_errors): Constify.
12578         * exceptions.h (catch_errors): Constify.
12579         * expprint.c (print_subexp_standard, op_string, op_name)
12580         (op_name_standard, dump_raw_expression, dump_raw_expression):
12581         * expression.h (op_name, op_string, dump_raw_expression):
12582         Constify.
12583         * f-exp.y (yyerror): Constify.
12584         (struct token::oper): Constify.
12585         (struct f77_boolean_val::name): Constify.
12586         * f-lang.c (f_word_break_characters): Constify.
12587         * f-lang.h (f_yyerror): Constify.
12588         * fork-child.c (fork_inferior): Add cast.
12589         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12590         (new_variant): Constify.
12591         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12592         * gdbarch.c: Regenerate.
12593         * gdbcore.h (set_gnutarget): Constify.
12594         * go-exp.y (yyerror): Constify.
12595         (token::oper): Constify.
12596         * go-lang.h (go_yyerror): Constify.
12597         * go32-nat.c (go32_sysinfo): Constify.
12598         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12599         * guile/scm-cmd.c (cmdscm_function): Constify.
12600         * guile/scm-param.c (pascm_param_value): Constify.
12601         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12602         (h8300sx_register_name): Constify.
12603         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12604         Constify.
12605         * ia64-tdep.c (ia64_register_names): Constify.
12606         * infcmd.c (construct_inferior_arguments): Constify.
12607         (path_command, attach_post_wait): Constify.
12608         * language.c (show_range_command, show_case_command)
12609         (unk_lang_error): Constify.
12610         * language.h (language_defn::la_error)
12611         (language_defn::la_name_of_this): Constify.
12612         * linespec.c (decode_line_2): Constify.
12613         * linux-thread-db.c (thread_db_err_str): Constify.
12614         * lm32-tdep.c (lm32_register_name): Constify.
12615         * m2-exp.y (yyerror): Constify.
12616         * m2-lang.h (m2_yyerror): Constify.
12617         * m32r-tdep.c (m32r_register_names): Constify and make static.
12618         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12619         * m88k-tdep.c (m88k_register_name): Constify.
12620         * macroexp.c (appendmem): Constify.
12621         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12622         (upgrade_type, parse_external, parse_partial_symbols)
12623         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12624         (new_symbol): Constify.
12625         * memattr.c (mem_info_command): Constify.
12626         * mep-tdep.c (register_name_from_keyword): Constify.
12627         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12628         Constify.
12629         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12630         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12631         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12632         cast.
12633         (mi_execute_async_cli_command): Constify.
12634         * mips-tdep.c (mips_register_name): Constify.
12635         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12636         (am33_register_name, am33_2_register_name)
12637         * moxie-tdep.c (moxie_register_names): Constify.
12638         * nat/linux-osdata.c (osdata_type): Constify fields.
12639         * nto-tdep.c (nto_parse_redirection): Constify.
12640         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12641         (lookup_child_selector): Constify.
12642         (objc_methcall::name): Constify.
12643         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12644         (lookup_struct_typedef): Constify.
12645         * objfiles.c (pc_in_section): Constify.
12646         * objfiles.h (pc_in_section): Constify.
12647         * p-exp.y (struct token::oper): Constify.
12648         (yyerror): Constify.
12649         * p-lang.h (pascal_yyerror): Constify.
12650         * parser-defs.h (op_name_standard): Constify.
12651         (op_print::string): Constify.
12652         (exp_descriptor::op_name): Constify.
12653         * printcmd.c (print_address_symbolic): Constify.
12654         * psymtab.c (print_partial_symbols): Constify.
12655         * python/py-breakpoint.c (stop_func): Constify.
12656         (bppy_get_expression): Constify.
12657         * python/py-cmd.c (cmdpy_completer::name): Constify.
12658         (cmdpy_function): Constify.
12659         * python/py-event.c (evpy_add_attribute)
12660         (gdbpy_initialize_event_generic): Constify.
12661         * python/py-event.h (evpy_add_attribute)
12662         (gdbpy_initialize_event_generic): Constify.
12663         * python/py-evts.c (add_new_registry): Constify.
12664         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12665         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12666         * python/py-inferior.c (get_buffer): Add cast.
12667         * python/py-param.c (parm_constant::name): Constify.
12668         * python/py-unwind.c (fprint_frame_id): Constify.
12669         * python/python.c (gdbpy_parameter_value): Constify.
12670         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12671         * remote.c (memory_packet_config::name): Constify.
12672         (show_packet_config_cmd, remote_write_bytes)
12673         (remote_buffer_add_string):
12674         * reverse.c (exec_reverse_once): Constify.
12675         * rs6000-tdep.c (variant::name, variant::description): Constify.
12676         * rust-exp.y (rustyyerror): Constify.
12677         * rust-lang.c (rust_op_name): Constify.
12678         * rust-lang.h (rustyyerror): Constify.
12679         * serial.h (serial_ops::name): Constify.
12680         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12681         (sh_sh3e_register_name, sh_sh2e_register_name)
12682         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12683         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12684         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12685         (sh_sh4al_dsp_register_name): Constify.
12686         * sh64-tdep.c (sh64_register_name): Constify.
12687         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12688         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12689         * stabsread.c (patch_block_stabs, read_type_number)
12690         (ref_map::stabs, ref_add, process_reference)
12691         (symbol_reference_defined, define_symbol, define_symbol)
12692         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12693         (read_one_struct_field, read_struct_fields, read_baseclasses)
12694         (read_tilde_fields, read_struct_type, read_array_type)
12695         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12696         (read_huge_number, read_range_type, read_args, common_block_start)
12697         (find_name_end): Constify.
12698         * stabsread.h (common_block_start, define_symbol)
12699         (process_one_symbol, symbol_reference_defined, ref_add):
12700         * symfile.c (get_section_index, add_symbol_file_command):
12701         * symfile.h (get_section_index): Constify.
12702         * target-descriptions.c (tdesc_type::name): Constify.
12703         (tdesc_free_type): Add cast.
12704         * target.c (find_default_run_target):
12705         (add_deprecated_target_alias, find_default_run_target)
12706         (target_announce_detach): Constify.
12707         (do_option): Constify.
12708         * target.h (add_deprecated_target_alias): Constify.
12709         * thread.c (print_thread_info_1): Constify.
12710         * top.c (deprecated_readline_begin_hook, command_line_input):
12711         Constify.
12712         (init_main): Add casts.
12713         * top.h (handle_line_of_input): Constify.
12714         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12715         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12716         (tfind_command): Rename to ...
12717         (tfind_command_1): ... this and constify.
12718         (tfind_command): New function.
12719         (tfind_end_command, tfind_start_command): Adjust.
12720         (encode_source_string): Constify.
12721         * tracepoint.h (encode_source_string): Constify.
12722         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12723         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12724         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12725         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12726         * tui/tui-win.c (parse_scrolling_args): Constify.
12727         * tui/tui-windata.c (tui_erase_data_content): Constify.
12728         * tui/tui-windata.h (tui_erase_data_content): Constify.
12729         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12730         * tui/tui.c (tui_enable): Add cast.
12731         * utils.c (defaulted_query): Constify.
12732         (init_page_info): Add cast.
12733         (puts_debug, subset_compare): Constify.
12734         * utils.h (subset_compare): Constify.
12735         * varobj.c (varobj_format_string): Constify.
12736         * varobj.h (varobj_format_string): Constify.
12737         * vax-tdep.c (vax_register_name): Constify.
12738         * windows-nat.c (windows_detach): Constify.
12739         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12740         * xml-support.c (gdb_xml_end_element): Constify.
12741         * xml-tdesc.c (tdesc_start_reg): Constify.
12742         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12743         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12744         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12745
12746 2017-04-05  Pedro Alves  <palves@redhat.com>
12747
12748         * proc-api.c (struct trans): Constify.
12749         (procfs_note): Constify.
12750         * proc-events.c (struct trans, syscall_table):
12751         * proc-flags.c (struct trans): Constify.
12752         * proc-utils.h (procfs_note): Constify.
12753         * proc-why.c (struct trans): Constify.
12754         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12755         (procfs_detach): Constify.
12756         * sol-thread.c (struct string_map): Constify.
12757         (td_err_string, td_state_string): Constify.
12758
12759 2017-04-05  Pedro Alves  <palves@redhat.com>
12760
12761         * proc-api.c (procfs_filename): Don't initialize
12762         procfs_filename.
12763         (prepare_to_trace): Assume procfs_filename is non-NULL.
12764         (_initialize_proc_api): Give procfs_filename a default value here.
12765
12766 2017-04-05  Pedro Alves  <palves@redhat.com>
12767
12768         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12769         'cond_string' parameter.
12770         (extract_exception_regexp): Constify 'string' parameter.
12771         (catch_exception_command_1): Constify.
12772         * breakpoint.c (init_catchpoint)
12773         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12774         parameter.
12775         (ep_parse_optional_if_clause, catch_fork_command_1)
12776         (catch_exec_command_1): Constify.
12777         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12778         parameter.
12779         (ep_parse_optional_if_clause): Constify.
12780         * cli/cli-utils.c (remove_trailing_whitespace)
12781         (check_for_argument): Constify.
12782         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12783         non-const overload.
12784         (check_for_argument): Likewise.
12785
12786 2017-04-05  Pedro Alves  <palves@redhat.com>
12787
12788         * event-top.c (command_line_handler): Add cast to execute_command
12789         call.
12790         * record-btrace.c (cmd_record_btrace_bts_start)
12791         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12792         (cmd_record_btrace_start): Add cast to execute_command call.
12793         * record-full.c (record_full_goto_insn):
12794         * record.c (record_start, record_stop): Add cast to
12795         execute_command_to_string calls.
12796         (cmd_record_start): Add cast to execute_command calls.
12797
12798 2017-04-05  Pedro Alves  <palves@redhat.com>
12799
12800         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12801         static inline function.
12802         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12803         array and use gdb_PyArg_ParseTupleAndKeywords.
12804         * python/py-cmd.c (cmdpy_init): Likewise.
12805         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12806         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12807         (infpy_search_memory): Likewise.
12808         * python/py-objfile.c (objfpy_add_separate_debug_file)
12809         (gdbpy_lookup_objfile): Likewise.
12810         * python/py-symbol.c (gdbpy_lookup_symbol)
12811         (gdbpy_lookup_global_symbol): Likewise.
12812         * python/py-type.c (gdbpy_lookup_type): Likewise.
12813         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12814         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12815         Likewise.
12816
12817 2017-04-05  Pedro Alves  <palves@redhat.com>
12818
12819         * python/python-internal.h (gdb_PyGetSetDef): New type.
12820         * python/py-block.c (block_object_getset)
12821         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12822         * python/py-event.c (event_object_getset)
12823         (finish_breakpoint_object_getset): Likewise.
12824         * python/py-inferior.c (inferior_object_getset): Likewise.
12825         * python/py-infthread.c (thread_object_getset): Likewise.
12826         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12827         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12828         * python/py-objfile.c (objfile_getset): Likewise.
12829         * python/py-progspace.c (pspace_getset): Likewise.
12830         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12831         Likewise.
12832         * python/py-record.c (recpy_record_getset): Likewise.
12833         * python/py-symbol.c (symbol_object_getset): Likewise.
12834         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12835         Likewise.
12836         * python/py-type.c (type_object_getset, field_object_getset):
12837         Likewise.
12838         * python/py-value.c (value_object_getset): Likewise.
12839
12840 2017-04-05  Pedro Alves  <palves@redhat.com>
12841
12842         * python/python-internal.h (gdb_PyObject_CallMethod)
12843         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12844         New functions.
12845         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12846         (PySys_GetObject, PySys_SetPath): New macros.
12847
12848 2017-04-05  Pedro Alves  <palves@redhat.com>
12849
12850         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12851         info_osdata_command.
12852         * osdata.c (info_osdata_command): Rename to ...
12853         (info_osdata): ... this.  Constify 'type' parameter, and remove
12854         the 'from_tty' parameter.  Accept NULL TYPE.
12855         (info_osdata_command): New function.
12856         * osdata.h (info_osdata_command): Remove declaration.
12857         (info_osdata): New declaration.
12858
12859 2017-04-05  Pedro Alves  <palves@redhat.com>
12860
12861         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12862         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12863         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12864         parameter.
12865         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12866         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12867         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12868         parameter.
12869         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12870         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12871         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12872         (mi_cmd_file_list_exec_source_files)
12873         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12874         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12875         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12876         parameter.
12877         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12878         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12879         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12880         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12881         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12882         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12883         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12884         'command' parameter.
12885         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12886         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12887         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12888         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12889         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12890         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12891         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12892         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12893         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12894         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12895         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12896         parameter.
12897         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12898         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12899         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12900         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12901         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12902         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12903         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12904         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12905         (mi_cmd_data_list_changed_registers)
12906         (mi_cmd_data_write_register_values)
12907         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12908         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12909         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12910         (mi_cmd_list_features, mi_cmd_list_target_features)
12911         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12912         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12913         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12914         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12915         (mi_cmd_trace_frame_collected): Constify 'command'
12916         parameter.
12917         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12918         'command' parameter.
12919
12920 2017-04-05  Pedro Alves  <palves@redhat.com>
12921
12922         * ada-lang.c (ada_completer_word_break_characters): Now a const
12923         array.
12924         (ada_get_gdb_completer_word_break_characters): Constify.
12925         * completer.c (gdb_completer_command_word_break_characters)
12926         (gdb_completer_file_name_break_characters)
12927         (gdb_completer_quote_characters): Now const arrays.
12928         (get_gdb_completer_quote_characters): Constify.
12929         (set_rl_completer_word_break_characters): New function.
12930         (set_gdb_completion_word_break_characters)
12931         (complete_line_internal): Use it.
12932         * completer.h (get_gdb_completer_quote_characters): Constify.
12933         (set_rl_completer_word_break_characters): Declare.
12934         * f-lang.c (f_word_break_characters): Constify.
12935         * language.c (default_word_break_characters): Constify.
12936         * language.h (language_defn::la_word_break_characters): Constify.
12937         (default_word_break_characters): Constify.
12938         * top.c (init_main): Use set_rl_completer_word_break_characters.
12939
12940 2017-04-05  Pedro Alves  <palves@redhat.com>
12941
12942         * aix-thread.c (aix_thread_pid_to_str)
12943         (aix_thread_extra_thread_info): Constify.
12944         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12945         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12946         (bsd_uthread_pid_to_str): Constify.
12947         * corelow.c (core_pid_to_str): Constify.
12948         * darwin-nat.c (darwin_pid_to_str): Constify.
12949         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12950         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12951         Constify.
12952         * gnu-nat.c (gnu_pid_to_str): Constify.
12953         * go32-nat.c (go32_pid_to_str): Constify.
12954         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12955         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12956         * inferior.c (inferior_pid_to_str): Constify.
12957         * linux-nat.c (linux_nat_pid_to_str): Constify.
12958         * linux-tdep.c (linux_core_pid_to_str): Constify.
12959         * linux-thread-db.c (thread_db_pid_to_str)
12960         (thread_db_extra_thread_info): Constify.
12961         * nto-tdep.c (nto_extra_thread_info): Constify.
12962         * nto-tdep.h (nto_extra_thread_info): Constify.
12963         * obsd-nat.c (obsd_pid_to_str): Constify.
12964         * procfs.c (procfs_pid_to_str): Constify.
12965         * ravenscar-thread.c (ravenscar_extra_thread_info)
12966         (ravenscar_pid_to_str): Constify.
12967         * remote-sim.c (gdbsim_pid_to_str): Constify.
12968         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12969         Constify.
12970         * sol-thread.c (solaris_pid_to_str): Constify.
12971         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12972         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12973         * target.c (default_pid_to_str, target_pid_to_str)
12974         (normal_pid_to_str, default_pid_to_str): Constify.
12975         * target.h (target_ops::to_pid_to_str)
12976         (target_ops::to_extra_thread_info): Constify.
12977         (target_pid_to_str, normal_pid_to_str): Constify.
12978         * windows-nat.c (windows_pid_to_str): Constify.
12979         * gdbarch.sh (core_pid_to_str): Constify.
12980         * target-delegates.c: Regenerate.
12981         * gdbarch.h, gdbarch.c: Regenerate.
12982
12983 2017-04-05  Pedro Alves  <palves@redhat.com>
12984
12985         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12986         the memory of the temporary warning_pre_print override.
12987         * utils.c (warning_pre_print): Constify.
12988         * utils.h (warning_pre_print): Constify.
12989
12990 2017-04-05  Pedro Alves  <palves@redhat.com>
12991
12992         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12993         (shell_command): New function.
12994         (make_command): Use std::string.
12995         (init_cli_cmds): Register shell_command instead of shell_escape.
12996
12997 2017-04-05  Pedro Alves  <palves@redhat.com>
12998
12999         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13000         * tracepoint.c (default_collect): Don't initialize.
13001
13002 2017-04-05  Pedro Alves  <palves@redhat.com>
13003
13004         * macroexp.c (macro_buffer::shared): Now a bool.
13005         (init_buffer): Update.
13006         (init_shared_buffer): Constify 'addr' parameter.
13007         (substitute_args, expand, macro_expand, macro_expand_next): Remove
13008         casts.
13009
13010 2017-04-05  Pedro Alves  <palves@redhat.com>
13011
13012         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13013         * disasm.c (set_disassembler_options): Constify local.
13014         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13015
13016 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
13017
13018         PR gdb/21352
13019         * tracefile.c (tsave_command): Fix argument parsing for '-r'
13020         option.
13021
13022 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13023
13024         * frame.c (frame_unwind_register_unsigned): Call
13025         frame_unwind_register_value.
13026
13027 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13028
13029         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13030         Use gdb_test_multiple, and don't match anchor.
13031
13032 2017-04-05  Pedro Alves  <palves@redhat.com>
13033
13034         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13035         (Write After Approval): Remove Simon Marchi.
13036
13037 2017-04-05  Pedro Alves  <palves@redhat.com>
13038
13039         * common/gdb_optional.h (optional::optional): Make constexpr and
13040         initialize m_dummy.
13041
13042 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13043
13044         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13045         (amd64fbsd_jmp_buf_reg_offset): Remove.
13046         (amd64fbsd_supply_uthread): Remove function.
13047         (amd64fbsd_collect_uthread): Remove function.
13048         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13049         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13050         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13051         (fbsd-nat.c): Update comment.
13052         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13053         (i386fbsd_jmp_buf_reg_offset): Remove.
13054         (i386fbsd_supply_uthread): Remove function.
13055         (i386fbsd_collect_uthread): Remove function.
13056         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13057
13058 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13059
13060         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13061         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13062         * NEWS: Mention that support for FreeBSD/alpha was removed.
13063         * alpha-fbsd-tdep.c: Delete file.
13064         * config/alpha/fbsd.mh: Delete file.
13065         * configure.host: Delete alpha*-*-freebsd* and
13066         alpha*-*-kfreebsd*-gnu.
13067         * configure.tgt: Delete alpha*-*-freebsd* and
13068         alpha*-*-kfreebsd*-gnu.
13069
13070 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13071
13072         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13073         amd64bsd_store_inferior_registers): Use ptid from regcache.
13074
13075 2017-04-04  Pedro Alves  <palves@redhat.com>
13076
13077         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13078         data fields, make them private and add "m_" prefixes.
13079         (lnp_state_machine::lnp_state_machine): New ctor.
13080         (record_line, check_line_address, handle_set_discriminator)
13081         (handle_set_address, handle_advance_pc, handle_special_opcode)
13082         (handle_advance_line, handle_set_file, handle_negate_stmt)
13083         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13084         (end_sequence, advance_line): New methods.
13085         (m_gdbarch, m_record_lines_p): New fields.
13086         (lnp_reader_state): Delete.
13087         (dwarf_record_line): Rename to ...
13088         (lnp_state_machine::record_line): ... adjust.
13089         (init_lnp_state_machine): Delete.
13090         (lnp_state_machine::lnp_state_machine): New.
13091         (check_line_address): Rename to ...
13092         (lnp_state_machine::check_line_address): This.
13093         (dwarf_decode_lines_1): Remove reference to "reader_state".
13094         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13095         State machine internal state manipulation moved to
13096         lnp_state_machine methods.
13097
13098 2017-04-04  Pedro Alves  <palves@redhat.com>
13099
13100         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13101         unittests/offset-type-selftests.c.
13102         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13103         * common/offset-type.h: New file.
13104         * common/preprocessor.h: New file.
13105         * common/traits.h: New file.
13106         * common/valid-expr.h: New file.
13107         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13108         sect_offset and cu_offset strong typedefs throughout.
13109         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13110         typedefs throughout.
13111         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13112         sect_offset and cu_offset strong typedefs throughout.
13113         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13114         typedefs throughout.
13115         * gdbtypes.h: Include "common/offset-type.h".
13116         (cu_offset): Now an offset type (strong typedef) instead of a
13117         struct.
13118         (sect_offset): Likewise.
13119         (union call_site_parameter_u): Rename "param_offset" field to
13120         "param_cu_off".
13121         * unittests/offset-type-selftests.c: New file.
13122
13123 2017-04-04  Pedro Alves  <palves@redhat.com>
13124
13125         * common/underlying.h: New file.
13126         * dwarf2read.c: Include "common/gdb_optional.h" and
13127         "common/underlying.h".
13128         (dir_index, file_name_index): New types.
13129         (file_entry): Use them.
13130         (file_entry::include): Use to_underlying.
13131         (line_header::add_file_name): Use dir_index.
13132         (read_formatted_entries): Use gdb::optional.  Read form before
13133         writting to file_entry.
13134         (dwarf_decode_line_header): Use dir_index.
13135         (lnp_state_machine::current_file): Use to_underlying.
13136         (lnp_state_machine::file): Change type to file_name_index.
13137         (dwarf_record_line): Use to_underlying.
13138         (init_lnp_state_machine): Use file_name_index.
13139         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13140
13141 2017-04-04  Pedro Alves  <palves@redhat.com>
13142
13143         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13144         operator bool, has_value and get methods.
13145
13146 2017-04-04  Pedro Alves  <palves@redhat.com>
13147
13148         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13149         fields.
13150         (line_header): Initialize all data fields.  Change type of
13151         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13152         Change type of include_dirs to std::vector<const char *>.  Remove
13153         num_include_dirs, include_dirs_size.  Change type of file_names to
13154         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13155         (line_header::line_header): New.
13156         (line_header::add_include_dir, line_header::add_file_name): New
13157         methods.
13158         (line_header::include_dir_at): Remove NULL check.
13159         (line_header::file_name_at): Add const overload.
13160         (line_header_up): New unique_ptr typedef.
13161         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13162         std::vector.  Remove free_line_header call.
13163         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13164         free_line_header call.
13165         (free_cu_line_header): Delete.
13166         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13167         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13168         Adjust to use std::vector.
13169         (free_line_header): Delete.
13170         (free_line_header_voidp): Use delete.
13171         (add_include_dir): Replace with ...
13172         (line_header::add_include_dir): ... this method.  Use std::vector.
13173         (add_file_name): Replace with ...
13174         (line_header::add_file_name): ... this method.  Use std::vector.
13175         (add_include_dir_stub): Delete.
13176         (read_formatted_entries): Remove memset.
13177         (dwarf_decode_line_header): Return a line_header_up instead of a
13178         raw pointer.  Remove cleanup handling.  Pass lambdas to
13179         read_formatted_entries.  Adjust to use line_header methods.
13180         (dwarf_decode_lines_1): Adjust to use line_header methods.
13181         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13182         use std::vector.
13183
13184 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13185
13186         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13187         instead of struct ptid.
13188
13189 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13190
13191         * frame.c (get_frame_register_bytes): Unwind using value.
13192         (put_frame_register_bytes): Likewise.
13193
13194 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13195
13196         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13197         aggregate-like.
13198
13199 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13200
13201         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13202
13203 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13204
13205         * gdbthread.h (struct thread_info): Declare constructor and
13206         destructor.  Add some in-class member initializers.
13207         * thread.c (free_thread): Remove.
13208         (init_thread_list): Call delete instead of free_thread.
13209         (new_thread): Call thread_info constructor.
13210         (thread_info::thread_info): New function.
13211         (thread_info::~thread_info): New function.
13212         (delete_thread_1): Call delete instead of free_thread.
13213         (make_cleanup_restore_current_thread): Move tp and frame to
13214         inner block.
13215
13216 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13217
13218         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13219         (arc_skip_prologue): Likewise.
13220         (arc_make_frame_cache): Likewise.
13221         (arc_pv_get_operand): New function.
13222         (arc_is_in_prologue): Likewise.
13223         (arc_analyze_prologue): Likewise.
13224         (arc_print_frame_cache): Likewise.
13225         (MAX_PROLOGUE_LENGTH): New constant.
13226
13227 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13228
13229         * configure.tgt: Add arc-insn.o.
13230         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13231         (dump_arc_instruction_command): New function.
13232         (arc_fprintf_disasm): Likewise.
13233         (arc_disassemble_info): Likewise.
13234         (arc_insn_get_operand_value): Likewise.
13235         (arc_insn_get_operand_value_signed): Likewise.
13236         (arc_insn_get_memory_base_reg): Likewise.
13237         (arc_insn_get_memory_offset): Likewise.
13238         (arc_insn_get_branch_target): Likewise.
13239         (arc_insn_dump): Likewise.
13240         (arc_insn_get_linear_next_pc): Likewise.
13241         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13242         (arc_disassemble_info): Likewise.
13243         (arc_insn_get_branch_target): Likewise.
13244         (arc_insn_get_linear_next_pc): Likewise.
13245         * NEWS: Mention new "maint print arc arc-instruction".
13246
13247 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13248
13249         * arc-tdep (maintenance_print_arc_list): New variable.
13250         (maintenance_print_arc_command): New function.
13251
13252 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13253
13254         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13255         Add "limm" and "reserved".
13256         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13257         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13258         * arc-tdep.h (arc_regnum): Likewise.
13259
13260 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13261
13262         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13263         for THREADPTR register.
13264         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13265         register.
13266         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13267         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13268         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13269
13270 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13271
13272         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13273         registers above gdbarch_num_regs (gdbarch) as privileged in
13274         call0 ABI.
13275
13276 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13277
13278         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13279         for a single specified register or for all registers in
13280         a0_base..a0_base + C0_NREGS range.
13281         (supply_gregset_reg): Call regcache_raw_supply for a single
13282         specified register or for all registers in a0_base..a0_base +
13283         C0_NREGS range.
13284
13285 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13286
13287         * arch/xtensa.h (C0_NREGS): Add definition.
13288         * xtensa-tdep.c (C0_NREGS): Remove definition.
13289
13290 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13291
13292         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13293         Drop xtensa_default_isa initialization.
13294         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13295
13296 2017-03-27  Pedro Alves  <palves@redhat.com>
13297
13298         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13299         (file_entry::include_dir): New method.
13300         (line_header::include_dir_at, line_header::file_name_at): New
13301         methods.
13302         (setup_type_unit_groups, setup_type_unit_groups)
13303         (psymtab_include_file_name): Simplify using the new methods.
13304         (lnp_state_machine) <the_line_header>: New field.
13305         <file>: Add comment.
13306         (lnp_state_machine::current_file): New method.
13307         (dwarf_record_line): Simplify using the new methods.
13308         (init_lnp_state_machine): Initialize the "the_line_header" field.
13309         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13310         Simplify using the new methods.
13311
13312 2017-03-27  Pedro Alves  <palves@redhat.com>
13313
13314         * cp-name-parser.y (make_empty): Delete.
13315         (demangler_special, nested_name, ptr_operator, array_indicator)
13316         (direct_declarator, declarator_1): Use fill_comp instead of
13317         make_empty.
13318
13319 2017-03-27  Pedro Alves  <palves@redhat.com>
13320
13321         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13322         to ATTRIBUTE_PRINTF.
13323         * solib-target.c (library_list_start_list): Print "string" not
13324         "version".
13325         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13326         gdb_xml_error call.
13327
13328 2017-03-27  Pedro Alves  <palves@redhat.com>
13329
13330         * dwarf2read.c (struct file_and_directory): New.
13331         (dwarf2_get_dwz_file): Adjust to use std::string.
13332         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13333         (find_file_and_directory): Adjust to return a file_and_directory
13334         object.
13335         (read_file_scope): Adjust to use file_and_directory.  Remove
13336         make_cleanup/do_cleanups calls.
13337         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13338         make_cleanup/do_cleanups calls.
13339         * python/python.c (do_start_initialization): Adjust to ldirname
13340         returning a std::string.
13341         * utils.c (ldirname): Now returns a std::string.
13342         * utils.h (ldirname): Change return type to std::string.
13343         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13344         returning a std::string.
13345         * xml-tdesc.c (file_read_description_xml): Likewise.
13346
13347 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13348
13349         * regcache.c (regcache_debug_print_register): New function.
13350         * regcache.h (regcache_debug_print_register): New declaration.
13351         * target.c (debug_print_register): Remove.
13352         (target_fetch_registers): Call regcache_debug_print_register.
13353         (target_store_registers): Likewise.
13354
13355 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13356
13357         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13358         reference beyond the 'lh->include_dirs' array before accessing to
13359         it.
13360         (psymtab_include_file_name): Likewise.
13361         (dwarf_decode_lines_1): Likewise.
13362         (dwarf_decode_lines): Likewise.
13363         (file_file_name): Likewise.
13364
13365 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13366
13367         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13368         inferior_ptid.
13369         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13370         ps_lsetfpregs): Likewise.
13371         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13372         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13373         ps_lsetfpregs): Likewise.
13374         * target.c (target_fetch_registers, target_store_registers):
13375         Remove asserts.
13376
13377 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13378
13379         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13380
13381 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13382
13383         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13384         (_initialize_aarch64_tdep): Register it.
13385         (aarch64_record_load_store): Handle PRFM instruction.
13386         (aarch64_process_record_test): New function.
13387
13388 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13389
13390         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13391         indentation.
13392
13393 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13394
13395         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13396
13397 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13398
13399         python/python.c (do_start_initialization): Fix memory leak.
13400
13401 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13402
13403         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13404         using get_ptrace_pid.
13405         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13406         inferior_ptid.
13407         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13408         inferior_ptid instead of pid.
13409
13410 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13411
13412         * aarch64-tdep.c: Wrap locally used classes in anonymous
13413         namespace.
13414         * arm-tdep.c: Likewise.
13415         * linespec.c: Likewise.
13416         * ui-out.c: Likewise.
13417
13418 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13419
13420         PR gdb/19637
13421         * python/lib/gdb/printer/bound_registers.py: Import sys.
13422
13423 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13424
13425         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13426         windows_thread_info parameter and use it instead of
13427         current_thread.
13428         (windows_fetch_inferior_registers): Don't set current_thread,
13429         pass the thread to do_windows_fetch_inferior_registers.  Use
13430         ptid from regcache instead of inferior_ptid.
13431         (do_windows_store_inferior_registers): Add windows_thread_info
13432         parameter and use it instead of current_thread.
13433         (windows_store_inferior_registers): Don't set current_thread,
13434         pass the thread to do_windows_store_inferior_registers.  Use
13435         ptid from regcache instead of inferior_ptid.
13436
13437 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13438
13439         * ser-mingw.c (ser_windows_raw): Remove reference to
13440         struct serial::current_timeout.
13441
13442 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13443
13444         PR tdep/20928
13445         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13446         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13447         (sparc64_fsr_type): Fix %fsr decoding.
13448
13449 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13450
13451         * python/py-record-btrace.c (btpy_insn_data): Change return type
13452         for Python 2.
13453
13454 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13455
13456         * spu-linux-nat.c (spu_fetch_inferior_registers,
13457         spu_store_inferior_registers): Use ptid from regcache, set and
13458         restore inferior_ptid.
13459         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13460         Likewise.
13461
13462 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13463
13464         * i386-linux-nat.c (fetch_register, store_register,
13465         i386_linux_fetch_inferior_registers,
13466         i386_linux_store_inferior_registers): Use ptid from regcache.
13467         * ia64-linux-nat.c (ia64_linux_fetch_register,
13468         ia64_linux_store_register): Likewise.
13469         * inf-ptrace.c (inf_ptrace_fetch_register,
13470         inf_ptrace_store_register): Likewise.
13471         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13472         m32r_linux_store_inferior_registers): Likewise.
13473         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13474         m68kbsd_store_inferior_registers): Likewise.
13475         * m68k-linux-nat.c (fetch_register, store_register,
13476         m68k_linux_fetch_inferior_registers,
13477         m68k_linux_store_inferior_registers): Likewise.
13478         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13479         m88kbsd_store_inferior_registers): Likewise.
13480         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13481         mips_fbsd_store_inferior_registers): Likewise.
13482         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13483         mips64_linux_regsets_store_registers): Likewise.
13484         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13485         mipsnbsd_store_inferior_registers): Likewise.
13486         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13487         mips64obsd_store_inferior_registers): Likewise.
13488         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13489         Likewise.
13490         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13491         ppcfbsd_store_inferior_registers): Likewise.
13492         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13493         ppc_linux_store_inferior_registers): Likewise.
13494         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13495         ppcnbsd_store_inferior_registers): Likewise.
13496         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13497         ppcobsd_store_registers): Likewise.
13498         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13499         Likewise.
13500         * ravenscar-thread.c (ravenscar_fetch_registers,
13501         ravenscar_store_registers, ravenscar_prepare_to_store):
13502         Likewise.
13503         * record-btrace.c (record_btrace_fetch_registers,
13504         record_btrace_store_registers, record_btrace_prepare_to_store):
13505         Likewise.
13506         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13507         Lookup inferior using ptid from regcache, instead of
13508         current_inferior.
13509         * remote.c (remote_fetch_registers, remote_store_registers): Use
13510         ptid from regcache.
13511         * rs6000-nat.c (fetch_register, store_register): Likewise.
13512         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13513         s390_linux_store_inferior_registers): Likewise.
13514         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13515         shnbsd_store_inferior_registers): Likewise.
13516         * sol-thread.c (sol_thread_fetch_registers,
13517         sol_thread_store_registers): Likewise.
13518         * sparc-nat.c (sparc_fetch_inferior_registers,
13519         sparc_store_inferior_registers): Likewise.
13520         * tilegx-linux-nat.c (fetch_inferior_registers,
13521         store_inferior_registers): Likewise.
13522         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13523         vaxbsd_store_inferior_registers): Likewise.
13524         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13525         store_xtregs): Likewise.
13526
13527 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13528
13529         PR gdb/14441
13530         * NEWS: Mention support for rvalue references in GDB and python.
13531         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13532         supports both lvalue and rvalue references.
13533
13534 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13535
13536         PR gdb/14441
13537         * gdbtypes.c (rank_one_type): Implement overloading
13538         resolution rules regarding rvalue references.
13539
13540 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13541
13542         PR gdb/14441
13543         * aarch64-tdep.c (aarch64_type_align)
13544         (aarch64_extract_return_value, aarch64_store_return_value): Change
13545         lvalue reference type checks to general reference type checks.
13546         * amd64-tdep.c (amd64_classify): Likewise.
13547         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13548         Likewise.
13549         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13550         (arm_store_return_value): Likewise.
13551         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13552         * c-typeprint.c (c_print_type): Likewise.
13553         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13554         (cplus_number_of_children, cplus_describe_child): Likewise.
13555         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13556         * completer.c (expression_completer): Likewise.
13557         * cp-support.c (make_symbol_overload_list_adl_namespace):
13558         Likewise.
13559         * darwin-nat-info.c (info_mach_region_command): Likewise.
13560         * dwarf2loc.c (entry_data_value_coerce_ref)
13561         (value_of_dwarf_reg_entry): Likewise.
13562         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13563         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13564         Likewise.
13565         * findvar.c (extract_typed_address, store_typed_address):
13566         Likewise.
13567         * gdbtypes.c (rank_one_type): Likewise.
13568         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13569         * infcall.c (value_arg_coerce): Likewise.
13570         * language.c (pointer_type): Likewise.
13571         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13572         Likewise.
13573         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13574         * mn10300-tdep.c (mn10300_type_align): Likewise.
13575         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13576         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13577         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13578         Likewise.
13579         * printcmd.c (print_formatted, x_command): Likewise.
13580         * python/py-type.c (typy_get_composite, typy_template_argument):
13581         Likewise.
13582         * python/py-value.c (valpy_referenced_value)
13583         (valpy_get_dynamic_type, value_has_field): Likewise.
13584         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13585         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13586         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13587         * spu-tdep.c (spu_scalar_value_p): Likewise.
13588         * symtab.c (lookup_symbol_aux): Likewise.
13589         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13590         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13591         Likewise.
13592         * valops.c (value_cast_pointers, value_cast)
13593         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13594         (value_struct_elt, value_struct_elt_bitpos)
13595         (value_find_oload_method_list, find_overload_match)
13596         (value_rtti_indirect_type): Likewise.
13597         * valprint.c (val_print_scalar_type_p, generic_val_print):
13598         Likewise.
13599         * value.c (value_actual_type, value_as_address, unpack_long)
13600         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13601         (coerce_ref): Likewise.
13602         * varobj.c (varobj_get_value_type): Likewise.
13603
13604 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13605
13606         PR gdb/14441
13607         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13608         table of constants.
13609         * python/lib/gdb/command/explore.py: Support exploring values
13610         of rvalue reference types.
13611         * python/lib/gdb/types.py: Implement get_basic_type() for
13612         rvalue reference types.
13613         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13614         constant.
13615         * python/py-value.c (valpy_getitem): Add an rvalue reference
13616         check.
13617         (valpy_reference_value): Add new parameter "refcode".
13618         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13619         New wrappers for valpy_reference_value().
13620         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13621         (gdbpy_invoke_xmethod): Likewise.
13622
13623 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13624
13625         PR gdb/14441
13626         * dwarf2read.c (process_die, read_type_die_1): Handle the
13627         DW_TAG_rvalue_reference_type DIE.
13628         (read_tag_reference_type): Add new parameter "refcode".
13629
13630 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13631
13632         PR gdb/14441
13633         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13634         (c_type_print_modifier, c_type_print_varspec_suffix)
13635         (c_type_print_base): Support printing rvalue reference types.
13636         * c-valprint.c (c_val_print, c_value_print): Support printing
13637         rvalue reference values.
13638
13639 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13640
13641         PR gdb/14441
13642         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13643         typename.
13644         * cp-support.c (replace_typedefs): Handle
13645         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13646         * python/py-type.c (typy_lookup_type): Likewise.
13647
13648 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13649
13650         PR gdb/14441
13651         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13652         * parse.c (insert_type): Change assert statement.
13653         (follow_types): Handle rvalue reference types.
13654         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13655         constant.
13656
13657 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13658
13659         PR gdb/14441
13660         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13661         value_ref() interface.
13662         * c-valprint.c (c_value_print): Likewise.
13663         * infcall.c (value_arg_coerce): Likewise.
13664         * python/py-value.c (valpy_reference_value): Likewise.
13665         * valops.c (value_cast, value_reinterpret_cast)
13666         (value_dynamic_cast, typecmp): Likewise.
13667         (value_ref): Parameterize by kind of return value reference type.
13668         * value.h (value_ref): Add new parameter "refcode".
13669
13670 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13671
13672         PR gdb/14441
13673         * dwarf2read.c (read_tag_reference_type): Use
13674         lookup_lvalue_reference_type() instead of lookup_reference_type().
13675         * eval.c (evaluate_subexp_standard): Likewise.
13676         * f-exp.y: Likewise.
13677         * gdbtypes.c (make_reference_type, lookup_reference_type):
13678         Generalize with rvalue reference types.
13679         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13680         convenience wrappers for lookup_reference_type().
13681         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13682         reference kind parameter.
13683         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13684         wrappers for lookup_reference_type().
13685         * guile/scm-type.c (gdbscm_type_reference): Use
13686         lookup_lvalue_reference_type() instead of lookup_reference_type().
13687         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13688         * parse.c (follow_types): Likewise.
13689         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13690         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13691         Likewise.
13692         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13693         (gdbpy_invoke_xmethod): Likewise.
13694         * stabsread.c: Provide extra argument to make_reference_type()
13695         call.
13696         * valops.c (value_ref, value_rtti_indirect_type): Use
13697         lookup_lvalue_reference_type() instead of lookup_reference_type().
13698
13699 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13700
13701         PR gdb/14441
13702         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13703         (TYPE_IS_REFERENCE): New macro.
13704         (struct type): Add rvalue_reference_type field.
13705         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13706
13707 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13708
13709         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13710         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13711         New function definition.
13712         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13713         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13714         New function declaration.
13715         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13716         * mi/mi-interp.h: New file.
13717         * solib.c (info_sharedlibrary_command): Replace for loop with
13718         ALL_SO_LIBS macro
13719         * solib.h (update_solib_list): New function declaration.
13720         (so_list_head): Move macro.
13721         * solist.h (ALL_SO_LIBS): New macro.
13722
13723 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13724
13725         * infcmd.c (post_create_inferior): Remove unused argument in
13726         call to solib_add.
13727         * remote.c (remote_start_remote): Likewise.
13728         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13729         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13730         (enable_break): Likewise.
13731         * solib.c (update_solib_list): Remove unused target argument
13732         and its documentation.
13733         (solib_add): Remove unused target argument.  Remove unused
13734         argument in call to update_solib_list.
13735         (info_sharedlibrary_command): Remove unused argument in call
13736         to update_solib_list.
13737         (sharedlibrary_command): Remove unused argument in call to
13738         solib_add.
13739         (handle_solib_event): Likewise.
13740         (reload_shared_libraries): Likewise.
13741         * solib.h (solib_add): Remove unused target argument.
13742
13743 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13744
13745         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13746         (s390_displaced_step_fixup): Cover relative branches with the
13747         default fixup handling.  This fixes lack of support for some
13748         relative branch instructions.
13749
13750 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13751
13752         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13753         ptid from regcache.
13754
13755 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13756
13757         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13758         i386_darwin_store_inferior_registers): Use ptid from regcache.
13759
13760 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13761
13762         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13763         i386bsd_store_inferior_registers): Use ptid from regcache.
13764
13765 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13766
13767         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13768         hppaobsd_store_registers): Use ptid from regcache.
13769
13770 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13771
13772         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13773         hppanbsd_store_registers): Use ptid from regcache.
13774
13775 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13776
13777         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13778         from regcache.  Use get_ptrace_pid.
13779
13780 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13781
13782         * corelow.c (get_core_register_section): Use ptid from regcache,
13783         update doc.
13784
13785 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13786
13787         * bsd-uthread.c (bsd_uthread_fetch_registers,
13788         bsd_uthread_store_registers): Use ptid from regcache, set and
13789         restore inferior_ptid.
13790
13791 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13792
13793         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13794         fetch_fp_regs, store_register, store_regs, store_fp_register,
13795         store_fp_regs): Use ptid from regcache.
13796
13797 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13798
13799         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13800         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13801         store_vfp_regs): Use ptid from regcache.
13802
13803 2017-03-17  Pedro Alves  <palves@redhat.com>
13804
13805         PR remote/21188
13806         * ser-base.c (ser_base_wait_for): Add comment.
13807         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13808         version.
13809         * ser-unix.c (hardwire_raw): Remove reference to
13810         scb->current_timeout.
13811         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13812         (hardwire_ops): Install ser_base_readchar instead of
13813         hardwire_readchar.
13814         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13815         Remove fields.
13816
13817 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13818
13819         PR gdb/19637
13820         * python/lib/gdb/printer/bound_registers.py: Add support for
13821         Python 3.
13822
13823 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13824
13825         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13826         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13827         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13828         byte_offset to subobj_byte_offset.  Fix the handling of
13829         DWARF_VALUE_STACK on big-endian targets when coming via an
13830         implicit pointer.
13831         (dwarf2_evaluate_loc_desc): Adjust call to
13832         dwarf2_evaluate_loc_desc_full.
13833         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13834         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13835
13836 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13837
13838         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13839         and REVSH instructions.
13840
13841 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13842
13843         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13844         (arm_record_test): Declare.
13845         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13846         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13847         align with the manual.
13848         (thumb_record_misc): Adjust the code order to align with the
13849         manual.
13850         (thumb2_record_decode_insn_handler): Fix instruction matching.
13851         (instruction_reader_thumb): New class.
13852         (arm_record_test): New function.
13853
13854 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13855
13856         * arm-tdep.c (abstract_memory_reader): New class.
13857         (instruction_reader): New class.
13858         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13859         (decode_insn): Likewise.
13860
13861 2017-03-16  Doug Evans  <dje@google.com>
13862
13863         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13864         member.  Change type of TYPE member to SCM.  All uses updated.
13865         (lsscm_make_lazy_string_smob): Add assert.
13866         (lsscm_make_lazy_string): Flag bad length values.
13867         (lsscm_elt_type): New function.
13868         (gdbscm_lazy_string_to_value): Rewrite to use
13869         lsscm_safe_lazy_string_to_value.
13870         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13871         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13872         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13873         in incoming type.
13874         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13875         * guile/scm-type.c (tyscm_scm_to_type): New function.
13876
13877 2017-03-15  Doug Evans  <dje@google.com>
13878
13879         PR python/17728, python/18439, python/18779
13880         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13881         member.  Change type of TYPE member to PyObject *.  All uses updated.
13882         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13883         (gdbpy_create_lazy_string_object): Flag bad length values.
13884         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13885         Handle typedefs in incoming type.
13886         (stpy_lazy_string_elt_type): New function.
13887         (gdbpy_extract_lazy_string): Call it.
13888         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13889         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13890         typedefs in incoming type.
13891
13892 2017-03-16  Doug Evans  <dje@google.com>
13893
13894         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13895         * guile/scm-type.c (tyscm_scm_to_type): New function.
13896
13897 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13898
13899         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13900         "ULONGEST" for "skip".
13901
13902 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13903
13904         PR gdb/21220
13905         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13906         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13907         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13908         over ptrace peek/poke until end of buffer or error.
13909
13910 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13911
13912         * parse.c (length_of_subexp): Make static.
13913         * parser-defs.h (length_of_subexp): Remove.
13914
13915 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13916
13917         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13918         as well.
13919
13920 2017-03-14  Pedro Alves  <palves@redhat.com>
13921
13922         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13923         (main): Use std::unique_ptr.  Remove calls to
13924         cp_demangled_name_parse_free.
13925
13926 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13927
13928         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13929         alphabsd_store_inferior_registers): Use regcache->ptid instead
13930         of inferior_ptid.
13931
13932 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13933
13934         * aix-thread.c (aix_thread_fetch_registers,
13935         aix_thread_store_registers): Use regcache->ptid instead of
13936         inferior_ptid.
13937
13938 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13939
13940         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13941         store_gregs_to_thread, fetch_fpregs_from_thread,
13942         store_fpregs_to_thread): Use regcache->ptid instead of
13943         inferior_ptid.
13944
13945 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13946
13947         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13948         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13949         instead of inferior_ptid.
13950
13951 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13952
13953         * target.c (target_fetch_registers, target_store_registers): Add
13954         assert.
13955
13956 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13957
13958         * regcache.h (regcache_get_ptid): New function.
13959         * regcache.c (regcache_get_ptid): New function.
13960
13961 2017-03-13  Mark Wielaard  <mark@klomp.org>
13962
13963         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13964
13965 2017-03-10  Keith Seitz  <keiths@redhat.com>
13966
13967         PR c++/8218
13968         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13969
13970 2017-03-08  Pedro Alves  <palves@redhat.com>
13971
13972         PR gdb/18360
13973         * infrun.c (start_step_over, do_target_resume, resume)
13974         (restart_threads): Assert we're not resuming a thread that is
13975         meant to be stopped.
13976         (infrun_thread_stop_requested_callback): Delete.
13977         (infrun_thread_stop_requested): If the thread is internally
13978         stopped, queue a pending stop event and clear the thread's
13979         inline-frame state.
13980         (handle_stop_requested): New function.
13981         (handle_syscall_event, handle_inferior_event_1): Use
13982         handle_stop_requested.
13983         (handle_stop_requested): New function.
13984         (handle_signal_stop): Set the thread's stop_signal here instead of
13985         at caller.
13986         (finish_step_over): Clear step over info unconditionally.
13987         (handle_signal_stop): If the user had interrupted the event
13988         thread, consider the stop a random signal.
13989         (handle_signal_stop) <signal arrived while stepping over
13990         breakpoint>: Don't restart threads here.
13991         (stop_waiting): Don't clear step-over info here.
13992
13993 2017-03-08  Pedro Alves  <palves@redhat.com>
13994
13995         PR 21206
13996         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13997         goes to argument 2, not 1.
13998
13999 2017-03-08  Pedro Alves  <palves@redhat.com>
14000
14001         PR cli/21218
14002         * top.c (gdb_readline_wrapper): Avoid passing NULL to
14003         display_gdb_prompt.
14004         (command_line_input): Add comment.
14005
14006 2017-03-08  Pedro Alves  <palves@redhat.com>
14007
14008         PR tui/21216
14009         * tui/tui-file.c (tui_file::write): New.
14010         * tui/tui-file.h (tui_file): Override "write".
14011         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14012         factored out from ...
14013         (tui_puts): ... here.
14014         (tui_putc): Use them.
14015         (tui_write): New function.
14016         * tui/tui-io.h (tui_write): Declare.
14017
14018 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
14019
14020         * Makefile.in (SFILES): Replace "environ.c" with
14021         "common/environ.c".
14022         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14023         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
14024         to...
14025         * common/environ.c: ... here.
14026         * environ.h: Moved to...
14027         * common/environ.h: ... here.
14028
14029 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14030
14031         * gdbarch.sh (pstring_ptr): New static function.
14032         (gdbarch_disassembler_options): Use it.
14033         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14034         not valid_disassembler_option->name.
14035         * gdbarch.c: Regenerate.
14036
14037 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14038
14039         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14040
14041 2017-03-07  Pedro Alves  <palves@redhat.com>
14042
14043         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14044
14045 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14046
14047         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14048         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14049         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14050         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14051
14052 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14053
14054         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14055
14056 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14057
14058         * remote.c (remote_add_target_side_commands): Use range-based
14059         for loop.
14060
14061 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14062
14063         PR gdb/21165
14064         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14065         value is lazy.
14066         * valprint.c (common_val_print): Likewise.
14067
14068 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14069
14070         * NEWS: Mention new set/show disassembler-options commands.
14071         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14072         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14073         (prospective_options): New static variable.
14074         (gdb_disassembler::gdb_disassembler): Initialize
14075         m_di.disassembler_options.
14076         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14077         (get_disassembler_options): New function.
14078         (set_disassembler_options): Likewise.
14079         (set_disassembler_options_sfunc): Likewise.
14080         (show_disassembler_options_sfunc): Likewise.
14081         (disassembler_options_completer): Likewise.
14082         (_initialize_disasm): Likewise.
14083         * disasm.h (get_disassembler_options): New prototype.
14084         (set_disassembler_options): Likewise.
14085         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14086         (gdbarch_verify_disassembler_options): Likewise.
14087         * gdbarch.c: Regenerate.
14088         * gdbarch.h: Likewise.
14089         * arm-tdep.c (num_disassembly_options): Delete.
14090         (set_disassembly_style): Likewise.
14091         (arm_disassembler_options): New static variable.
14092         (set_disassembly_style_sfunc): Convert short style name into long
14093         option name.  Call set_disassembler_options.
14094         (show_disassembly_style_sfunc): New function.
14095         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14096         set_gdbarch_verify_disassembler_options.
14097         (_initialize_arm_tdep): Delete regnames variable and update callers.
14098         (arm_disassembler_options): Initialize.
14099         (disasm_options): New variable.
14100         (num_disassembly_options): Rename from this...
14101         (num_disassembly_styles): ...to this.  Compute by scanning through
14102         disasm_options.
14103         (valid_disassembly_styles): Initialize using disasm_options.
14104         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14105         set_arm_regname_option.
14106         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14107         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14108         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14109         set_gdbarch_verify_disassembler_options.
14110         * s390-tdep.c (s390_disassembler_options): New static variable.
14111         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14112         set_gdbarch_verify_disassembler_options.
14113
14114 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14115
14116         * remote.c (remote_add_target_side_condition): Remove "struct"
14117         keyword from range-based for loop.
14118
14119 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14120
14121         * remote.c (remote_add_target_side_condition): Use range-based
14122         for loop.  Update comment.
14123
14124 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14125
14126         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14127
14128 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14129
14130         * regcache.c (regcache_raw_update): New function.
14131         (regcache_raw_read): Move code to regcache_raw_update.
14132         * regcache.h (regcache_raw_update): New declaration.
14133         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14134
14135 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14136
14137         * dwarf2read.c (create_debug_type_hash_table): Initialize
14138         header.signature and header.type_offset_in_tu.
14139
14140 2017-02-24  Pedro Alves  <palves@redhat.com>
14141
14142         * symtab.c (make_file_symbol_completion_list_1): Use
14143         add_symtab_completions.
14144
14145 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14146
14147         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14148
14149 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14150
14151         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14152         I386_MAX_REGISTER_SIZE.
14153         (i386_pseudo_register_write): Likewise.
14154         (i386_process_record): Likewise.
14155         * i387-tdep.c (i387_supply_xsave): Likewise.
14156         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14157         (store_register): Likewise.
14158
14159 2017-02-23  Pedro Alves  <palves@redhat.com>
14160
14161         * ada-lang.c: Include "common/function-view.h".
14162         (ada_iterate_over_symbols): Adjust to use function_view as
14163         callback type.
14164         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14165         (ada_make_symbol_completion_list): Use a lambda.
14166         (ada_exc_search_name_matches): Delete.
14167         (name_matches_regex): New.
14168         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14169         * compile/compile-c-support.c: Include "common/function-view.h".
14170         (print_one_macro): Change prototype to accept a ui_file pointer.
14171         (write_macro_definitions): Use a lambda.
14172         * dwarf2read.c: Include "common/function-view.h".
14173         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14174         (dw2_expand_symtabs_matching): Adjust to use function_view as
14175         callback type.
14176         * language.h: Include "common/function-view.h".
14177         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14178         function_view as callback type.
14179         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14180         * linespec.c: Include "common/function-view.h".
14181         (collect_info::add_symbol): New method.
14182         (struct symbol_and_data_callback, iterate_inline_only, struct
14183         symbol_matcher_data, iterate_name_matcher): Delete.
14184         (iterate_over_all_matching_symtabs): Adjust to use function_view
14185         as callback type and lambdas.
14186         (iterate_over_file_blocks): Adjust to use function_view as
14187         callback type.
14188         (decode_compound_collector): Now a class with private fields.
14189         (decode_compound_collector::release_symbols): New method.
14190         (collect_one_symbol): Rename to...
14191         (decode_compound_collector::operator()): ... this and adjust.
14192         (lookup_prefix_sym): decode_compound_collector construction bits
14193         move to decode_compound_collector ctor.  Pass the
14194         decode_compound_collector object directly as callback.  Remove
14195         cleanups and use decode_compound_collector::release_symbols
14196         instead.
14197         (symtab_collector): Now a class with private fields.
14198         (symtab_collector::release_symtabs): New method.
14199         (add_symtabs_to_list): Rename to...
14200         (symtab_collector::operator()): ... this and adjust.
14201         (collect_symtabs_from_filename): symtab_collector construction
14202         bits move to symtab_collector ctor.  Pass the symtab_collector
14203         object directly as callback.  Remove cleanups and use
14204         symtab_collector::release_symtabs instead.
14205         (collect_symbols): Delete.
14206         (add_matching_symbols_to_info): Use lambdas.
14207         * macrocmd.c (print_macro_callback): Delete.
14208         (info_macro_command): Use a lambda.
14209         (info_macros_command): Pass print_macro_definition as callable
14210         directly.
14211         (print_one_macro): Remove 'ignore' parameter.
14212         (macro_list_command): Adjust.
14213         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14214         (macro_for_each_data::user_data): Delete field.
14215         (foreach_macro): Adjust to call the function_view.
14216         (macro_for_each): Adjust to use function_view as callback type.
14217         (foreach_macro_in_scope): Adjust to call the function_view.
14218         (macro_for_each_in_scope): Adjust to use function_view as callback
14219         type.
14220         * macrotab.h: Include "common/function-view.h".
14221         (macro_callback_fn): Declare a prototype instead of a pointer.
14222         Remove "user_data" parameter.
14223         (macro_for_each, macro_for_each_in_scope): Adjust to use
14224         function_view as callback type.
14225         * psymtab.c (partial_map_expand_apply)
14226         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14227         Adjust to use function_view as callback type and to return bool.
14228         (psym_expand_symtabs_matching): Adjust to use function_view as
14229         callback types.
14230         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14231         to use function_view as callback type and to return bool.
14232         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14233         callback types.
14234         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14235         as callback types.
14236         * symfile.h: Include "common/function-view.h".
14237         (expand_symtabs_file_matcher_ftype)
14238         (expand_symtabs_symbol_matcher_ftype)
14239         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14240         return bool.
14241         (quick_symbol_functions::map_symtabs_matching_filename)
14242         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14243         function_view as callback type and return bool.
14244         (expand_symtabs_matching): Adjust to use function_view as callback
14245         type.
14246         (maintenance_expand_name_matcher)
14247         (maintenance_expand_file_matcher): Delete.
14248         (maintenance_expand_symtabs): Use lambdas.
14249         * symtab.c (iterate_over_some_symtabs): Adjust to use
14250         function_view as callback types and return bool.
14251         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14252         of a cleanup.
14253         (lookup_symtab_callback): Delete.
14254         (lookup_symtab): Use a lambda.
14255         (iterate_over_symbols): Adjust to use function_view as callback
14256         type.
14257         (struct search_symbols_data, search_symbols_file_matches)
14258         (search_symbols_name_matches): Delete.
14259         (search_symbols): Use a pair of lambdas.
14260         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14261         (symtab_expansion_callback): Delete.
14262         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14263         * symtab.h: Include "common/function-view.h".
14264         (iterate_over_some_symtabs): Adjust to use function_view as
14265         callback type and return bool.
14266         (iterate_over_symtabs): Adjust to use function_view as callback
14267         type.
14268         (symbol_found_callback_ftype): Remove 'data' parameter and return
14269         bool.
14270         (iterate_over_symbols): Adjust to use function_view as callback
14271         type.
14272
14273 2017-02-23  Pedro Alves  <palves@redhat.com>
14274
14275         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14276         (%.o) <unittests/%.c>: New pattern.
14277         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14278         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14279         * common/function-view.h: New file.
14280         * unittests/function-view-selftests.c: New file.
14281         * configure: Regenerate.
14282
14283 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14284
14285         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14286         inferior_ptid.
14287         * go32-nat.c (go32_thread_alive): Likewise.
14288
14289 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14290
14291         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14292         delete.
14293
14294 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14295
14296         * varobj.c (varobj_clear_saved_item): Use delete instead of
14297         xfree.
14298         (update_dynamic_varobj_children): Likewise.
14299
14300 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14301
14302         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14303
14304 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14305
14306         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14307         m_enum_value to 0 in default constructor.
14308
14309 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14310
14311         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14312         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14313         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14314         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14315         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14316         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14317         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14318         IS_STORE_CONDITIONAL_INSN.
14319
14320 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14321
14322         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14323
14324 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14325
14326         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14327
14328 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14329
14330         * dwarf2read.c (skip_one_die, read_attribute_value)
14331         (dwarf2_const_value_attr, dump_die_shallow)
14332         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14333         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14334
14335 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14336
14337         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14338         (dwarf_parse_macro_header): Accept DWARF version 5.
14339         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14340
14341 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14342
14343         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14344         DW_AT_GNU_*.
14345         * common/common-exceptions.h (enum errors): Likewise.
14346         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14347         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14348         (dwarf_expr_context::execute_stack_op): Likewise.
14349         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14350         Likewise.
14351         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14352         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14353         (show_entry_values_debug, call_site_to_target_addr)
14354         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14355         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14356         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14357         (value_of_dwarf_block_entry, indirect_pieced_value)
14358         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14359         (disassemble_dwarf_expression): Likewise.
14360         * dwarf2read.c (process_die, inherit_abstract_dies)
14361         (read_call_site_scope): Likewise.
14362         * gdbtypes.h (struct func_type, struct call_site_parameter)
14363         (struct call_site): Likewise.
14364         * stack.c (read_frame_arg): Likewise.
14365         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14366
14367 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14368
14369         * defs.h (read_unsigned_leb128): New declaration.
14370         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14371         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14372         (dwarf2_find_location_expression): Call also
14373         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14374         * dwarf2loc.h (dwarf2_version): New declaration.
14375         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14376         rnglists.
14377         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14378         .debug_rnglists.
14379         (struct dwop_section_names): Add loclists_dwo.
14380         (dwop_section_names): Add .debug_loclists.dwo.
14381         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14382         (struct dwarf2_per_cu_data): Add dwarf_version.
14383         (struct dwo_sections): Add loclists.
14384         (struct attr_abbrev): Add implicit_const.
14385         (read_indirect_line_string): New declaration.
14386         (read_unsigned_leb128): Delete declaration.
14387         (rcuh_kind): New definition.
14388         (read_and_check_comp_unit_head): Change parameter
14389         is_debug_types_section to section_kind.
14390         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14391         (read_comp_unit_head): Change parameter abfd to section, add parameter
14392         section_kind.  Handle DWARF-5.
14393         (error_check_comp_unit_head): Accept also DWARF version 5.
14394         (read_and_check_comp_unit_head): Change parameter
14395         is_debug_types_section to section_kind.
14396         (read_and_check_type_unit_head): Delete function.
14397         (read_abbrev_offset): Handle DWARF-5.
14398         (create_debug_type_hash_table): Add parameter section_kind.  Process
14399         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14400         comp_unit_head.
14401         (create_debug_types_hash_table): Update create_debug_type_hash_table
14402         caller.
14403         (create_all_type_units): Call create_debug_type_hash_table.
14404         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14405         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14406         caller.
14407         (skip_one_die): Handle DW_FORM_implicit_const.
14408         (dwarf2_rnglists_process): New function.
14409         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14410         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14411         (read_attribute_value): Handle DW_FORM_implicit_const,
14412         DW_FORM_line_strp.
14413         (read_attribute): Handle DW_FORM_implicit_const.
14414         (read_indirect_string_at_offset_from): New function from
14415         read_indirect_string_at_offset.
14416         (read_indirect_string_at_offset): Call
14417         read_indirect_string_at_offset_from.
14418         (read_indirect_line_string_at_offset): New function.
14419         (read_indirect_string): New function comment.
14420         (read_indirect_line_string): New function.
14421         (read_unsigned_leb128): Make it global.
14422         (dwarf2_string_attr): Handle DWARF-5.
14423         (add_include_dir_stub, read_formatted_entries): New functions.
14424         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14425         Handle DWARF-5.
14426         (per_cu_header_read_in): Update read_comp_unit_head caller.
14427         (dwarf2_version): New function.
14428         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14429         rnglists.
14430         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14431         fields.
14432
14433 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14434
14435         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14436
14437 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14438
14439         * dwarf2read.c (dwarf2_ranges_process): New function from
14440         dwarf2_ranges_read.
14441         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14442         dwarf2_ranges_process.
14443
14444 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14445
14446         * dwarf2read.c (create_debug_type_hash_table): New function from
14447         create_debug_types_hash_table.
14448         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14449         (create_all_type_units, open_and_init_dwo_file): Update
14450         create_debug_types_hash_table callers.
14451
14452 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14453
14454         PR gdb/16188
14455         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14456         refer to 'ap', not 'args'.
14457
14458 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14459             Pedro Alves  <palves@redhat.com>
14460
14461         PR gdb/16188
14462         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14463         calls succeeded.
14464         * fork-child.c (trace_start_error): New function.
14465         (trace_start_error_with_name): Likewise.
14466         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14467         * inf-ptrace.c (inf_ptrace_me): Likewise.
14468         * inferior.h (trace_start_error): New prototype.
14469         (trace_start_error_with_name): Likewise.
14470
14471 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14472
14473         PR gdb/21164
14474         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14475         NULL before using it.
14476         * symmisc.c (maintenance_print_symbols): Likewise.
14477         (maintenance_print_msymbols): Likewise.
14478
14479 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14480
14481         * NEWS: Add record Python bindings entry.
14482
14483 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14484
14485         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14486         py-record-full.o.
14487         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14488         * python/py-record-btrace.c, python/py-record-btrace.h,
14489         python/py-record-full.c, python/py-record-full.h: New file.
14490         * python/py-record.c: Add include for py-record-btrace.h and
14491         py-record-full.h.
14492         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14493         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14494         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14495         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14496         New definition.
14497         (gdbpy_initialize_btrace): New export.
14498         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14499
14500 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14501
14502         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14503         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14504         * python/py-record.c: New file.
14505         * python/python-internal.h (gdbpy_start_recording,
14506         gdbpy_current_recording, gdpy_stop_recording,
14507         gdbpy_initialize_record): New export.
14508         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14509         (python_GdbMethods): Add gdbpy_start_recording,
14510         gdbpy_current_recording and gdbpy_stop_recording.
14511
14512 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14513
14514         * record-btrace.c (record_btrace_record_method): New function.
14515         (init_record_btrace_ops): Initialize to_record_method.
14516         * record-full.c (record_full_record_method): New function.
14517         (init_record_full_ops, init_record_full_core_ops): Add
14518         record_full_record_method.
14519         * record.h (enum record_method): New enum.
14520         * target-debug.h (target_debug_print_enum_record_method: New define.
14521         * target-delegates.c: Regenerate.
14522         * target.c (target_record_method): New function.
14523         * target.h: Include record.h.
14524         (struct target_ops) <to_record_method>: New field.
14525         (target_record_method): New export.
14526
14527 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14528
14529         * record.h (record_start, record_stop): New export.
14530         * record.c (record_start, record_stop): New function.
14531
14532 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14533
14534         * btrace.c (btrace_fetch): Copy function call segments pointer
14535         into a vector.
14536         (btrace_clear): Clear the vector.
14537         (btrace_find_insn_by_number): Use binary search to find the correct
14538         function call segment.
14539         * btrace.h (brace_fun_p): New typedef.
14540         (struct btrace_thread_info) <functions>: New field.
14541
14542 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14543
14544         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14545         * btrace.c (btrace_decode_error): ... here.  New function.
14546         * btrace.h (btrace_decode_error): New export.
14547
14548 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14549
14550         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14551         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14552         btrace_find_insn_by_number): Remove special case for gaps.
14553         * btrace.h (btrace_insn_get_error): New export.
14554         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14555         * record-btrace.c (btrace_insn_history): Print number for gaps.
14556         (record_btrace_info, record_btrace_goto): Handle gaps.
14557
14558 2017-02-14  Tom Tromey  <tom@tromey.com>
14559
14560         PR python/13598:
14561         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14562         event.
14563         * python/py-evts.c (gdbpy_initialize_py_events): Add
14564         before_prompt registry.
14565         * python/py-events.h (events_object) <before_prompt>: New field.
14566
14567 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14568
14569         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14570
14571 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14572
14573         * symfile (_initialize_symfile): Add usage text to the load command's
14574         help text.
14575
14576 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14577
14578         * utils.c (defaulted_query): Don't query on secondary UIs.
14579
14580 2017-02-10  Tom Tromey  <tom@tromey.com>
14581
14582         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14583
14584 2017-02-10  Tom Tromey  <tom@tromey.com>
14585
14586         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14587         "cleanup" local.
14588         * python/py-type.c (typy_legacy_template_argument): Remove
14589         unnecessary "cleanup" local.
14590
14591 2017-02-10  Tom Tromey  <tom@tromey.com>
14592
14593         * python/python.c (do_start_initialization): New function, from
14594         _initialize_python.
14595         (_initialize_python): Call do_start_initialization.
14596         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14597         goto.
14598
14599 2017-02-10  Tom Tromey  <tom@tromey.com>
14600
14601         * python/py-prettyprint.c (pretty_print_one_value): Use
14602         gdbpy_ref.
14603
14604 2017-02-10  Tom Tromey  <tom@tromey.com>
14605
14606         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14607         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14608         gdbpy_ref.
14609         * python/py-type.c (field_new): Use gdbpy_ref.
14610         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14611         gdbpy_ref.
14612         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14613         (py_free_pspace): Likewise.
14614         (pspace_to_pspace_object): Likewise.
14615         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14616         (py_free_objfile): Likewise.
14617         (objfile_to_objfile_object): Likewise.
14618         * python/py-inferior.c (delete_thread_object): Use
14619         gdbpy_ref.
14620         (infpy_read_memory): Likewise.
14621         (py_free_inferior): Likewise.
14622         * python/py-evtregistry.c (create_eventregistry_object): Use
14623         gdbpy_ref.
14624         * python/py-event.c (create_event_object): Use gdbpy_ref.
14625
14626 2017-02-10  Tom Tromey  <tom@tromey.com>
14627
14628         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14629         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14630         used.
14631         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14632         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14633         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14634         python/py-framefilter.c, python/py-function.c,
14635         python/py-inferior.c, python/py-infevents.c,
14636         python/py-linetable.c, python/py-newobjfileevent.c,
14637         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14638         python/py-signalevent.c, python/py-stopevent.c,
14639         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14640         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14641         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14642         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14643
14644 2017-02-10  Tom Tromey  <tom@tromey.com>
14645
14646         * ui-out.h (ui_out_emit_type): New class.
14647         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14648         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14649         and ui_out_emit_tuple.
14650         (enumerate_locals): Likewise.
14651         (py_mi_print_variables, py_print_locals, py_print_args): Use
14652         ui_out_emit_list.
14653         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14654         ui_out_emit_list.
14655         * common/gdb_optional.h: New file.
14656
14657 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14658
14659         * MAINTAINERS (Write After Approval): Update my e-mail address.
14660
14661 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14662
14663         PR gdb/21122
14664         * breakpoint.c (_initialize_breakpoint): Update the help description
14665         of the 'commands' command to indicate that it takes a list argument.
14666
14667 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14668
14669         * interps.c (current_interp_set_logging): Remove "return".
14670
14671 2017-02-09  Gary Benson  <gbenson@redhat.com>
14672
14673         * symtab.c (add_symtab_completions): Prevent NULL pointer
14674         dereference.
14675
14676 2017-02-08  Pedro Alves  <palves@redhat.com>
14677
14678         * interps.c (interp::interp): Remove reference to quiet_p.
14679         (interp_set): Make static.  Remove dead "Switching to" output
14680         code.
14681         (interp_quiet_p, interp_set_quiet): Delete.
14682         (interpreter_exec_cmd): Don't set the interpreter quiet.
14683         * interps.h (interp_quiet_p): Make static.
14684         (class interp) <quiet_p>: Remove field
14685
14686 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14687
14688         * cli/cli-decode.c (find_command_name_length): Make it extern.
14689         * cli/cli-decode.h (find_command_name_length): Declare.
14690         * cli/cli-script.c (command_name_equals, line_first_arg):
14691         New functions.
14692         (process_next_line): Use cli-decode to parse command names.
14693         (build_command_line): Make args a constant pointer.
14694
14695 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14696
14697         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14698         Remove case-insensitive search.
14699
14700 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14701
14702         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14703         at the end of the line.  Avoids an ARI warning.
14704
14705 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14706
14707         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14708         rdseed instructions.
14709         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14710
14711 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14712
14713         PR tdep/20936
14714         Provide and use sparc32 and sparc64 target description XML files.
14715         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14716         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14717         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14718         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14719         * features/sparc/sparc32-solaris.xml: New file.
14720         * features/sparc/sparc64-solaris.xml: New file.
14721         * features/sparc/sparc32-solaris.c: Generated.
14722         * features/sparc/sparc64-solaris.c: Generated.
14723         * sparc-tdep.h: Account for differences in target descriptions.
14724         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14725         (sparc32_register_type): Use target provided registers.
14726         (validate_tdesc_registers): New function.
14727         (sparc32_gdbarch_init): Use tdesc_has_registers.
14728         Set pseudoregister functions.
14729         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14730         (sparc64_register_type): Use target provided registers.
14731         (sparc64_init_abi): Set pseudoregister functions.
14732
14733 2017-02-03  Tom Tromey  <tom@tromey.com>
14734
14735         PR rust/21097:
14736         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14737         with a single member.
14738
14739 2017-02-03  Pedro Alves  <palves@redhat.com>
14740
14741         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14742         (cli_interp_base::~cli_interp_base): New.
14743         (cli_interp): New struct.
14744         (as_cli_interp): Cast the interp itself to cli_interp.
14745         (cli_interpreter_pre_command_loop): Rename to ...
14746         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14747         parameter.
14748         (cli_interpreter_init): Rename to ...
14749         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14750         boolean.  Make extern.
14751         (cli_interpreter_resume): Rename to ...
14752         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14753         extern.
14754         (cli_interpreter_suspend): Rename to ...
14755         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14756         extern.
14757         (cli_interpreter_exec): Rename to ...
14758         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14759         extern.
14760         (cli_interpreter_supports_command_editing): Rename to ...
14761         (cli_interp_base::supports_command_editing): ... this.  Remove
14762         'interp' parameter.  Make extern.
14763         (cli_ui_out): Rename to ...
14764         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14765         Make extern.
14766         (cli_set_logging): Rename to ...
14767         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14768         parameter.  Make extern.
14769         (cli_interp_procs): Delete.
14770         (cli_interp_factory): Adjust to use "new".
14771         * cli/cli-interp.h: Include "interps.h".
14772         (struct cli_interp_base): New struct.
14773         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14774         (interp_new): Delete.
14775         (interp::interp, interp::~interp): New.
14776         (interp_set): Use bool, and return void.  Assume the interpreter
14777         has suspend, init and resume methods, and that the all return
14778         void.
14779         (set_top_level_interpreter): interp_set returns void.
14780         (interp_ui_out): Adapt.
14781         (current_interp_set_logging): Adapt.
14782         (interp_data): Delete.
14783         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14784         (interp_exec): Adapt.
14785         (top_level_interpreter_data): Delete.
14786         * interps.h (interp_init_ftype, interp_resume_ftype)
14787         (interp_suspend_ftype, interp_exec_ftype)
14788         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14789         (class interp): New.
14790         (interp_new): Delete.
14791         (interp_set): Now returns void.  Use bool.
14792         (interp_data, top_level_interpreter_data): Delete.
14793         * mi/mi-common.h: Include interps.h.
14794         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14795         init, resume, suspect, exec, interp_ui_out, set_logging and
14796         pre_command_loop methods.
14797         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14798         (mi_interpreter_init): Rename to ...
14799         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14800         bool, return void and make extern.  Adjust.
14801         (mi_interpreter_resume): ... Rename to ...
14802         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14803         return void and make extern.  Adjust.
14804         (mi_interpreter_suspend): ... Rename to ...
14805         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14806         return void and make extern.  Adjust.
14807         (mi_interpreter_exec): ... Rename to ...
14808         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14809         extern.  Adjust.
14810         (mi_interpreter_pre_command_loop): ... Rename to ...
14811         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14812         parameter and make extern.
14813         (mi_on_normal_stop_1): Adjust.
14814         (mi_ui_out): Rename to ...
14815         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14816         parameter and make extern.  Adjust.
14817         (mi_set_logging): Rename to ...
14818         (mi_interp::set_logging): ... this.  Remove the 'interp'
14819         parameter and make extern.  Adjust.
14820         (mi_interp_procs): Delete.
14821         (mi_interp_factory): Adjust to use 'new'.
14822         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14823         (mi_print_exception, mi_execute_command, mi_load_progress):
14824         Adjust.
14825         * tui/tui-interp.c (tui_interp): New class.
14826         (as_tui_interp): Return a tui_interp pointer.
14827         (tui_on_normal_stop, tui_on_signal_received)
14828         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14829         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14830         to use interp::interp_ui_out.
14831         (tui_init): Rename to ...
14832         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14833         bool, return void and make extern.  Adjust.
14834         (tui_resume): Rename to ...
14835         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14836         return void and make extern.  Adjust.
14837         (tui_suspend): Rename to ...
14838         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14839         return void and make extern.  Adjust.
14840         (tui_ui_out): Rename to ...
14841         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14842         parameter, and make extern.  Adjust.
14843         (tui_exec): Rename to ...
14844         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14845         make extern.
14846         (tui_interp_procs): Delete.
14847         (tui_interp_factory): Use "new".
14848
14849 2017-02-02  Tom Tromey  <tom@tromey.com>
14850
14851         * rust-exp.y (ends_raw_string, space_then_number)
14852         (rust_identifier_start_p): Return bool.
14853         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14854         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14855         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14856         (rust_chartype_p): Return bool.
14857         (val_print_struct, rust_print_struct_def, rust_print_type):
14858         Update.
14859         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14860         Return bool.
14861
14862 2017-02-02  Tom Tromey  <tom@tromey.com>
14863
14864         * rust-lang.c: Reindent.
14865
14866 2017-02-02  Tom Tromey  <tom@tromey.com>
14867
14868         * rust-lang.h (rust_crate_for_block): Update.
14869         * rust-lang.c (rust_crate_for_block): Return std::string.
14870         (rust_get_disr_info): Use std:;string, not
14871         gdb::unique_xmalloc_ptr.
14872         * rust-exp.y (crate_name): Update.
14873
14874 2017-02-02  Pedro Alves  <palves@redhat.com>
14875
14876         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14877         field out of gdb_disassembler_test and make it static.
14878
14879 2017-02-02  Pedro Alves  <palves@redhat.com>
14880
14881         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14882         mi1_interp and mi_interp fields.
14883
14884 2017-02-02  Pedro Alves  <palves@redhat.com>
14885
14886         * cli/cli-interp.c (struct saved_output_files, saved_output):
14887         Moved from cli/cli-logging.c.
14888         (cli_set_logging): New function.
14889         (cli_interp_procs): Install cli_set_logging.
14890         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14891         Declare.
14892         * cli/cli-logging.c (struct saved_output_files, saved_output):
14893         Moved to cli/cli-interp.c.
14894         (pop_output_files): Don't save outputs here.
14895         (make_logging_output): New function.
14896         (handle_redirections): Don't build tee nor save previous outputs
14897         here.
14898         * interps.c (current_interp_set_logging): Change prototype.
14899         Assume there's always a set_logging_proc method installed.
14900         * interps.h (interp_set_logging_ftype): Change prototype.
14901         (current_interp_set_logging): Change prototype and adjust comment.
14902         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14903         use make_logging_output.
14904         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14905 2017-02-02  Pedro Alves  <palves@redhat.com>
14906
14907         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14908         from ...
14909         (set_logging_overwrite): ... here.
14910         (logging_no_redirect_file): Delete.
14911         (set_logging_redirect): Don't handle redirection on the fly.
14912         Instead warn that "logging off" / "logging on" is necessary.
14913         (pop_output_files): Delete references to logging_no_redirect_file.
14914         (show_logging_command): Always speak in terms of what will happen
14915         once logging is reenabled.
14916
14917 2017-02-02  Pedro Alves  <palves@redhat.com>
14918
14919         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14920
14921 2017-02-02  Pedro Alves  <palves@redhat.com>
14922
14923         * disasm.c (gdb_pretty_print_insn): Rename to ...
14924         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14925         Remove gdbarch parameter.  Adapt to clear the object's buffers
14926         instead of allocating new buffers, and to print using the object's
14927         gdb_disassembler instead of calling gdb_print_insn.
14928         (dump_insns): Use gdb_pretty_print_disassembler.
14929         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14930         (gdb_pretty_print_disassembler): New class.
14931         * record-btrace.c (btrace_insn_history): Use
14932         gdb_pretty_print_disassembler.
14933
14934 2017-02-02  Pedro Alves  <palves@redhat.com>
14935
14936         * ada-lang.c (type_as_string): Use string_file.
14937         * ada-valprint.c (ada_print_floating): Use string_file.
14938         * ada-varobj.c (ada_varobj_scalar_image)
14939         (ada_varobj_get_value_image): Use string_file.
14940         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14941         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14942         * breakpoint.c (update_inserted_breakpoint_locations)
14943         (insert_breakpoint_locations, reattach_breakpoints)
14944         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14945         (print_it_watchpoint): Use string_file.
14946         (save_breakpoints): Use stdio_file.
14947         * c-exp.y (oper): Use string_file.
14948         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14949         tee_file.
14950         (pop_output_files): Use delete.
14951         (handle_redirections): Use stdio_file and tee_file.
14952         * cli/cli-setshow.c (do_show_command): Use string_file.
14953         * compile/compile-c-support.c (c_compute_program): Use
14954         string_file.
14955         * compile/compile-c-symbols.c (generate_vla_size): Take a
14956         'string_file &' instead of a 'ui_file *'.
14957         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14958         of a 'ui_file *'.  Use string_file.
14959         (generate_c_for_variable_locations): Take a 'string_file &'
14960         instead of a 'ui_file *'.
14961         * compile/compile-internal.h (generate_c_for_for_one_variable):
14962         Take a 'string_file &' instead of a 'ui_file *'.
14963         * compile/compile-loc2c.c (push, pushf, unary, binary)
14964         (print_label, pushf_register_address, pushf_register)
14965         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14966         'ui_file *'.  Adjust.
14967         * compile/compile.c (compile_to_object): Use string_file.
14968         * compile/compile.h (compile_dwarf_expr_to_c)
14969         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14970         'ui_file *'.
14971         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14972         (replace_typedefs_qualified_name): Use string_file and
14973         obstack_copy0.
14974         * disasm.c (gdb_pretty_print_insn): Use string_file.
14975         (gdb_disassembly): Adjust reference the null_stream global.
14976         (do_ui_file_delete): Delete.
14977         (gdb_insn_length): Use null_stream.
14978         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14979         * dwarf2loc.c (dwarf2_compile_property_to_c)
14980         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14981         'string_file &' instead of a 'ui_file *'.
14982         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14983         * dwarf2read.c (do_ui_file_peek_last): Delete.
14984         (dwarf2_compute_name): Use string_file.
14985         * event-top.c (gdb_setup_readline): Use stdio_file.
14986         * gdbarch.sh (verify_gdbarch): Use string_file.
14987         * gdbtypes.c (safe_parse_type): Use null_stream.
14988         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14989         string_file.
14990         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14991         'string_file *' instead of a 'ui_file *'.
14992         (gdbscm_arch_disassemble): Use string_file.
14993         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14994         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14995         inherits from ui_file.
14996         (ioscm_file_port_delete, ioscm_file_port_rewind)
14997         (ioscm_file_port_put): Delete.
14998         (ioscm_file_port_write): Rename to ...
14999         (ioscm_file_port::write): ... this.  Remove file_port_magic
15000         checks.
15001         (ioscm_file_port_new): Delete.
15002         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15003         ui_file_up.
15004         * guile/scm-type.c (tyscm_type_name): Use string_file.
15005         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15006         Use string_file.
15007         * infcmd.c (print_return_value_1): Use string_file.
15008         * infrun.c (print_target_wait_results): Use string_file.
15009         * language.c (add_language): Use string_file.
15010         * location.c (explicit_to_string_internal): Use string_file.
15011         * main.c (captured_main_1): Use null_file.
15012         * maint.c (maintenance_print_architecture): Use stdio_file.
15013         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15014         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15015         event_channel>: Change type to mi_console_file pointer.
15016         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15017         (mi_console_file_delete): Delete.
15018         (struct mi_console_file): Delete.
15019         (mi_console_file_magic): Delete.
15020         (mi_console_file_new): Delete.
15021         (mi_console_file::mi_console_file): New.
15022         (mi_console_file_delete): Delete.
15023         (mi_console_file_fputs): Delete.
15024         (mi_console_file::write): New.
15025         (mi_console_raw_packet): Delete.
15026         (mi_console_file::flush): New.
15027         (mi_console_file_flush): Delete.
15028         (mi_console_set_raw): Rename to ...
15029         (mi_console_file::set_raw): ... this.
15030         * mi/mi-console.h (class mi_console_file): New class.
15031         (mi_console_file_new, mi_console_set_raw): Delete.
15032         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15033         (mi_set_logging): Use delete and tee_file.  Adjust.
15034         * mi/mi-main.c (output_register): Use string_file.
15035         (mi_cmd_data_evaluate_expression): Use string_file.
15036         (mi_cmd_data_read_memory): Use string_file.
15037         (mi_cmd_execute, print_variable_or_computed): Use string_file.
15038         * mi/mi-out.c (mi_ui_out::main_stream): New.
15039         (mi_ui_out::rewind): Use main_stream and
15040         string_file.
15041         (mi_ui_out::put): Use main_stream and string_file.
15042         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15043         Allocate a 'string_file' instead.
15044         (mi_out_new): Don't allocate a mem_fileopen stream here.
15045         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15046         (mi_ui_out::main_stream): Declare method.
15047         * printcmd.c (eval_command): Use string_file.
15048         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15049         * python/py-arch.c (archpy_disassemble): Use string_file.
15050         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15051         * python/py-frame.c (frapy_str): Use string_file.
15052         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15053         Use string_file.
15054         * python/py-type.c (typy_str): Use string_file.
15055         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15056         * python/py-value.c (valpy_str): Use string_file.
15057         * record-btrace.c (btrace_insn_history): Use string_file.
15058         * regcache.c (regcache_print): Use stdio_file.
15059         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15060         * remote.c (escape_buffer): Use string_file.
15061         * rust-lang.c (rust_get_disr_info): Use string_file.
15062         * serial.c (serial_open_ops_1): Use stdio_file.
15063         (do_serial_close): Use delete.
15064         * stack.c (print_frame_arg): Use string_file.
15065         (print_frame_args): Remove local mem_fileopen stream, not used.
15066         (print_frame): Use string_file.
15067         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15068         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15069         Take a 'string_file *' instead of a 'ui_file *'.
15070         * top.c (new_ui): Use stdio_file and stderr_file.
15071         (free_ui): Use delete.
15072         (execute_command_to_string): Use string_file.
15073         (quit_confirm): Use string_file.
15074         * tracepoint.c (collection_list::append_exp): Use string_file.
15075         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15076         * tui/tui-file.c: Don't include "ui-file.h".
15077         (enum streamtype, struct tui_stream): Delete.
15078         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15079         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15080         (tui_file::tui_file): New method.
15081         (tui_file_fputs): Delete.
15082         (tui_file_get_strbuf): Delete.
15083         (tui_file::puts): New method.
15084         (tui_file_adjust_strbuf): Delete.
15085         (tui_file_flush): Delete.
15086         (tui_file::flush): New method.
15087         * tui/tui-file.h: Tweak intro comment.
15088         Include ui-file.h.
15089         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15090         (tui_file_adjust_strbuf): Delete declarations.
15091         (class tui_file): New class.
15092         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15093         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15094         (tui_register_format): Use string_stream.
15095         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15096         (tui_get_function_from_frame): Use string_file.
15097         * typeprint.c (type_to_string): Use string_file.
15098         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15099         (null_stream): New global.
15100         (ui_file_delete): Delete.
15101         (ui_file::ui_file): New.
15102         (null_file_isatty): Delete.
15103         (ui_file::~ui_file): New.
15104         (null_file_rewind): Delete.
15105         (ui_file::printf): New.
15106         (null_file_put): Delete.
15107         (null_file_flush): Delete.
15108         (ui_file::putstr): New.
15109         (null_file_write): Delete.
15110         (ui_file::putstrn): New.
15111         (null_file_read): Delete.
15112         (ui_file::putc): New.
15113         (null_file_fputs): Delete.
15114         (null_file_write_async_safe): Delete.
15115         (ui_file::vprintf): New.
15116         (null_file_delete): Delete.
15117         (null_file::write): New.
15118         (null_file_fseek): Delete.
15119         (null_file::puts): New.
15120         (ui_file_data): Delete.
15121         (null_file::write_async_safe): New.
15122         (gdb_flush, ui_file_isatty): Adjust.
15123         (ui_file_put, ui_file_rewind): Delete.
15124         (ui_file_write): Adjust.
15125         (ui_file_write_for_put): Delete.
15126         (ui_file_write_async_safe, ui_file_read): Adjust.
15127         (ui_file_fseek): Delete.
15128         (fputs_unfiltered): Adjust.
15129         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15130         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15131         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15132         (set_ui_file_data): Delete.
15133         (string_file::~string_file, string_file::write)
15134         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15135         (do_ui_file_as_string, ui_file_as_string): Delete.
15136         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15137         (struct mem_file): Delete.
15138         (mem_file_new): Delete.
15139         (stdio_file::stdio_file): New.
15140         (mem_file_delete): Delete.
15141         (stdio_file::stdio_file): New.
15142         (mem_fileopen): Delete.
15143         (stdio_file::~stdio_file): New.
15144         (mem_file_rewind): Delete.
15145         (stdio_file::set_stream): New.
15146         (mem_file_put): Delete.
15147         (stdio_file::open): New.
15148         (mem_file_write): Delete.
15149         (stdio_file_magic, struct stdio_file): Delete.
15150         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15151         (stdio_file::flush): New.
15152         (stdio_file_read): Rename to ...
15153         (stdio_file::read): ... this.  Adjust.
15154         (stdio_file_write): Rename to ...
15155         (stdio_file::write): ... this.  Adjust.
15156         (stdio_file_write_async_safe): Rename to ...
15157         (stdio_file::write_async_safe) ... this.  Adjust.
15158         (stdio_file_fputs): Rename to ...
15159         (stdio_file::puts) ... this.  Adjust.
15160         (stdio_file_isatty): Delete.
15161         (stdio_file_fseek): Delete.
15162         (stdio_file::isatty): New.
15163         (stderr_file_write): Rename to ...
15164         (stderr_file::write) ... this.  Adjust.
15165         (stderr_file_fputs): Rename to ...
15166         (stderr_file::puts) ... this.  Adjust.
15167         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15168         (stderr_file::stderr_file): New.
15169         (tee_file_magic): Delete.
15170         (struct tee_file): Delete.
15171         (tee_file::tee_file): New.
15172         (tee_file_new): Delete.
15173         (tee_file::~tee_file): New.
15174         (tee_file_delete): Delete.
15175         (tee_file_flush): Rename to ...
15176         (tee_file::flush): ... this.  Adjust.
15177         (tee_file_write): Rename to ...
15178         (tee_file::write): ... this.  Adjust.
15179         (tee_file::write_async_safe): New.
15180         (tee_file_fputs): Rename to ...
15181         (tee_file::puts): ... this.  Adjust.
15182         (tee_file_isatty): Rename to ...
15183         (tee_file::isatty): ... this.  Adjust.
15184         * ui-file.h (struct obstack, struct ui_file): Don't
15185         forward-declare.
15186         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15187         (ui_file_write_ftype)
15188         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15189         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15190         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15191         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15192         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15193         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15194         (set_ui_file_fseek): Delete.
15195         (ui_file_data, ui_file_delete, ui_file_rewind)
15196         (struct ui_file): New.
15197         (ui_file_up): New.
15198         (class null_file): New.
15199         (null_stream): Declare.
15200         (ui_file_write_for_put, ui_file_put): Delete.
15201         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15202         Delete.
15203         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15204         (gdb_fopen, tee_file_new): Delete.
15205         (struct string_file): New.
15206         (struct stdio_file): New.
15207         (stdio_file_up): New.
15208         (struct stderr_file): New.
15209         (class tee_file): New.
15210         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15211         of a 'ui_file *'.  Adjust.
15212         * ui-out.h (class ui_out) <field_stream>: Likewise.
15213         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15214         (null_stream): Delete.
15215         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15216         Adjust.
15217         * utils.h (struct ui_file): Delete forward declaration..
15218         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15219         (error_stream): Take a 'string_file &' instead of a
15220         'ui_file *'.
15221         * varobj.c (varobj_value_get_print_value): Use string_file.
15222         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15223         * gdbarch.c: Regenerate.
15224
15225 2017-02-02  Pedro Alves  <palves@redhat.com>
15226
15227         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15228         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15229         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15230         Adjust to call gdb_print_insn instead of
15231         gdb_disassembler::print_insn.
15232         (dump_insns, do_mixed_source_and_assembly_deprecated)
15233         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15234         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15235         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15236         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15237         declaration.
15238         (gdb_pretty_print_insn): Re-add declaration.
15239         * record-btrace.c (btrace_insn_history): Don't allocate a
15240         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15241
15242 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15243
15244         * disasm.h (gdb_disassembly): Remove file_string parameter.
15245         * disasm.c (gdb_disassembly): Likewise.
15246         * cli/cli-cmds.c (print_disassembly): Adapt.
15247         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15248         * stack.c (do_gdb_disassembly): Likewise.
15249
15250 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15251
15252         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15253         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15254         targets.  And if the implicit value is longer than needed, extract
15255         the first bytes instead of the "least significant" ones.
15256
15257 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15258
15259         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15260         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15261         (btrace_fetch): Assert can_access_registers_ptid.
15262         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15263         validate_registers_access.
15264
15265 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15266
15267         * gdbthread.h (can_access_registers_ptid): New.
15268         * thread.c (can_access_registers_ptid): New.
15269
15270 2017-02-01  Pedro Alves  <palves@redhat.com>
15271
15272         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15273
15274 2017-01-31  Pedro Alves  <palves@redhat.com>
15275
15276         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15277         Fix typos.
15278
15279 2017-01-31  Pedro Alves  <palves@redhat.com>
15280
15281         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15282         not used.
15283
15284 2017-01-31  Pedro Alves  <palves@redhat.com>
15285
15286         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15287
15288 2017-01-31  Pedro Alves  <palves@redhat.com>
15289
15290         * common/scoped_restore.h
15291         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15292         change the value's parameter type to T2.
15293         (make_scoped_restore): Likewise.
15294
15295 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15296             Richard Henderson  <rth@redhat.com>
15297
15298         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15299         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15300         GS_BASE for older kernels.
15301         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15302         GS_BASE for older kernels.
15303         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15304         and GS_BASE to the offset table.
15305         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15306         system register group.
15307         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15308         for older kernels.
15309         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15310         amd64 ABI.
15311         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15312         AMD64_GSBASE_REGNUM.
15313         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15314         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15315         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15316         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15317         i386/64bit-segments.xml in those rules.
15318         * features/i386/64bit-segments.xml: New file.
15319         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15320         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15321         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15322         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15323         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15324         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15325         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15326         * features/i386/amd64-avx-linux.c: Regenerated.
15327         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15328         * features/i386/amd64-avx-mpx.c: Regenerated.
15329         * features/i386/amd64-avx512-linux.c: Regenerated.
15330         * features/i386/amd64-linux.c: Regenerated.
15331         * features/i386/amd64-mpx-linux.c: Regenerated.
15332         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15333         * features/i386/i386-avx-mpx.c: Regenerated.
15334         * features/i386/x32-avx-linux.c: Regenerated.
15335         * features/i386/x32-avx512-linux.c: Regenerated.
15336         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15337         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15338         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15339         * regformats/i386/amd64-linux.dat: Regenerated.
15340         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15341         * regformats/i386/x32-avx-linux.dat: Regenerated.
15342         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15343         * regformats/i386/x32-linux.dat: Regenerated.
15344
15345 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15346
15347         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15348         Set to AMD64_NUM_REGS.
15349
15350 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15351
15352         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15353         that checks validity of a register number.
15354
15355 2017-01-27  Kees Cook  <keescook@google.com>
15356
15357         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15358         fetch_fpregs if target has fpa registers.
15359         (arm_linux_store_inferior_registers): Call store_fpregs if target
15360         has fpa registers.
15361
15362 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15363
15364         * cris-tdep.c (cris_gdbarch_init): Remove check for
15365         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15366
15367 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15368
15369         * corelow.c (get_core_register_section): Check for regset
15370         existence before checking for REGSET_VARIABLE_SIZE.
15371
15372 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15373             Pedro Alves  <palves@redhat.com>
15374
15375         PR gdb/20939
15376         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15377         call memory_error, save memaddr instead.
15378         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15379         negative, cal memory_error.
15380         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15381
15382 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15383
15384         * disasm-selftests.c (memory_error_test): New function.
15385         (_initialize_disasm_selftests): Register memory_error_test.
15386
15387 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15388
15389         * Makefile.in (SFILES): Add disasm-selftests.c and
15390         selftest-arch.c.
15391         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15392         * disasm-selftests.c: New file.
15393         * selftest-arch.c: New file.
15394         * selftest-arch.h: New file.
15395
15396 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15397
15398         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15399         to bfd_arch_mep.  Don't return 0 if section is not
15400         found.  Call print_insn_mep.
15401
15402 2017-01-26  Pedro Alves  <palves@redhat.com>
15403             Yao Qi  <yao.qi@linaro.org>
15404
15405         * arm-tdep.c: Include "disasm.h".
15406         (gdb_print_insn_arm): Update code to get gdbarch.
15407         * disasm.c (dis_asm_read_memory): Change it to
15408         gdb_disassembler::dis_asm_read_memory.
15409         (dis_asm_memory_error): Likewise.
15410         (dis_asm_print_address): Likewise.
15411         (gdb_pretty_print_insn): Change it to
15412         gdb_disassembler::pretty_print_insn.
15413         (dump_insns): Add one argument gdb_disassemlber.  All
15414         callers updated.
15415         (do_mixed_source_and_assembly_deprecated): Likewise.
15416         (do_mixed_source_and_assembly): Likewise.
15417         (do_assembly_only): Likewise.
15418         (gdb_disassembler::gdb_disassembler): New.
15419         (gdb_disassembler::print_insn): New.
15420         * disasm.h (class gdb_disassembler): New.
15421         (gdb_pretty_print_insn): Remove declaration.
15422         (gdb_disassemble_info): Likewise.
15423         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15424         (gdbscm_disasm_read_memory_worker): Update.
15425         (gdbscm_disasm_read_memory): Update.
15426         (gdbscm_disasm_memory_error): Remove.
15427         (gdbscm_disasm_print_address): Remove.
15428         (gdbscm_disassembler::gdbscm_disassembler): New.
15429         (gdbscm_print_insn_from_port): Update.
15430         * mips-tdep.c: Include disasm.h.
15431         (gdb_print_insn_mips): Update code to get gdbarch.
15432         * record-btrace.c (btrace_insn_history): Update.
15433         * spu-tdep.c: Include disasm.h.
15434         (struct spu_dis_asm_data): Remove.
15435         (struct spu_dis_asm_info): New.
15436         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15437         SPU id.
15438         (gdb_print_insn_spu): Cast disassemble_info to
15439         spu_dis_asm_info.
15440
15441 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15442
15443         * disasm.c (do_ui_file_delete): Delete.
15444         (gdb_insn_length): Move code creating stream to ...
15445         * utils.c (null_stream): ... here.  New function.
15446         * utils.h (null_stream): Declare.
15447
15448 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15449
15450         * python/py-inferior.c (find_thread_object): Return directly
15451         from the loop.  Remove "found" variable.
15452
15453 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15454
15455         GDB 7.12.1 released.
15456
15457 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15458
15459         * python/py-function.c (fnpy_call): Reorder declarations to have
15460         the gdbpy_enter object declared first.
15461         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15462
15463 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15464
15465         PR python/21068
15466         * python/python-internal.h (PyMem_RawMalloc): Define for
15467         Python < 3.4.
15468         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15469         PyMem_RawMalloc instead of PyMem_Malloc.
15470
15471 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15472             Luis Machado  <lgustavo@codesourcery.com>
15473
15474         * NEWS (New commands): Mention flash-erase.
15475         (New MI commands): Mention target-flash-erase.
15476         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15477         command.
15478         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15479         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15480         * target.c (flash_erase_command): New function.
15481         (initialize_targets): Add new flash-erase command.
15482         * target.h (flash_erase_command): New declaration.
15483
15484 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15485
15486         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15487         HAVE_SYS_PROCFS_H is defined.
15488
15489 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15490
15491         * remote.c (struct cached_reg): Change data into a pointer.
15492         * (stop_reply_dtr): Free data pointers before deleting vector.
15493         (process_stop_reply): Likewise.
15494         (remote_parse_stop_reply): Allocate space for data
15495
15496 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15497
15498         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15499         MAX_REGISTER_SIZE.
15500         (amd64_pseudo_register_read_value): Likewise.
15501         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15502         (store_register_using_P): Likewise.
15503         * regcache.c (regcache_xfer_part): Likewise.
15504
15505 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15506
15507         Split real and pseudo registers.
15508         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15509         (sparc32_pseudo_regnum): New enum.
15510         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15511         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15512         (SPARC32_CP0_REGISTERS): New macro.
15513         (sparc32_pseudo_register_name): New function.
15514         (sparc32_register_name): Use sparc32_pseudo_register_name.
15515         (sparc32_pseudo_register_type): New function.
15516         (sparc32_register_type): Use sparc32_pseudo_register_type.
15517         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15518         pseudo register numbers.
15519         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15520         (SPARC64_CP0_REGISTERS): New macro.
15521         (sparc64_pseudo_register_name): New function.
15522         (sparc64_register_name): Use sparc64_pseudo_register_name.
15523         (sparc64_pseudo_register_type): New function.
15524         (sparc64_register_type): Use sparc64_pseudo_register_type.
15525         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15526         pseudo register numbers.
15527         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15528         sparc64_store_arguments): Handle pseudo register numbers.
15529
15530 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15531
15532         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15533         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15534         output.
15535         (getpkt_or_notif_sane_1): Likewise.
15536
15537 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15538
15539         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15540         of CC.  Pass "-x c++-header" instead of "-x c".
15541
15542 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15543
15544         * remote.c (remote_can_async_p): Update comment.
15545
15546 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15547
15548         * linux-nat.c (linux_nat_can_async_p): Update comment.
15549
15550 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15551
15552         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15553
15554 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15555
15556         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15557
15558 2017-01-10  Tom Tromey  <tom@tromey.com>
15559
15560         * python/py-type.c (typy_legacy_template_argument): Update.
15561         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15562         ~demangle_parse_info): Declare new members.
15563         (cp_demangled_name_to_comp): Return unique_ptr.
15564         (cp_demangled_name_parse_free)
15565         (make_cleanup_cp_demangled_name_parse_free)
15566         (cp_new_demangle_parse_info): Remove.
15567         * cp-support.c (do_demangled_name_parse_free_cleanup)
15568         (make_cleanup_cp_demangled_name_parse_free): Remove.
15569         (inspect_type, cp_canonicalize_string_full)
15570         (cp_canonicalize_string): Update.
15571         (mangled_name_to_comp): Change return type.
15572         (cp_class_name_from_physname, method_name_from_physname)
15573         (cp_func_name, cp_remove_params): Update.
15574         * cp-name-parser.y (demangle_parse_info): New constructor, from
15575         cp_new_demangle_parse_info.
15576         (~demangle_parse_info): New destructor, from
15577         cp_demangled_name_parse_free.
15578         (cp_merge_demangle_parse_infos): Update.
15579         (cp_demangled_name_to_comp): Change return type.
15580
15581 2017-01-10  Tom Tromey  <tom@tromey.com>
15582
15583         * top.c (prevent_dont_repeat): Change return type.
15584         * python/python.c (execute_gdb_command): Use std::string.
15585         Update.
15586         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15587         * command.h (prevent_dont_repeat): Change return type.
15588         * breakpoint.c (bpstat_do_actions_1): Update.
15589
15590 2017-01-10  Tom Tromey  <tom@tromey.com>
15591
15592         * value.h (scoped_value_mark::~scoped_value_mark): Call
15593         free_to_mark.
15594         (scoped_value_mark::free_to_mark): New method.
15595         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15596         scoped_value_mark.
15597
15598 2017-01-10  Tom Tromey  <tom@tromey.com>
15599
15600         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15601         (valpy_reference_value, valpy_const_value, valpy_get_address)
15602         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15603         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15604         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15605         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15606         scoped_value_mark.
15607         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15608         * value.h (scoped_value_mark): New class.
15609
15610 2017-01-10  Tom Tromey  <tom@tromey.com>
15611
15612         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15613         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15614         * psymtab.c (discard_psymtabs_upto): Remove.
15615         (make_cleanup_discard_psymtabs): Remove.
15616         (struct psymtab_state): Remove.
15617
15618 2017-01-10  Tom Tromey  <tom@tromey.com>
15619
15620         * record-full.c (record_full_save_cleanups): Remove.
15621         (record_full_save): Use gdb::unlinker.
15622         * gcore.c (do_bfd_delete_cleanup): Remove.
15623         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15624         cleanups.
15625         * dwarf2read.c (unlink_if_set): Remove.
15626         (write_psymtabs_to_index): Use gdb::unlinker.
15627         * common/gdb_unlinker.h: New file.
15628
15629 2017-01-10  Tom Tromey  <tom@tromey.com>
15630
15631         * windows-tdep.c (windows_xfer_shared_library): Update.
15632         * windows-nat.c (windows_make_so): Update.
15633         * utils.h (make_cleanup_bfd_unref): Remove.
15634         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15635         * symfile.h (symfile_bfd_open)
15636         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15637         * symfile.c (read_symbols, symbol_file_add)
15638         (separate_debug_file_exists): Update.
15639         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15640         (generic_load, reread_symbols): Update.
15641         * symfile-mem.c (symbol_file_add_from_memory): Update.
15642         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15643         (spu_symbol_file_add_from_memory): Update.
15644         * solist.h (struct target_so_ops) <bfd_open>: Return
15645         gdb_bfd_ref_ptr.
15646         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15647         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15648         gdb_bfd_ref_ptr.
15649         (solib_map_sections, reload_shared_libraries_1): Update.
15650         * solib-svr4.c (enable_break): Update.
15651         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15652         * solib-frv.c (enable_break2): Update.
15653         * solib-dsbt.c (enable_break): Update.
15654         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15655         gdb_bfd_ref_ptr.
15656         (darwin_solib_get_all_image_info_addr_at_init): Update.
15657         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15658         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15659         * record-full.c (record_full_save): Update.
15660         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15661         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15662         * minidebug.c (find_separate_debug_file_in_section): Return
15663         gdb_bfd_ref_ptr.
15664         * machoread.c (macho_add_oso_symfile): Change abfd to
15665         gdb_bfd_ref_ptr.
15666         (macho_symfile_read_all_oso): Update.
15667         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15668         (macho_symfile_read): Update.
15669         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15670         (jit_bfd_try_read_symtab): Update.
15671         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15672         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15673         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15674         gdb_bfd_ref_ptr.
15675         (gdb_bfd_ref_policy): New struct.
15676         (gdb_bfd_ref_ptr): New typedef.
15677         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15678         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15679         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15680         gdb_bfd_ref_ptr.
15681         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15682         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15683         (gcore_command): Update.
15684         * exec.c (exec_file_attach): Update.
15685         * elfread.c (elf_symfile_read): Update.
15686         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15687         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15688         (open_and_init_dwo_file): Update.
15689         (open_dwp_file): Return gdb_bfd_ref_ptr.
15690         (open_and_init_dwp_file): Update.
15691         * corelow.c (core_open): Update.
15692         * compile/compile-object-load.c (compile_object_load): Update.
15693         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15694         * coffread.c (coff_symfile_read): Update.
15695         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15696         gdb_bfd_ref_ptr.  Rename.
15697         (dump_bfd_file, restore_command): Update.
15698         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15699         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15700         (find_separate_debug_file_by_buildid): Update.
15701
15702 2017-01-10  Tom Tromey  <tom@tromey.com>
15703
15704         * common/gdb_ref_ptr.h: New file.
15705         * python/py-ref.h (struct gdbpy_ref_policy): New.
15706         (gdbpy_ref): Now a typedef.
15707
15708 2017-01-10  Tom Tromey  <tom@tromey.com>
15709
15710         * utils.h (make_cleanup_htab_delete): Don't declare.
15711         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15712         Remove.
15713         * linespec.c (decode_compound_collector): Add constructor,
15714         destructor.
15715         (lookup_prefix_sym): Remove cleanup.
15716         (symtab_collector): Add constructor, destructor.
15717         (collect_symtabs_from_filename): Remove cleanup.
15718         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15719         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15720         Use htab_up.
15721         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15722         * dwarf2read.c (dw2_expand_symtabs_matching)
15723         (dw2_map_symbol_filenames, dwarf_decode_macros)
15724         (write_psymtabs_to_index): Use htab_up.
15725         * dwarf2loc.c (func_verify_no_selftailcall)
15726         (call_site_find_chain_1, func_verify_no_selftailcall)
15727         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15728         std::vector, gdb::unique_xmalloc_ptr.
15729         (call_sitep): Remove typedef.
15730         (dwarf2_locexpr_baton_eval): Remove unused variable.
15731
15732 2017-01-10  Tom Tromey  <tom@tromey.com>
15733
15734         * python/python-internal.h (make_cleanup_py_decref)
15735         (make_cleanup_py_xdecref): Don't declare.
15736         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15737         (py_xdecref, make_cleanup_py_xdecref): Remove.
15738
15739 2017-01-10  Tom Tromey  <tom@tromey.com>
15740
15741         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15742         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15743
15744 2017-01-10  Tom Tromey  <tom@tromey.com>
15745
15746         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15747
15748 2017-01-10  Tom Tromey  <tom@tromey.com>
15749
15750         * python/py-utils.c (unicode_to_encoded_string)
15751         (python_string_to_target_string)
15752         (python_string_to_target_python_string)
15753         (python_string_to_host_string, gdbpy_obj_to_string)
15754         (get_addr_from_python): Use gdbpy_ref.
15755
15756 2017-01-10  Tom Tromey  <tom@tromey.com>
15757
15758         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15759         gdbpy_ref.
15760
15761 2017-01-10  Tom Tromey  <tom@tromey.com>
15762
15763         * python/python.c (eval_python_command, gdbpy_decode_line)
15764         (gdbpy_run_events, gdbpy_start_type_printers)
15765         (gdbpy_apply_type_printers): Use gdbpy_ref.
15766
15767 2017-01-10  Tom Tromey  <tom@tromey.com>
15768
15769         * python/py-param.c (get_doc_string, compute_enum_values): Use
15770         gdbpy_ref.
15771
15772 2017-01-10  Tom Tromey  <tom@tromey.com>
15773
15774         * python/py-inferior.c (find_thread_object, build_inferior_list):
15775         Use gdbpy_ref.
15776
15777 2017-01-10  Tom Tromey  <tom@tromey.com>
15778
15779         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15780
15781 2017-01-10  Tom Tromey  <tom@tromey.com>
15782
15783         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15784         gdbpy_ref.
15785
15786 2017-01-10  Tom Tromey  <tom@tromey.com>
15787
15788         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15789         extra incref.
15790         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15791         Use gdbpy_ref.
15792
15793 2017-01-10  Tom Tromey  <tom@tromey.com>
15794
15795         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15796         gdbpy_ref.
15797
15798 2017-01-10  Tom Tromey  <tom@tromey.com>
15799
15800         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15801         decref results of PyArg_ParseTupleAndKeywords.
15802
15803 2017-01-10  Tom Tromey  <tom@tromey.com>
15804
15805         * python/python.c (python_run_simple_file): Use
15806         unique_xmalloc_ptr, gdbpy_ref.
15807
15808 2017-01-10  Tom Tromey  <tom@tromey.com>
15809
15810         * python/py-prettyprint.c (print_stack_unless_memory_error)
15811         (print_string_repr, print_children): Use gdbpy_ref.
15812         (dummy_python_frame): New class.
15813         (dummy_python_frame::dummy_python_frame): Rename from
15814         push_dummy_python_frame.
15815         (py_restore_tstate): Remove.
15816
15817 2017-01-10  Tom Tromey  <tom@tromey.com>
15818
15819         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15820
15821 2017-01-10  Tom Tromey  <tom@tromey.com>
15822
15823         * python/python.c (ensure_python_env, restore_python_env):
15824         Remove.
15825         * python/python-internal.h (ensure_python_env): Don't declare.
15826         * varobj.h (varobj_ensure_python_env): Don't declare.
15827         * varobj.c (varobj_ensure_python_env): Remove.
15828
15829 2017-01-10  Tom Tromey  <tom@tromey.com>
15830
15831         * varobj.c (varobj_value_get_print_value): Use
15832         gdbpy_enter_varobj.
15833
15834 2017-01-10  Tom Tromey  <tom@tromey.com>
15835
15836         * python/py-prettyprint.c (print_string_repr, print_children):
15837         Update.
15838         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15839         of "encoding".
15840         * varobj.c (varobj_value_get_print_value): Update.
15841         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15842
15843 2017-01-10  Tom Tromey  <tom@tromey.com>
15844
15845         * varobj.c (varobj_get_display_hint)
15846         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15847         (varobj_set_visualizer, free_variable): Use
15848         gdbpy_enter_varobj.
15849
15850 2017-01-10  Tom Tromey  <tom@tromey.com>
15851
15852         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15853         (do_finish_initialization): New function.  Use gdbpy_ref.
15854         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15855         do_finish_initialization.
15856
15857 2017-01-10  Tom Tromey  <tom@tromey.com>
15858
15859         * python/py-param.c (get_set_value, get_show_value): Use
15860         gdbpy_enter, gdbpy_ref.
15861
15862 2017-01-10  Tom Tromey  <tom@tromey.com>
15863
15864         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15865
15866 2017-01-10  Tom Tromey  <tom@tromey.com>
15867
15868         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15869
15870 2017-01-10  Tom Tromey  <tom@tromey.com>
15871
15872         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15873         Use gdbpy_enter_varobj.
15874
15875 2017-01-10  Tom Tromey  <tom@tromey.com>
15876
15877         * varobj.c (gdbpy_enter_varobj): New constructor.
15878         * python/python-internal.h (gdbpy_enter_varobj): New class.
15879         * python/py-varobj.c (py_varobj_get_iterator): Use
15880         gdbpy_enter_varobj.
15881
15882 2017-01-10  Tom Tromey  <tom@tromey.com>
15883
15884         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15885         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15886         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15887         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15888         unique_xmalloc_ptr.
15889         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15890
15891 2017-01-10  Tom Tromey  <tom@tromey.com>
15892
15893         * python/py-xmethods.c (invoke_match_method): Use
15894         gdbpy_ref.
15895
15896 2017-01-10  Tom Tromey  <tom@tromey.com>
15897
15898         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15899         gdbpy_enter, gdbpy_ref.
15900
15901 2017-01-10  Tom Tromey  <tom@tromey.com>
15902
15903         * python/python.c (python_interactive_command): Use gdbpy_enter.
15904
15905 2017-01-10  Tom Tromey  <tom@tromey.com>
15906
15907         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15908         gdbpy_ref.
15909
15910 2017-01-10  Tom Tromey  <tom@tromey.com>
15911
15912         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15913         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15914
15915 2017-01-10  Tom Tromey  <tom@tromey.com>
15916
15917         * utils.h (htab_deleter): New struct.
15918         (htab_up): New typedef.
15919         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15920         gdbpy_enter, gdbpy_ref, htab_up.
15921
15922 2017-01-10  Tom Tromey  <tom@tromey.com>
15923
15924         * python/py-unwind.c (pending_frame_invalidate): Remove.
15925         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15926
15927 2017-01-10  Tom Tromey  <tom@tromey.com>
15928
15929         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15930         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15931
15932 2017-01-10  Tom Tromey  <tom@tromey.com>
15933
15934         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15935
15936 2017-01-10  Tom Tromey  <tom@tromey.com>
15937
15938         * python/python.c (gdbpy_eval_from_control_command)
15939         (gdbpy_source_script, gdbpy_run_events)
15940         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15941         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15942         gdbpy_enter.
15943
15944 2017-01-10  Tom Tromey  <tom@tromey.com>
15945
15946         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15947
15948 2017-01-10  Tom Tromey  <tom@tromey.com>
15949
15950         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15951
15952 2017-01-10  Tom Tromey  <tom@tromey.com>
15953
15954         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15955         (python_on_inferior_call_pre, python_on_inferior_call_post)
15956         (python_on_memory_change, python_on_register_change)
15957         (python_inferior_exit, python_new_objfile, add_thread_object)
15958         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15959
15960 2017-01-10  Tom Tromey  <tom@tromey.com>
15961
15962         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15963         (bpfinishpy_handle_exit): Use gdbpy_enter.
15964
15965 2017-01-10  Tom Tromey  <tom@tromey.com>
15966
15967         * python/py-cmd.c (cmdpy_destroyer)
15968         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15969         gdbpy_enter.
15970
15971 2017-01-10  Tom Tromey  <tom@tromey.com>
15972
15973         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15974         gdbpy_enter.
15975         (gdbpy_breakpoint_has_cond): Likewise.
15976
15977 2017-01-10  Tom Tromey  <tom@tromey.com>
15978
15979         * python/python.c (gdbpy_enter): New constructor.
15980         (~gdbpy_enter): New destructor.
15981         (restore_python_env, ensure_python_env): Rewrite.
15982         * python/python-internal.h (gdbpy_enter): New class.
15983
15984 2017-01-10  Tom Tromey  <tom@tromey.com>
15985
15986         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15987
15988 2017-01-10  Tom Tromey  <tom@tromey.com>
15989
15990         * python/py-value.c (value_has_field, get_field_flag)
15991         (get_field_type, valpy_getitem, convert_value_from_python): Use
15992         gdbpy_ref.
15993
15994 2017-01-10  Tom Tromey  <tom@tromey.com>
15995
15996         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15997         gdbpy_ref.
15998
15999 2017-01-10  Tom Tromey  <tom@tromey.com>
16000
16001         * python/py-prettyprint.c (search_pp_list)
16002         (find_pretty_printer_from_objfiles)
16003         (find_pretty_printer_from_progspace)
16004         (find_pretty_printer_from_gdb, find_pretty_printer)
16005         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16006         gdbpy_ref.
16007
16008 2017-01-10  Tom Tromey  <tom@tromey.com>
16009
16010         * python/py-param.c (call_doc_function): Use gdbpy_ref.
16011
16012 2017-01-10  Tom Tromey  <tom@tromey.com>
16013
16014         * python/py-linetable.c (build_line_table_tuple_from_pcs)
16015         (ltpy_get_all_source_lines): Use gdbpy_ref.
16016
16017 2017-01-10  Tom Tromey  <tom@tromey.com>
16018
16019         * python/py-framefilter.c (extract_sym, extract_value)
16020         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16021         gdbpy_ref.
16022
16023 2017-01-10  Tom Tromey  <tom@tromey.com>
16024
16025         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16026
16027 2017-01-10  Tom Tromey  <tom@tromey.com>
16028
16029         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16030
16031 2017-01-10  Tom Tromey  <tom@tromey.com>
16032
16033         * python/py-function.c (convert_values_to_python, fnpy_init): Use
16034         gdbpy_ref.
16035
16036 2017-01-10  Tom Tromey  <tom@tromey.com>
16037
16038         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16039
16040 2017-01-10  Tom Tromey  <tom@tromey.com>
16041
16042         * python/py-type.c (convert_field, make_fielditem, typy_fields)
16043         (typy_range): Use gdbpy_ref.
16044
16045 2017-01-10  Tom Tromey  <tom@tromey.com>
16046
16047         * python/py-threadevent.c (create_thread_event_object): Use
16048         gdbpy_ref.
16049         * python/py-stopevent.c (create_stop_event_object): Simplify.
16050         (emit_stop_event): Use gdbpy_ref.
16051         * python/py-signalevent.c (create_signal_event_object): Use
16052         gdbpy_ref.
16053         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16054         (emit_new_objfile_event, create_clear_objfiles_event_object)
16055         (emit_clear_objfiles_event): Use gdbpy_ref.
16056         * python/py-infevents.c (create_inferior_call_event_object)
16057         (create_register_changed_event_object)
16058         (create_memory_changed_event_object, emit_inferior_call_event)
16059         (emit_memory_changed_event, emit_register_changed_event): Use
16060         gdbpy_ref.
16061         * python/py-exitedevent.c (create_exited_event_object)
16062         (emit_exited_event): Use gdbpy_ref.
16063         * python/py-event.h (evpy_emit_event): Remove
16064         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16065         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16066         * python/py-continueevent.c (emit_continue_event): Use
16067         gdbpy_ref.
16068         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16069         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16070         gdbpy_ref.
16071         * python/py-bpevent.c (create_breakpoint_event_object): Use
16072         gdbpy_ref.
16073
16074 2017-01-10  Tom Tromey  <tom@tromey.com>
16075
16076         * python/py-ref.h: New file.
16077
16078 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16079
16080         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16081         void.
16082         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16083         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16084         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16085         * ui-out.c (ui_out::redirect): Likewise.
16086         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16087         * cli/cli-logging.c (set_logging_redirect): Update call site of
16088         ui_out::redirect.
16089         (handle_redirections): Likewise.
16090         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16091         * top.c (execute_command_to_string): Likewise.
16092         * utils.c (do_ui_out_redirect_pop): Likewise.
16093
16094 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16095
16096         * stack.c (_initialize_stack): Update "frame" command help message.
16097
16098 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16099
16100         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16101
16102 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16103
16104         * x86-linux-nat.h: Include gdb_proc_service.h.
16105
16106 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16107
16108         * ser-base.h: Include serial.h.
16109
16110 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16111
16112         * ppc-linux-tdep.h: Include ppc-tdep.h.
16113
16114 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16115
16116         * nat/amd64-linux-siginfo.h: Include signal.h.
16117
16118 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16119
16120         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16121
16122 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16123
16124         * mi/mi-parse.h: Include mi-cmds.h.
16125
16126 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16127
16128         * inf-loop.c: Don't include "target.h".
16129         * inf-loop.h: Include it here.
16130
16131 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16132
16133         * dfp.h: Include "dboulest.h" and "expression.h".
16134
16135 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16136
16137         * ax-gdb.h: Include "ax.h".
16138
16139 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16140
16141         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16142         with nat/gdb_ptrace.h.
16143
16144 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16145
16146         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16147         new line.
16148         (mips64_fbsd_sigframe_init): Likewise.
16149
16150 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16151
16152         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16153         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16154
16155 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16156
16157         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16158         * NEWS: Mention new FreeBSD/mips native configuration.
16159         * config/mips/fbsd.mh: New file.
16160         * configure.host: Add mips*-*-freebsd*.
16161         * mips-fbsd-nat.c: New file.
16162
16163 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16164
16165         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16166         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16167         * NEWS: Mention new FreeBSD/mips target.
16168         * configure.tgt: Add mips*-*-freebsd*.
16169         * mips-fbsd-tdep.c: New file.
16170         * mips-fbsd-tdep.h: New file.
16171
16172 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16173
16174         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16175         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16176
16177 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16178
16179         Update copyright year range in all GDB files.
16180
16181 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16182
16183         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16184
16185 For older changes see ChangeLog-2016.
16186 \f
16187 Local Variables:
16188 mode: change-log
16189 left-margin: 8
16190 fill-column: 74
16191 version-control: never
16192 coding: utf-8
16193 End: