C++ify osdata
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * osdata.h: Include vector isntead of vec.h.
4         (osdata_column_s): Remove typedef.
5         (struct osdata_column): Add constructor.
6         <name, value>: Change type to std::string.
7         (DEF_VEC_O (osdata_column_s)): Remove.
8         (osdata_item_s): Remove typedef.
9         (struct osdata_item) <columns>: Change type to std::vector.
10         (DEF_VEC_O (osdata_item_s)): Remove.
11         (struct osdata): Add constructor.
12         <type>: Change type to std::string.
13         <items>: Change type to std::vector.
14         (osdata_p): Remove typedef.
15         (DEF_VEC_P (osdata_p)): Remove.
16         (osdata_parse): Return a unique_ptr.
17         (osdata_free): Remove.
18         (make_cleanup_osdata_free): Remove.
19         (get_osdata): Return a unique_ptr.
20         (get_osdata_column): Return pointer to std::string, take a
21         reference to osdata_item as parameter.
22         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
23         unique_ptr.
24         <property_name>: Change type to std::string.
25         (osdata_start_osdata): Allocate osdata with new and adjust.
26         (osdata_start_item): Adjust.
27         (osdata_start_column): Adjust.
28         (osdata_end_column): Adjust.
29         (clear_parsing_data): Remove.
30         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
31         (osdata_item_clear): Remove.
32         (get_osdata): return a unique_ptr and adjust.
33         (get_osdata_column): Return a pointer to std::string and adjust.
34         (info_osdata): Adjust.
35         * mi/mi-main.c: Include <map>.
36         (free_vector_of_osdata_items): Remove.
37         (list_available_thread_groups): Adjust, use std::map instead of
38         splay tree.
39
40 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
41
42         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
43         case in switch.
44
45 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
46
47         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
48
49 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
50
51         * varobj.h (struct varobj_update_result): Add constructor, add
52         move constructor, disable copy and assign, initialize fields.
53         <newobj>: Change type to std::vector.
54         (varobj_update): Return std::vector.
55         * varobj.c (install_dynamic_child): Change VEC parameters to
56         std::vector and adjust.
57         (update_dynamic_varobj_children): Likewise.
58         (varobj_update): Return std::vector and adjust.
59         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
60
61 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
62
63         * varobj.h (struct varobj) <parent>: Remove const.
64         <children>: Change type to std::vector.
65         (varobj_list_children): Return std::vector const reference.
66         (varobj_restrict_range): Change parameter type to std::vector
67         const reference.
68         * varobj.c (varobj_has_more): Adjust.
69         (varobj_restrict_range): Change parameter type to std::vector
70         const reference and adjust.
71         (install_dynamic_child): Adjust.
72         (update_dynamic_varobj_children): Adjust.
73         (varobj_list_children): Return std::vector const reference and
74         adjust.
75         (varobj_add_child): Adjust.
76         (update_type_if_necessary): Adjust.
77         (varobj_update): Adjust.
78         (delete_variable_1): Adjust.
79         * ada-varobj.c (ada_value_has_mutated): Adjust.
80         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
81
82 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
83
84         * varobj.h (struct varobj): Add constructor and destructor,
85         initialize fields.
86         * varobj.c (struct varobj_root): Initialize fields.
87         (struct varobj_dynamic): Initialize fields.
88         (varobj_create): Use unique_ptr instead of cleanup.  Create
89         varobj with new instead of new_root_variable.
90         (delete_variable_1): Free variable with delete instead of
91         free_variable.
92         (create_child_with_value): Create variable with new instead of
93         new_variable.
94         (varobj::varobj): New.
95         (varobj::~varobj): New (body mostly coming from free_variable).
96         (new_variable): Remove.
97         (free_variable): Remove.
98         (do_free_variable_cleanup): Remove.
99         (make_cleanup_free_variable): Remove.
100
101 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
102
103         * core-regset.c: Remove file.
104         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
105
106 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
107
108         * NEWS: Document use of GNU MPFR.
109         * README: Likewise.
110
111         * Makefile.in (LIBMPFR): Add define.
112         (CLIBS): Add $(LIBMPFR).
113         * configure.ac: Add --with-mpfr configure option.
114         * configure: Regenerate.
115         * config.in: Regenerate.
116
117         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
118         (class mpfr_float_ops): New type.
119         (mpfr_float_ops::from_target): Two new overloaded functions.
120         (mpfr_float_ops::to_target): Likewise.
121         (mpfr_float_ops::to_string): New function.
122         (mpfr_float_ops::from_string): Likewise.
123         (mpfr_float_ops::to_longest): Likewise.
124         (mpfr_float_ops::from_longest): Likewise.
125         (mpfr_float_ops::from_ulongest): Likewise.
126         (mpfr_float_ops::to_host_double): Likewise.
127         (mpfr_float_ops::from_host_double): Likewise.
128         (mpfr_float_ops::convert): Likewise.
129         (mpfr_float_ops::binop): Likewise.
130         (mpfr_float_ops::compare): Likewise.
131         (get_target_float_ops): Use mpfr_float_ops if available.
132
133 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
134
135         * target-float.c: Do not include <math.h>.
136         Include <cmath> and <limits>.
137         (DOUBLEST): Do not define.
138         (class target_float_ops): New type.
139         (class host_float_ops): New templated type.
140         (class decimal_float_ops): New type.
141
142         (floatformat_to_doublest): Rename to ...
143         (host_float_ops<T>::from_target): ... this.  Use template type T
144         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
145         (host_float_ops<T>::from_target): New overload using a type argument.
146         (floatformat_from_doublest): Rename to ...
147         (host_float_ops<T>::to_target): ... this.  Use template type T
148         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
149         (host_float_ops<T>::to_target): New overload using a type argument.
150         (floatformat_printf_format): New function.
151         (struct printf_length_modifier): New templated type.
152         (floatformat_to_string): Rename to ...
153         (host_float_ops<T>::to_string): ... this.  Use type instead of
154         floatformat argument.  Use floatformat_printf_format and
155         printf_length_modifier.  Remove special handling of invalid numbers,
156         infinities and NaN (moved to target_float_to_string).
157         (struct scanf_length_modifier): New templated type.
158         (floatformat_from_string): Rename to ...
159         (host_float_ops<T>::from_string): ... this.  Use type instead of
160         floatformat argument.  Use scanf_length_modifier.
161         (floatformat_to_longest): Rename to ...
162         (host_float_ops<T>::to_longest): ... this.  Use type instead of
163         floatformat argument.  Handle out-of-range values deterministically.
164         (floatformat_from_longest): Rename to ...
165         (host_float_ops<T>::from_longest): ... this.  Use type instead of
166         floatformat argument.
167         (floatformat_from_ulongest): Rename to ...
168         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
169         floatformat argument.
170         (floatformat_to_host_double): Rename to ...
171         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
172         floatformat argument.
173         (floatformat_from_host_double): Rename to ...
174         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
175         floatformat argument.
176         (floatformat_convert): Rename to ...
177         (host_float_ops<T>::convert): ... this.  Use type instead of
178         floatformat arguments.  Remove handling of no-op conversions.
179         (floatformat_binop): Rename to ...
180         (host_float_ops<T>::binop): ... this.  Use type instead of
181         floatformat arguments.
182         (floatformat_compare): Rename to ...
183         (host_float_ops<T>::compare): ... this.  Use type instead of
184         floatformat arguments.
185
186         (match_endianness): Use type instead of length/byte_order arguments.
187         (set_decnumber_context): Likewise.
188         (decimal_from_number): Likewise.  Update calls.
189         (decimal_to_number): Likewise.
190         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
191         (decimal_float_ops::to_host_double): New dummy function.
192         (decimal_float_ops::from_host_double): Likewise.
193         (decimal_to_string): Rename to ...
194         (decimal_float_ops::to_string): ... this.  Use type instead of
195         length/byte_order arguments.  Update calls.
196         (decimal_from_string): Rename to ...
197         (decimal_float_ops::from_string): ... this.  Use type instead of
198         length/byte_order arguments.  Update calls.
199         (decimal_from_longest): Rename to ...
200         (decimal_float_ops::from_longest): ... this.  Use type instead of
201         length/byte_order arguments.  Update calls.
202         (decimal_from_ulongest): Rename to ...
203         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
204         length/byte_order arguments.  Update calls.
205         (decimal_to_longest): Rename to ...
206         (decimal_float_ops::to_longest): ... this.  Use type instead of
207         length/byte_order arguments.  Update calls.
208         (decimal_binop): Rename to ...
209         (decimal_float_ops::binop): ... this.  Use type instead of
210         length/byte_order arguments.  Update calls.
211         (decimal_compare): Rename to ...
212         (decimal_float_ops::compare): ... this.  Use type instead of
213         length/byte_order arguments.  Update calls.
214         (decimal_convert): Rename to ...
215         (decimal_float_ops::convert): ... this.  Use type instead of
216         length/byte_order arguments.  Update calls.
217
218         (target_float_same_category_p): New function.
219         (target_float_same_format_p): Likewise.
220         (target_float_format_length): Likewise.
221         (enum target_float_ops_kind): New type.
222         (get_target_float_ops_kind): New function.
223         (get_target_float_ops): Three new overloaded functions.
224
225         (target_float_is_zero): Update call.
226         (target_float_to_string): Add special handling of invalid numbers,
227         infinities and NaN (moved from floatformat_to_string).  Use
228         target_float_ops callback.
229         (target_float_from_string): Use target_float_ops callback.
230         (target_float_to_longest): Likewise.
231         (target_float_from_longest): Likewise.
232         (target_float_from_ulongest): Likewise.
233         (target_float_to_host_double): Likewise.
234         (target_float_from_host_double): Likewise.
235         (target_float_convert): Add special case for no-op conversions.
236         Use target_float_ops callback.
237         (target_float_binop): Use target_float_ops callback.
238         (target_float_compare): Likewise.
239
240 2017-11-22  Yao Qi  <yao.qi@linaro.org>
241
242         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
243
244 2017-11-22  Yao Qi  <yao.qi@linaro.org>
245
246         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
247         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
248
249 2017-11-21  Jerome Guitton  <guitton@adacore.com>
250
251         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
252         with event ptid from the lower layer before doing the
253         ravenscar-specific update.
254
255 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
256
257         * ravenscar-thread.c (is_ravenscar_task): Also verify that
258         the ptid's TID is nonzero.
259
260 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
261
262         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
263         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
264         Make non-static.  Change return type to char *.  Adjust code
265         accordingly.  Rewrite the function's documentation.
266         (read_atcb): Adjust call to get_tcb_types_info accordingly.
267         * ravenscar-thread.c (ravenscar_inferior_created): Check that
268         we have enough debugging information in the runtime to support
269         Ada task debugging before we enable the ravenscar-thread layer.
270
271 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
272
273         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
274         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
275         * ravenscar-thread.c: Add into comment.
276         (base_magic_null_ptid): Delete.
277         (base_ptid): Change documentation.
278         (ravenscar_active_task): Renames ravenscar_running_thread.
279         All callers updated throughout.
280         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
281         (ravenscar_task_is_currently_active): Likewise.
282         (get_base_thread_from_ravenscar_task): Ditto.
283         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
284         (ravenscar_runtime_initialized): Likewise.
285         (get_running_thread_id): Add new parameter "cpu".  Adjust
286         implementation to handle this new parameter.
287         (ravenscar_fetch_registers): Small adjustment to use
288         is_ravenscar_task and ravenscar_task_is_currently_active in
289         order to decide whether to use the target beneath or this
290         module's arch_ops.
291         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
292         (ravenscar_stopped_by_sw_breakpoint): Use
293         get_base_thread_from_ravenscar_task to get the underlying
294         thread, rather than using base_ptid.
295         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
296         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
297         Likewise.
298         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
299
300 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
301
302         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
303         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
304         (get_tcb_types_info): Set fieldnos.base_cpu.
305         (read_atcb): Set task_info->base_cpu.
306         (info_task): Print "Base CPU" info if set by runtime.
307
308 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
309
310         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
311         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
312         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
313         New functions.
314         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
315         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
316         to_stopped_data_address and to_core_of_thread fields of
317         ravenscar_ops.
318
319 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
320
321         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
322         (struct gdbarch_tdep): New member long_double_abi.
323         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
324         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
325         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
326         format depending on long_double_abi tdep member.
327         (ppc_floatformat_for_type): Handle __ibm128 type.
328
329 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
330
331         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
332
333 2017-11-21  Pedro Alves  <palves@redhat.com>
334
335         * dwarf2read.c (mapped_index::find_name_components_bounds)
336         <completion mode, upper bound>: Use std::lower_bound instead of
337         std::upper_bound.
338         (test_mapped_index_find_name_component_bounds): Remove incorrect
339         "t1_fund" from expected symbols.
340
341 2017-11-21  Pedro Alves  <palves@redhat.com>
342
343         * dwarf2read.c (mapped_index::name_components_casing): New field.
344         (mapped_index) <build_name_components,
345         find_name_components_bounds): Declare new methods.
346         (mapped_index::find_name_components_bounds)
347         (mapped_index::build_name_components): New methods, factored out
348         from dw2_expand_symtabs_matching_symbol.
349         (check_find_bounds_finds)
350         (test_mapped_index_find_name_component_bounds): New.
351         (run_test): Rename to ...
352         (test_dw2_expand_symtabs_matching_symbol): ... this.
353         (run_test): Reimplement.
354
355 2017-11-21  Pedro Alves  <palves@redhat.com>
356
357         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
358         (symbol_end): Use cp_ident_is_alnum.
359         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
360         * dwarf2read.c (make_sort_after_prefix_name): New function.
361         (dw2_expand_symtabs_matching_symbol): Use it.
362         (test_symbols): Add more symbols.
363         (run_test): Add tests.
364
365 2017-11-17  Tom Tromey  <tom@tromey.com>
366
367         * symtab.h (enum symbol_subclass_kind): New.
368         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
369         Remove.
370         <subclass>: New member.
371         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
372         * rust-lang.c (rust_get_trait_object_pointer): Update.
373         * dwarf2read.c (read_func_scope): Update.
374         (read_variable): Update.
375
376 2017-11-17  Tom Tromey  <tom@tromey.com>
377
378         * dwarf2read.c (read_func_scope): Update.
379         * symtab.h (struct template_symbol): Derive from symbol.
380         <base>: Remove.
381
382 2017-11-17  Tom Tromey  <tom@tromey.com>
383
384         * symtab.h (struct symbol) <is_rust_vtable>: New member.
385         (struct rust_vtable_symbol): New.
386         (find_symbol_at_address): Declare.
387         * symtab.c (find_symbol_at_address): New function.
388         * symfile.h (struct quick_symbol_functions)
389         <find_compunit_symtab_by_address>: New member.
390         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
391         function.
392         (debug_sym_quick_functions): Link to
393         debug_qf_find_compunit_symtab_by_address.
394         * rust-lang.c (rust_get_trait_object_pointer): New function.
395         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
396         rust_get_trait_object_pointer.
397         * psymtab.c (psym_relocate): Clear psymbol_map.
398         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
399         functions.
400         (psym_functions): Link to psym_find_compunit_symtab_by_address.
401         * objfiles.h (struct objfile) <psymbol_map>: New member.
402         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
403         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
404         (rust_containing_type, read_variable): New functions.
405
406 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
407
408         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
409
410 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
411
412         * common/filestuff.c: Include <algorithm>.
413         (open_fds): Change type to std::vector<int>.
414         (do_mark_open_fd): Adjust.
415         (unmark_fd_no_cloexec): Adjust.
416         (do_close): Adjust.
417
418 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
419
420         * breakpoint.c (output_thread_groups): Take an std::vector.
421         (print_one_breakpoint_location): Adjust.
422
423 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
424
425         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
426         (ada_evaluate_subexp_for_cast): New function.
427         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
428         ada_evaluate_subexp_for_cast.
429         (ada_evaluate_subexp) <nosideret>: Replace code by call to
430         eval_skip_value.
431         * eval.c (evaluate_var_value): Make non-static.
432         (evaluate_var_msym_value, eval_skip_value): Likewise.
433         * value.h (evaluate_var_value, evaluate_var_msym_value)
434         (eval_skip_value): Declare.
435
436 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
437
438         * ada-lang.c (ada_value_cast): Remove parameter "noside".
439         Update all callers.
440
441 2017-11-16  Pedro Alves  <palves@redhat.com>
442
443         * python/py-unwind.c (pyuw_sniffer): Translate
444         PyExc_KeyboardInterrupt to a GDB Quit exception.
445
446 2017-11-16  Pedro Alves  <palves@redhat.com>
447
448         * infrun.c (resume_cleanups): Delete.
449         (resume): No longer install a resume_cleanups cleanup nor call
450         QUIT.
451         (proceed): Pass the terminal to the inferior.
452         (keep_going_pass_signal): No longer install a resume_cleanups
453         cleanup.
454
455 2017-11-16  Pedro Alves  <palves@redhat.com>
456
457         * inf-loop.c (inferior_event_handler): Don't swallow the exception
458         if the prompt is blocked.
459
460 2017-11-16  Pedro Alves  <palves@redhat.com>
461
462         * breakpoint.c (insert_bp_location): Replace bp_err and
463         bp_err_message locals by a gdb_exception local.
464
465 2017-11-16  Pedro Alves  <palves@redhat.com>
466
467         * inflow.c (scoped_ignore_sigttou): New class.
468         (child_terminal_ours_1, new_tty): Use it.
469
470 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
471
472         * target-float.c (decimal_from_number): Add byte_order argument and
473         call match_endianness.  Error if unknown floating-point type.
474         (decimal_to_number): Add byte_order argument and call match_endianness.
475         (decimal_from_longest): Update call.  Do not call match_endianness.
476         (decimal_from_ulongest): Likewise.
477         (decimal_binop): Likewise.
478         (decimal_is_zero): Likewise.
479         (decimal_compare): Likewise.
480         (decimal_convert): Likewise.
481
482 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
483
484         * python/python.c (gdbpy_rbreak): New function.
485         * NEWS: Document Python rbreak feature.
486
487 2017-11-16  Yao Qi  <yao.qi@linaro.org>
488
489         * features/tic6x-c62x.xml: Remove.
490         * features/tic6x-c64x.xml: Remove.
491         * features/tic6x-c64xp.xml: Remove.
492
493 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
494
495         * symtab.h: Include <array>.
496
497 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
498
499         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
500         (bsd_kvm_proc_cmd): Likewise.
501
502 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
503
504         * tui/tui-win.c (window_name_completer): Replace VEC with
505         std::vector.
506
507 2017-11-15  Andrew Cagney  <cagney@gnu.org>
508
509         * MAINTAINERS: Remove no-longer applicable entries.
510
511 2017-11-15  Andrew Cagney  <cagney@gnu.org>
512
513         * MAINTAINERS: Move self to Past Maintainers.
514
515 2017-11-15  Yao Qi  <yao.qi@linaro.org>
516
517         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
518         * features/nios2-linux.c: Remove.
519         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
520         initialize_tdesc_nios2_linux.
521
522 2017-11-15  Yao Qi  <yao.qi@linaro.org>
523
524         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
525         M68HC11_LAST_HARD_REG + 1.
526
527 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
528
529         PR gdb/22388
530         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
531         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
532         Return TARGET_XFER_EOF if size of returned data is 0.
533
534 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
535
536         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
537         memory-map-selftests.c.
538         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
539         * memory-map.c (memory_map_start_memory): Fix computation of hi
540         address.
541         * unittests/memory-map-selftests.c: New file.
542
543 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
544
545         * ada-lang.c: Fix some typos in the general command documenting
546         how Ada expressions are being evaluated and how their result
547         is printed.
548
549 2017-11-09  Tom Tromey  <tom@tromey.com>
550
551         * psymtab.c (psymbol_hash): Do not hash string contents.
552         (psymbol_compare): Add comment.
553
554 2017-11-09  Tom Tromey  <tom@tromey.com>
555
556         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
557
558 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
559
560         * ada-exp.y (write_var_from_sym): Remove parameter
561         "orig_left_context".  Update all callers.
562
563 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
564
565         * tracepoint.h (class collection_list) <stringify>: Return
566         std::vector<std::string>.
567         (encode_actions_rsp): Change parameters to
568         std::vector<std::string> *.
569         * tracepoint.c (collection_list::stringify): Return
570         std::vector<std::string> and adjust accordingly.
571         (encode_actions_rsp): Changee parameters to
572         std::vector<std::string> and adjust accordingly.
573         * remote.c (free_actions_list),
574         free_actions_list_cleanup_wrapper): Remove.
575         (remote_download_tracepoint): Adjust to std::vector.
576
577 2017-11-08  Tom Tromey  <tom@tromey.com>
578
579         * dwarf2read.c (symbolp): Remove typedef.
580         (read_func_scope): Use std::vector.
581         (process_structure_scope): Use std::vector.
582
583 2017-11-08  Pedro Alves  <palves@redhat.com>
584
585         * ada-lang.c (ada_make_symbol_completion_list): Use
586         completion_skip_symbol.
587         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
588         (symbol_is_function_or_method(symbol*)): New.
589         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
590         completion_skip_symbol.
591         (default_collect_symbol_completion_matches_break_on): Use
592         completion_skip_symbol.  Pass down mode.
593         (collect_file_symbol_completion_matches): Pass down mode.
594         * symtab.h (symbol_is_function_or_method): New declarations.
595         (completion_skip_symbol): New template function.
596
597 2017-11-08  Pedro Alves  <palves@redhat.com>
598
599         * linespec.c (iterate_over_all_matching_symtabs): Add
600         search_domain parameter.  Pass it down to expand_symtabs_matching.
601         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
602         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
603         search_domain.
604         (add_all_symbol_names_from_pspace): Add search_domain parameter.
605         Pass it down.
606         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
607         symbols.
608         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
609         it down.
610
611 2017-11-08  Pedro Alves  <palves@redhat.com>
612
613         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
614         text_len locals and don't pass them down.
615         * symtab.c (completion_list_add_name): Remove
616         sym_text/sym_text_len parameters and adjust.
617         (completion_list_add_symbol, completion_list_add_msymbol)
618         (completion_list_objc_symbol, completion_list_add_fields)
619         (add_symtab_completions): Likewise.
620         (default_collect_symbol_completion_matches_break_on)
621         (collect_file_symbol_completion_matches): Remove sym_text_len
622         local and don't pass it down.
623         * symtab.h (completion_list_add_name): Remove
624         sym_text/sym_text_len parameters.
625
626 2017-11-08  Pedro Alves  <palves@redhat.com>
627
628         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
629         unittests/lookup_name_info-selftests.c.
630         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
631         * cp-support.c: Include "selftest.h".
632         (cp_remove_params_1): Rename from cp_remove_params.  Add
633         'require_param' parameter, and handle it.
634         (cp_remove_params): Reimplement.
635         (cp_remove_params_if_any): New.
636         (selftests::quote): New.
637         (selftests::check_remove_params): New.
638         (selftests::test_cp_remove_params): New.
639         (_initialize_cp_support): Install
640         selftests::test_cp_remove_params.
641         * cp-support.h (cp_remove_params_if_any): Declare.
642         * dwarf2read.c :Include "selftest.h".
643         (dw2_expand_symtabs_matching_symbol): Use
644         lookup_name_info::make_ignore_params.
645         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
646         (selftests::dw2_expand_symtabs_matching::string_or_null)
647         (selftests::dw2_expand_symtabs_matching::check_match)
648         (selftests::dw2_expand_symtabs_matching::test_symbols)
649         (selftests::dw2_expand_symtabs_matching::run_test): New.
650         (_initialize_dwarf2_read): Register
651         selftests::dw2_expand_symtabs_matching::run_test.
652         * psymtab.c (psym_expand_symtabs_matching): Use
653         lookup_name_info::make_ignore_params.
654         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
655         If the lookup name wants to ignore parameters, strip them.
656         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
657         code handling '('.
658         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
659         (default_collect_symbol_completion_matches_break_on): Don't try to
660         strip parameters.
661         * symtab.h (lookup_name_info::lookup_name_info): Add
662         'ignore_parameters' parameter.
663         (lookup_name_info::ignore_parameters)
664         (lookup_name_info::make_ignore_params): New methods.
665         (lookup_name_info::m_ignore_parameters): New field.
666         * unittests/lookup_name_info-selftests.c: New file.
667
668 2017-11-08  Pedro Alves  <palves@redhat.com>
669
670         * dwarf2read.c (dw2_expand_marked_cus)
671         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
672         (dw2_expand_symtabs_matching): Move further below.
673         (dw2_expand_marked_cus): Reindent.
674
675 2017-11-08  Pedro Alves  <palves@redhat.com>
676
677         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
678         (struct name_component): New.
679         (mapped_index::name_components): New field.
680         (mapped_index::symbol_name_at): New method.
681         (dwarf2_read_index): Call mapped_index ctor.
682         (dw2_map_matching_symbols): Add comment about name_components
683         table.
684         (dw2_expand_symtabs_matching): Factor part to...
685         (dw2_expand_symtabs_matching_symbol): ... this new function.
686         Build name components table, and lookup symbols in it before
687         calling the name matcher.
688         (dw2_expand_marked_cus): New, factored out from
689         dw2_expand_symtabs_matching.
690         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
691
692 2017-11-08   Pedro Alves  <palves@redhat.com>
693
694         * ada-lang.c (ada_encode): Rename to ..
695         (ada_encode_1): ... this.  Add throw_errors parameter and handle
696         it.
697         (ada_encode): Reimplement.
698         (match_name): Delete, folded into full_name.
699         (resolve_subexp): No longer pass the encoded name to
700         ada_lookup_symbol_list.
701         (should_use_wild_match): Delete.
702         (name_match_type_from_name): New.
703         (ada_lookup_simple_minsym): Use lookup_name_info and the
704         language's symbol_name_matcher_ftype.
705         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
706         (ada_add_block_renamings): Adjust to use lookup_name_info.
707         (ada_lookup_name): New.
708         (add_nonlocal_symbols, ada_add_all_symbols)
709         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
710         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
711         (ada_name_for_lookup): Delete.
712         (ada_lookup_encoded_symbol): Construct a verbatim name.
713         (wild_match): Reverse sense of return type.  Use bool.
714         (full_match): Reverse sense of return type.  Inline bits of old
715         match_name here.
716         (ada_add_block_symbols): Adjust to use lookup_name_info.
717         (symbol_completion_match): Delete, folded into...
718         (ada_lookup_name_info::matches): ... .this new method.
719         (symbol_completion_add): Delete.
720         (ada_collect_symbol_completion_matches): Add name_match_type
721         parameter.  Adjust to use lookup_name_info and
722         completion_list_add_name.
723         (get_var_value, ada_add_global_exceptions): Adjust to use
724         lookup_name_info.
725         (ada_get_symbol_name_cmp): Delete.
726         (do_wild_match, do_full_match): New functions.
727         (ada_lookup_name_info::ada_lookup_name_info): New method.
728         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
729         functions.
730         (ada_language_defn): Install ada_get_symbol_name_matcher.
731         * ada-lex.l (processId): If name starts with '<', copy it
732         verbatim.
733         * block.c (block_iter_match_step, block_iter_match_first)
734         (block_iter_match_next, block_lookup_symbol)
735         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
736         lookup_name_info.
737         * block.h (block_iter_match_first, block_iter_match_next)
738         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
739         * c-lang.c (c_language_defn, cplus_language_defn)
740         (asm_language_defn, minimal_language_defn): Adjust comments to
741         refer to la_get_symbol_name_matcher.
742         * completer.c (complete_files_symbols)
743         (collect_explicit_location_matches, symbol_completer): Pass a
744         symbol_name_match_type down.
745         * completer.h (class completion_match, completion_match_result):
746         New classes.
747         (completion_tracker::reset_completion_match_result): New method.
748         (completion_tracker::m_completion_match_result): New field.
749         * cp-support.c (make_symbol_overload_list_block): Adjust to use
750         lookup_name_info.
751         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
752         functions.
753         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
754         * d-lang.c: Adjust comments to refer to
755         la_get_symbol_name_matcher.
756         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
757         Adjust to use lookup_name_info.
758         (dict_iter_match_first, dict_iter_match_next)
759         (iter_match_first_hashed, iter_match_next_hashed)
760         (iter_match_first_linear, iter_match_next_linear): Adjust to work
761         with a lookup_name_info.
762         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
763         Likewise.
764         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
765         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
766         (gdb_index_symbol_name_matcher): New class.
767         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
768         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
769         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
770         with a symbol_name_match_type.
771         (f_language_defn): Adjust comments to refer to
772         la_get_symbol_name_matcher.
773         * go-lang.c (go_language_defn): Adjust comments to refer to
774         la_get_symbol_name_matcher.
775         * language.c (default_symbol_name_matcher)
776         (language_get_symbol_name_matcher): New functions.
777         (unknown_language_defn, auto_language_defn): Adjust comments to
778         refer to la_get_symbol_name_matcher.
779         * language.h (symbol_name_cmp_ftype): Delete.
780         (language_defn) <la_collect_symbol_completion_matches>: Add match
781         type parameter.
782         <la_get_symbol_name_cmp>: Delete field.
783         <la_get_symbol_name_matcher>: New field.
784         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
785         (default_symbol_name_matcher, language_get_symbol_name_matcher):
786         Declare.
787         * linespec.c (iterate_over_all_matching_symtabs)
788         (iterate_over_file_blocks): Adjust to use lookup_name_info.
789         (find_methods): Add language parameter, and use lookup_name_info
790         and the language's symbol_name_matcher_ftype.
791         (linespec_complete_function): Adjust.
792         (lookup_prefix_sym): Use lookup_name_info.
793         (add_all_symbol_names_from_pspace): Adjust.
794         (find_superclass_methods): Add language parameter and pass it
795         down.
796         (find_method): Pass symbol language down.
797         (find_linespec_symbols): Don't demangle or Ada encode here.
798         (search_minsyms_for_name): Add lookup_name_info parameter.
799         (add_matching_symbols_to_info): Add name_match_type parameter.
800         Use lookup_name_info.
801         * m2-lang.c (m2_language_defn): Adjust comments to refer to
802         la_get_symbol_name_matcher.
803         * minsyms.c: Include <algorithm>.
804         (add_minsym_to_demangled_hash_table): Remove table parameter and
805         add objfile parameter.  Use search_name_hash, and add language to
806         demangled languages vector.
807         (struct found_minimal_symbols): New struct.
808         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
809         New functions.
810         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
811         input names here.  Use lookup_name_info instead.  Lookup up
812         demangled names once for each language in the demangled names
813         vector.
814         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
815         demangled names once for each language in the demangled names
816         vector.
817         (build_minimal_symbol_hash_tables): Adjust.
818         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
819         lookup_name_info.
820         * objc-lang.c (objc_language_defn): Adjust comment to refer to
821         la_get_symbol_name_matcher.
822         * objfiles.h: Include <vector>.
823         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
824         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
825         la_get_symbol_name_matcher.
826         * p-lang.c (pascal_language_defn): Adjust comment to refer to
827         la_get_symbol_name_matcher.
828         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
829         (match_partial_symbol): Use symbol_name_match_type,
830         lookup_name_info and psymbol_name_matches.
831         (lookup_partial_symbol): Use lookup_name_info.
832         (map_block): Use symbol_name_match_type and lookup_name_info.
833         (psym_map_matching_symbols): Use symbol_name_match_type.
834         (psymbol_name_matches): New.
835         (recursively_search_psymtabs): Use lookup_name_info and
836         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
837         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
838         'kind' parameter to 'domain'.
839         * rust-lang.c (rust_language_defn): Adjust comment to refer to
840         la_get_symbol_name_matcher.
841         * symfile-debug.c (debug_qf_map_matching_symbols)
842         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
843         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
844         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
845         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
846         Adjust to use symbol_name_match_type.
847         <expand_symtabs_matching>: Adjust to use lookup_name_info.
848         (expand_symtabs_matching): Adjust to use lookup_name_info.
849         * symmisc.c (maintenance_expand_symtabs): Use
850         lookup_name_info::match_any ().
851         * symtab.c (symbol_matches_search_name): New.
852         (eq_symbol_entry): Adjust to use lookup_name_info and the
853         language's matcher.
854         (demangle_for_lookup_info::demangle_for_lookup_info): New.
855         (lookup_name_info::match_any): New.
856         (iterate_over_symbols, search_symbols): Use lookup_name_info.
857         (compare_symbol_name): Add language, lookup_name_info and
858         completion_match_result parameters, and use them.
859         (completion_list_add_name): Make extern.  Add language and
860         lookup_name_info parameters.  Use them.
861         (completion_list_add_symbol, completion_list_add_msymbol)
862         (completion_list_objc_symbol): Add lookup_name_info parameters and
863         adjust.  Pass down language.
864         (completion_list_add_fields): Add lookup_name_info parameters and
865         adjust.  Pass down language.
866         (add_symtab_completions): Add lookup_name_info parameters and
867         adjust.
868         (default_collect_symbol_completion_matches_break_on): Add
869         name_match_type parameter, and use it.  Use lookup_name_info.
870         (default_collect_symbol_completion_matches)
871         (collect_symbol_completion_matches): Add name_match_type
872         parameter, and pass it down.
873         (collect_symbol_completion_matches_type): Adjust.
874         (collect_file_symbol_completion_matches): Add name_match_type
875         parameter, and use lookup_name_info.
876         * symtab.h: Include <string> and "common/gdb_optional.h".
877         (enum class symbol_name_match_type): New.
878         (class ada_lookup_name_info): New.
879         (struct demangle_for_lookup_info): New.
880         (class lookup_name_info): New.
881         (symbol_name_matcher_ftype): New.
882         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
883         (symbol_matches_search_name): Declare.
884         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
885         (default_collect_symbol_completion_matches)
886         (collect_symbol_completion_matches)
887         (collect_file_symbol_completion_matches): Add name_match_type
888         parameter.
889         (iterate_over_symbols): Use lookup_name_info.
890         (completion_list_add_name): Declare.
891         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
892         (strncmp_iw_with_mode): Now extern.
893         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
894         (strncmp_iw_with_mode): Declare.
895
896 2017-11-08  Keith Seitz  <keiths@redhat.com>
897             Pedro Alves  <palves@redhat.com>
898
899         * ada-lang.c (ada_language_defn): Install
900         default_search_name_hash.
901         * buildsym.c (struct buildsym_compunit): <language>: New field.
902         (finish_block_internal): Pass language when creating dictionaries.
903         (start_buildsym_compunit, start_symtab): New language parameters.
904         Use them.
905         (restart_symtab): Pass down compilation unit's language.
906         * buildsym.h (enum language): Forward declare.
907         (start_symtab): New 'language' parameter.
908         * c-lang.c (c_language_defn, cplus_language_defn)
909         (asm_language_defn, minimal_language_defn): Install
910         default_search_name_hash.
911         * coffread.c (coff_start_symtab): Adjust.
912         * d-lang.c (d_language_defn): Install default_search_name_hash.
913         * dbxread.c (struct symloc): Add 'pst_language' field.
914         (PST_LANGUAGE): Define.
915         (start_psymtab, read_ofile_symtab): Use it.
916         (process_one_symbol): New 'language' parameter.  Pass it down.
917         * dictionary.c (struct dictionary) <language>: New field.
918         (DICT_LANGUAGE): Define.
919         (dict_create_hashed, dict_create_hashed_expandable)
920         (dict_create_linear, dict_create_linear_expandable): New parameter
921         'language'.  Set the dictionary's language.
922         (iter_match_first_hashed): Adjust to rename.
923         (insert_symbol_hashed): Assert we don't see mismatching
924         languages.  Adjust to rename.
925         (dict_hash): Rename to ...
926         (default_search_name_hash): ... this and make extern.
927         * dictionary.h (struct language_defn): Forward declare.
928         (dict_create_hashed): New parameter 'language'.
929         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
930         * f-lang.c (f_language_defn): Install default_search_name_hash.
931         * go-lang.c (go_language_defn): Install default_search_name_hash.
932         * jit.c (finalize_symtab): Pass compunit's language to dictionary
933         creation.
934         * language.c (unknown_language_defn, auto_language_defn):
935         * language.h (language_defn::la_search_name_hash): New field.
936         (default_search_name_hash): Declare.
937         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
938         * mdebugread.c (new_block): New parameter 'language'.
939         * mdebugread.c (parse_symbol): Pass symbol language to block
940         allocation.
941         (psymtab_to_symtab_1): Pass down language.
942         (new_symtab): Pass compunit's language to block allocation.
943         * objc-lang.c (objc_language_defn): Install
944         default_search_name_hash.
945         * opencl-lang.c (opencl_language_defn):
946         * p-lang.c (pascal_language_defn): Install
947         default_search_name_hash.
948         * rust-lang.c (rust_language_defn): Install
949         default_search_name_hash.
950         * stabsread.h (enum language): Forward declare.
951         (process_one_symbol): Add 'language' parameter.
952         * symtab.c (search_name_hash): New function.
953         * symtab.h (search_name_hash): Declare.
954         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
955
956 2017-11-08  Pedro Alves  <palves@redhat.com>
957
958         * cp-name-parser.y (main): Don't initialize extra_chars.
959
960 2017-11-07  Tom Tromey  <tom@tromey.com>
961
962         * event-top.h (command_handler): Constify.
963         * record-full.c (cmd_record_full_start): Update.
964         * thread.c (thread_apply_all_command): Update.
965         * printcmd.c (eval_command): Update.
966         * mi/mi-main.c (mi_execute_cli_command): Update.
967         (mi_execute_async_cli_command): Update.
968         * tui/tui-stack.c (tui_update_command): Update.
969         * cli/cli-interp.c (safe_execute_command): Constify.
970         * record.c (record_start): Update.
971         (record_start, record_stop, cmd_record_start): Update.
972         * record-btrace.c (cmd_record_btrace_bts_start): Update.
973         (cmd_record_btrace_pt_start): Update.
974         (cmd_record_btrace_start): Update.
975         (cmd_record_btrace_start): Update.
976         * reverse.c (exec_reverse_once): Update.
977         * python/python.c (execute_gdb_command): Don't copy the command.
978         * event-top.c (command_line_handler): Update.
979         (command_handler): Constify.
980         * defs.h (deprecated_call_command_hook): Constify.
981         * cli/cli-script.h (execute_user_command): Constify.
982         * cli/cli-script.c (execute_user_command): Constify.
983         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
984         (enum command_control_type): Update.
985         * main.c (catch_command_errors): Remove non-const overload.
986         (catch_command_errors_ftype): Remove.
987         * python/py-cmd.c (cmdpy_function): Constify.
988         * guile/scm-cmd.c (cmdscm_function): Constify.
989         * cli/cli-dump.c (call_dump_func): Constify.
990         * cli/cli-decode.c (do_const_cfunc): Constify.
991         (do_sfunc): Constify.
992         (cmd_func): Constify.
993         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
994         * top.h (execute_command): Constify.
995         * top.c (execute_command): Constify.
996         (execute_command_to_string): Constify.
997         (deprecated_call_command_hook): Constify.
998         * command.h (cmd_func): Constify.
999         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1000
1001 2017-11-07  Tom Tromey  <tom@tromey.com>
1002
1003         * ada-lang.c (catch_ada_exception_command): Constify.
1004         (catch_assert_command): Constify.
1005         * break-catch-throw.c (catch_catch_command, catch_throw_command)
1006         (catch_rethrow_command): Constify.
1007         (catch_exception_command_1): Constify.
1008         * breakpoint.h (add_catch_command): Constify.
1009         * break-catch-syscall.c (catch_syscall_command_1): Constify.
1010         (catch_syscall_split_args): Constify.
1011         * break-catch-sig.c (catch_signal_command): Constify.
1012         (catch_signal_split_args): Constify.
1013         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1014         cmd_const_sfunc_ftype.
1015         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1016         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1017         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1018         (add_setshow_string_cmd, struct cmd_list_element)
1019         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1020         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1021         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1022         Constify.
1023         (set_cmd_sfunc): Constify.
1024         (empty_sfunc): Constify.
1025         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1026         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1027         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1028         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1029         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1030         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1031         Constify.
1032         (set_cmd_sfunc): Constify.
1033         (cmd_sfunc_ftype): Remove.
1034         * compile/compile.c (set_compile_args): Constify.
1035         * infrun.c (set_disable_randomization): Constify.
1036         * infcmd.c (set_args_command, set_cwd_command): Constify.
1037         * breakpoint.c (set_condition_evaluation_mode): Constify.
1038         (add_catch_command): Constify.
1039         (catch_fork_command_1, catch_exec_command_1)
1040         (catch_load_command_1, catch_unload_command_1): Constify.
1041         (catch_load_or_unload): Constify.
1042         * guile/scm-param.c (pascm_set_func): Constify.
1043         (add_setshow_generic): Constify.
1044         * python/py-param.c (get_set_value): Constify.
1045         * top.h (set_verbose): Constify.
1046         * tui/tui-win.c (tui_set_var_cmd): Constify.
1047         * mi/mi-main.c (set_mi_async_command): Constify.
1048         * cli/cli-logging.c (set_logging_overwrite)
1049         (set_logging_redirect): Constify.
1050         * value.c (set_max_value_size): Constify.
1051         * valprint.c (set_input_radix, set_output_radix): Constify.
1052         * utils.c (set_width_command, set_height_command): Constify.
1053         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1054         * tracepoint.c (set_disconnected_tracing)
1055         (set_circular_trace_buffer, set_trace_buffer_size)
1056         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1057         * top.c (set_history_size_command, set_verbose, set_editing)
1058         (set_gdb_datadir, set_history_filename): Constify.
1059         * target.c (set_targetdebug, maint_set_target_async_command)
1060         (maint_set_target_non_stop_command, set_target_permissions)
1061         (set_write_memory_permission): Constify.
1062         (open_target): Constify.
1063         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1064         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1065         * symtab.c (set_symbol_cache_size_handler): Constify.
1066         * symfile.c (set_ext_lang_command): Constify.
1067         * symfile-debug.c (set_debug_symfile): Constify.
1068         * source.c (set_directories_command): Constify.
1069         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1070         * serial.c (set_parity): Constify.
1071         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1072         * remote.c (set_remote_exec_file, set_remotebreak)
1073         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1074         * record.c (set_record_insn_history_size)
1075         (set_record_call_history_size): Constify.
1076         * record-full.c (set_record_full_insn_max_num): Constify.
1077         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1078         * osabi.c (set_osabi): Constify.
1079         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1080         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1081         * maint.c (maintenance_set_profile_cmd): Constify.
1082         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1083         * language.c (set_language_command, set_range_command)
1084         (set_case_command): Constify.
1085         * infrun.c (set_non_stop, set_observer_mode)
1086         (set_stop_on_solib_events, set_schedlock_func)
1087         (set_exec_direction_func): Constify.
1088         * infcmd.c (set_inferior_tty_command): Constify.
1089         * disasm.c (set_disassembler_options_sfunc): Constify.
1090         * demangle.c (set_demangling_command): Constify.
1091         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1092         * cris-tdep.c (set_cris_version, set_cris_mode)
1093         (set_cris_dwarf2_cfi): Constify.
1094         * corefile.c (set_gnutarget_command): Constify.
1095         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1096         (set_target_wide_charset_sfunc): Constify.
1097         * breakpoint.c (update_dprintf_commands): Constify.
1098         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1099         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1100         (set_disassembly_style_sfunc): Constify.
1101         * arch-utils.c (set_endian, set_architecture): Constify.
1102         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1103         * agent.c (set_can_use_agent): Constify.
1104
1105 2017-11-07  Tom Tromey  <tom@tromey.com>
1106
1107         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1108         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1109         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1110         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1111         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1112         (parse_int_arg, show_thread_default_detach_sc_cmd)
1113         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1114         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1115         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1116         (show_task_pause_cmd, set_task_detach_sc_cmd)
1117         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1118         (set_noninvasive_cmd, set_thread_pause_cmd)
1119         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1120         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1121         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1122         * windows-nat.c (display_selectors): Constify.
1123         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1124         non-const "cfunc".
1125         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1126         (cmd_cfunc_eq): Likewise.
1127         (struct cmd_list_element): Likewise.
1128         (do_cfunc): Remove.
1129         (cli_user_command_p): Update.
1130         * command.h (add_cmd): Remove non-const overload.
1131         (cmd_cfunc_ftype): Remove typedef.
1132         (cmd_cfunc_eq): Remove non-const overload.
1133         * value.c (show_values): Constify.
1134         * thread.c (thread_apply_all_command): Constify.
1135         * symfile.c (load_command): Constify.
1136         * source.c (directory_command): Constify.
1137         * maint.c (maintenance_internal_error)
1138         (maintenance_demangler_warning, maintenance_space_display)
1139         (maintenance_print_architecture, maintenance_translate_address)
1140         (maintenance_info_selftests, maintenance_internal_warning):
1141         Constify.
1142         * breakpoint.c (disable_trace_command, enable_trace_command):
1143         Constify.
1144         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1145         Constify.
1146         (add_auto_load_safe_path): Constify.
1147         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1148         * top.h (show_commands): Constify.
1149         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1150         * sparc64-tdep.c (adi_examine_command): Constify.
1151         (adi_assign_command): Constify.
1152
1153 2017-11-07  Tom Tromey  <tom@tromey.com>
1154
1155         * frame.h (info_locals_command, info_args_command): Constify.
1156         * auto-load.h (auto_load_info_scripts): Constify.
1157         * inferior.h (registers_info): Constify.
1158         * copying.c: Rebuild.
1159         * copying.awk: Constify generated commands.
1160         * auto-load.c (auto_load_info_scripts)
1161         (info_auto_load_gdb_scripts): Constify.
1162         * cli/cli-decode.c (struct cmd_list_element): Take a
1163         cmd_const_cfunc_ftype.
1164         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1165         * tui/tui-win.c (tui_all_windows_info): Constify.
1166         * python/py-auto-load.c (info_auto_load_python_scripts):
1167         Constify.
1168         * cli/cli-cmds.c (show_command): Remove non-const overload.
1169         * tracepoint.c (info_tvariables_command, info_scope_command):
1170         Constify.
1171         (info_static_tracepoint_markers_command): Constify.
1172         * thread.c (info_threads_command): Constify.
1173         (print_thread_info_1): Constify.
1174         * target.c (info_target_command): Constify.
1175         * symtab.c (info_sources_command, info_functions_command)
1176         (info_types_command): Constify.
1177         (info_variables_command): Remove non-const overload.
1178         * symfile.c (info_ext_lang_command): Constify.
1179         * stack.c (info_frame_command, info_locals_command)
1180         (info_args_command): Constify.
1181         (backtrace_command): Remove non-const overload.
1182         * source.c (info_source_command, info_line_command): Constify.
1183         * solib.c (info_sharedlibrary_command): Constify.
1184         * skip.c (info_skip_command): Constify.
1185         * ser-go32.c (info_serial_command): Constify.
1186         * reverse.c (info_bookmarks_command): Constify.
1187         * printcmd.c (info_symbol_command, info_address_command)
1188         (info_display_command): Constify.
1189         * osdata.c (info_osdata_command): Constify.
1190         * objc-lang.c (info_selectors_command, info_classes_command):
1191         Constify.
1192         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1193         * memattr.c (info_mem_command): Constify.
1194         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1195         * linux-fork.c (info_checkpoints_command): Constify.
1196         * infrun.c (info_signals_command): Constify.
1197         * inflow.c (info_terminal_command): Constify.
1198         * inferior.c (info_inferiors_command): Constify.
1199         (print_inferior): Constify.
1200         * infcmd.c (info_program_command, info_all_registers_command)
1201         (info_registers_command, info_vector_command)
1202         (info_float_command): Constify.
1203         (registers_info): Constify.
1204         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1205         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1206         Constify.
1207         * f-valprint.c (info_common_command): Constify.
1208         * dcache.c (info_dcache_command): Constify.
1209         (dcache_info_1): Constify.
1210         * darwin-nat-info.c (info_mach_tasks_command)
1211         (info_mach_task_command, info_mach_ports_command)
1212         (info_mach_port_command, info_mach_threads_command)
1213         (info_mach_thread_command, info_mach_regions_command)
1214         (info_mach_regions_recurse_command, info_mach_region_command)
1215         (info_mach_exceptions_command): Constify.
1216         (get_task_from_args): Constify.
1217         * cp-support.c (info_vtbl_command): Constify.
1218         * breakpoint.c (info_watchpoints_command)
1219         (info_tracepoints_command): Constify.
1220         (info_breakpoints_command): Remove non-const overload.
1221         * avr-tdep.c (avr_io_reg_read_command): Constify.
1222         * auxv.c (info_auxv_command): Constify.
1223         * ada-tasks.c (info_tasks_command): Constify.
1224         (info_task): Constify.
1225         * ada-lang.c (info_exceptions_command): Constify.
1226
1227 2017-11-07  Tom Tromey  <tom@tromey.com>
1228
1229         * solib.h (no_shared_libraries): Constify.
1230         * frame.h (return_command): Constify.
1231         * cli/cli-cmds.h (quit_command): Constify.
1232         * top.h (quit_command, execute_command): Constify.
1233         * target.h (flash_erase_command): Constify.
1234         * inferior.h (set_inferior_args, attach_command): Constify.
1235         * tracepoint.h (start_tracing, stop_tracing): Constify.
1236         * breakpoint.h (break_command, tbreak_command)
1237         (hbreak_command_wrapper, thbreak_command_wrapper)
1238         (rbreak_command_wrapper, watch_command_wrapper)
1239         (awatch_command_wrapper, rwatch_command_wrapper)
1240         (get_tracepoint_by_number): Constify.
1241         * symtab.c (info_variables_command, rbreak_command)
1242         (symtab_symbol_info): Constify.
1243         (info_variables_command): Add non-const overload.
1244         * top.c (dont_repeat_command): Constify.
1245         * breakpoint.c (ignore_command, commands_command)
1246         (condition_command, tbreak_command, hbreak_command)
1247         (thbreak_command, clear_command, break_command)
1248         (info_breakpoints_command, watch_command, rwatch_command)
1249         (awatch_command, trace_command, ftrace_command, strace_command)
1250         (trace_pass_command, break_range_command, dprintf_command)
1251         (agent_printf_command, get_tracepoint_by_number)
1252         (watch_maybe_just_location, trace_pass_command): Constify.
1253         (info_breakpoints_command): Add non-const overload.
1254         * tracefile.c (tsave_command): Constify.
1255         * infcmd.c (attach_command, disconnect_command, signal_command)
1256         (queue_signal_command, stepi_command, nexti_command)
1257         (finish_command, next_command, step_command, until_command)
1258         (advance_command, jump_command, continue_command, run_command)
1259         (start_command, starti_command, interrupt_command)
1260         (run_command_1, set_inferior_args, step_1): Constify.
1261         * inferior.c (add_inferior_command, remove_inferior_command)
1262         (clone_inferior_command): Constify.
1263         * linux-fork.c (checkpoint_command, restart_command): Constify.
1264         * windows-nat.c (signal_event_command): Constify.
1265         * guile/guile.c (guile_repl_command, guile_command): Constify.
1266         * printcmd.c (x_command, display_command, printf_command)
1267         (output_command, set_command, call_command, print_command)
1268         (eval_command): Constify.
1269         (non_const_set_command): Remove.
1270         (_initialize_printcmd): Update.
1271         * source.c (forward_search_command, reverse_search_command):
1272         Constify.
1273         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1274         Constify.
1275         * infrun.c (handle_command): Constify.
1276         * memattr.c (mem_command): Constify.
1277         * stack.c (return_command, up_command, up_silently_command)
1278         (down_command, down_silently_command, frame_command)
1279         (backtrace_command, func_command, backtrace_command_1): Constify.
1280         (backtrace_command): Add non-const overload.
1281         * remote-sim.c (simulator_command): Constify.
1282         * exec.c (set_section_command): Constify.
1283         * tracepoint.c (tdump_command, trace_variable_command)
1284         (tstatus_command, tstop_command, tstart_command)
1285         (end_actions_pseudocommand, while_stepping_pseudocommand)
1286         (collect_pseudocommand, teval_pseudocommand, actions_command)
1287         (start_tracing, stop_tracing): Constify.
1288         * value.c (init_if_undefined_command): Constify.
1289         * tui/tui-stack.c (tui_update_command): Constify.
1290         * tui/tui-win.c (tui_refresh_all_command)
1291         (tui_set_tab_width_command, tui_set_win_height_command)
1292         (tui_set_focus_command, tui_scroll_forward_command)
1293         (tui_scroll_backward_command, tui_scroll_left_command)
1294         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1295         (tui_set_win_height): Constify.
1296         * tui/tui-layout.c (tui_layout_command): Constify.
1297         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1298         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1299         (proc_untrace_sysexit_cmd): Constify.
1300         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1301         (threadset_test_cmd, threadlist_update_test_cmd)
1302         (threadalive_test): Constify.
1303         * objc-lang.c (print_object_command): Constify.
1304         * command.h (add_com): Constify.
1305         * cli/cli-dump.c (restore_command): Constify.
1306         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1307         (help_command, complete_command, shell_command, edit_command)
1308         (list_command, disassemble_command, make_command)
1309         (apropos_command, alias_command): Constify.
1310         * cli/cli-script.c (document_command, define_command)
1311         (while_command, if_command, validate_comname): Constify.
1312         * cli/cli-decode.c (struct cmd_list_element): Change type of
1313         "fun".
1314         * target.c (do_monitor_command, flash_erase_command): Constify.
1315         * regcache.c (reg_flush_command): Constify.
1316         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1317         (reverse_nexti, reverse_continue, reverse_finish)
1318         (save_bookmark_command, goto_bookmark_command)
1319         (exec_reverse_once): Constify.
1320         * python/python.c (python_interactive_command, python_command):
1321         Constify.
1322         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1323         Constify.
1324         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1325         * gcore.c (gcore_command): Constify.
1326
1327 2017-11-07  Tom Tromey  <tom@tromey.com>
1328
1329         * printcmd.c (x_command): Call set_repeat_arguments.
1330         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1331         * top.c (repeat_arguments): New global.
1332         (set_repeat_arguments): New function.
1333         (execute_command): Handle repeat_arguments.
1334         (show_commands): Calls set_repeat_arguments.
1335         * command.h (set_repeat_arguments): Declare.
1336
1337 2017-11-07  Tom Tromey  <tom@tromey.com>
1338
1339         * stack.c (backtrace_command): Use std::string.
1340         (backtrace_command_1): Make "count_exp" const.
1341
1342 2017-11-07  Tom Tromey  <tom@tromey.com>
1343
1344         * source.c (directory_switch, mod_path, add_path): Constify.
1345         * defs.h (add_path, mod_path, directory_switch): Constify.
1346         * mi/mi-cmd-env.c (env_mod_path): Constify.
1347
1348 2017-11-07  Tom Tromey  <tom@tromey.com>
1349
1350         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1351         (run_command_1, continue_command, step_1, jump_command)
1352         (signal_command, until_command, advance_command, finish_command)
1353         (attach_command): Update.
1354
1355 2017-11-07  Tom Tromey  <tom@tromey.com>
1356
1357         * command.h (set_cmd_cfunc): Don't declare.
1358         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1359
1360 2017-11-07  Tom Tromey  <tom@tromey.com>
1361
1362         * stack.c (select_frame_command): Constify.
1363         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1364         * command.h (add_com_suppress_notification): Constify.
1365
1366 2017-11-07  Tom Tromey  <tom@tromey.com>
1367
1368         * breakpoint.c (stop_command): Constify.
1369         * cli/cli-decode.c (struct cmd_list_element): Constify.
1370         * command.h (add_abbrev_prefix_cmd): Constify.
1371
1372 2017-11-07  Pedro Alves  <palves@redhat.com>
1373
1374         * breakpoint.c (extract_bp_kind): New enum.
1375         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1376         factored out from ...
1377         (extract_bp_number_and_location): ... here.
1378         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1379
1380 2017-11-07  Pedro Alves  <palves@redhat.com>
1381
1382         * breakpoint.c (extract_bp_number_and_location): Change return
1383         type to void.  Throw error instead of warning.
1384         (enable_disable_command): Adjust.
1385
1386 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1387             Pedro Alves  <palves@redhat.com>
1388
1389         * breakpoint.c (map_breakpoint_number_range): New, factored out
1390         from ...
1391         (map_breakpoint_numbers): ... here.
1392         (find_location_by_number): Change parameters from string to
1393         breakpoint number and location.
1394         (extract_bp_number_and_location): New function.
1395         (enable_disable_bp_num_loc)
1396         (enable_disable_breakpoint_location_range)
1397         (enable_disable_command): New functions, factored out ...
1398         (enable_command, disable_command): ... these functions, and
1399         adjusted to support ranges.
1400         * NEWS: Document enable/disable breakpoint location range feature.
1401
1402 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1403
1404         * MAINTAINERS (Write After Approval): Update my e-mail address.
1405
1406 2017-11-06  Pedro Alves  <palves@redhat.com>
1407
1408         * gnu-nat.c (gnu_terminal_init): Delete.
1409         (gnu_target): Don't install gnu_terminal_init.
1410         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1411         (child_terminal_init): ... this function.
1412
1413 2017-11-06  Pedro Alves  <palves@redhat.com>
1414
1415         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1416         sgtty.h.
1417         * config.in, configure: Regenerate.
1418
1419 2017-11-06  Pedro Alves  <palves@redhat.com>
1420
1421         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1422         (async_init_signals): Adjust.
1423         (handle_stop_sig): Rename to ...
1424         (handle_sigtstp): ... this.
1425         (async_stop_sig): Rename to ...
1426         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1427         SIGTSTP path.
1428         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1429         instead of STOP_SIGNAL thoughout.
1430         (handle_stop_sig): Rename to ...
1431         (handle_sigtstp): ... this.
1432         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1433
1434 2017-11-06  Pedro Alves  <palves@redhat.com>
1435
1436         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1437         longer set flags twice in row.
1438
1439 2017-11-06  Pedro Alves  <palves@redhat.com>
1440
1441         * Makefile.in (SER_HARDWIRE): Update comment.
1442         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1443         * common/gdb_termios.h: Delete file.
1444         * common/job-control.c: Include termios.h and unistd.h instead of
1445         gdb_termios.h.
1446         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1447         check.
1448         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1449         Remove sgtty code.
1450         * configure.ac: No longer check for termio.h and sgtty.h.
1451         * configure: Regenerate.
1452         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1453         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1454         Replace PROCESS_GROUP_TYPE references with pid_t references
1455         throughout.
1456         (gdb_getpgrp): Delete.
1457         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1458         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1459         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1460         gdb_getpgrp.  Use serial_set_tty_state instead aof
1461         serial_noflush_set_tty_state.  Remove sgtty code.
1462         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1463         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1464         (inferior_process_group): Now returns pid_t.
1465         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1466         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1467         * ser-event.c (serial_event_ops): Update.
1468         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1469         (dos_ops): Update.
1470         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1471         * ser-pipe.c (pipe_ops): Update.
1472         * ser-tcp.c (tcp_ops): Update.
1473         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1474         HAVE_TERMIOS checks.
1475         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1476         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1477         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1478         assume termios.
1479         (hardwire_noflush_set_tty_state): Delete.
1480         (hardwire_print_tty_state, hardwire_drain_output)
1481         (hardwire_flush_output, hardwire_flush_input)
1482         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1483         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1484         code, and assume termios.
1485         (hardwire_ops): Update.
1486         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1487         * serial.c (serial_noflush_set_tty_state): Delete.
1488         * serial.h (serial_noflush_set_tty_state): Delete.
1489         (serial_ops::noflush_set_tty_state): Delete.
1490
1491 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1492
1493         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1494         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1495         (COMMON_OBS): Remove doublest.o and dfp.o.
1496         Do not build target-float.c (instead of doublest.c)
1497         with -Wformat-nonliteral.
1498
1499         * doublest.c: Remove file.
1500         * doublest.h: Remove file.
1501         * dfp.c: Remove file.
1502         * dfp.h: Remove file.
1503
1504         * target-float.c: Do not include "doublest.h" and "dfp.h".
1505         (DOUBLEST): Move here from doublest.h.
1506         (enum float_kind): Likewise.
1507         (FLOATFORMAT_CHAR_BIT): Likewise.
1508         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1509         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1510         (floatformat_precision): Likewise.
1511         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1512         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1513         Likewise.
1514         (host_float_format, host_double_format, host_long_double_format):
1515         Likewise.
1516         (floatformat_to_string, floatformat_from_string): Likewise.
1517         (floatformat_to_doublest): Likewise.  Also, inline the original
1518         convert_floatformat_to_doublest.
1519         (floatformat_from_doublest): Likewise.  Also, inline the original
1520         convert_floatformat_from_doublest.
1521
1522         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1523         (MAX_DECIMAL_STRING): Move here from dfp.c.
1524         (match_endianness): Likewise.
1525         (set_decnumber_context, decimal_check_errors): Likewise.
1526         (decimal_from_number, decimal_to_number): Likewise.
1527         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1528         (decimal_from_longest, decimal_from_ulongest): Likewise.
1529         (decimal_to_longest): Likewise.
1530         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1531         (decimal_convert): Likewise.
1532
1533 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1534
1535         * doublest.c: Do not include "gdbtypes.h".
1536         (extract_typed_floating): Remove.
1537         (store_typed_floating): Remove.
1538         (convert_typed_floating): Remove.
1539         * doublest.h (struct type): Remove.
1540         (DOUBLEST_PRINT_FORMAT): Remove.
1541         (DOUBLEST_SCAN_FORMAT): Remove.
1542         (extract_typed_floating): Remove.
1543         (store_typed_floating): Remove.
1544         (convert_typed_floating): Remove.
1545
1546         * dfp.c (decimal_from_doublest): Remove.
1547         (decimal_to_doublest): Remove.
1548         * dfp.h: Do not include "doublest.h".
1549         (decimal_from_doublest): Remove.
1550         (decimal_to_doublest): Remove.
1551
1552         * value.c: Do not include "doublest.h" and "dfp.h".
1553         (value_as_double): Remove.
1554         (unpack_double): Remove.
1555         (value_from_double): Remove.
1556         (value_from_decfloat): Remove.
1557         * value.h: Do not include "doublest.h".
1558         (value_as_double): Remove.
1559         (unpack_double): Remove.
1560         (value_from_double): Remove.
1561         (value_from_decfloat): Remove.
1562
1563 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1564
1565         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1566         (i386_extract_return_value): Use target_float_convert.
1567         (i386_store_return_value): Likewise.
1568         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1569         (i387_value_to_register): Likewise.
1570         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1571         (ia64_register_to_value): Use target_float_convert.
1572         (ia64_value_to_register): Likewise.
1573         (ia64_extract_return_value): Likewise.
1574         (ia64_store_return_value): Likewise.
1575         (ia64_push_dummy_call): Likewise.
1576         * m68k-tdep.c: Include "target-float.h".
1577         (m68k_register_to_value): Use target_float_convert.
1578         (m68k_value_to_register): Likewise.
1579         (m68k_svr4_extract_return_value): Likewise.
1580         (m68k_svr4_store_return_value): Likewise.
1581         * ppc-sysv-tdep.c: Include "target-float.h".
1582         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1583         (do_ppc_sysv_return_value): Likewise.
1584         (ppc64_sysv_abi_push_freg): Likewise.
1585         (ppc64_sysv_abi_return_value_base): Likewise.
1586         * rs6000-aix-tdep.c: Include "target-float.h".
1587         (rs6000_push_dummy_call): Use target_float_convert.
1588         (rs6000_return_value): Likewise.
1589         * rs6000-lynx178-tdep.c: Include "target-float.h".
1590         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1591         (rs6000_lynx178_return_value): Likewise.
1592         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1593         (rs6000_register_to_value): Use target_float_convert.
1594         (rs6000_value_to_register): Likewise.
1595         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1596         (arm_extract_return_value): Use target_float_convert.
1597         (arm_store_return_value): Likewise.
1598         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1599         (sh_register_convert_to_virtual): Use target_float_convert.
1600         (sh_register_convert_to_raw): Likewise.
1601         * sh64-tdep.c: Include "target-float.h".
1602         (sh64_extract_return_value): Use target_float_convert.
1603         (sh64_register_convert_to_virtual): Likewise.
1604         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1605
1606 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1607
1608         * target-float.c (floatformat_to_host_double): New function.
1609         (floatformat_from_host_double): Likewise.
1610         (target_float_to_host_double): Likewise.
1611         (target_float_from_host_double): Likewise.
1612         * target-float.h (target_float_to_host_double): Add prototype.
1613         (target_float_from_host_double): Likewise.
1614
1615         * guile/scm-value.c: Include "target-float.h".
1616         (gdbscm_value_to_real): Use target_float_to_host_double.
1617         Handle integer source values via value_as_long.
1618         * guile/scm-math.c: Include "target-float.h".  Do not include
1619         "doublest.h", "dfp.h", and "expression.h".
1620         (vlscm_convert_typed_number): Use target_float_from_host_double.
1621         (vlscm_convert_number): Likewise.
1622
1623         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1624         (convert_value_from_python): Use target_float_from_host_double.
1625
1626 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1627
1628         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1629         (cast_from_fixed): Likewise.
1630         (ada_scaling_type): New function.
1631         (ada_delta): Return value instead of DOUBLEST.  Perform target
1632         arithmetic instead of host arithmetic.
1633         (scaling_factor): Rename to ...
1634         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1635         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1636         (ada_fixed_to_float): Remove.
1637         (ada_float_to_fixed): Remove.
1638         * ada-lang.h (ada_fixed_to_float): Remove.
1639         (ada_float_to_fixed): Remove.
1640         (ada_delta): Return value instead of DOUBLEST.
1641         (ada_scaling_factor): Add prototype.
1642
1643         * ada-typeprint.c: Include "target-float.h".
1644         (print_fixed_point_type): Perform target arithmetic instead of
1645         host arithmetic.
1646         * ada-valprint.c: Include "target-float.h".
1647         (ada_val_print_num): Perform target arithmetic instead of
1648         host arithmetic for fixed-point types.
1649
1650 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1651
1652         * target-float.c: Include <math.h>.
1653         (floatformat_binop): New function.
1654         (floatformat_compare): Likewise.
1655         (target_float_binop): Likewise.
1656         (target_float_compare): Likewise.
1657         * target-float.h: Include "expression.h".
1658         (target_float_binop): Add prototype.
1659         (target_float_compare): Likewise.
1660
1661         * valarith.c: Do not include "doublest.h" and "dfp.h".
1662         Include "common/byte-vector.h".
1663         (value_args_as_decimal): Remove, replace by ...
1664         (value_args_as_target_float): ... this function.  Handle both
1665         binary and decimal target floating-point formats.
1666         (scalar_binop): Handle both binary and decimal FP using
1667         value_args_as_target_float and target_float_binop.
1668         (value_equal): Handle both binary and decimal FP using
1669         value_args_as_target_float and target_float_compare.
1670         (value_less): Likewise.
1671         (value_pos): Handle all scalar types as simple copy.
1672         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1673         * dfp.c (decimal_binop): Throw error instead of internal_error
1674         when called with an unsupported operation code.
1675
1676 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1677
1678         * target-float.c (target_float_to_string): New function.
1679         (target_float_from_string): New function.
1680         * target-float.h (target_float_to_string): Add prototype.
1681         (target_float_from_string): Add prototype.
1682
1683         * valprint.c: Include "target-float.h".  Do not include
1684         "doublest.h" and "dfp.h".
1685         (print_floating): Use target_float_to_string.
1686         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1687         (printf_floating): Use target_float_to_string.
1688         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1689         (print_i387_value): Use target_float_to_string.
1690         * mips-tdep.c: Include "target-float.h".
1691         (mips_print_fp_register): Use target_float_to_string.
1692         * sh64-tdep.c: Include "target-float.h".
1693         (sh64_do_fp_register): Use target_float_to_string.
1694
1695         * parse.c: Include "target-float.h".  Do not include
1696         "doublest.h" and "dfp.h".
1697         (parse_float): Use target_float_from_string.
1698         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1699         (define_symbol): Use target_float_from_string.
1700         * gdbarch-selftests.c: Include "target-float.h".
1701         (register_to_value_test): Use target_float_from_string.
1702
1703 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1704
1705         * Makefile.c (SFILES): Add target-float.c.
1706         (HFILES_NO_SRCDIR): Add target-float.h.
1707         (COMMON_OBS): Add target-float.o.
1708         * target-float.h: New file.
1709         * target-float.c: New file.
1710
1711         * doublest.c (floatformat_classify): Fix detection of float_zero.
1712
1713         * gdbtypes.c (is_floating_type): New function.
1714         * gdbtypes.h (is_floating_type): Add prototype.
1715
1716         * value.c: Do not include "floatformat.h".
1717         (unpack_double): Use target_float_is_valid.
1718         (is_floating_value): New function.
1719         * value.h (is_floating_value): Add prototype-
1720
1721         * valarith.c: Include "target-float.h".
1722         (value_logical_not): Use target_float_is_zero.
1723
1724         * python/py-value.c: Include "target-float.h".
1725         (valpy_nonzero): Use target_float_is_zero.
1726
1727 2017-11-04  Tom Tromey  <tom@tromey.com>
1728
1729         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1730
1731 2017-11-04  Tom Tromey  <tom@tromey.com>
1732
1733         * breakpoint.c (set_momentary_breakpoint): Return
1734         breakpoint_up.
1735         (until_break_command): Update.
1736         (new_until_break_fsm): Change argument types to
1737         breakpoint_up.
1738         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1739         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1740         Remove.
1741         * infcmd.c (finish_forward): Update.
1742         * breakpoint.h (set_momentary_breakpoint)
1743         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1744         (make_cleanup_delete_breakpoint): Remove.
1745         (struct breakpoint_deleter): New.
1746         (breakpoint_up): New typedef.
1747         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1748         (insert_exception_resume_breakpoint): Update.
1749         (insert_exception_resume_from_probe): Update.
1750         (insert_longjmp_resume_breakpoint): Update.
1751         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1752         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1753         * infcall.c (call_function_by_hand_dummy): Update
1754
1755 2017-11-04  Tom Tromey  <tom@tromey.com>
1756
1757         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1758
1759 2017-11-04  Tom Tromey  <tom@tromey.com>
1760
1761         * linux-tdep.c (linux_core_info_proc_mappings): Use
1762         gdb::def_vector.
1763         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1764         "size" argument.
1765         (linux_corefile_thread): Update.
1766         (linux_make_corefile_notes): Remove unused variable.
1767
1768 2017-11-04  Tom Tromey  <tom@tromey.com>
1769
1770         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1771         gdb::byte_vector.
1772
1773 2017-11-04  Tom Tromey  <tom@tromey.com>
1774
1775         * objfiles.c (do_free_objfile_cleanup): Remove.
1776         * compile/compile-object-load.c (compile_object_load): Update.
1777         * objfiles.h (make_cleanup_free_objfile): Remove.
1778
1779 2017-11-04  Tom Tromey  <tom@tromey.com>
1780
1781         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1782         (adi_read_versions): Change "tags" to "gdb_byte *".
1783         (adi_print_versions): Likewise.
1784
1785 2017-11-04  Tom Tromey  <tom@tromey.com>
1786
1787         * breakpoint.c
1788         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1789         from start_rbreak_breakpoints.
1790         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1791         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1792         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1793         * symtab.c (do_end_rbreak_breakpoints): Remove.
1794         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1795
1796 2017-11-04  Tom Tromey  <tom@tromey.com>
1797
1798         * cp-namespace.c (reset_directive_searched): Remove.
1799         (cp_lookup_symbol_via_imports): Use scoped_restore.
1800         * cp-support.c (reset_directive_searched): Remove.
1801         (make_symbol_overload_list_using): Use scoped_restore.
1802         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1803         (reset_directive_searched): Remove.
1804
1805 2017-11-04  Tom Tromey  <tom@tromey.com>
1806
1807         * symfile.c (find_separate_debug_file_by_debuglink): Use
1808         unique_xmalloc_ptr.
1809
1810 2017-11-04  Tom Tromey  <tom@tromey.com>
1811
1812         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1813         type of "info".
1814         (compute_stack_depth): Likewise.
1815         (do_compile_dwarf_expr_to_c): Use std::vector.
1816
1817 2017-11-04  Tom Tromey  <tom@tromey.com>
1818
1819         * compile/compile-object-load.c (link_callbacks_einfo): Use
1820         std::string.
1821
1822 2017-11-04  Tom Tromey  <tom@tromey.com>
1823
1824         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1825         Use scoped_free_pendings.
1826         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1827         scoped_free_pendings.
1828         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1829         (xcoff_initial_scan): Likewise.
1830         * buildsym.c (reset_symtab_globals): Update comment.
1831         (scoped_free_pendings): Rename from really_free_pendings.
1832         (prepare_for_building): Update comment.
1833         (buildsym_init): Likewise.
1834         * buildsym.h (class scoped_free_pendings): New class.
1835         (really_free_pendings): Don't declare.
1836
1837 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1838
1839         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1840         output when converting a zero value to a special byteorder format.
1841
1842 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1843
1844         * frame.c (do_frame_register_read): Remove aspace.
1845         * jit.c (jit_frame_sniffer): Likwise.
1846         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1847         * regcache.c (regcache::regcache): Pass nullptr.
1848         (regcache_print): Caller updated.
1849         * regcache.h (regcache::regcache): Remove one constructor
1850         parameter aspace.
1851
1852 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1853
1854         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1855
1856 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1857
1858         * breakpoint.c (insert_single_step_breakpoints): Update.
1859         * frame.c (struct frame_info) <aspace>: Add const.
1860         (frame_save_as_regcache): Add const.
1861         (get_frame_address_space): Return const address_space *.
1862         * frame.h (get_frame_address_space): Update declaration.
1863         * infrun.c (struct step_over_info) <aspace>: Add const.
1864         (set_step_over_info): Make aspace const.
1865         (displaced_step_prepare_throw): Change variable const.
1866         (resume): Likewise.
1867         (proceed): Likewise.
1868         (adjust_pc_after_break): Likewise.
1869         (save_waitstatus): Likewise.
1870         (handle_signal_stop): Likewise.
1871         (keep_going_pass_signal): Likewise.
1872         * jit.c (jit_frame_sniffer): Add const.
1873         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1874         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1875         * record-full.c (record_full_wait_1): Likewise.
1876         * regcache.c (regcache::regcache): Change parameter to const.
1877         * regcache.h (regcache::regcache): Likewise.
1878         (regcache::aspace): Return const address_space *.
1879         (regcache) <m_aspace>: Add const.
1880
1881 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1882
1883         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1884         * frame.c (create_sentinel_frame): Likewise.
1885         * infrun.c (displaced_step_prepare_throw): Likewise.
1886         (resume): Likewise.
1887         (thread_still_needs_step_over_bp): Likewise.
1888         (proceed): Likewise.
1889         (do_target_wait): Likewise.
1890         (adjust_pc_after_break): Likewise.
1891         (handle_syscall_event): Likewise.
1892         (save_waitstatus): Likewise.
1893         (handle_inferior_event_1): Likewise.
1894         (handle_signal_stop): Likewise.
1895         (keep_going_pass_signal): Likewise.
1896         * linux-nat.c (status_callback): Likewise.
1897         (save_stop_reason): Likewise.
1898         (resume_stopped_resumed_lwps): Likewise.
1899         * record-full.c (record_full_exec_insn): Likewise.
1900         (record_full_wait_1): Likewise.
1901         * regcache.c (get_regcache_aspace): Remove.
1902         * regcache.h (get_regcache_aspace): Remove.
1903
1904 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1905
1906         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1907         (init_regcache_descr): Use gdbarch_num_regs.
1908         (regcache::regcache): Likewise.
1909         (regcache::get_register_status): Likewise.
1910         (regcache::assert_raw_regnum): Likewise.
1911         (regcache::cooked_read): Likewise.
1912         (regcache::cooked_read_value): Likewise.
1913         (regcache::cooked_write): Likewise.
1914         (regcache::dump): Likewise.
1915         (regcache::num_raw_registers): New method.
1916         * regcache.h (class regcache) <num_raw_registers>: New.
1917
1918 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1919
1920         * regcache.c (regcache::assert_regnum): New method.
1921         (regcache::invalidate): Call assert_regnum.
1922         (regcache::raw_update): Likewise.
1923         (regcache::raw_write): Likewise.
1924         (regcache::raw_read_part): Likewise.
1925         (regcache::raw_write_part): Likewise.
1926         (regcache::raw_supply): Likewise.
1927         (regcache::raw_supply_integer): Likewise.
1928         (regcache::raw_supply_zeroed): Likewise.
1929         (regcache::raw_collect): Likewise.
1930         (regcache::raw_collect_integer): Likewise.
1931         * regcache.h (regcache::assert_regnum): Declare.
1932
1933 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1934
1935         * regcache.c (regcache::dump): Remove code.
1936
1937 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1938
1939         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1940         Remove.
1941         <sizeof_cooked_register_status>: Remove.
1942         (init_regcache_descr): Update.
1943         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1944         (regcache::save): Likewise.
1945         (regcache::dump): Likewise.
1946
1947 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1948
1949         * ft32-tdep.c (ft32_fetch_instruction): New function.
1950         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1951
1952 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1953
1954         * cli/cli-script.c (execute_control_command): Rename to ...
1955         (execute_control_command_1): ... this.
1956         (execute_control_command): New function.
1957
1958 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1959
1960         * tracepoint.c (tfind_command): Remove const_cast.
1961
1962 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1963
1964         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1965
1966 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1967
1968         * common/common-utils.h (in_inclusive_range): New function.
1969         * arm-tdep.c (arm_record_extension_space): Use
1970         in_inclusive_range.
1971         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1972         * cris-tdep.c (cris_spec_reg_applicable): Use
1973         in_inclusive_range.
1974
1975 2017-10-30  Pedro Alves  <palves@redhat.com>
1976             Simon Marchi <simon.marchi@ericsson.com>
1977
1978         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1979         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1980
1981 2017-10-30  Pedro Alves  <palves@redhat.com>
1982
1983         * common/common-utils.c (string_appendf, string_vappendf): New
1984         functions.
1985         * common/common-utils.h (string_appendf, string_vappendf): New
1986         declarations.
1987         * unittests/common-utils-selftests.c (string_appendf_func)
1988         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1989         (string_vappendf_tests): New functions.
1990         (_initialize_common_utils_selftests): Register "string_appendf" and
1991         "string_vappendf tests".
1992
1993 2017-10-30  Pedro Alves  <palves@redhat.com>
1994
1995         * unittests/common-utils-selftests.c (format_func): New typedef.
1996         (string_printf_tests, string_vprintf_tests): Tests factored out
1997         and merged to ...
1998         (test_format_func): ... this new function.
1999         (string_printf_tests, string_vprintf_tests): Reimplement on top of
2000         test_format_func.
2001
2002 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2003
2004         * darwin-nat.c: Remove include of gdb.h.
2005
2006 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2007
2008         * xtensa-xtregs.c: Fix formatting issues.
2009
2010 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2011
2012         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2013
2014 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
2015
2016         PR python/21213
2017         * python/py-infthread.c (thpy_get_inferior): Increment reference
2018         of inferior before returning it.
2019
2020 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2021
2022         * unittests/common-utils-selftests.c (format): Add
2023         ATTRIBUTE_PRINTF.
2024
2025 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2026
2027         * xml-syscall.c (struct syscall_desc): Add constructor.
2028         <name>: Change type to std::string.
2029         (syscall_desc_up): New typedef.
2030         (syscall_desc_p): Remove typeder.
2031         (DEF_VEC_P(syscall_desc_p)): Remove.
2032         (struct syscall_group_desc): Add constructor.
2033         <name>: Change type to std::string.
2034         <syscalls>: Change type to std::vector.
2035         (syscall_group_desc_up): New typedef.
2036         (syscall_group_desc_p): Remove typedef.
2037         (DEF_VEC_P(syscall_group_desc_p)): Remove.
2038         (struct syscalls_info) <syscalls>: Change type to std::vector of
2039         unique_ptr.
2040         <groups>: Likewise.
2041         <my_gdb_datadir>: Change type to std::string.
2042         (syscalls_info_up): New typedef.
2043         (allocate_syscalls_info): Remove.
2044         (syscalls_info_free_syscalls_desc): Remove.
2045         (syscalls_info_free_syscall_group_desc): Remove.
2046         (free_syscalls_info): Remove.
2047         (make_cleanup_free_syscalls_info): Remove.
2048         (syscall_group_create_syscall_group_desc): Adjust.
2049         (syscall_group_add_syscall): Adjust.
2050         (syscall_create_syscall_desc): Adjust.
2051         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2052         (init_syscalls_info): Adjust.
2053         (syscall_group_get_group_by_name): Adjust.
2054         (xml_get_syscall_number): Adjust.
2055         (xml_get_syscall_name): Adjust.
2056         (xml_list_of_syscalls): Adjust.
2057         (xml_list_syscalls_by_group): Adjust.
2058         (xml_list_of_groups): Adjust.
2059
2060 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2061
2062         * probe.h: Don't include gdb_vecs.h.
2063         (DEF_VEC_P (probe_p)): Remove.
2064         (find_probes_in_objfile): Return an std::vector.
2065         * probe.c (find_probes_in_objfile): Likewise.
2066         * breakpoint.c (breakpoint_objfile_data)
2067         <longjmp_probes>: Change type to std::vector.
2068         <exception_probes>: Likewise.
2069         (free_breakpoint_probes): Don't manually free vectors.
2070         (create_longjmp_master_breakpoint): Adjust.
2071         (create_exception_master_breakpoint): Adjust.
2072         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2073         parameter type, adjust.
2074         (svr4_create_solib_event_breakpoints): Adjust.
2075
2076 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2077
2078         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2079         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2080         with new.
2081         (free_breakpoint_probes): Rename to ...
2082         (free_breakpoint_objfile_data): ... this, and call delete on
2083         bp_objfile_data..
2084
2085 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2086
2087         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2088         (loaded_script_ptr): Remove typedef.
2089         (DEF_VEC_P (loaded_script_ptr)): Remove.
2090         (struct collect_matching_scripts_data): Add constructor.
2091         <scripts_p>: Change type to (pointer to) std::vector.
2092         (collect_matching_scripts_data): Adjust.
2093         (sort_scripts_by_name): Make suitable for std::sort.
2094         (print_scripts): Don't sort vector, adjust to std::vector.
2095         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2096
2097 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2098
2099         * symfile.c (filename_language): Make struct, not typedef.  Add
2100         constructor.
2101         <ext>: Change type to std::string.
2102         (DEF_VEC_O (filename_language)): Remove.
2103         (filename_language_table): Change type to std::vector.
2104         (add_filename_language): Adjust.
2105         (set_ext_lang_command): Adjust.
2106         (info_ext_lang_command): Adjust.
2107         (deduce_language_from_filename): Adjust.
2108         (class scoped_restore_filename_language_table): Remove.
2109         (test_filename_language): Use scoped_restore.
2110         (test_set_ext_lang_command): Use scoped_restore, adjust to
2111         std::vector change.
2112
2113 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2114
2115         * symfile.c: Include selftest.h.
2116         (class scoped_restore_filename_language_table): New.
2117         (test_filename_language): New test.
2118         (test_set_ext_lang_command): New test.
2119         (_initialize_symfile): Register tests.
2120
2121 2017-10-27  Keith Seitz  <keiths@redhat.com>
2122
2123         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2124         in the bp_location, falling back to find_pc_sect_function when
2125         needed.
2126         (add_location_to_breakpoint): Save sal->symbol.
2127         * breakpoint.h (struct bp_location) <symbol>: New field.
2128         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2129         * symtab.h (struct symtab_and_line) <symbol>: New field.
2130
2131 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2132
2133         PR gdb/13669
2134         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2135         to rewind obstack.
2136
2137 2017-10-26  Pedro Alves  <palves@redhat.com>
2138
2139         * remote.c (remote_async_terminal_ours_p): Delete.
2140         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2141         Remove references to 'remote_async_terminal_ours_p'.
2142
2143 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2144
2145         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2146
2147 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2148
2149         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2150         aspace const.
2151         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2152         Likewise.
2153         * breakpoint.c (bpstat_check_location): Remove cast.
2154         (breakpoint_hit_catch_fork): Make aspce const.
2155         (breakpoint_hit_catch_solib): Likewise.
2156         (breakpoint_hit_catch_exec): Likewise.
2157         (breakpoint_hit_ranged_breakpoint): Likewise.
2158         (breakpoint_hit_watchpoint): Likewise.
2159         (base_breakpoint_breakpoint_hit): Likewise.
2160         (bkpt_breakpoint_hit): Likewise.
2161         (dprintf_breakpoint_hit): Likewise.
2162         (tracepoint_breakpoint_hit): Likewise.
2163         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2164
2165 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2166
2167         * breakpoint.c (breakpoint_location_address_match): Change
2168         "struct address_space *" to "const address_space".
2169         (breakpoint_location_address_range_overlap): Likewise.
2170         (breakpoint_here_p): Likewise.
2171         (breakpoint_in_range_p): Likewise.
2172         (moribund_breakpoint_here_p): Likewise.
2173         (bp_location_inserted_here_p): Likewise.
2174         (software_breakpoint_inserted_here_p): Likewise.
2175         (hardware_breakpoint_inserted_here_p): Likewise.
2176         (hardware_watchpoint_inserted_in_range): Likewise.
2177         (bpstat_check_location): Likewise.
2178         (bpstat_stop_status): Likewise.
2179         (breakpoint_address_match): Likewise.
2180         (breakpoint_address_match_range): Likewise.
2181         (breakpoint_location_address_match): Likewise.
2182         (breakpoint_location_address_range_overlap): Likewise.
2183         (insert_single_step_breakpoint): Likewise.
2184         (breakpoint_has_location_inserted_here): Likewise.
2185         (single_step_breakpoint_inserted_here_p): Likewise.
2186         (pc_at_non_inline_function): Likewise.
2187         * breakpoint.h (bpstat_stop_status): Update declaration.
2188         (breakpoint_here_p): Likewise.
2189         (breakpoint_in_range_p): Likewise.
2190         (moribund_breakpoint_here_p): Likewise.
2191         (breakpoint_inserted_here_p): Likewise.
2192         (software_breakpoint_inserted_here_p): Likewise.
2193         (hardware_breakpoint_inserted_here_p): Likewise.
2194         (breakpoint_has_location_inserted_here): Likewise.
2195         (single_step_breakpoint_inserted_here_p): Likewise.
2196         (hardware_watchpoint_inserted_in_range): Likewise.
2197         (breakpoint_address_match): Likewise.
2198         (insert_single_step_breakpoint): Likewise.
2199         (pc_at_non_inline_function): Likewise.
2200         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2201         * record.c (record_check_stopped_by_breakpoint): Likewise.
2202         * record.h (record_check_stopped_by_breakpoint): Likewise.
2203         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2204
2205 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2206
2207         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2208         regcache->arch () instead get_regcache_arch.
2209         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2210         Likewise.
2211         (aarch64_fbsd_store_inferior_registers): Likewise.
2212         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2213         (store_gregs_to_thread): Likewise.
2214         (fetch_fpregs_from_thread): Likewise.
2215         (store_fpregs_to_thread): Likewise.
2216         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2217         (aarch64_store_return_value): Likewise.
2218         (aarch64_software_single_step): Likewise.
2219         * aix-thread.c (aix_thread_wait): Likewise.
2220         (supply_reg32): Likewise.
2221         (supply_sprs64): Likewise.
2222         (supply_sprs32): Likewise.
2223         (fill_gprs64): Likewise.
2224         (fill_gprs32): Likewise.
2225         (fill_sprs64): Likewise.
2226         (fill_sprs32): Likewise.
2227         (store_regs_user_thread): Likewise.
2228         (store_regs_kernel_thread): Likewise.
2229         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2230         (alphabsd_store_inferior_registers): Likewise.
2231         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2232         (alpha_store_return_value): Likewise.
2233         (alpha_deal_with_atomic_sequence): Likewise.
2234         (alpha_next_pc): Likewise.
2235         (alpha_software_single_step): Likewise.
2236         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2237         (amd64bsd_store_inferior_registers): Likewise.
2238         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2239         Likewise.
2240         (amd64_linux_store_inferior_registers): Likewise.
2241         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2242         (amd64_collect_native_gregset): Likewise.
2243         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2244         (amd64obsd_collect_uthread): Likewise.
2245         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2246         (amd64_collect_fpregset): Likewise.
2247         (amd64_supply_fxsave): Likewise.
2248         (amd64_supply_xsave): Likewise.
2249         (amd64_collect_fxsave): Likewise.
2250         (amd64_collect_xsave): Likewise.
2251         * arc-tdep.c (arc_write_pc): Likewise.
2252         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2253         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2254         (arm_fbsd_store_inferior_registers): Likewise.
2255         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2256         (store_vfp_regs): Likewise.
2257         (arm_linux_fetch_inferior_registers): Likewise.
2258         (arm_linux_store_inferior_registers): Likewise.
2259         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2260         (arm_linux_sigreturn_next_pc): Likewise.
2261         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2262         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2263         (fetch_register): Likewise.
2264         (store_register): Likewise.
2265         * arm-tdep.c (arm_is_thumb): Likewise.
2266         (displaced_in_arm_mode): Likewise.
2267         (bx_write_pc): Likewise.
2268         (arm_get_next_pcs_addr_bits_remove): Likewise.
2269         (arm_software_single_step): Likewise.
2270         (arm_extract_return_value): Likewise.
2271         (arm_store_return_value): Likewise.
2272         (arm_write_pc): Likewise.
2273         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2274         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2275         (bsd_uthread_store_registers): Likewise.
2276         * core-regset.c (fetch_core_registers): Likewise.
2277         * corelow.c (get_core_registers): Likewise.
2278         * cris-tdep.c (cris_store_return_value): Likewise.
2279         (cris_extract_return_value): Likewise.
2280         (find_step_target): Likewise.
2281         (find_step_target): Likewise.
2282         (cris_software_single_step): Likewise.
2283         * ctf.c (ctf_fetch_registers): Likewise.
2284         * darwin-nat.c (cancel_breakpoint): Likewise.
2285         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2286         * frv-tdep.c (frv_extract_return_value): Likewise.
2287         * ft32-tdep.c (ft32_store_return_value): Likewise.
2288         (ft32_extract_return_value): Likewise.
2289         * go32-nat.c (fetch_register): Likewise.
2290         (go32_fetch_registers): Likewise.
2291         (go32_store_registers): Likewise.
2292         (store_register): Likewise.
2293         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2294         (h8300_store_return_value): Likewise.
2295         * hppa-linux-nat.c (fetch_register): Likewise.
2296         (store_register): Likewise.
2297         (hppa_linux_fetch_inferior_registers): Likewise.
2298         (hppa_linux_store_inferior_registers): Likewise.
2299         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2300         (i386_darwin_store_inferior_registers): Likewise.
2301         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2302         (gnu_store_registers): Likewise.
2303         * i386-linux-nat.c (fetch_register): Likewise.
2304         (store_register): Likewise.
2305         (supply_gregset): Likewise.
2306         (fill_gregset): Likewise.
2307         (i386_linux_fetch_inferior_registers): Likewise.
2308         (i386_linux_store_inferior_registers): Likewise.
2309         (i386_linux_resume): Likewise.
2310         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2311         Likewise.
2312         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2313         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2314         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2315         (i386obsd_collect_uthread): Likewise.
2316         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2317         (i386_supply_gregset): Likewise.
2318         (i386_collect_gregset): Likewise.
2319         (i386_supply_fpregset): Likewise.
2320         (i386_collect_fpregset): Likewise.
2321         (i386_mpx_bd_base): Likewise.
2322         * i386-v4-nat.c (supply_fpregset): Likewise.
2323         (fill_fpregset): Likewise.
2324         * i387-tdep.c (i387_supply_fsave): Likewise.
2325         (i387_collect_fsave): Likewise.
2326         (i387_supply_fxsave): Likewise.
2327         (i387_collect_fxsave): Likewise.
2328         (i387_supply_xsave): Likewise.
2329         (i387_collect_xsave): Likewise.
2330         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2331         (ia64_linux_store_registers): Likewise.
2332         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2333         (ia64_extract_return_value): Likewise.
2334         (ia64_store_return_value): Likewise.
2335         (find_func_descr): Likewise.
2336         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2337         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2338         (inf_ptrace_store_registers): Likewise.
2339         * infrun.c (use_displaced_stepping): Likewise.
2340         (displaced_step_prepare_throw): Likewise.
2341         (resume): Likewise.
2342         (proceed): Likewise.
2343         (do_target_wait): Likewise.
2344         (adjust_pc_after_break): Likewise.
2345         (handle_inferior_event_1): Likewise.
2346         (handle_signal_stop): Likewise.
2347         (save_infcall_suspend_state): Likewise.
2348         (restore_infcall_suspend_state): Likewise.
2349         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2350         * jit.c (jit_frame_prev_register): Likewise.
2351         * linux-nat.c (save_stop_reason): Likewise.
2352         (linux_nat_wait_1): Likewise.
2353         (resume_stopped_resumed_lwps): Likewise.
2354         * linux-record.c (record_linux_sockaddr): Likewise.
2355         (record_linux_msghdr): Likewise.
2356         (record_linux_system_call): Likewise.
2357         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2358         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2359         (lm32_store_return_value): Likewise.
2360         * m32c-tdep.c (m32c_read_flg): Likewise.
2361         (m32c_pseudo_register_read): Likewise.
2362         (m32c_pseudo_register_write): Likewise.
2363         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2364         (m32r_linux_collect_gregset): Likewise.
2365         * m32r-tdep.c (m32r_store_return_value): Likewise.
2366         (m32r_extract_return_value): Likewise.
2367         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2368         (m68kbsd_collect_fpregset): Likewise.
2369         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2370         * m68k-linux-nat.c (fetch_register): Likewise.
2371         (old_fetch_inferior_registers): Likewise.
2372         (old_store_inferior_registers): Likewise.
2373         (store_regs): Likewise.
2374         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2375         (m68k_svr4_store_return_value): Likewise.
2376         * m88k-tdep.c (m88k_store_arguments): Likewise.
2377         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2378         (mi_cmd_data_write_register_values): Likewise.
2379         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2380         (mips_fbsd_store_inferior_registers): Likewise.
2381         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2382         (mips_fbsd_supply_gregs): Likewise.
2383         (mips_fbsd_collect_fpregs): Likewise.
2384         (mips_fbsd_collect_gregs): Likewise.
2385         (mips_fbsd_supply_fpregset): Likewise.
2386         (mips_fbsd_collect_fpregset): Likewise.
2387         (mips_fbsd_supply_gregset): Likewise.
2388         (mips_fbsd_collect_gregset): Likewise.
2389         * mips-linux-nat.c (supply_gregset): Likewise.
2390         (fill_gregset): Likewise.
2391         (supply_fpregset): Likewise.
2392         (fill_fpregset): Likewise.
2393         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2394         (mips_fill_gregset): Likewise.
2395         (mips_supply_fpregset): Likewise.
2396         (mips_fill_fpregset): Likewise.
2397         (mips64_supply_gregset): Likewise.
2398         (micromips_linux_sigframe_validate): Likewise.
2399         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2400         (mipsnbsd_fetch_inferior_registers): Likewise.
2401         (mipsnbsd_store_inferior_registers): Likewise.
2402         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2403         (mipsnbsd_supply_gregset): Likewise.
2404         (mipsnbsd_iterate_over_regset_sections): Likewise.
2405         (mipsnbsd_supply_reg): Likewise.
2406         (mipsnbsd_supply_fpreg): Likewise.
2407         * mips-tdep.c (mips_in_frame_stub): Likewise.
2408         (mips_dummy_id): Likewise.
2409         (is_octeon_bbit_op): Likewise.
2410         (micromips_bc1_pc): Likewise.
2411         (extended_mips16_next_pc): Likewise.
2412         (mips16_next_pc): Likewise.
2413         (deal_with_atomic_sequence): Likewise.
2414         * moxie-tdep.c (moxie_process_readu): Likewise.
2415         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2416         * nto-procfs.c (procfs_store_registers): Likewise.
2417         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2418         (ppcfbsd_store_inferior_registers): Likewise.
2419         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2420         (fetch_altivec_register): Likewise.
2421         (get_spe_registers): Likewise.
2422         (fetch_spe_register): Likewise.
2423         (fetch_altivec_registers): Likewise.
2424         (fetch_all_gp_regs): Likewise.
2425         (fetch_all_fp_regs): Likewise.
2426         (store_vsx_register): Likewise.
2427         (store_altivec_register): Likewise.
2428         (set_spe_registers): Likewise.
2429         (store_spe_register): Likewise.
2430         (store_altivec_registers): Likewise.
2431         (store_all_gp_regs): Likewise.
2432         (store_all_fp_regs): Likewise.
2433         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2434         (ppc_linux_collect_gregset): Likewise.
2435         (ppc_canonicalize_syscall): Likewise.
2436         (ppc_linux_record_signal): Likewise.
2437         (ppu2spu_prev_register): Likewise.
2438         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2439         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2440         (ppcobsd_store_registers): Likewise.
2441         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2442         Likewise.
2443         (ppc_ravenscar_generic_store_registers): Likewise.
2444         * procfs.c (procfs_fetch_registers): Likewise.
2445         (procfs_store_registers): Likewise.
2446         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2447         (ravenscar_store_registers): Likewise.
2448         (ravenscar_prepare_to_store): Likewise.
2449         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2450         * record-full.c (record_full_wait_1): Likewise.
2451         (record_full_registers_change): Likewise.
2452         (record_full_store_registers): Likewise.
2453         (record_full_core_fetch_registers): Likewise.
2454         (record_full_save): Likewise.
2455         (record_full_goto_insn): Likewise.
2456         * regcache.c (regcache_register_size): Likewise.
2457         (get_regcache_arch): Remove.
2458         (regcache_read_pc): Likewise.
2459         * regcache.h (get_regcache_arch): Remove.
2460         * remote-sim.c (gdbsim_fetch_register): Likewise.
2461         (gdbsim_store_register): Likewise.
2462         * remote.c (fetch_register_using_p): Likewise.
2463         (send_g_packet): Likewise.
2464         (remote_prepare_to_store): Likewise.
2465         (store_registers_using_G): Likewise.
2466         * reverse.c (save_bookmark_command): Likewise.
2467         (goto_bookmark_command): Likewise.
2468         * rs6000-aix-tdep.c (branch_dest): Likewise.
2469         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2470         (fetch_register): Likewise.
2471         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2472         (ppc_collect_reg): Likewise.
2473         (ppc_collect_gregset): Likewise.
2474         (ppc_collect_fpregset): Likewise.
2475         (ppc_collect_vsxregset): Likewise.
2476         (ppc_collect_vrregset): Likewise.
2477         (ppc_displaced_step_hw_singlestep): Likewise.
2478         (rs6000_pseudo_register_read): Likewise.
2479         (rs6000_pseudo_register_write): Likewise.
2480         * s390-linux-nat.c (supply_gregset): Likewise.
2481         (fill_gregset): Likewise.
2482         (s390_linux_fetch_inferior_registers): Likewise.
2483         * s390-linux-tdep.c (s390_write_pc): Likewise.
2484         (s390_software_single_step): Likewise.
2485         (s390_all_but_pc_registers_record): Likewise.
2486         (s390_linux_syscall_record): Likewise.
2487         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2488         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2489         (shnbsd_store_inferior_registers): Likewise.
2490         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2491         (sh_extract_return_value_fpu): Likewise.
2492         (sh_store_return_value_nofpu): Likewise.
2493         (sh_corefile_supply_regset): Likewise.
2494         (sh_corefile_collect_regset): Likewise.
2495         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2496         (sh64_store_return_value): Likewise.
2497         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2498         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2499         (sparc_store_inferior_registers): Likewise.
2500         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2501         (sparc_ravenscar_prepare_to_store): Likewise.
2502         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2503         (sparc_analyze_control_transfer): Likewise.
2504         (sparc_step_trap): Likewise.
2505         (sparc_software_single_step): Likewise.
2506         (sparc32_gdbarch_init): Likewise.
2507         (sparc_supply_rwindow): Likewise.
2508         (sparc_collect_rwindow): Likewise.
2509         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2510         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2511         (sparc64nbsd_collect_gregset): Likewise.
2512         (sparc64nbsd_supply_fpregset): Likewise.
2513         (sparc64nbsd_collect_fpregset): Likewise.
2514         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2515         (sparc64_supply_gregset): Likewise.
2516         (sparc64_collect_gregset): Likewise.
2517         (sparc64_supply_fpregset): Likewise.
2518         (sparc64_collect_fpregset): Likewise.
2519         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2520         * spu-tdep.c (spu_unwind_sp): Likewise.
2521         (spu2ppu_prev_register): Likewise.
2522         (spu_memory_remove_breakpoint): Likewise.
2523         * stack.c (return_command): Likewise.
2524         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2525         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2526         * tracefile.c (trace_save_ctf): Likewise.
2527         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2528         (do_windows_store_inferior_registers): Likewise.
2529         (windows_resume): Likewise.
2530         * xtensa-linux-nat.c (fill_gregset): Likewise.
2531         (supply_gregset_reg): Likewise.
2532         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2533         (xtensa_register_read_masked): Likewise.
2534         (xtensa_supply_gregset): Likewise.
2535         (xtensa_extract_return_value): Likewise.
2536         (xtensa_store_return_value): Likewise.
2537
2538 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2539
2540         * doublest.c (floatformat_from_string): New function.
2541         * doublest.h (floatformat_from_string): Add prototype.
2542
2543         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2544         (OP_FLOAT): ... this.
2545         * expression.h: Do not include "doublest.h".
2546         (union exp_element): Replace doubleconst and decfloatconst by
2547         new element floatconst.
2548         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2549         (ada_evaluate_subexp): Likewise.
2550         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2551         OP_DOUBLE and OP_DECFLOAT.
2552         * expprint.c (print_subexp_standard): Likewise.
2553         (dump_subexp_body_standard): Likewise.
2554         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2555
2556         * parse.c: Include "dfp.h".
2557         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2558         (write_exp_elt_floatcst): New function.
2559         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2560         and OP_DECFLOAT.
2561         (operator_check_standard): Likewise.
2562         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2563         Return target format buffer instead of host DOUBLEST.
2564         Use floatformat_from_string and decimal_from_string to parse
2565         either binary or decimal floating-point types.
2566         (parse_c_float): Remove.
2567         * parser-defs.h: Do not include "doublest.h".
2568         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2569         (write_exp_elt_floatcst): Add prototype.
2570         (parse_float): Update prototype.
2571         (parse_c_float): Remove.
2572
2573         * c-exp.y: Do not include "dfp.h".
2574         (typed_val_float): Use byte buffer instead of DOUBLEST.
2575         (typed_val_decfloat): Remove.
2576         (DECFLOAT): Remove.
2577         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2578         (parse_number): Update to new parse_float interface.
2579         Parse suffixes and determine type before calling parse_float.
2580         Handle decimal and binary FP types the same way.
2581
2582         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2583         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2584         (parse_number): Update to new parse_float interface.
2585         Parse suffixes and determine type before calling parse_float.
2586
2587         * f-exp.y: Replace dval by typed_val_float.
2588         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2589         (parse_number): Use parse_float instead of atof.
2590
2591         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2592         (parse_go_float): Remove.
2593         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2594         (parse_number): Call parse_float instead of parse_go_float.
2595         Parse suffixes and determine type before calling parse_float.
2596
2597         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2598         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2599         (parse_number): Update to new parse_float interface.
2600         Parse suffixes and determine type before calling parse_float.
2601
2602         * m2-exp.y: Replace dval by byte buffer val.
2603         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2604         (parse_number): Call parse_float instead of atof.
2605
2606         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2607         (lex_number): Call parse_float instead of strtod.
2608         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2609         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2610         Use write_exp_elt_floatcst.
2611         (unit_testing): Remove static variable.
2612         (rust_type): Do not check unit_testing.
2613         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2614
2615         * ada-exp.y (type_float, type_double): Remove.
2616         (typed_val_float): Use byte buffer instead of DOUBLEST.
2617         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2618         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2619
2620 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2621
2622         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2623         * arch/aarch64.h: New file.
2624
2625 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2626
2627         * dfp.h (decimal_from_string): Use const reference for argument.
2628         * dfp.c (decimal_from_string): Likewise.
2629
2630 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2631
2632         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2633         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2634         * mips-tdep.c (mips_print_fp_register): Likewise.
2635
2636 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2637
2638         * common/format.h (enum argclass): Replace decfloat_arg by
2639         dec32float_arg, dec64float_arg, and dec128float_arg.
2640         * common/format.c (parse_format_string): Update to return
2641         new decimal float argument classes.
2642
2643         * printcmd.c (printf_decfloat): Rename to ...
2644         (printf_floating): ... this.  Add argclass argument, and use it
2645         instead of parsing the format string again.  Add support for
2646         binary floating-point values, using floatformat_to_string.
2647         Convert value to the target format if it doesn't already match.
2648         (ui_printf): Call printf_floating instead of printf_decfloat,
2649         also for double_arg / long_double_arg.  Pass argclass.
2650
2651         * dfp.c (decimal_to_string): Add format string argument.
2652         * dfp.h (decimal_to_string): Likewise.
2653
2654         * doublest.c (floatformat_to_string): Add format string argument.
2655         * doublest.h (floatformat_to_string): Likewise.
2656
2657 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2658
2659         * doublest.c (floatformat_precision): New routine.
2660         (floatformat_to_string): Likewise.
2661         * doublest.c (floatformat_to_string): Add prototype.
2662
2663         * printcmd.c (print_scalar_formatted): Only call print_floating
2664         on floating-point types.
2665         * valprint.c: Do not include "floatformat.h".
2666         (generic_val_print_decfloat): Remove.
2667         (generic_val_print): Call generic_val_print_float for both
2668         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2669         (print_floating): Use floatformat_to_string.  Handle decimal float.
2670         (print_decimal_floating): Remove, merge into floatformat_to_string.
2671         * value.h (print_decimal_floating): Remove.
2672
2673         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2674
2675 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2676
2677         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2678
2679 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2680
2681         * memattr.h: Don't include vec.h.
2682         (struct mem_attrib): Initialize fields.
2683         <unknown>: New static method.
2684         (struct mem_region): Add constructors, operator<, initialize
2685         fields.
2686         * memattr.c: Include algorithm.
2687         (default_mem_attrib, unknown_mem_attrib): Remove.
2688         (user_mem_region_list): New global.
2689         (target_mem_region_list, mem_region_list): Change type to
2690         std::vector<mem_region>.
2691         (mem_use_target): Now a function.
2692         (target_mem_regions_valid): Change type to bool.
2693         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2694         (require_user_regions): Adjust.
2695         (require_target_regions): Adjust.
2696         (create_mem_region): Adjust.
2697         (lookup_mem_region): Adjust.
2698         (invalidate_target_mem_regions): Adjust.
2699         (mem_clear): Rename to...
2700         (user_mem_clear): ... this, and adjust.
2701         (mem_command): Adjust.
2702         (info_mem_command): Adjust.
2703         (mem_enable, enable_mem_command, mem_disable,
2704         disable_mem_command): Adjust.
2705         (mem_delete): Adjust.
2706         (delete_mem_command): Adjust.
2707         * memory-map.h (parse_memory_map): Return an std::vector.
2708         * memory-map.c (parse_memory_map): Likewise.
2709         (struct memory_map_parsing_data): Add constructor.
2710         <memory_map>: Point to std::vector.
2711         (memory_map_start_memory): Adjust.
2712         (memory_map_end_memory): Adjust.
2713         (memory_map_end_property): Adjust.
2714         (clear_result): Remove.
2715         * remote.c (remote_memory_map): Return an std::vector.
2716         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2717         Remove.
2718         (target_debug_print_mem_region_vector): New.
2719         * target-delegates.c: Regenerate.
2720         * target.h (mem_region_vector): New typedef.
2721         (to_memory_map): Return mem_region_vector.
2722         (target_memory_map): Return an std::vector.
2723         * target.c (target_memory_map): Return an std::vector.
2724         (flash_erase_command): Adjust.
2725
2726 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2727
2728         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2729         Change type to std::string.
2730         (memory_map_start_property): Adjust.
2731         (memory_map_end_property): Adjust.
2732
2733 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2734
2735         * infrun.h: Include common/byte-vector.h.
2736         (struct displaced_step_closure): New struct.
2737         (struct buf_displaced_step_closure): New struct.
2738         * infrun.c (displaced_step_closure::~displaced_step_closure):
2739         Provide default implementation.
2740         (displaced_step_clear): Deallocate step closure with delete.
2741         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2742         (aarch64_displaced_step_closure): ... this, extend
2743         displaced_step_closure.
2744         (aarch64_displaced_step_data) <dsc>: Change type to
2745         aarch64_displaced_step_closure.
2746         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2747         unique_ptr.
2748         (aarch64_displaced_step_fixup): Add cast for displaced step
2749         closure.
2750         * amd64-tdep.c (displaced_step_closure): Rename to ...
2751         (amd64_displaced_step_closure): ... this, extend
2752         displaced_step_closure.
2753         <insn_buf>: Change type to std::vector<gdb_byte>.
2754         <max_len>: Remove.
2755         (fixup_riprel): Change type of DSC parameter, adjust to type
2756         change of insn_buf.
2757         (fixup_displaced_copy): Change type of DSC parameter.
2758         (amd64_displaced_step_copy_insn): Instantiate
2759         amd64_displaced_step_closure.
2760         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2761         to type change of insn_buf.
2762         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2763         parameter DSC.
2764         (arm_linux_copy_svc): Likewise.
2765         (cleanup_kernel_helper_return): Likewise.
2766         (arm_catch_kernel_helper_return): Likewise.
2767         (arm_linux_displaced_step_copy_insn): Instantiate
2768         arm_displaced_step_closure.
2769         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2770         (displaced_read_reg): Change type of parameter DSC.
2771         (branch_write_pc): Likewise.
2772         (load_write_pc): Likewise.
2773         (alu_write_pc): Likewise.
2774         (displaced_write_reg): Likewise.
2775         (arm_copy_unmodified): Likewise.
2776         (thumb_copy_unmodified_32bit): Likewise.
2777         (thumb_copy_unmodified_16bit): Likewise.
2778         (cleanup_preload): Likewise.
2779         (install_preload): Likewise.
2780         (arm_copy_preload): Likewise.
2781         (thumb2_copy_preload): Likewise.
2782         (install_preload_reg): Likewise.
2783         (arm_copy_preload_reg): Likewise.
2784         (cleanup_copro_load_store): Likewise.
2785         (install_copro_load_store): Likewise.
2786         (arm_copy_copro_load_store) Likewise.
2787         (thumb2_copy_copro_load_store): Likewise.
2788         (cleanup_branch): Likewise.
2789         (install_b_bl_blx): Likewise.
2790         (arm_copy_b_bl_blx): Likewise.
2791         (thumb2_copy_b_bl_blx): Likewise.
2792         (thumb_copy_b): Likewise.
2793         (install_bx_blx_reg): Likewise.
2794         (arm_copy_bx_blx_reg): Likewise.
2795         (thumb_copy_bx_blx_reg): Likewise.
2796         (cleanup_alu_imm): Likewise.
2797         (arm_copy_alu_imm): Likewise.
2798         (thumb2_copy_alu_imm): Likewise.
2799         (cleanup_alu_reg): Likewise.
2800         (install_alu_reg): Likewise.
2801         (arm_copy_alu_reg): Likewise.
2802         (thumb_copy_alu_reg): Likewise.
2803         (cleanup_alu_shifted_reg): Likewise.
2804         (install_alu_shifted_reg): Likewise.
2805         (arm_copy_alu_shifted_reg): Likewise.
2806         (cleanup_load): Likewise.
2807         (cleanup_store): Likewise.
2808         (arm_copy_extra_ld_st): Likewise.
2809         (install_load_store): Likewise.
2810         (thumb2_copy_load_literal): Likewise.
2811         (thumb2_copy_load_reg_imm): Likewise.
2812         (arm_copy_ldr_str_ldrb_strb): Likewise.
2813         (cleanup_block_load_all): Likewise.
2814         (cleanup_block_store_pc): Likewise.
2815         (cleanup_block_load_pc): Likewise.
2816         (arm_copy_block_xfer): Likewise.
2817         (thumb2_copy_block_xfer): Likewise.
2818         (cleanup_svc): Likewise.
2819         (install_svc): Likewise.
2820         (arm_copy_svc): Likewise.
2821         (thumb_copy_svc): Likewise.
2822         (arm_copy_undef): Likewise.
2823         (thumb_32bit_copy_undef): Likewise.
2824         (arm_copy_unpred): Likewise.
2825         (arm_decode_misc_memhint_neon): Likewise.
2826         (arm_decode_unconditional): Likewise.
2827         (arm_decode_miscellaneous): Likewise.
2828         (arm_decode_dp_misc): Likewise.
2829         (arm_decode_ld_st_word_ubyte): Likewise.
2830         (arm_decode_media): Likewise.
2831         (arm_decode_b_bl_ldmstm): Likewise.
2832         (arm_decode_ext_reg_ld_st): Likewise.
2833         (thumb2_decode_dp_shift_reg): Likewise.
2834         (thumb2_decode_ext_reg_ld_st): Likewise.
2835         (arm_decode_svc_copro): Likewise.
2836         (thumb2_decode_svc_copro): Likewise.
2837         (install_pc_relative): Likewise.
2838         (thumb_copy_pc_relative_16bit): Likewise.
2839         (thumb_decode_pc_relative_16bit): Likewise.
2840         (thumb_copy_pc_relative_32bit): Likewise.
2841         (thumb_copy_16bit_ldr_literal): Likewise.
2842         (thumb_copy_cbnz_cbz): Likewise.
2843         (thumb2_copy_table_branch): Likewise.
2844         (cleanup_pop_pc_16bit_all): Likewise.
2845         (thumb_copy_pop_pc_16bit): Likewise.
2846         (thumb_process_displaced_16bit_insn): Likewise.
2847         (decode_thumb_32bit_ld_mem_hints): Likewise.
2848         (thumb_process_displaced_32bit_insn): Likewise.
2849         (thumb_process_displaced_insn): Likewise.
2850         (arm_process_displaced_insn): Likewise.
2851         (arm_displaced_init_closure): Likewise.
2852         (arm_displaced_step_fixup): Add cast for closure.
2853         * arm-tdep.h: Include infrun.h.
2854         (displaced_step_closure): Rename to ...
2855         (arm_displaced_step_closure): ... this, extend
2856         displaced_step_closure.
2857         <u::svc::copy_svc_os>: Change type of parameter DSC.
2858         <cleanup>: Likewise.
2859         (arm_process_displaced_insn): Likewise.
2860         (arm_displaced_init_closure): Likewise.
2861         (displaced_read_reg): Likewise.
2862         (displaced_write_reg): Likewise.
2863         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2864         Adjust.
2865         * i386-tdep.h: Include infrun.h.
2866         (i386_displaced_step_closure): New typedef.
2867         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2868         i386_displaced_step_closure.
2869         (i386_displaced_step_fixup): Adjust.
2870         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2871         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2872         and unique_ptr.
2873         (ppc_displaced_step_fixup): Adjust.
2874         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2875         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2876         and unique_ptr.
2877         (s390_displaced_step_fixup): Adjust.
2878
2879 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2880
2881         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2882         Remove declarations.
2883
2884 2017-10-20  Tom Tromey  <tom@tromey.com>
2885
2886         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2887         std::vector.
2888         (gdb_bfd_record_inclusion): Update.
2889         (bfdp): Remove typedef.
2890
2891 2017-10-20  Tom Tromey  <tom@tromey.com>
2892
2893         * gdb_bfd.c (gdb_bfd_ref): Use new.
2894         (struct gdb_bfd_data): Add constructor, destructor, and member
2895         initializers.
2896         (gdb_bfd_unref): Use delete.
2897
2898 2017-10-20  Tom Tromey  <tom@tromey.com>
2899
2900         * exec.c (exec_file_attach): Use new_bfd_ref.
2901         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2902         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2903         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2904         new_bfd_ref.
2905         * gdb_bfd.h (new_bfd_ref): New function.
2906
2907 2017-10-20  Pedro Alves  <palves@redhat.com>
2908
2909         * main.c (captured_command_loop): Add attribute noinline.
2910
2911 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2912
2913         * interps.c (struct interp_factory): Add constructor.
2914         (interp_factory_p): Remove typedef.
2915         (DEF_VEC_P(interp_factory_p)): Remove.
2916         (interpreter_factories): Change type to std::vector.
2917         (interp_factory_register): Adjust.
2918         (interp_lookup): Adjust.
2919         (interpreter_completer): Adjust.
2920
2921 2017-10-19  Tom Tromey  <tom@tromey.com>
2922
2923         * break-catch-syscall.c (catch_syscall_completer): Use
2924         std::string, gdb::unique_xmalloc_ptr.
2925
2926 2017-10-19  Tom Tromey  <tom@tromey.com>
2927
2928         * infcall.c (call_function_by_hand_dummy): Use std::string.
2929
2930 2017-10-19  Tom Tromey  <tom@tromey.com>
2931
2932         * mi/mi-main.c (mi_cmd_execute): Update.
2933         * top.h (prepare_execute_command): Return scoped_value_mark.
2934         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2935         Add move constructor.
2936         * top.c (prepare_execute_command): Return scoped_value_mark.
2937         (execute_command): Update.
2938
2939 2017-10-19  Pedro Alves  <palves@redhat.com>
2940
2941         * xml-support.c (xml_fetch_content_from_file): Check fread's
2942         return.
2943
2944 2017-10-19  Pedro Alves  <palves@redhat.com>
2945
2946         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2947         async.
2948         (handle_error_fd): New function.
2949         (ser_base_async): Add/delete an event loop file handler for
2950         error_fd.
2951
2952 2017-10-19  Pedro Alves  <palves@redhat.com>
2953
2954         * xml-support.c (xml_fetch_content_from_file): Don't read in
2955         chunks.  Instead use fseek to determine the file's size, and read
2956         it in one go.
2957
2958 2017-11-18  Keith Seitz  <keiths@redhat.com>
2959
2960         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2961         types.
2962         Add whitespace to front of type name.
2963
2964 2017-10-18  Keith Seitz  <keiths@redhat.com>
2965
2966         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2967         DW_AT_accessibility.
2968
2969 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2970
2971         * features/tic6x-c62x-linux.c: Remove.
2972
2973 2017-10-17  Tom Tromey  <tom@tromey.com>
2974
2975         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2976         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2977         (do_mixed_source_and_assembly): Likewise.
2978
2979 2017-10-17  Tom Tromey  <tom@tromey.com>
2980
2981         * regcache.c (regcache::xfer_part): Remove assertion.
2982
2983 2017-10-17  Pedro Alves  <palves@redhat.com>
2984
2985         * xml-support.c (xml_fetch_content_from_file): Call
2986         unique_ptr::release() instead unique_ptr::get() when passing
2987         through xrealloc.
2988
2989 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2990
2991         * regcache.c (regcache::xfer_part): Remove parameters read and
2992         write, add parameter is_raw.  All callers are updated.
2993
2994 2017-10-16  Keith Seitz  <keiths@redhat.com>
2995
2996         * c-typeprint.c (enum access_specifier): Moved here from
2997         c_type_print_base.
2998         (output_access_specifier): New function.
2999         (c_type_print_base): Consider typedefs when assessing
3000         whether access labels are needed.
3001         Use output_access_specifier as needed.
3002         Output access specifier for typedefs, if needed.
3003         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3004         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3005         fields.
3006         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3007         accessor macros.
3008
3009 2017-10-16  Tom Tromey  <tom@tromey.com>
3010
3011         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3012         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3013         * target.c (target_fileio_read_stralloc): Update.
3014         * sparc64-tdep.c (adi_is_addr_mapped): Update.
3015         * target.h (target_fileio_read_stralloc): Return
3016         unique_xmalloc_ptr.
3017
3018 2017-10-16  Tom Tromey  <tom@tromey.com>
3019
3020         * xml-syscall.c (xml_init_syscalls_info): Update.
3021         * xml-support.c (xinclude_start_include): Update.
3022         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3023         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3024         (xml_fetch_content_from_file): Likewise.
3025         * osdata.c (get_osdata): Update.
3026         * target.h (target_read_stralloc, target_get_osdata): Return
3027         unique_xmalloc_ptr.
3028         * solib-aix.c (solib_aix_get_library_list): Update.
3029         * solib-target.c (solib_target_current_sos): Update.
3030         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3031         * xml-tdesc.c (fetch_available_features_from_target): Update.
3032         (target_fetch_description_xml): Update.
3033         (file_read_description_xml): Update.
3034         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3035         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3036         (remote_pid_to_exec_file): Update.
3037         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3038         (target_get_osdata): Likewise.
3039
3040 2017-10-16  Tom Tromey  <tom@tromey.com>
3041
3042         * remote.c (remote_register_number_and_offset): Use std::vector.
3043         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3044         (putpkt_binary): Use gdb::def_vector.
3045         (compare_sections_command): Use gdb::byte_vector.
3046
3047 2017-10-16  Tom Tromey  <tom@tromey.com>
3048
3049         * ppc-linux-nat.c (hwdebug_insert_point): Use
3050         gdb::unique_xmalloc_ptr, XDUP.
3051
3052 2017-10-16  Tom Tromey  <tom@tromey.com>
3053
3054         * probe.c (parse_probes): Use std::string.
3055         (info_probes_for_ops, enable_probes_command)
3056         (disable_probes_command): Remove cleanups.
3057
3058 2017-10-16  Tom Tromey  <tom@tromey.com>
3059
3060         * buildsym.c (block_compar): Remove.
3061         (end_symtab_get_static_block): Use std::vector.
3062
3063 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3064
3065         * memrange.h (struct mem_range): Define operator< and operator==.
3066         (mem_range_s): Remove.
3067         (DEF_VEC_O (mem_range_s)): Remove.
3068         (normalize_mem_ranges): Change parameter type to std::vector.
3069         * memrange.c (compare_mem_ranges): Remove.
3070         (normalize_mem_ranges): Change parameter type to std::vector,
3071         adjust to vector change.
3072         * exec.c (section_table_available_memory): Return vector, remove
3073         parameter.
3074         (section_table_read_available_memory): Adjust to std::vector
3075         change.
3076         * remote.c (remote_read_bytes): Adjust to std::vector
3077         change.
3078         * tracepoint.h (traceframe_available_memory): Change parameter
3079         type to std::vector.
3080         * tracepoint.c (traceframe_available_memory): Change parameter
3081         type to std::vector, adjust.
3082         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3083         std::vector change.
3084         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3085         unittests/memrange-selftests.c.
3086         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3087         * gdb/unittests/memrange-selftests.c: New file.
3088
3089 2017-10-16  Pedro Alves  <palves@redhat.com>
3090
3091         * elfread.c (probe_key_free): Rename range-for variable.
3092         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3093         (find_probe_by_pc, collect_probes): Rename range-for variable.
3094
3095 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3096
3097         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3098         * features/tic6x-c62x.c: Remove.
3099         * features/tic6x-c64x-linux.c: Remove.
3100         * features/tic6x-c64x.c: Remove.
3101         * features/tic6x-c64xp-linux.c: Remove.
3102         * features/tic6x-c64xp.c: Remove.
3103         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3104         initialize_tdesc_tic6x_*_linux functions.
3105         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3106         initialize_tdesc_tic6x_* functions.
3107
3108 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3109
3110         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3111         tic6x-c62x.
3112         * regformats/tic6x-c62x.dat: Remove.
3113         * regformats/tic6x-c64x.dat: Remove.
3114         * regformats/tic6x-c64xp.dat: Remove.
3115
3116 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3117
3118         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3119         (the !HAVE_LIBEXPAT version).
3120
3121 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3122
3123         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3124         const.
3125
3126 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3127
3128         * target.h: Include tracepoint.h.
3129         (enum trace_find_type): Move to tracepoint.h.
3130         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3131         * tracepoint.h: Don't include target.h
3132         (enum trace_find_type): Move from target.h.
3133         (parse_traceframe_info): Return a unique ptr.
3134         * tracepoint.c (current_traceframe_info): Change type to unique
3135         ptr.
3136         (free_traceframe_info): Remove.
3137         (clear_traceframe_info): Don't manually free
3138         current_traceframe_info.
3139         (free_result): Remove.
3140         (parse_traceframe_info): Return a unique ptr.
3141         (get_traceframe_info): Adjust to unique ptr.
3142         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3143         * remote.c (remote_traceframe_info): Return a unique ptr.
3144         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3145         ptr.
3146         * target-debug.h (target_debug_print_traceframe_info_up): New
3147         macro.
3148         * target-delegates.c: Regenerate.
3149
3150 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3151
3152         * memrange.h (struct mem_range): Add constructors.
3153         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3154         std::vector<mem_range>.
3155         * tracepoint.c (free_traceframe_info): Don't manually free
3156         vector.
3157         (traceframe_info_start_memory): Adjust to vector change.
3158         (traceframe_available_memory): Likewise.
3159         * tracefile-tfile.c (build_traceframe_info): Likewise.
3160         * ctf.c (ctf_traceframe_info): Likewise.
3161
3162 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3163
3164         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3165         std::vector<int>.
3166         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3167         (traceframe_info_start_tvar): Adjust to vector change.
3168         (parse_traceframe_info): Allocate with new.
3169         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3170         vector change.
3171         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3172         change.
3173         tfile_traceframe_info): Allocate with new.
3174         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3175         change.
3176
3177 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3178
3179         * tracepoint.c (traceframe_info): Rename to...
3180         (current_traceframe_info): ...this.
3181         (clear_traceframe_info): Adjust.
3182         (get_traceframe_info): Adjust.
3183
3184 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3185
3186         * nat/linux-osdata.c: Include algorithm.
3187         (compare_processes): Remove.
3188         (struct pid_pgid_entry): New struct.
3189         (linux_xfer_osdata_processgroups): Use std::vector instead of
3190         XNEWVEC.
3191
3192 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3193
3194         * objfiles.h: Don't include symfile.h.
3195         (struct partial_symbol): Remove forward-declaration.
3196         (struct objfile) <global_psymbols, static_psymbols>: Change type
3197         to std::vector<partial_symbol *>.
3198         * objfiles.c (objfile::objfile): Don't memset those fields.
3199         (objfile::~objfile): Don't free those fields.
3200         * psympriv.h (struct psymbol_allocation_list): Remove
3201         forward-declaration.
3202         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3203         to std::vector.
3204         (start_psymtab_common): Change parameters to std::vector.
3205         * psymtab.c: Include algorithm.
3206         (require_partial_symbols): Call shrink_to_fit.
3207         (find_pc_sect_psymbol): Adjust to vector change.
3208         (match_partial_symbol): Likewise.
3209         (lookup_partial_symbol): Likewise.
3210         (psym_relocate): Likewise.
3211         (dump_psymtab): Likewise.
3212         (recursively_search_psymtabs): Likewise.
3213         (compare_psymbols): Remove.
3214         (sort_pst_symbols): Adjust to vector change.
3215         (start_psymtab_common): Likewise.
3216         (end_psymtab_common): Likewise.
3217         (psymbol_bcache_full): De-constify return value.
3218         (add_psymbol_to_bcache): Likewise.
3219         (extend_psymbol_list): Remove.
3220         (append_psymbol_to_list): Adjust to vector change.
3221         (add_psymbol_to_list): Likewise.
3222         (init_psymbol_list): Likewise.
3223         (maintenance_info_psymtabs): Likewise.
3224         (maintenance_check_psymtabs): Likewise.
3225         * symfile.h (struct psymbol_allocation_list): Remove.
3226         * symfile.c (reread_symbols): Adjust to vector change.
3227         * dbxread.c (start_psymtab): Change type of parameters.
3228         (dbx_symfile_read): Adjust to vector change.
3229         (read_dbx_symtab): Likewise.
3230         (start_psymtab): Change type of parameters.
3231         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3232         (create_partial_symtab): Likewise.
3233         (add_partial_symbol): Likewise.
3234         (write_one_signatured_type): Likewise.
3235         (recursively_write_psymbols): Likewise.
3236         * mdebugread.c (parse_partial_symbols): Likewise.
3237         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3238         (scan_xcoff_symtab): Adjust to vector change.
3239         (xcoff_initial_scan): Likewise.
3240
3241 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3244
3245 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3246
3247         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3248         Remove s390x-*-expedite, add s390x-expedite.
3249
3250 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3251
3252         * features/s390-gs-linux64.c: Regenerated.
3253         * features/s390x-gs-linux64.c: Regenerated.
3254
3255 2017-10-13  Tom Tromey  <tom@tromey.com>
3256
3257         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3258         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3259         delete.
3260         * symfile.c (symbol_file_add_with_addrs): Use new.
3261         (symbol_file_add_separate): Update comment.
3262         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3263         * jit.c (jit_object_close_impl): Use new.
3264         (jit_unregister_code): Use delete.
3265         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3266         (~objfile): Rename from free_objfile.
3267         (free_objfile_separate_debug, do_free_objfile_cleanup)
3268         (free_all_objfiles, objfile_purge_solibs): Use delete.
3269         * objfiles.h (struct objfile): Add constructor and destructor.
3270         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3271         (allocate_objfile, free_objfile): Don't declare.
3272         (struct objstats): Add initializers.
3273
3274 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3275
3276         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3277         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3278         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3279         * gdbarch.h: Regenerate.
3280         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3281         Adjust comment.
3282         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3283         (i386_displaced_step_fixup): Adjust comment.
3284         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3285
3286 2017-10-12  Tom Tromey  <tom@tromey.com>
3287
3288         * prologue-value.h (pv_area::store_would_trash): Return bool.
3289         (pv_area::find_reg): Likewise.
3290         * prologue-value.c (pv_area::store_would_trash): Return bool.
3291         (pv_area::find_reg): Likewise.
3292
3293 2017-10-12  Tom Tromey  <tom@tromey.com>
3294
3295         * s390-linux-tdep.c (s390_store, s390_load)
3296         (s390_check_for_saved, s390_analyze_prologue): Update.
3297         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3298         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3299         * prologue-value.h (class pv_area): Move from prologue-value.c.
3300         Change names of members.  Add constructor, destructor, member
3301         functions.
3302         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3303         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3304         (pv_area_fetch, pv_area_scan): Don't declare.
3305         * prologue-value.c (struct pv_area::area_entry): Now member of
3306         pv_area.
3307         (struct pv_area): Move to prologue-value.h.
3308         (pv_area::pv_area): Rename from make_pv_area.
3309         (pv_area::~pv_area): Rename from free_pv_area.
3310         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3311         (clear_entries, find_entry, overlaps, store_would_trash, store)
3312         (fetch, find_reg, scan): Now member of pv_area.
3313         Remove "area" argument.  Update.
3314         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3315         Update.
3316         * mn10300-tdep.c (push_reg, check_for_saved)
3317         (mn10300_analyze_prologue): Update.
3318         * mep-tdep.c (is_arg_spill, check_for_saved)
3319         (mep_analyze_prologue): Update.
3320         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3321         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3322         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3323         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3324         Update.
3325         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3326         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3327
3328 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3329
3330         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3331         * linux-nat.c (linux_nat_delete_thread): New variable.
3332         (lwp_free): Invoke linux_nat_delete_thread if set.
3333         (linux_nat_set_delete_thread): New function.
3334         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3335         thread delete callback.
3336         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3337         (_initialize_arm_linux_nat): Assign thread delete callback.
3338         * s390-linux-nat.c (s390_delete_thread): New function.
3339         (_initialize_s390_nat): Assign thread delete callback.
3340         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3341         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3342         function.
3343         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3344         declaration.
3345         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3346         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3347
3348 2017-10-09  Tom Tromey  <tom@tromey.com>
3349
3350         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3351         std::string.
3352         * tui/tui-layout.c (enum tui_status): Use std::string.
3353
3354 2017-10-11  Tom Tromey  <tom@tromey.com>
3355
3356         * gdbthread.h (thread_command): Constify.
3357         * inferior.h (detach_command): Constify.
3358         * top.h (set_history, show_history): Constify.
3359         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3360         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3361         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3362         * printcmd.c (set_command): Constify.
3363         (non_const_set_command): New function.
3364         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3365         * breakpoint.c (enable_command, disable_command, delete_command)
3366         (catch_command, tcatch_command, set_breakpoint_cmd)
3367         (show_breakpoint_cmd): Constify.
3368         * macrocmd.c (macro_command): Constify.
3369         * infcmd.c (unset_command, kill_command, detach_command)
3370         (info_proc_cmd): Constify.
3371         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3372         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3373         (info_auto_load_cmd): Constify.
3374         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3375         (unset_tdesc_cmd): Constify.
3376         * ada-lang.c (set_ada_command, show_ada_command)
3377         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3378         * guile/guile.c (set_guile_command, show_guile_command)
3379         (info_guile_command): Constify.
3380         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3381         Constify.
3382         * skip.c (skip_command): Constify.
3383         * compile/compile.c (_initialize_compile): Constify.
3384         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3385         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3386         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3387         (maint_btrace_pt_show_cmd): Constify.
3388         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3389         Constify.
3390         * python/python.c (user_show_python, user_set_python): Constify.
3391         * mips-tdep.c (set_mips_command, show_mips_command)
3392         (set_mipsfpu_command): Constify.
3393         * record-btrace.c (cmd_record_btrace_start)
3394         (cmd_set_record_btrace, cmd_show_record_btrace)
3395         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3396         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3397         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3398         Constify.
3399         * symfile.c (overlay_command): Constify.
3400         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3401         * cli/cli-logging.c (set_logging_command, show_logging_command):
3402         Constify.
3403         * cli/cli-dump.c (dump_command, append_command)
3404         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3405         (tekhex_dump_command, binary_dump_command)
3406         (binary_append_command): Constify.
3407         * cli/cli-decode.c (struct cmd_list_element): Change type of
3408         "fun".
3409         * cli/cli-cmds.c (info_command, show_command, set_debug)
3410         (show_debug): Constify.
3411         (show_command): Add non-const overload.
3412         * top.c (set_history, show_history): Constify.
3413         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3414         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3415         * target.c (target_command): Constify.
3416         * sparc64-tdep.c (info_adi_command): Constify.
3417         * record-full.c (cmd_record_full_start): Constify.
3418         (set_record_full_command): Constify.  Fix typo.
3419         (show_record_full_command): Constify.
3420         * thread.c (thread_command, thread_apply_command): Constify.
3421         * memattr.c (dummy_cmd): Constify.
3422         * value.c (function_command): Constify.
3423         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3424         * probe.c (info_probes_command): Constify.
3425         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3426         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3427         (show_thread_cmd, set_thread_default_cmd)
3428         (show_thread_default_cmd): Constify.
3429         (check_empty): Constify.
3430         * tracepoint.c (tfind_command): Constify.
3431         * cp-support.c (maint_cplus_command): Constify.
3432         * windows-tdep.c (info_w32_command): Constify.
3433         * record.c (cmd_record_start, set_record_command)
3434         (show_record_command, info_record_command, cmd_record_goto):
3435         Constify.
3436         * ravenscar-thread.c (set_ravenscar_command)
3437         (show_ravenscar_command): Constify.
3438         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3439         Constify.
3440         (add_internal_problem_command): Remove casts.
3441         * arc-tdep.c (maintenance_print_arc_command): Constify.
3442         * valprint.c (set_print, show_print, set_print_raw)
3443         (show_print_raw): Constify.
3444         * maint.c (maintenance_command, maintenance_info_command)
3445         (maintenance_print_command, maintenance_set_cmd)
3446         (maintenance_show_cmd, set_per_command_cmd)
3447         (show_per_command_cmd, maintenance_check_command): Constify.
3448         * language.c (set_check, show_check): Constify.
3449         * typeprint.c (show_print_type, set_print_type): Constify.
3450         * go32-nat.c (go32_info_dos_command): Constify.
3451
3452 2017-10-11  Tom Tromey  <tom@tromey.com>
3453
3454         * breakpoint.c (prepare_re_set_context): Remove.
3455         (breakpoint_re_set_one): Update.  Don't use cleanups.
3456         (breakpoint_re_set): Use scoped_restore, std::string, and
3457         scoped_restore_current_language.
3458
3459 2017-10-11  Tom Tromey  <tom@tromey.com>
3460
3461         * breakpoint.c (commands_command_1): Use std::string.
3462         (cleanup_executing_breakpoints): Remove.
3463         (bpstat_do_actions_1): Use scoped_restore.
3464         (bpstat_check_watchpoint): Use std::string.
3465         (decode_static_tracepoint_spec): Likewise.
3466         (break_range_command): Likewise.
3467         (watch_command_1): Likewise.
3468         (compare_breakpoints): Change argument types.
3469         (clear_command): Use std::vector.
3470         (cleanup_executing_breakpoints): Remove.
3471         (update_global_location_list): Use unique_xmalloc_ptr.
3472         (strace_command): Remove unused declaration.
3473
3474 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3475
3476         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3477         * NEWS: Mention new FreeBSD/arm native configuration.
3478         * configure.host: Add arm*-*-freebsd*.
3479         * configure.nat: Likewise.
3480         * arm-fbsd-nat.c: New file.
3481
3482 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3483
3484         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3485         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3486         * NEWS: Mention new FreeBSD/arm target.
3487         * configure.tgt: Add arm*-*-freebsd*.
3488         * arm-fbsd-tdep.c: New file.
3489         * arm-fbsd-tdep.h: New file.
3490
3491 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3492
3493         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3494         `gdbarch_elfcore_write_linux_prpsinfo'.
3495         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3496         method.
3497         (elf_internal_linux_prpsinfo): Remove declaration.
3498         * gdbarch.h: Regenerate.
3499         * gdbarch.c: Regenerate.
3500
3501 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3502
3503         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3504         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3505
3506 2017-10-11  Pedro Alves  <palves@redhat.com>
3507
3508         * breakpoint.c (reattach_breakpoints): Delete.
3509         * breakpoint.h (reattach_breakpoints): Delete.
3510
3511 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3512
3513         * symfile.c (registered_sym_fns): Make struct, not typedef.
3514         (DEF_VEC_O (registered_sym_fns)): Remove.
3515         (symtab_fns): Change type to std::vector.
3516         (add_symtab_fns): Adjust.
3517         (find_sym_fns): Adjust.
3518
3519 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3520
3521         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3522         * arc-tdep.h (arc_arch_is_em): New function.
3523         (arc_arch_is_hs): Likewise.
3524
3525 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3526
3527         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3528         parentheses in the declaration.
3529         (macro_lookup_inclusion): Likewise.
3530         (macro_lookup_definition): Likewise.
3531         * p-lang.h (pascal_builtin_types): Likewise.
3532         * tui/tui-data.c (tui_win_list): Likewise.
3533         * tui/tui-data.h (tui_win_list): Likewise.
3534         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3535
3536 2017-10-11  Mark Rages  <markrages@gmail.com>
3537
3538         * target-memory.c (block_boundaries): Fix for block address not
3539         aligned on block size.
3540
3541 2017-10-10  Pedro Alves <palves@redhat.com>
3542             Tom Tromey  <tom@tromey.com>
3543
3544         * breakpoint.c (struct captured_breakpoint_query_args)
3545         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3546         (print_breakpoint): New.
3547         * breakpoint.h (print_breakpoint): Declare.
3548         * common/common-exceptions.h (enum return_reason): Remove
3549         references to catch_exceptions.
3550         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3551         Delete.
3552         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3553         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3554         * gdb.h: Delete.
3555         * gdbthread.h (thread_select): Declare.
3556         * mi/mi-cmd-break.c: Don't include gdb.h.
3557         (breakpoint_notify): Use print_breakpoint.
3558         * mi/mi-cmd-catch.c: Don't include gdb.h.
3559         * mi/mi-interp.c: Don't include gdb.h.
3560         (mi_print_breakpoint_for_event): New.
3561         (mi_breakpoint_created, mi_breakpoint_modified): Use
3562         mi_print_breakpoint_for_event.
3563         * mi/mi-main.c: Don't include gdb.h.
3564         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3565         thread_select instead of gdb_thread_select.
3566         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3567         of using gdb_list_thread_ids.
3568         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3569         FILEIO_ENOSYS here.
3570         (remote_fileio_request): Use TRY/CATCH instead of
3571         catch_exceptions.
3572         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3573         (symbol_file_add_from_memory_wrapper): Delete.
3574         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3575         * thread.c: Don't include gdb.h.
3576         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3577         (thread_alive): Use thread_select.
3578         (do_captured_thread_select): Delete, parts salvaged as ...
3579         (thread_select): ... this new function.
3580         (gdb_thread_select): Delete.
3581
3582 2017-10-10  Pedro Alves  <palves@redhat.com>
3583             Tom Tromey  <tom@tromey.com>
3584
3585         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3586         and reverse logic.
3587         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3588         No longer macros.  Instead ...
3589         (enum wp_check_result): They're now values of this new
3590         enumeration.
3591         (watchpoint_check): Change return type to wp_check_result and
3592         parameter type to bpstat.
3593         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3594         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3595         catch_errors.  Reverse logic of watchpoint_check call.
3596         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3597         pointer as parameter.
3598         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3599         * common/common-exceptions.c (throw_exception_sjlj): Update
3600         comments to avoid mentioning catch_errors.
3601         * exceptions.c (catch_errors): Delete.
3602         * exceptions.h: Update comments to avoid mentioning catch_errors.
3603         (catch_errors_ftype, catch_errors): Delete.
3604         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3605         (hook_stop_stub): Delete.
3606         (restore_selected_frame): Change return type to void, and
3607         parameter type to const frame_id &.
3608         (restore_infcall_control_state): Use TRY/CATCH instead of
3609         catch_errors.
3610         * main.c (captured_command_loop): Return void and remove
3611         parameter.  Remove references to catch_errors.
3612         (captured_main): Use TRY/CATCH instead of catch_errors.
3613         * objc-lang.c (objc_submethod_helper_data)
3614         (find_objc_msgcall_submethod_helper): Delete.
3615         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3616         catch_errors.
3617         * record-full.c (record_full_message): Return void.
3618         (record_full_message_args, record_full_message_wrapper): Delete.
3619         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3620         instead of catch_errors.
3621         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3622         parameter type to int.
3623         * solib-darwin.c (open_symbol_file_object): Ditto.
3624         * solib-dsbt.c (open_symbol_file_object): Ditto.
3625         * solib-frv.c (open_symbol_file_object): Ditto.
3626         * solib-svr4.c (open_symbol_file_object): Ditto.
3627         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3628         * solib.c (update_solib_list): Use TRY/CATCH instead of
3629         catch_errors.
3630         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3631         Change type.
3632         * symmisc.c (struct print_symbol_args): Remove.
3633         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3634         (print_symbol): Change type.
3635         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3636         and remove parameters.
3637         (catch_errors): New.
3638         (get_windows_debug_event): Adjust.
3639
3640 2017-10-09  Tom Tromey  <tom@tromey.com>
3641
3642         * mi/mi-main.c (free_splay_tree): Remove.
3643         (list_available_thread_groups): Use splay_tree_up.
3644         * common/gdb_splay_tree.h: New file.
3645
3646 2017-10-09  Tom Tromey  <tom@tromey.com>
3647
3648         * mi/mi-main.c (do_nothing): Remove.
3649         (list_available_thread_groups): Update.
3650
3651 2017-10-09  Pedro Alves  <palves@redhat.com>
3652
3653         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3654         reading registers when switching context.
3655
3656 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3657
3658         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3659         (fbsd_convert_siginfo): Likewise.
3660         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3661
3662 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3663
3664         * configure.ac (try_guile_versions): Remove guile-2.2.
3665         * configure: Regenerate.
3666
3667 2017-10-09  Tom Tromey  <tom@tromey.com>
3668
3669         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3670         (COMPILE.pre): Use $(CXX).
3671
3672 2017-10-09  Pedro Alves  <palves@redhat.com>
3673
3674         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3675         Use bool.
3676         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3677         * cp-support.h (cp_remove_params): Now returns a
3678         gdb::unique_xmalloc_ptr.
3679         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3680         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3681         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3682         returning a gdb::unique_xmalloc_ptr.
3683         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3684         * stack.c (find_frame_funname): Adjust to cp_remove_params
3685         returning a gdb::unique_xmalloc_ptr.
3686
3687 2017-10-08  Tom Tromey  <tom@tromey.com>
3688
3689         * dwarf2read.c (dwarf2_get_dwz_file): Use
3690         gdb::unique_xmalloc_ptr.
3691         (find_slot_in_mapped_hash): Likewise.
3692         (dwarf2_physname): Likewise.
3693         (create_dwo_unit_in_dwp_v1): Use std::string.
3694         (create_dwo_unit_in_dwp_v2): Likewise.
3695         (lookup_dwo_cutu): Likewise.
3696         (inherit_abstract_dies): Use std::vector.
3697         (read_array_type): Likewise.
3698         (dwarf_decode_macros): Remove unused declaration.
3699         (unsigned_int_compar): Remove.
3700         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3701         (psymtabs_addrmap_cleanup): Remove.
3702
3703 2017-10-08  Tom Tromey  <tom@tromey.com>
3704
3705         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3706         * frame.h (frame_cleanup_after_sniffer): Declare.
3707         (frame_prepare_for_sniffer): Return void.
3708         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3709         type of argument.
3710         (frame_prepare_for_sniffer): Return void.
3711
3712 2017-10-08  Tom Tromey  <tom@tromey.com>
3713
3714         * utils.h (make_cleanup_value_free): Remove.
3715         * utils.c (do_value_free, struct cleanup): Remove.
3716         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3717         Use gdb_value_up.
3718         * value.h (struct value_deleter): New.
3719         (gdb_value_up): New typedef.
3720
3721 2017-10-08  Tom Tromey  <tom@tromey.com>
3722
3723         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3724         (make_cleanup_free_search_symbols): Remove.
3725         (search_symbols): Return std::vector.
3726         (symbol_search::compare_search_syms): Now member of
3727         symbol_search.  Change arguments.
3728         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3729         (symtab_symbol_info, rbreak_command): Update.
3730         * symtab.h (struct symbol_search) <next>: Remove.
3731         Add constructors.
3732         (symbol_search::operator<): New function.
3733         (symbol_search::operator==): New function.
3734         (search_symbols): Remove std::vector.
3735         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3736         (symbol_search::compare_search_syms): Declare.
3737
3738 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3739
3740         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3741         arch/aarch64-insn.o.
3742         Remove one rule.
3743         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3744
3745 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3746
3747         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3748         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3749         arch/arm-linux.o respectively.
3750         * configure.tgt: Likewise.
3751
3752 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3753
3754         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3755         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3756
3757 2017-10-06  Pedro Alves  <palves@redhat.com>
3758
3759         * windows-nat.c: Include <algorithm>.
3760
3761 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3762
3763         * configure.tgt (i386_tobjs): New variable.
3764         (amd64_tobjs): New variable.
3765         Set $cpu_obs and $os_obs.
3766
3767 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3768
3769         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3770         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3771         (clean): Remove object files and dependency files.
3772         (distclean): Remove the directory.
3773         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3774         * configure: Re-generated.
3775         * configure.tgt: Replace amd64.o with arch/amd64.o.
3776
3777 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3778
3779         PR build/22188
3780         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3781         and SETEND.
3782
3783 2017-10-05  Pedro Alves  <palves@redhat.com>
3784
3785         * linux-nat.c (linux_child_follow_fork): When following the parent
3786         and detaching the child, consult the parent thread's architecture
3787         instead of the child's.
3788
3789 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3790
3791         * ax.h: Do not include "doublest.h".
3792         (union agent_val): Remove.
3793
3794 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3795
3796         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3797         (decimal_to_string): Return std::string object.
3798         (decimal_from_string): Accept std::string object.  Return bool.
3799         (decimal_from_integral, decimal_from_doublest): Remove.
3800         (decimal_from_longest): Add prototype.
3801         (decimal_from_ulongest): Likewise.
3802         (decimal_to_longest): Likewise.
3803         (decimal_from_doublest): Likewise.
3804         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3805         (MAX_DECIMAL_STRING): Move here.
3806         (decimal_to_string): Return std::string object.
3807         (decimal_from_string): Accept std::string object.  Return bool.
3808         (decimal_from_integral): Remove, replace by ...
3809         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3810         (decimal_to_longest): New function.
3811         (decimal_from_floating): Remove, replace by ...
3812         (decimal_from_doublest): ... this new function.
3813         (decimal_to_doublest): Update to new decimal_to_string interface.
3814
3815         * value.c (unpack_long): Use decimal_to_longest.
3816         * valops.c (value_cast): Use decimal_from_doublest instead of
3817         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3818         decimal_from_integral.
3819         * valarith.c (value_args_as_decimal): Likewise.
3820         * valprint.c (print_decimal_floating): Update to new
3821         decimal_to_string interface.
3822         * printcmd.c (printf_decfloat): Likewise.
3823         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3824
3825 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3826
3827         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3828         * gdbtypes.c: Include "floatformat.h".
3829         * value.c: Likewise.
3830         * m68k-tdep.c: Likewise.
3831
3832         * findvar.c: Do not include "floatformat.h".
3833         * amd64-darwin-tdep.c: Likewise.
3834         * arm-linux-tdep.c: Likewise.
3835         * i386-darwin-tdep.c: Likewise.
3836         * i387-tdep.c: Likewise.
3837         * m68k-linux-tdep.c: Likewise.
3838         * mep-tdep.c: Likewise.
3839         * mips-tdep.c: Likewise.
3840         * nios2-tdep.c: Likewise.
3841         * s390-linux-tdep.c: Likewise.
3842         * sparc-obsd-tdep.c: Likewise.
3843         * sparc-tdep.c: Likewise.
3844         * sparc64-tdep.c: Likewise.
3845         * spu-tdep.c: Likewise.
3846         * tic6x-tdep.c: Likewise.
3847         * tilegx-tdep.c: Likewise.
3848         * vax-tdep.c: Likewise.
3849         * xstormy16-tdep.c: Likewise.
3850         * xtensa-tdep.c: Likewise.
3851
3852         * top.c: Do not include "doublest.h".
3853         * aarch64-tdep.c: Likewise.
3854         * alpha-tdep.c: Likewise.
3855         * arm-linux-tdep.c: Likewise.
3856         * m68k-linux-tdep.c: Likewise.
3857         * tilegx-tdep.c: Likewise.
3858         * xstormy16-tdep.c: Likewise.
3859
3860 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3861
3862         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3863         (mipsn32_fbsd_sigframe): Define.
3864         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3865         for FreeBSD/mipsn32.
3866
3867 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3868
3869         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3870         AT_HWCAP.
3871
3872 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3873
3874         * MAINTAINERS (Misc): Update my email address.
3875
3876 2017-10-04  Pedro Alves  <palves@redhat.com>
3877
3878         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3879         it instead of target_gdbarch.
3880         (get_remote_state, get_remote_packet_size): Adjust
3881         get_remote_arch_state calls, passing down target_gdbarch
3882         explicitly.
3883         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3884         'gdbarch' and use it instead of target_gdbarch.
3885         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3886         passing down target_gdbarch explicitly.
3887         (struct stop_reply) <arch>: New field.
3888         (remote_parse_stop_reply): Use the stopped thread's architecture,
3889         not the current inferior's.  Save the architecture in the
3890         stop_reply.
3891         (process_stop_reply): Use the stop reply's architecture.
3892         (process_g_packet, remote_fetch_registers)
3893         (remote_prepare_to_store, store_registers_using_G)
3894         (remote_store_registers): Adjust get_remote_arch_state calls,
3895         using the regcache's architecture.
3896         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3897         passing down target_gdbarch explicitly.
3898         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3899         beneath instead of calling target_gdbarch.
3900         * target.c (default_thread_architecture): Use the specified
3901         inferior's architecture, instead of the current inferior's
3902         architecture (via target_gdbarch).
3903
3904 2017-10-04  Pedro Alves  <palves@redhat.com>
3905
3906         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3907         case.
3908         (regcache_print): Handle !target_has_registers here instead.
3909
3910 2017-10-04  Pedro Alves  <palves@redhat.com>
3911
3912         * frame.c (create_test_frame): Delete.
3913         * frame.h (create_test_frame): Delete.
3914         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3915         (class regcache_test): Delete.
3916         (test_target_has_registers, test_target_has_stack)
3917         (test_target_has_memory, test_target_prepare_to_store)
3918         (test_target_store_registers): New functions.
3919         (test_target_ops): New class.
3920         (register_to_value_test): Error out if there's already a
3921         process_stratum (or higher) target pushed.  Create a fuller mock
3922         environment, with mock target_ops, inferior, address space, thread
3923         and inferior_ptid.
3924         * progspace.c (struct address_space): Move to ...
3925         * progspace.h (struct address_space): ... here.
3926         * regcache.h (regcache::~regcache, regcache::raw_write)
3927         [GDB_SELF_TEST]: No longer virtual.
3928
3929 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3930
3931         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3932
3933 2017-10-04  Pedro Alves  <palves@redhat.com>
3934
3935         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3936         out of 'between TRY and CATCH'.
3937
3938 2017-10-04  Pedro Alves  <palves@redhat.com>
3939
3940         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3941         * common/common-exceptions.h (TRY): Open an outermost scope.
3942         Expand intro comment.
3943         (CATCH): Reindent.
3944         (END_CATCH): Close the outermost scope.
3945         * completer.c (complete_line_internal): Add missing END_CATCH.
3946
3947 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3948
3949         * NEWS (Changes since GDB 8.0): Add entry about new
3950         'set-cwd-on-gdbserver' feature.
3951         (New remote packets): Add entry for QSetWorkingDir.
3952         * common/common-inferior.h (set_inferior_cwd): New prototype.
3953         * infcmd.c (set_inferior_cwd): Remove "static".
3954         (show_cwd_command): Expand text to include remote debugging.
3955         * remote.c: Add PACKET_QSetWorkingDir.
3956         (remote_protocol_features) <QSetWorkingDir>: New entry for
3957         PACKET_QSetWorkingDir.
3958         (extended_remote_set_inferior_cwd): New function.
3959         (extended_remote_create_inferior): Call
3960         "extended_remote_set_inferior_cwd".
3961         (_initialize_remote): Call "add_packet_config_cmd" for
3962         QSetWorkingDir.
3963
3964 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3965
3966         * NEWS (New commands): Mention "set/show cwd".
3967         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3968         "cd" command's help text.
3969         * common/common-inferior.h (get_inferior_cwd): New prototype.
3970         * infcmd.c (inferior_cwd_scratch): New global variable.
3971         (set_inferior_cwd): New function.
3972         (get_inferior_cwd): Likewise.
3973         (set_cwd_command): Likewise.
3974         (show_cwd_command): Likewise.
3975         (_initialize_infcmd): Add "set/show cwd" commands.
3976         * inferior.h (class inferior) <cwd>: New field.
3977         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3978         (fork_inferior): Change inferior's cwd before its execution.
3979         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3980         to CreateProcess.
3981
3982 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3983
3984         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3985         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3986         (COMMON_OBS): Add gdb_tilde_expand.o.
3987         * common/gdb_tilde_expand.c: New file.
3988         * common/gdb_tilde_expand.h: Likewise.
3989
3990 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3991
3992         * gdbarch.sh (objfile): Remove duplicate declaration.
3993         * gdbarch.h: Regenerate.
3994
3995 2017-10-03  Tom Tromey  <tom@tromey.com>
3996
3997         * utils.c (internal_vproblem): Use string_vprintf.
3998
3999 2017-10-03  Tom Tromey  <tom@tromey.com>
4000
4001         * printcmd.c (info_symbol_command): Use std::string.
4002
4003 2017-10-03  Tom Tromey  <tom@tromey.com>
4004
4005         * top.c (gdb_safe_append_history): Use std::string.
4006
4007 2017-10-03  Tom Tromey  <tom@tromey.com>
4008
4009         * event-top.c (stdin_event_handler): Update.
4010         * main.c (captured_main_1): Update.
4011         * top.h (make_delete_ui_cleanup): Remove.
4012         (struct ui): Add constructor and destructor.
4013         (new_ui, delete_ui): Remove.
4014         * top.c (make_delete_ui_cleanup): Remove.
4015         (new_ui_command): Use std::unique_ptr.
4016         (delete_ui_cleanup): Remove.
4017         (ui::ui): Rename from new_ui.  Update.
4018         (free_ui): Remove.
4019         (ui::~ui): Rename from delete_ui.  Update.
4020
4021 2017-10-03  Tom Tromey  <tom@tromey.com>
4022
4023         * symfile.c (load_progress): Use gdb::byte_vector.
4024
4025 2017-10-03  Tom Tromey  <tom@tromey.com>
4026
4027         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4028         declaration.
4029         * printcmd.c (x_command): Remove unused declaration.
4030         * symfile.c (symbol_file_command): Remove unused declaration.
4031
4032 2017-10-03  Tom Tromey  <tom@tromey.com>
4033
4034         * utils.c (internal_vproblem): Use std::string.
4035         (defaulted_query): Likewise.
4036
4037 2017-10-03  Tom Tromey  <tom@tromey.com>
4038
4039         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4040         * top.c (execute_command_to_string): Update.
4041         * utils.c (make_cleanup_restore_page_info): Remove.
4042         (do_restore_page_info_cleanup): Remove.
4043         (set_batch_flag_and_restore_page_info):
4044         New.
4045         (make_cleanup_restore_page_info): Remove.
4046         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4047         (~set_batch_flag_and_restore_page_info): New
4048         (make_cleanup_restore_uinteger): Remove.
4049         (make_cleanup_restore_integer): Remove.
4050         (struct restore_integer_closure): Remove.
4051         (restore_integer): Remove.
4052         * utils.h (struct set_batch_flag_and_restore_page_info): New
4053         class.
4054         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4055         (make_cleanup_restore_page_info): Remove.
4056         (make_cleanup_restore_uinteger) Remove.
4057         (make_cleanup_restore_integer) Remove.
4058
4059 2017-10-03  Tom Tromey  <tom@tromey.com>
4060
4061         * record-full.h (record_full_gdb_operation_disable_set): Return
4062         scoped_restore_tmpl<int>.
4063         * infrun.c (adjust_pc_after_break): Update.
4064         (handle_signal_stop): Update.
4065         * record-full.c (record_full_gdb_operation_disable_set): Return
4066         scoped_restore_tmpl<int>.
4067         (record_full_wait_1, record_full_insert_breakpoint)
4068         (record_full_remove_breakpoint, record_full_save)
4069         (record_full_goto_insn): Update.
4070
4071 2017-10-02  Tom Tromey  <tom@tromey.com>
4072
4073         PR rust/22236:
4074         * rust-lang.c (rust_val_print_str): New function.
4075         (val_print_struct): Call it.
4076         (rust_subscript): Preserve name of slice type.
4077
4078 2017-10-02  Tom Tromey  <tom@tromey.com>
4079
4080         * rust-lang.c (rust_subscript): Handle slices in
4081         EVAL_AVOID_SIDE_EFFECTS case.
4082
4083 2017-10-02  Tom Tromey  <tom@tromey.com>
4084
4085         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4086
4087 2017-10-02  Tom Tromey  <tom@tromey.com>
4088
4089         * rust-lang.h (rust_slice_type): Add "extern".
4090
4091 2017-10-02  Tom Tromey  <tom@tromey.com>
4092             Pedro Alves  <palves@redhat.com>
4093
4094         * ada-lang.h (ada_exc_info::operator<): Make const.
4095         (ada_exc_info::operator==): Make const.
4096         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4097         Make const.
4098
4099 2017-09-29  Tom Tromey  <tom@tromey.com>
4100
4101         * target.c (read_whatever_is_readable): Change type of "result".
4102         Update.
4103         (free_memory_read_result_vector): Remove.
4104         (read_memory_robust): Change return type.  Update.
4105         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4106         bin2hex, std::string.
4107         * target.h (memory_read_result_s): Remove typedef.
4108         (free_memory_read_result_vector): Remove.
4109         (read_memory_robust): Return std::vector.
4110
4111 2017-09-29  Tom Tromey  <tom@tromey.com>
4112
4113         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4114
4115 2017-09-29  Tom Tromey  <tom@tromey.com>
4116
4117         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4118         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4119         operator< and operator==.
4120         (ada_exceptions_list): Return a std::vector.
4121         * ada-lang.c (ada_exc_info::operator<): Rename from
4122         compare_ada_exception_info.
4123         (ada_exc_info::operator==): New.
4124         (sort_remove_dups_ada_exceptions_list): Change type of
4125         "exceptions".
4126         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4127         (ada_add_global_exceptions): Likewise.
4128         (ada_exceptions_list_1): Return a std::vector.
4129         (ada_exceptions_list): Likewise.
4130
4131 2017-09-29  Tom Tromey  <tom@tromey.com>
4132
4133         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4134         'std::set *'.
4135         (print_one_inferior): Update.
4136         (free_vector_of_ints): Remove.
4137         (list_available_thread_groups): Change "ids" to std::set.
4138         (mi_cmd_list_thread_groups): Update.
4139         (struct collect_cores_data) <core>: Now a std::set.
4140         (collect_cores): Update.
4141         (unique): Remove.
4142         (print_one_inferior): Update.
4143
4144 2017-09-29  Tom Tromey  <tom@tromey.com>
4145
4146         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4147         (mi_execute_async_cli_command): Likewise.
4148         (mi_cmd_trace_frame_collected): Use field_fmt.
4149
4150 2017-09-29  Tom Tromey  <tom@tromey.com>
4151
4152         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4153         gdb::byte_vector.
4154
4155 2017-09-29  Tom Tromey  <tom@tromey.com>
4156
4157         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4158
4159 2017-09-29  Tom Tromey  <tom@tromey.com>
4160
4161         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4162
4163 2017-09-29  Tom Tromey  <tom@tromey.com>
4164
4165         * varobj.h (varobj_gen_name): Return std::string.
4166         * varobj.c (varobj_gen_name): Return std::string.
4167         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4168         (mi_cmd_var_delete): Don't copy "name".
4169
4170 2017-09-29  Tom Tromey  <tom@tromey.com>
4171
4172         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4173         (mi_cmd_break_insert_1): Update.
4174
4175 2017-09-29  Tom Tromey  <tom@tromey.com>
4176
4177         * target.h (make_scoped_defer_target_commit_resume): Update.
4178         * target.c (make_scoped_defer_target_commit_resume): Rename from
4179         make_cleanup_defer_target_commit_resume.  Return a
4180         scoped_restore.
4181         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4182
4183 2017-09-29  Tom Tromey  <tom@tromey.com>
4184
4185         * main.c (captured_main_1): Remove unused declaration.
4186         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4187
4188 2017-09-29  Tom Tromey  <tom@tromey.com>
4189
4190         * symtab.c (search_symbols): Remove unused outer cleanup.
4191         (make_source_files_completion_list): Remove unused declaration.
4192
4193 2017-09-29  Tom Tromey  <tom@tromey.com>
4194
4195         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4196
4197 2017-09-29  Tom Tromey  <tom@tromey.com>
4198
4199         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4200         gdb::byte_vector.
4201
4202 2017-09-29  Tom Tromey  <tom@tromey.com>
4203
4204         * complaints.c (vcomplaint): Use std::string.
4205
4206 2017-09-29  Tom Tromey  <tom@tromey.com>
4207
4208         * tracepoint.c (trace_variable_command): Use std::string.
4209         (encode_actions_1): Remove unused declarations.
4210         (create_tsv_from_upload): Use std::string.
4211
4212 2017-09-29  Tom Tromey  <tom@tromey.com>
4213
4214         * cp-support.c (gdb_demangle): Use std::string.
4215
4216 2017-09-29  Tom Tromey  <tom@tromey.com>
4217
4218         * stack.c (parse_frame_specification): Use std::string
4219         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4220
4221 2017-09-29  Tom Tromey  <tom@tromey.com>
4222
4223         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4224
4225 2017-09-29  Tom Tromey  <tom@tromey.com>
4226
4227         * utils.c (vfprintf_maybe_filtered): Use std::string.
4228         (vfprintf_unfiltered): Likewise.
4229
4230 2017-09-29  Tom Tromey  <tom@tromey.com>
4231
4232         * event-top.c (top_level_prompt): Return std::string.
4233         (display_gdb_prompt): Update.
4234
4235 2017-09-29  Tom Tromey  <tom@tromey.com>
4236
4237         * unittests/common-utils-selftests.c (format): New function.
4238         (string_vprintf_tests): New function.
4239         (_initialize_common_utils_selftests): Register new tests.
4240         * common/common-utils.c (string_vprintf): New function.
4241         * common/common-utils.h (string_vprintf): Declare.
4242
4243 2017-09-29  Pedro Alves  <palves@redhat.com>
4244
4245         * common/rsp-low.c (unpack_varlen_hex): Constify.
4246         * common/rsp-low.h (unpack_varlen_hex): Constify.
4247         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4248         Constify.
4249         * remote.c (remote_set_permissions, read_ptid)
4250         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4251         (remote_static_tracepoint_marker_at)
4252         (remote_static_tracepoint_markers_by_strid)
4253         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4254         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4255         (parse_tracepoint_definition, parse_tsv_definition)
4256         (parse_static_tracepoint_marker_definition): Constify.
4257         * tracepoint.h (parse_static_tracepoint_marker_definition)
4258         (parse_trace_status, parse_tracepoint_status)
4259         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4260
4261 2017-09-29  Pedro Alves  <palves@redhat.com>
4262
4263         * remote.c (target_buf, target_buf_size): Delete.
4264         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4265         Use the connection's packet buffer instead.
4266         All callers adjusted.
4267         (_initialize_remote): Remove references to target_buf and
4268         target_buf_size.
4269
4270 2017-09-28  Pedro Alves  <palves@redhat.com>
4271
4272         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4273         unittests/common-utils-selftests.c.
4274         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4275         (COMMON_OBS): Remove utils-selftests.o.
4276         * utils-selftests.c: Move to ...
4277         * unittests/common-utils-selftests.c: ... here and rename self
4278         test to "string_printf".
4279
4280 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4281
4282         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4283         having NULL cus or tus.
4284
4285 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4286
4287         * arm-tdep.c: (convert_from_extended): Remove.
4288         (convert_to_extended): Likewise.
4289         (arm_extract_return_value): Use convert_typed_floating.
4290         (arm_store_return_value): Likewise.
4291
4292         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4293         * sh-tdep.c: Do not include "floatformat.h".
4294         (sh_littlebyte_bigword_type): New function.
4295         (sh_register_convert_to_virtual): Use convert_typed_floating.
4296         (sh_register_convert_to_raw): Likewise.
4297         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4298         (sh64_littlebyte_bigword_type): New function.
4299         (sh64_extract_return_value): Use convert_typed_floating.
4300         (sh64_register_convert_to_virtual): Likewise.
4301         (sh64_register_convert_to_raw): Likewise.
4302
4303 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4304
4305         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4306         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4307
4308         * gdbtypes.h (union type_specific): Make field floatformat hold
4309         just a single struct floatformat, not an array.
4310         (floatformat_from_type): Move here.
4311         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4312         changed TYPE_FLOATFORMAT definition.
4313         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4314         (recursive_dump_type): Likewise.
4315         (init_float_type): Install correct floatformat for byte order.
4316         (arch_float_type): Likewise.
4317
4318 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4319
4320         * gdbtypes.c (init_type): Change incoming argument from
4321         length-in-bytes to length-in-bits.  Assert length is a
4322         multiple of TARGET_CHAR_BITS.
4323         (arch_type, arch_flags_type): Likewise.
4324         (init_integer_type): Update call to init_type.
4325         (init_character_type): Likewise.
4326         (init_boolean_type): Likewise.
4327         (init_float_type): Likewise.
4328         (init_decfloat_type): Likewise.
4329         (init_complex_type): Likewise.
4330         (init_pointer_type): Likewise.
4331         (objfile_type): Likewise.
4332         (arch_integer_type): Update call to arch_type.
4333         (arch_character_type): Likewise.
4334         (arch_boolean_type): Likewise.
4335         (arch_float_type): Likewise.
4336         (arch_decfloat_type): Likewise.
4337         (arch_complex_type): Likewise.
4338         (arch_pointer_type): Likewise.
4339         (gdbtypes_post_init): Likewise.
4340
4341         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4342         (read_base_type): Likewise.
4343         * mdebugread.c (basic_type): Likewise.
4344         * stabsread.c (dbx_init_float_type): Likewise.
4345         (rs6000_builtin_type): Likewise.
4346         (read_range_type): Likewise.  Also, fix call to init_integer_type
4347         with erroneous length argument.
4348
4349         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4350         * d-lang.c (build_d_types): Likewise.
4351         * f-lang.c (build_fortran_types): Likewise.
4352         * go-lang.c (build_go_types): Likewise.
4353         * opencl-lang.c (build_opencl_types): Likewise.
4354         * jit.c (finalize_symtab): Likewise.
4355         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4356         (build_std_type_info_type): Likewise.
4357         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4358         update call to arch_flags_type.
4359
4360         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4361         arch_type.
4362         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4363         * windows-tdep.c (windows_get_tlb_type): Likewise.
4364
4365         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4366         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4367         * m32c-tdep.c (make_types): Likewise.
4368         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4369         (rl78_psw_type): Update call to arch_flags_type.
4370         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4371         * rx-tdep.c (rx_psw_type): Likewise.
4372         (rx_fpsw_type): Likewise.
4373         * sparc-tdep.c (sparc_psr_type): Likewise.
4374         (sparc_fsr_type): Likewise.
4375         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4376         (sparc64_ccr_type): Likewise.
4377         (sparc64_fsr_type): Likewise.
4378         (sparc64_fprs_type): Likewise.
4379
4380 2017-09-27  Tom Tromey  <tom@tromey.com>
4381
4382         * findcmd.c (find_command): Constify.
4383
4384 2017-09-27  Tom Tromey  <tom@tromey.com>
4385
4386         * ada-tasks.c (task_command_1, task_command): Constify.
4387
4388 2017-09-27  Tom Tromey  <tom@tromey.com>
4389
4390         * symtab.c (maintenance_print_symbol_cache)
4391         (maintenance_flush_symbol_cache)
4392         (maintenance_print_symbol_cache_statistics): Constify.
4393
4394 2017-09-27  Tom Tromey  <tom@tromey.com>
4395
4396         * inferior.c (detach_inferior_command, kill_inferior_command)
4397         (inferior_command): Constify.
4398
4399 2017-09-27  Tom Tromey  <tom@tromey.com>
4400
4401         * regcache.c (regcache_print, maintenance_print_registers)
4402         (maintenance_print_raw_registers)
4403         (maintenance_print_cooked_registers)
4404         (maintenance_print_register_groups)
4405         (maintenance_print_remote_registers): Constify.
4406
4407 2017-09-27  Tom Tromey  <tom@tromey.com>
4408
4409         * printcmd.c (map_display_numbers, undisplay_command)
4410         (enable_disable_display_command, enable_display_command)
4411         (disable_display_command): Constify.
4412
4413 2017-09-27  Tom Tromey  <tom@tromey.com>
4414
4415         * breakpoint.h (delete_command): Don't declare.
4416         * breakpoint.c (delete_command, enable_once_command)
4417         (enable_count_command, enable_delete_command, breakpoint_1)
4418         (maintenance_info_breakpoints, stopin_command, stopat_command)
4419         (delete_command, delete_trace_command, save_breakpoints)
4420         (save_breakpoints_command, save_tracepoints_command): Constify.
4421
4422 2017-09-27  Tom Tromey  <tom@tromey.com>
4423
4424         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4425         (skip_ws, extract_identifier, macro_define_command)
4426         (macro_undef_command, macro_list_command): Constify.
4427
4428 2017-09-27  Tom Tromey  <tom@tromey.com>
4429
4430         * infcmd.c (environment_info, set_environment_command)
4431         (unset_environment_command, path_info, info_proc_cmd_1)
4432         (info_proc_cmd_mappings, info_proc_cmd_stat)
4433         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4434         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4435
4436 2017-09-27  Tom Tromey  <tom@tromey.com>
4437
4438         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4439         Constify.
4440
4441 2017-09-27  Tom Tromey  <tom@tromey.com>
4442
4443         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4444
4445 2017-09-27  Tom Tromey  <tom@tromey.com>
4446
4447         * demangle.c (demangle_command): Constify.
4448
4449 2017-09-27  Tom Tromey  <tom@tromey.com>
4450
4451         * progspace.c (maintenance_info_program_spaces_command):
4452         Constify.
4453
4454 2017-09-27  Tom Tromey  <tom@tromey.com>
4455
4456         * compile/compile.c (check_raw_argument, compile_file_command)
4457         (compile_code_command, compile_print_command): Constify.
4458
4459 2017-09-27  Tom Tromey  <tom@tromey.com>
4460
4461         * reggroups.c (maintenance_print_reggroups): Constify.
4462
4463 2017-09-27  Tom Tromey  <tom@tromey.com>
4464
4465         * dwarf2read.c (save_gdb_index_command): Constify.
4466
4467 2017-09-27  Tom Tromey  <tom@tromey.com>
4468
4469         * stap-probe.c (info_probes_stap_command): Constify.
4470
4471 2017-09-27  Tom Tromey  <tom@tromey.com>
4472
4473         * fork-child.c (unset_exec_wrapper_command): Constify.
4474
4475 2017-09-27  Tom Tromey  <tom@tromey.com>
4476
4477         * btrace.c (get_uint, get_context_size, no_chunk)
4478         (maint_btrace_packet_history_cmd)
4479         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4480         (maint_info_btrace_cmd): Constify.
4481
4482 2017-09-27  Tom Tromey  <tom@tromey.com>
4483
4484         * reverse.c (delete_bookmark_command): Constify.
4485
4486 2017-09-27  Tom Tromey  <tom@tromey.com>
4487
4488         * remote.c (set_memory_packet_size)
4489         (set_memory_write_packet_size, show_memory_write_packet_size)
4490         (set_memory_read_packet_size, show_memory_read_packet_size)
4491         (compare_sections_command, packet_command, remote_put_command)
4492         (remote_get_command, remote_delete_command): Constify.
4493
4494 2017-09-27  Tom Tromey  <tom@tromey.com>
4495
4496         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4497         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4498         (set_mipsfpu_auto_command): Constify.
4499
4500 2017-09-27  Tom Tromey  <tom@tromey.com>
4501
4502         * cli/cli-cmds.h (cd_command): Constify.
4503         * cli/cli-cmds.c (cd_command): Constify.
4504
4505 2017-09-27  Tom Tromey  <tom@tromey.com>
4506
4507         * thread.c (thread_name_command, thread_find_command): Constify.
4508
4509 2017-09-27  Tom Tromey  <tom@tromey.com>
4510
4511         * probe.c (enable_probes_command, disable_probes_command):
4512         Constify.
4513
4514 2017-09-27  Tom Tromey  <tom@tromey.com>
4515
4516         * symfile.c (symbol_file_command): Constify.
4517         * gdbcore.h (deprecated_file_changed_hook): Constify.
4518         * exec.c (deprecated_file_changed_hook, exec_file_command)
4519         (file_command): Constify.
4520         * defs.h (symbol_file_command): Constify.
4521
4522 2017-09-27  Tom Tromey  <tom@tromey.com>
4523
4524         * remote-fileio.c (set_system_call_allowed)
4525         (show_system_call_allowed): Constify.
4526
4527 2017-09-27  Tom Tromey  <tom@tromey.com>
4528
4529         * tracepoint.c (delete_trace_variable_command)
4530         (tfind_end_command, tfind_start_command, tfind_pc_command)
4531         (tfind_tracepoint_command, tfind_line_command)
4532         (tfind_range_command, tfind_outside_command): Constify.
4533
4534 2017-09-27  Tom Tromey  <tom@tromey.com>
4535
4536         * ax-gdb.c (maint_agent_printf_command, agent_command)
4537         (agent_eval_command): Constify.
4538
4539 2017-09-27  Tom Tromey  <tom@tromey.com>
4540
4541         * tracepoint.c (info_scope_command): Constify.
4542         * python/python.c (gdbpy_decode_line): Constify.
4543         * python/py-breakpoint.c (bppy_init): Constify.
4544         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4545         * location.h: (new_linespec_location)
4546         (string_to_event_location_basic, string_to_event_location):
4547         Constify.
4548         * location.c (new_linespec_location)
4549         (string_to_event_location_basic, string_to_event_location):
4550         Constify.
4551         * linespec.h (decode_line_with_current_source)
4552         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4553         * linespec.c (linespec_lex_to_end)
4554         (decode_line_with_current_source)
4555         (decode_line_with_last_displayed): Constify.
4556         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4557         Constify.
4558         * cli/cli-cmds.c (edit_command, list_command): Constify.
4559         * breakpoint.h (until_break_command, watch_command_wrapper)
4560         (awatch_command_wrapper, rwatch_command_wrapper)
4561         (init_ada_exception_breakpoint): Constify.
4562         * breakpoint.c (break_command_1, dprintf_command)
4563         (break_range_command, watch_command_wrapper)
4564         (rwatch_command_wrapper, awatch_command_wrapper)
4565         (until_break_command, init_ada_exception_breakpoint)
4566         (strace_marker_create_sals_from_location, trace_command)
4567         (ftrace_command, strace_command, struct tracepoint): Constify.
4568         * ax-gdb.c (agent_command_1): Constify.
4569         * ada-lang.c (ada_exception_sal): Constify.
4570
4571 2017-09-27  Tom Tromey  <tom@tromey.com>
4572
4573         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4574         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4575         (get_context_size, no_chunk, get_insn_history_modifiers)
4576         (cmd_record_insn_history, get_call_history_modifiers)
4577         (cmd_record_call_history): Constify.
4578
4579 2017-09-27  Tom Tromey  <tom@tromey.com>
4580
4581         * source.c (show_substitute_path_command)
4582         (unset_substitute_path_command, set_substitute_path_command):
4583         Constify.
4584
4585 2017-09-27  Tom Tromey  <tom@tromey.com>
4586
4587         * typeprint.c (maintenance_print_type): Constify.
4588         * maint.c (maintenance_dump_me, maintenance_demangle)
4589         (maintenance_time_display, maintenance_info_sections)
4590         (maintenance_print_statistics, maintenance_deprecate)
4591         (maintenance_undeprecate): Constify.
4592         (maintenance_do_deprecate): Constify.  Use std::string.
4593         (maintenance_selftest): Constify.
4594         * gdbtypes.h (maintenance_print_type): Constify.
4595
4596 2017-09-27  Tom Tromey  <tom@tromey.com>
4597
4598         * hppa-tdep.c (unwind_command): Constify.
4599
4600 2017-09-27  Tom Tromey  <tom@tromey.com>
4601
4602         * target-descriptions.c (unset_tdesc_filename_cmd)
4603         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4604         Constify.
4605
4606 2017-09-27  Tom Tromey  <tom@tromey.com>
4607
4608         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4609
4610 2017-09-27  Tom Tromey  <tom@tromey.com>
4611
4612         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4613
4614 2017-09-27  Tom Tromey  <tom@tromey.com>
4615
4616         * tui/tui-regs.c (tui_reg_command): Constify.
4617
4618 2017-09-27  Tom Tromey  <tom@tromey.com>
4619
4620         * skip.c (skip_file_command, skip_function_command)
4621         (skip_enable_command, skip_disable_command, skip_delete_command):
4622         Constify.
4623
4624 2017-09-27  Tom Tromey  <tom@tromey.com>
4625
4626         * record-btrace.c (cmd_record_btrace_bts_start)
4627         (cmd_record_btrace_pt_start): Constify.
4628
4629 2017-09-27  Tom Tromey  <tom@tromey.com>
4630
4631         * symmisc.c (maintenance_print_symbols)
4632         (maintenance_print_msymbols, maintenance_print_objfiles)
4633         (maintenance_info_symtabs, maintenance_check_symtabs)
4634         (maintenance_expand_symtabs, maintenance_info_line_tables):
4635         Constify.
4636
4637 2017-09-27  Tom Tromey  <tom@tromey.com>
4638
4639         * top.c (new_ui_command): Constify.
4640
4641 2017-09-27  Tom Tromey  <tom@tromey.com>
4642
4643         * symfile.c (add_symbol_file_command)
4644         (remove_symbol_file_command, list_overlays_command)
4645         (map_overlay_command, unmap_overlay_command)
4646         (overlay_auto_command, overlay_manual_command)
4647         (overlay_off_command, overlay_load_command): Constify.
4648
4649 2017-09-27  Tom Tromey  <tom@tromey.com>
4650
4651         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4652         (info_spu_mailbox_command, info_spu_dma_command)
4653         (info_spu_proxydma_command): Constify.
4654
4655 2017-09-27  Tom Tromey  <tom@tromey.com>
4656
4657         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4658
4659 2017-09-27  Tom Tromey  <tom@tromey.com>
4660
4661         * cli/cli-script.c (user_defined_command): Constify.
4662
4663 2017-09-27  Tom Tromey  <tom@tromey.com>
4664
4665         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4666         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4667         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4668         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4669         (dump_binary_value, append_binary_memory, append_binary_value):
4670         Constify.
4671         (struct dump_context) <func>: Constify.
4672         (add_dump_command): Update.
4673
4674 2017-09-27  Tom Tromey  <tom@tromey.com>
4675
4676         * cli/cli-cmds.c (show_version, show_configuration)
4677         (source_command, show_user): Constify.
4678
4679 2017-09-27  Tom Tromey  <tom@tromey.com>
4680
4681         * target.c (maintenance_print_target_stack): Constify.
4682
4683 2017-09-27  Tom Tromey  <tom@tromey.com>
4684
4685         * interps.c (interpreter_exec_cmd): Constify.
4686
4687 2017-09-27  Tom Tromey  <tom@tromey.com>
4688
4689         * record-full.c (cmd_record_full_restore): Constify.
4690
4691 2017-09-27  Tom Tromey  <tom@tromey.com>
4692
4693         * memattr.c (enable_mem_command, disable_mem_command)
4694         (delete_mem_command): Constify.
4695
4696 2017-09-27  Tom Tromey  <tom@tromey.com>
4697
4698         * value.c (show_convenience): Constify.
4699
4700 2017-09-27  Tom Tromey  <tom@tromey.com>
4701
4702         * gdbcore.h (core_file_command): Update.
4703         * corefile.c (core_file_command): Constify.
4704
4705 2017-09-27  Tom Tromey  <tom@tromey.com>
4706
4707         * user-regs.c (maintenance_print_user_registers): Constify.
4708
4709 2017-09-27  Tom Tromey  <tom@tromey.com>
4710
4711         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4712
4713 2017-09-27  Tom Tromey  <tom@tromey.com>
4714
4715         * cp-support.c (first_component_command): Constify.
4716
4717 2017-09-27  Tom Tromey  <tom@tromey.com>
4718
4719         * psymtab.c (maintenance_print_psymbols)
4720         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4721         Constify.
4722
4723 2017-09-27  Tom Tromey  <tom@tromey.com>
4724
4725         * windows-tdep.c (display_tib): Constify.
4726
4727 2017-09-27  Tom Tromey  <tom@tromey.com>
4728
4729         * linux-fork.c (delete_checkpoint_command)
4730         (detach_checkpoint_command): Constify.
4731
4732 2017-09-27  Tom Tromey  <tom@tromey.com>
4733
4734         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4735
4736 2017-09-27  Tom Tromey  <tom@tromey.com>
4737
4738         * arc-tdep.c (dump_arc_instruction_command): Constify.
4739
4740 2017-09-27  Tom Tromey  <tom@tromey.com>
4741
4742         * valprint.c (set_radix, show_radix): Constify.
4743
4744 2017-09-27  Tom Tromey  <tom@tromey.com>
4745
4746         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4747
4748 2017-09-27  Tom Tromey  <tom@tromey.com>
4749
4750         * command.h (not_just_help_class_command): Update.
4751         * cli/cli-decode.h (not_just_help_class_command): Update.
4752         * cli/cli-decode.c (not_just_help_class_command): Constify.
4753
4754 2017-09-27  Tom Tromey  <tom@tromey.com>
4755
4756         * gdb_bfd.c (maintenance_info_bfds): Constify.
4757
4758 2017-09-27  Tom Tromey  <tom@tromey.com>
4759
4760         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4761         overloads.
4762         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4763         (do_const_cfunc): New function.
4764         (cmd_cfunc_eq): New overload.
4765         (cli_user_command_p): Check do_const_cfunc.
4766         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4767         const_cfunc.
4768         * command.h (add_cmd): Add const overload and no-function
4769         overload.
4770         (set_cmd_cfunc): Add const overload.
4771         (cmd_const_cfunc_ftype): Declare.
4772         (cmd_cfunc_eq): Add const overload.
4773         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4774         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4775         overload.
4776
4777 2017-09-27  Tom Tromey  <tom@tromey.com>
4778
4779         * macroexp.c (get_next_token_for_substitution): New function.
4780         (substitute_args): Call it.  Check for __VA_OPT__.
4781
4782 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4783             Pedro Alves <palves@redhat.com>
4784
4785         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4786         producer_is_icc_lt_14.
4787         (producer_is_icc_lt_14): New function.
4788         (check_producer): Add code for checking version of ICC.
4789         (producer_is_icc): Move to producer.c.
4790         (read_structure_type): Restrict ICC workaround to ICC<14.
4791         * producer.c: Include selftest.h.
4792         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4793         New functions.
4794         * producer.h (producer_is_icc): New declaration.
4795
4796 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4797
4798         * Makefile.in (SFILES): Add producer.c.
4799         (COMMON_OBS): Add producer.o
4800         * amd64-tdep.c (producer.h): Add new include.
4801         * dwarf2read.c (producer.h): Add new include.
4802         * producer.c: New file.
4803         * producer.h: New file.
4804         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4805         producer.c.
4806         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4807         producer.h.
4808
4809 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4810
4811         * configure.ac: Search ncursesw before ncurses.
4812         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4813         * gdb_curses.h: Include <ncursesw/ncurses.h>
4814         * config.in, configure: Regenerate.
4815
4816 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4817
4818         PR gdb/22185
4819         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4820         obsolete.
4821         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4822         Remove i386sol2 support.
4823         * configure.nat <i386sol2>: Remove.
4824         <sol2-64>: Fold into ...
4825         <sol2>: ... this.
4826         Move common settings to default section.
4827         Add sol-thread.o.
4828         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4829         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4830         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4831         <i[34567]86-*-solaris*>: Remove.
4832         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4833
4834         * configure.ac: Remove wctype in libw check.
4835         (_MSE_INT_H): Don't define on Solaris 7-9.
4836         <solaris*>: Remove libthread_db.so.1 check.
4837         * configure: Regenerate.
4838         * config.in: Regenerate.
4839
4840         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4841         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4842         (gdb_ps_size_t): Remove.
4843         Use base types in users.
4844         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4845
4846         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4847
4848 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4849
4850         PR build/22206
4851         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4852         (adi_is_addr_mapped): Likewise.
4853         (PSR_ICC): Don't redefine.
4854         (PSR_IMPL): Likewise.
4855
4856 2017-09-25  Tom Tromey  <tom@tromey.com>
4857
4858         * regcache.c (regcache::dump): Use string_printf.
4859
4860 2017-09-25  Tom Tromey  <tom@tromey.com>
4861
4862         * regcache.c (class regcache_invalidator): New.
4863         (struct register_to_invalidate): Remove.
4864         (make_cleanup_regcache_invalidate): Remove.
4865         (regcache::raw_write): Use regcache_invalidator.
4866
4867 2017-09-25  Tom Tromey  <tom@tromey.com>
4868
4869         * spu-tdep.c (spu2ppu_sniffer): Update.
4870         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4871         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4872         Remove.
4873         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4874         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4875         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4876         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4877         (frame_pop): Update.
4878
4879 2017-09-25  Tom Tromey  <tom@tromey.com>
4880
4881         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4882         * regcache.h (regcache_xfree): Don't declare.
4883         * regcache.c (regcache_xfree): Remove.
4884         (do_regcache_xfree): Use delete.
4885         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4886         * linux-fork.c (free_fork): Use delete.
4887         (fork_save_infrun_state): Likewise.
4888         * jit.c (jit_dealloc_cache): Use delete.
4889         * infrun.c (discard_infcall_suspend_state): Use delete.
4890
4891 2017-09-25  Tom Tromey  <tom@tromey.com>
4892
4893         * regcache.h (regcache_xmalloc): Don't declare.
4894         (regcache_raw_set_cached_value): Update comment.
4895         * regcache.c (regcache_xmalloc): Remove.
4896         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4897         * jit.c (jit_frame_sniffer): Use new.
4898         * frame.c (frame_save_as_regcache): Use new.
4899
4900 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4901
4902         * NEWS: Advertise support for guarded-storage registers on IBM z.
4903
4904 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4905
4906         * s390-linux-nat.c (have_regset_gs): New static variable.
4907         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4908         control block and guarded-storage broadcast control regsets.
4909         (s390_read_description): Detect whether the target has
4910         guarded-storage support, return appropriate tdesc.
4911         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4912         (features/s390x-gs-linux64.c): Likewise.
4913         (struct gdbarch_tdep) <have_gs>: New field.
4914         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4915         (s390_gsbc_regset): New variables.
4916         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4917         and s390_gsbc_regset, if applicable.
4918         (s390_core_read_description): Check whether core file was from a
4919         target with guarded-storage support; include appropriate regsets.
4920         (s390_gdbarch_init): Add registers for guarded-storage support.
4921         (_initialize_s390_tdep): Initialize new target descriptions that
4922         include registers for guarded-storage support.
4923         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4924         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4925         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4926         (S390_NUM_REGS): Adjust macro definition.
4927         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4928         (tdesc_s390x_gs_linux64): New declarations.
4929
4930 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4931
4932         * features/s390-gs-linux64.xml: New file.
4933         * features/s390-gs.xml: New file.
4934         * features/s390-gsbc.xml: New file.
4935         * features/s390x-gs-linux64.xml: New file.
4936         * features/Makefile (WHICH): Add s390-gs-linux64 and
4937         s390x-gs-linux64.
4938         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4939         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4940         * features/s390-gs-linux64.c: New generated file.
4941         * features/s390x-gs-linux64.c: New file.
4942         * regformats/s390-gs-linux64.dat: New file.
4943         * regformats/s390x-gs-linux64.dat: New file.
4944
4945 2017-09-23  Tom Tromey  <tom@tromey.com>
4946
4947         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4948
4949 2017-09-22  Tom Tromey  <tom@tromey.com>
4950
4951         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4952         type to scoped_restore_tmpl.
4953         <scoped_input_handler>: Initialize m_quit_handler directly.
4954
4955 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4956
4957         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4958         (cd_command): Likewise.  Free "current_directory" before
4959         assigning to it.
4960         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4961         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4962         * top.c (gdb_dirbuf): Remove global declaration.
4963         * top.h (gdb_dirbuf): Likewise.
4964
4965 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4966
4967         * gnulib/aclocal.m4: Regenerate.
4968         * gnulib/config.in: Regenerate.
4969         * gnulib/configure: Regenerate.
4970         * gnulib/import/Makefile.am: Regenerate.
4971         * gnulib/import/Makefile.in: Regenerate.
4972         * gnulib/import/assure.h: New file.
4973         * gnulib/import/at-func.c: Likewise
4974         * gnulib/import/chdir-long.c: New file.
4975         * gnulib/import/chdir-long.h: New file.
4976         * gnulib/import/cloexec.c: New file.
4977         * gnulib/import/cloexec.h: New file.
4978         * gnulib/import/close.c: New file.
4979         * gnulib/import/closedir.c: New file.
4980         * gnulib/import/dirent-private.h: New file.
4981         * gnulib/import/dup-safer.c: New file.
4982         * gnulib/import/dup.c: New file.
4983         * gnulib/import/dup2.c: New file.
4984         * gnulib/import/error.c: New file.
4985         * gnulib/import/error.h: New file.
4986         * gnulib/import/exitfail.c: New file.
4987         * gnulib/import/exitfail.h: New file.
4988         * gnulib/import/fchdir.c: New file.
4989         * gnulib/import/fcntl.c: New file.
4990         * gnulib/import/fcntl.in.h: New file.
4991         * gnulib/import/fd-hook.c: New file.
4992         * gnulib/import/fd-hook.h: New file.
4993         * gnulib/import/fd-safer.c: New file.
4994         * gnulib/import/fdopendir.c: New file.
4995         * gnulib/import/filename.h: New file.
4996         * gnulib/import/filenamecat-lgpl.c: New file.
4997         * gnulib/import/filenamecat.h: New file.
4998         * gnulib/import/fstat.c: New file.
4999         * gnulib/import/fstatat.c: New file.
5000         * gnulib/import/getcwd-lgpl.c: New file.
5001         * gnulib/import/getcwd.c: New file.
5002         * gnulib/import/getdtablesize.c: New file.
5003         * gnulib/import/getlogin_r.c: New file.
5004         * gnulib/import/getprogname.c: New file.
5005         * gnulib/import/getprogname.h: New file.
5006         * gnulib/import/gettext.h: New file.
5007         * gnulib/import/glob-libc.h: New file.
5008         * gnulib/import/glob.c: New file.
5009         * gnulib/import/glob.in.h: New file.
5010         * gnulib/import/intprops.h: New file.
5011         * gnulib/import/m4/chdir-long.m4: New file.
5012         * gnulib/import/m4/close.m4: New file.
5013         * gnulib/import/m4/closedir.m4: New file.
5014         * gnulib/import/m4/d-ino.m4: New file.
5015         * gnulib/import/m4/d-type.m4: New file.
5016         * gnulib/import/m4/dup.m4: New file.
5017         * gnulib/import/m4/dup2.m4: New file.
5018         * gnulib/import/m4/error.m4: New file.
5019         * gnulib/import/m4/fchdir.m4: New file.
5020         * gnulib/import/m4/fcntl.m4: New file.
5021         * gnulib/import/m4/fcntl_h.m4: New file.
5022         * gnulib/import/m4/fdopendir.m4: New file.
5023         * gnulib/import/m4/filenamecat.m4: New file.
5024         * gnulib/import/m4/fstat.m4: New file.
5025         * gnulib/import/m4/fstatat.m4: New file.
5026         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5027         * gnulib/import/m4/getcwd-path-max.m4: New file.
5028         * gnulib/import/m4/getcwd.m4: New file.
5029         * gnulib/import/m4/getdtablesize.m4: New file.
5030         * gnulib/import/m4/getlogin_r.m4: New file.
5031         * gnulib/import/m4/getprogname.m4: New file.
5032         * gnulib/import/m4/glob.m4: New file.
5033         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5034         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5035         * gnulib/import/m4/mempcpy.m4: New file.
5036         * gnulib/import/m4/memrchr.m4: New file.
5037         * gnulib/import/m4/mode_t.m4: New file.
5038         * gnulib/import/m4/msvc-inval.m4: New file.
5039         * gnulib/import/m4/msvc-nothrow.m4: New file.
5040         * gnulib/import/m4/open.m4: New file.
5041         * gnulib/import/m4/openat.m4: New file.
5042         * gnulib/import/m4/opendir.m4: New file.
5043         * gnulib/import/m4/readdir.m4: New file.
5044         * gnulib/import/m4/realloc.m4: New file.
5045         * gnulib/import/m4/rewinddir.m4: New file.
5046         * gnulib/import/m4/save-cwd.m4: New file.
5047         * gnulib/import/m4/strdup.m4: New file.
5048         * gnulib/import/m4/strerror.m4: New file.
5049         * gnulib/import/m4/unistd-safer.m4: New file.
5050         * gnulib/import/mempcpy.c: New file.
5051         * gnulib/import/memrchr.c: New file.
5052         * gnulib/import/msvc-inval.c: New file.
5053         * gnulib/import/msvc-inval.h: New file.
5054         * gnulib/import/msvc-nothrow.c: New file.
5055         * gnulib/import/msvc-nothrow.h: New file.
5056         * gnulib/import/open.c: New file.
5057         * gnulib/import/openat-die.c: New file.
5058         * gnulib/import/openat-priv.h: New file.
5059         * gnulib/import/openat-proc.c: New file.
5060         * gnulib/import/openat.c: New file.
5061         * gnulib/import/openat.h: New file.
5062         * gnulib/import/opendir.c: New file.
5063         * gnulib/import/pipe-safer.c: New file.
5064         * gnulib/import/readdir.c: New file.
5065         * gnulib/import/realloc.c: New file.
5066         * gnulib/import/rewinddir.c: New file.
5067         * gnulib/import/save-cwd.c: New file.
5068         * gnulib/import/save-cwd.h: New file.
5069         * gnulib/import/strdup.c: New file.
5070         * gnulib/import/strerror-override.c: New file.
5071         * gnulib/import/strerror-override.h: New file.
5072         * gnulib/import/strerror.c: New file.
5073         * gnulib/import/unistd--.h: New file.
5074         * gnulib/import/unistd-safer.h: New file.
5075         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5076         "getcwd" and "glob".
5077         * ser-tcp.c: Undefine "close" before redefining it.
5078
5079 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5080
5081         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5082         get rid of res_val.
5083
5084 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5085
5086         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5087         <sol2,sparc>: Likewise.
5088         <sol2-64,i386>: Likewise.
5089
5090         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5091         -Wdeprecated-declarations on *-*-solaris*.
5092         * configure: Regenerate.
5093
5094         * procfs.c: Include "nat/inferior.h".
5095         (procfs_info_proc): Fix typo.
5096
5097 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5098
5099         * remote.c (vector): Include.
5100         (struct private_thread_info): Add field, thread_handle.
5101         (free_private_thread_info): Deallocate storage associated with
5102         thread handle.
5103         (get_private_info_thread): Initialize `thread_handle' field.
5104         (struct thread_item): Add field, thread_handle.
5105         (clear_threads_listing_context): Deallocate storage associated
5106         with thread handle.
5107         (start_thread): Add support for "handle" attribute.
5108         (thread_attributes): Add "handle".
5109         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5110         field.
5111         (remote_update_thread_list): Update thread_handle.
5112         (remote_thread_handle_to_thread_info): New function.
5113         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5114
5115 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5116
5117         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5118         function.
5119         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5120         * python/python-internal.h (thread_object_type): Declare.
5121
5122 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5123
5124         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5125         (target_thread_handle_to_thread_info): Declare.
5126         * target.c (target_thread_handle_to_thread_info): New function.
5127         * target-delegates.c: Regenerate.
5128         * gdbthread.h (find_thread_by_handle): Declare.
5129         * thread.c (find_thread_by_handle): New function.
5130         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5131         function.
5132         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5133
5134 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5135
5136         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5137
5138 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5139
5140         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5141
5142 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5143
5144         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5145         to gdb_target_obs.
5146
5147 2017-09-20  Tom Tromey  <tom@tromey.com>
5148
5149         * breakpoint.c (struct counted_command_line): Remove.
5150         (breakpoint_commands): Update.
5151         (alloc_counted_command_line, incref_counted_command_line)
5152         (decref_counted_command_line, do_cleanup_counted_command_line)
5153         (make_cleanup_decref_counted_command_line): Remove.
5154         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5155         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5156         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5157         (save_breakpoints): Update.
5158         * breakpoint.h (counted_command_line): Now a typedef to
5159         shared_ptr.
5160         (struct breakpoint) <commands>: Now a counted_command_line.
5161         (struct bpstats) <command>: Likewise.
5162
5163 2017-09-20  Tom Tromey  <tom@tromey.com>
5164
5165         * breakpoint.c (struct commands_info, do_map_commands_command):
5166         Remove.
5167         (commands_command_1): Update.
5168         (iterate_over_related_breakpoints): Take a function_view.
5169         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5170         (delete_command): Update.
5171         (map_breakpoint_numbers): Take a function_view.
5172         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5173         (disable_command): Update.
5174         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5175         (enable_command): Update.
5176         (struct disp_data, do_enable_breakpoint_disp)
5177         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5178         (do_map_enable_delete_breakpoint): Remove.
5179         (enable_once_command, enable_count_command, enable_delete_command)
5180         (delete_trace_variable_command): Update.
5181
5182 2017-09-20  Tom Tromey  <tom@tromey.com>
5183
5184         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5185         (bpstat_clear): Use delete.
5186         (bpstats): New constructors.
5187         (bpstat_copy, bpstat_stop_status): Use new.
5188         (dprintf_after_condition_true): Update.
5189         * breakpoint.h (bpstats::bpstats): Add constructors.
5190         (bpstats::~bpstats): Add destructor.
5191
5192 2017-09-20  Pedro Alves  <palves@redhat.com>
5193
5194         * eval.c (make_params): Delete, refactored as ...
5195         (class fake_method): ... this new type's ctor.
5196         (fake_method::~fake_method): New.
5197         (evaluate_subexp_standard): Use 'fake_method'.
5198
5199 2017-09-20  Tom Tromey  <tom@tromey.com>
5200
5201         * windows-nat.c (get_windows_debug_event, windows_wait)
5202         (do_initial_windows_stuff, windows_attach): Update.
5203         * utils.c (vwarning, internal_vproblem): Update.
5204         (ui_unregister_input_event_handler_cleanup)
5205         (prepare_to_handle_input): Remove.
5206         (class scoped_input_handler): New.
5207         (defaulted_query, prompt_for_continue): Update.
5208         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5209         Update.
5210         * top.c (undo_terminal_modifications_before_exit): Update.
5211         * target/target.h (target_terminal_init, target_terminal_inferior)
5212         (target_terminal_ours): Don't declare.
5213         (class target_terminal): New.
5214         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5215         (target_terminal_ours_for_output)
5216         (make_cleanup_restore_target_terminal): Don't declare.
5217         (target_terminal_info): Remove.
5218         * target.c (enum terminal_state, terminal_state): Remove.
5219         (target_terminal::terminal_state): Define.
5220         (target_terminal::init): Rename from target_terminal_init.
5221         (target_terminal::inferior): Rename from
5222         target_terminal_inferior.
5223         (target_terminal::ours): Rename from target_terminal_ours.
5224         (target_terminal::ours_for_output): Rename from
5225         target_terminal_ours_for_output.
5226         (target_terminal::info): New method.
5227         (cleanup_restore_target_terminal)
5228         (make_cleanup_restore_target_terminal): Remove.
5229         * solib.c (handle_solib_event): Update.
5230         * remote.c (remote_serial_quit_handler): Update.
5231         (remote_terminal_inferior, remote_wait_as): Update.
5232         * record-full.c (record_full_wait_1): Update.
5233         * nto-procfs.c (procfs_create_inferior): Update.
5234         * nat/fork-inferior.c (startup_inferior): Update.
5235         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5236         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5237         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5238         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5239         (mi_breakpoint_created, mi_breakpoint_deleted)
5240         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5241         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5242         (mi_user_selected_context_changed, report_initial_inferior):
5243         Update.
5244         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5245         (linux_nat_terminal_inferior): Update.
5246         * infrun.c (follow_fork_inferior)
5247         (handle_vfork_child_exec_or_exit, do_target_resume)
5248         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5249         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5250         Update.
5251         * inflow.c (child_terminal_init, info_terminal_command): Update.
5252         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5253         (attach_command): Update.
5254         * infcall.c (call_thread_fsm_should_stop): Update.
5255         * gnu-nat.c (gnu_attach): Update.
5256         * extension.c (struct active_ext_lang_state)
5257         (restore_active_ext_lang): Update.
5258         * exceptions.c (print_flush): Update.
5259         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5260         (struct quit_handler_cleanup_data, restore_quit_handler)
5261         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5262         Remove.
5263         * cp-support.c (gdb_demangle): Update.
5264         * breakpoint.c (update_inserted_breakpoint_locations)
5265         (insert_breakpoint_locations, handle_jit_event)
5266         (disable_breakpoints_in_unloaded_shlib): Update.
5267         * annotate.c (annotate_breakpoints_invalid)
5268         (annotate_frames_invalid): Update.
5269
5270 2017-09-20  Tom Tromey  <tom@tromey.com>
5271
5272         * main.c (catch_command_errors): Rename from
5273         catch_command_errors_const.
5274         (captured_main_1): Update.
5275
5276 2017-09-20  Pedro Alves  <palves@redhat.com>
5277
5278         * cli/cli-cmds.c (list_command): Use print_sal_location.
5279         (print_sal_location): New function.
5280         (ambiguous_line_spec): Use print_sal_location.
5281         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5282         * symtab.c (find_function_start_sal): Likewise.
5283         * symtab.h (symtab_and_line::symbol): New field.
5284
5285 2017-09-20  Pedro Alves  <palves@redhat.com>
5286
5287         * linespec.c (minsym_found): Handle non-text minsyms.
5288         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5289
5290 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5291
5292         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5293         backslash.
5294
5295 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5296
5297         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5298         vmovups instead vmovaps.
5299         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5300
5301 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5302
5303         * NEWS (Changes since GDB 8.0): Add starti.
5304         * infcmd.c (enum run_break): New.
5305         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5306         case.
5307         (run_command): Use enum run_how.
5308         (start_command): Likewise.
5309         (starti_command): New function.
5310         (RUN_ARGS_HELP): New macro.
5311         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5312         commands.  Add starti command.
5313
5314 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5315
5316         * Makefile.in (monitor.o): Remove the rule.
5317
5318 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5319
5320         * annotate.h (struct annotate_arg_emitter): Use
5321         DISABLE_COPY_AND_ASSIGN.
5322         * common/refcounted-object.h (refcounted_object): Likewise.
5323         * completer.h (struct completion_result): Likewise.
5324         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5325         * filename-seen-cache.h (filename_seen_cache): Likewise.
5326         * gdbcore.h (thread_section_name): Likewise.
5327         * gdb_regex.h (compiled_regex): Likewise.
5328         * gdbthread.h (scoped_restore_current_thread): Likewise.
5329         * inferior.h (scoped_restore_current_inferior): Likewise.
5330         * jit.c (jit_reader): Likewise.
5331         * linespec.h (struct linespec_result): Likewise.
5332         * mi/mi-parse.h (struct mi_parse): Likewise.
5333         * nat/fork-inferior.c (execv_argv): Likewise.
5334         * progspace.h (scoped_restore_current_program_space): Likewise.
5335         * python/python-internal.h (class gdbpy_enter): Likewise.
5336         * regcache.h (regcache): Likewise.
5337         * target-descriptions.c (struct tdesc_reg): Likewise.
5338         (struct tdesc_type): Likewise.
5339         (struct tdesc_feature): Likewise.
5340         * ui-out.h (ui_out_emit_type): Likewise.
5341
5342 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5343
5344         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5345         label abort_expression.
5346
5347 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5348
5349         * common/buffer.c (buffer_xml_printf): Adjust.
5350         * common/xml-utils.c (xml_escape_text): Change return type to
5351         std::string, update code accordingly.
5352         * common/xml-utils.h (xml_escape_text): Change return type to
5353         std::string.
5354         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5355         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5356         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5357         Adjust.
5358
5359 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5360
5361         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5362         (SUBDIR_UNITTESTS_OBS): Add new object file.
5363         * unittests/xml-utils-selftests.c: New file.
5364
5365 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5366
5367         * common/selftest.h (selftest): New struct/interface.
5368         (register_test): Add name parameter, add new overload.
5369         (run_tests): Add filter parameter.
5370         (for_each_selftest_ftype): New typedef.
5371         (for_each_selftest): New declaration.
5372         * common/selftest.c (tests): Change type to
5373         map<string, unique_ptr<selftest>>.
5374         (simple_selftest): New struct.
5375         (register_test): New function.
5376         (register_test): Add name parameter and use it.
5377         (run_tests): Add filter parameter and use it.  Add prints.
5378         Adjust to vector -> map change.
5379         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5380         registering selftests.
5381         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5382         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5383         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5384         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5385         * findvar.c (_initialize_findvar): Likewise.
5386         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5387         * maint.c (maintenance_selftest): Update call to run_tests.
5388         (maintenance_info_selftests): New function.
5389         (_initialize_maint_cmds): Register "maintenance info selftests"
5390         command.  Update "maintenance selftest" doc.
5391         * regcache.c (_initialize_regcache): Add names when registering
5392         selftests.
5393         * rust-exp.y (_initialize_rust_exp): Likewise.
5394         * selftest-arch.c (gdbarch_selftest): New struct.
5395         (gdbarch_tests): Remove.
5396         (register_test_foreach_arch): Add name parameter.  Call
5397         register_test.
5398         (tests_with_arch): Remove, move most content to
5399         gdbarch_selftest::operator().
5400         (_initialize_selftests_foreach_arch): Remove.
5401         * selftest-arch.h (register_test_foreach_arch): Add name
5402         parameter.
5403         (run_tests_with_arch): New declaration.
5404         * utils-selftests.c (_initialize_utils_selftests): Add names
5405         when registering selftests.
5406         * utils.c (_initialize_utils): Likewise.
5407         * unittests/array-view-selftests.c
5408         (_initialize_array_view_selftests): Likewise.
5409         * unittests/environ-selftests.c (_initialize_environ_selftests):
5410         Likewise.
5411         * unittests/function-view-selftests.c
5412         (_initialize_function_view_selftests): Likewise.
5413         * unittests/offset-type-selftests.c
5414         (_initialize_offset_type_selftests): Likewise.
5415         * unittests/optional-selftests.c
5416         (_initialize_optional_selftests): Likewise.
5417         * unittests/scoped_restore-selftests.c
5418         (_initialize_scoped_restore_selftests): Likewise.
5419         * NEWS: Document "maintenance selftest" and "maint info
5420         selftests".
5421
5422 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5423
5424         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5425         scoped_restore.
5426
5427 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5428
5429         * mi/mi-main.c (mi_load_progress): Make uiout variable
5430         a unique_ptr.
5431
5432 2017-09-15  Pedro Alves  <palves@redhat.com>
5433
5434         * compile/compile-c-types.c (convert_enum, convert_int)
5435         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5436
5437 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5438
5439         * dwarf2read.c (copy_string): Remove.
5440         (parse_macro_definition): Replace copy_string with savestring.
5441
5442 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5443
5444         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5445         gdb_target_obs.
5446         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5447         Likewise.
5448         (i[34567]86-*-linux*): Likewise.
5449
5450 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5451
5452         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5453         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5454         <stack>: Change type to std::vector.
5455         <stack_len, stack_allocated>: Remove.
5456         <grow_stack>: Remove.
5457         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5458         (dwarf_expr_context::~dwarf_expr_context): Remove.
5459         (dwarf_expr_context::grow_stack): Remove.
5460         (dwarf_expr_context::push): Adjust.
5461         (dwarf_expr_context::pop): Adjust.
5462         (dwarf_expr_context::fetch): Adjust.
5463         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5464         (dwarf_expr_context::stack_empty_p): Adjust.
5465         (dwarf_expr_context::execute_stack_op): Adjust.
5466
5467 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5468
5469         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5470         return type to bool.
5471         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5472
5473 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5474
5475         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5476         Change type to bool.
5477         (dwarf_stack_value) <in_stack_memory>: Likewise.
5478         (dwarf_expr_context) <push_address>: Change parameter type to
5479         bool.
5480         <fetch_in_stack_memory>: Change return type to bool.
5481         <push>: Change parameter type to bool.
5482         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5483         to bool.
5484         (dwarf_expr_context::push_address): Likewise.
5485         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5486         to bool.
5487         (dwarf_expr_context::execute_stack_op): Adjust.
5488         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5489
5490 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5491
5492         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5493         (struct dwarf_expr_context) <n_pieces>: Remove.
5494         <pieces>: Change type to std::vector.
5495         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5496         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5497         pieces.
5498         (dwarf_expr_context::add_piece): Adjust.
5499         * dwarf2loc.c (struct piece_closure): Initialize fields.
5500         <n_pieces>: Remove.
5501         <pieces>: Change type to std::vector.
5502         (allocate_piece_closure): Adjust, change parameter to
5503         std::vector rvalue and std::move it to piece_closure.
5504         (rw_pieced_value): Adjust.
5505         (check_pieced_synthetic_pointer): Adjust.
5506         (indirect_synthetic_pointer): Adjust.
5507         (coerce_pieced_ref): Adjust.
5508         (free_pieced_value_closure):  Adjust.  Use delete to free
5509         piece_closure.
5510         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5511         to allocate_piece_closure.
5512         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5513
5514 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5515
5516         * probe.h (probe_ops_cp): Remove typedef.
5517         (DEF_VEC_P (probe_ops_cp)): Remove.
5518         (all_probe_ops): Change type to std::vector.
5519         * probe.c (info_probes_for_ops): Adjust to vector change.
5520         (probe_linespec_to_ops): Likewise.
5521         (all_probe_ops): Change type to std::vector.
5522         (_initialize_probe): Adjust to vector change.
5523         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5524         * elfread.c (elf_get_probes): Likewise.
5525         * stap-probe.c (_initialize_stap_probe): Likewise.
5526
5527 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5528
5529         * probe.h (struct bound_probe): Define constructors.
5530         * probe.c (bound_probe_s): Remove typedef.
5531         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5532         (collect_probes): Change return type to std::vector, remove
5533         cleanup.
5534         (compare_probes): Return bool, change parameter type.  Change
5535         semantic to "less than".
5536         (gen_ui_out_table_header_info): Change parameter to std::vector
5537         and update.
5538         (exists_probe_with_pops): Likewise.
5539         (info_probes_for_ops): Update to std::vector change.
5540         (enable_probes_command): Likewise.
5541         (disable_probes_command): Likewise.
5542
5543 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5544
5545         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5546         vec to std::vector.
5547         * probe.c (parse_probes_in_pspace): Update.
5548         (find_probes_in_objfile): Update.
5549         (find_probe_by_pc): Update.
5550         (collect_probes): Update.
5551         (probe_any_get_probes): Update.
5552         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5553         return type to reference to std::vector.
5554         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5555         std::vector and update.
5556         (dtrace_process_dof): Likewise.
5557         (dtrace_get_probes): Likewise.
5558         * elfread.c (elf_get_probes): Change return type to std::vector,
5559         store an std::vector in bfd_data.
5560         (probe_key_free): Update to std::vector.
5561         * stap-probe.c (handle_stap_probe): Change parameter to
5562         std::vector and update.
5563         (stap_get_probes): Likewise.
5564         * symfile-debug.c (debug_sym_get_probes): Change return type to
5565         std::vector and update.
5566
5567 2017-09-11  Tom Tromey  <tom@tromey.com>
5568
5569         * breakpoint.c (program_breakpoint_here_p): Update.
5570         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5571         from make_show_memory_breakpoints_cleanup.  Return a
5572         scoped_restore_tmpl<int>.
5573         (restore_show_memory_breakpoints): Remove.
5574         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5575         * mem-break.c (memory_validate_breakpoint): Update.
5576         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5577         (ia64_memory_remove_breakpoint): Update.
5578         (ia64_breakpoint_from_pc): Update.
5579         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5580         from make_show_memory_breakpoints_cleanup.
5581
5582 2017-09-11  Tom Tromey  <tom@tromey.com>
5583
5584         * d-namespace.c (d_lookup_symbol): Use std::string.
5585         (find_symbol_in_baseclass): Likewise.
5586
5587 2017-09-11  Tom Tromey  <tom@tromey.com>
5588
5589         * ctf.c (ctf_start): Use std::string.
5590
5591 2017-09-11  Tom Tromey  <tom@tromey.com>
5592
5593         * ada-lang.c (is_known_support_routine): Update.
5594         (ada_unhandled_exception_name_addr_from_raise): Update.
5595         * guile/scm-frame.c (gdbscm_frame_name): Update.
5596         * python/py-frame.c (frapy_name): Update.
5597         (frapy_function): Update.
5598         * stack.h (find_frame_funname): Update.
5599         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5600         (print_frame): Update.
5601
5602 2017-09-11  Tom Tromey  <tom@tromey.com>
5603
5604         * findcmd.c (put_bits): Take a gdb::byte_vector.
5605         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5606         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5607         cleanups.
5608         (find_command): Update.
5609
5610 2017-09-11  Tom Tromey  <tom@tromey.com>
5611
5612         * cli/cli-script.c (class scoped_restore_hook_in): New.
5613         (clear_hook_in_cleanup): Remove.
5614         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5615         scoped_restore_hook_in.
5616
5617 2017-09-11  Tom Tromey  <tom@tromey.com>
5618
5619         * cli/cli-script.c (restore_interp): Remove.
5620         (read_command_lines): Use scoped_restore_interp.
5621         * interps.c (scoped_restore_interp::set_temp): Rename from
5622         interp_set_temp.
5623         * interps.h (class scoped_restore_interp): New.
5624         (interp_set_temp): Remove.
5625
5626 2017-09-11  Tom Tromey  <tom@tromey.com>
5627
5628         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5629         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5630         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5631         scoped_restore.
5632         (mi_cmd_break_insert_1): Update.
5633         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5634         scoped_restore.
5635
5636 2017-09-11  Tom Tromey  <tom@tromey.com>
5637
5638         * demangle.c (demangle_command): Update.
5639         * breakpoint.c (disable_command): Update.
5640         (enable_command): Update.
5641         (find_location_by_number): Make "number" const.  Use
5642         get_number_trailer.
5643         * cli/cli-utils.c (extract_arg): Return std::string.
5644         * probe.c (parse_probe_linespec): Update.  Change types.
5645         (collect_probes): Take string arguments.
5646         (parse_probe_linespec): Likewise.
5647         (info_probes_for_ops): Update.
5648         (enable_probes_command): Update.
5649         (disable_probes_command): Update.
5650         * break-catch-sig.c (catch_signal_split_args): Update.
5651         * mi/mi-parse.c (mi_parse): Update.
5652
5653 2017-09-11  Tom Tromey  <tom@tromey.com>
5654
5655         * language.h (language_enum): Make argument const.
5656         * language.c (language_enum): Make argument const.
5657
5658 2017-09-11  Tom Tromey  <tom@tromey.com>
5659
5660         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5661         as function.
5662         (skip_to_space): Rename from skip_to_space_const.
5663         * common/common-utils.c (skip_to_space): New function.
5664         (skip_to_space): Rename from skip_to_space_const.
5665         * cli/cli-utils.h (get_number): Rename from get_number_const.
5666         (extract_arg): Rename from extract_arg_const.
5667         * cli/cli-utils.c (get_number): Rename from get_number_const.
5668         (extract_arg): Rename from extract_arg_const.
5669         (number_or_range_parser::get_number): Use ::get_number.
5670         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5671         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5672         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5673         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5674         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5675         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5676         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5677         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5678
5679 2017-09-11  Tom Tromey  <tom@tromey.com>
5680
5681         * python/python.c (do_start_initialization): Use
5682         py-event-types.def to initialize types.
5683         Define all object type structures.
5684         * python/python-internal.h: Don't declare event initialization
5685         functions.
5686         * python/py-threadevent.c (thread_event_object_type): Don't
5687         define.
5688         * python/py-stopevent.c (stop_event_object_type): Don't define.
5689         * python/py-signalevent.c (signal_event_object_type): Don't
5690         declare or define.
5691         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5692         (clear_objfiles_event_object_type): Don't declare or define.
5693         * python/py-infevents.c (inferior_call_pre_event_object_type)
5694         (inferior_call_post_event_object_type)
5695         (register_changed_event_object_type)
5696         (memory_changed_event_object_type): Don't declare or define.
5697         * python/py-inferior.c (new_thread_event_object_type)
5698         (new_inferior_event_object_type)
5699         (inferior_deleted_event_object_type): Don't declare or define.
5700         * python/py-exitedevent.c (exited_event_object_type): Don't
5701         declare or define.
5702         * python/py-evts.c (gdbpy_initialize_py_events): Use
5703         py-all-events.def.
5704         * python/py-events.h (thread_event_object_type): Don't declare.
5705         (events_object): Use py-all-events.def.
5706         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5707         py-event-types.def.
5708         * python/py-event-types.def: New file.
5709         * python/py-continueevent.c (create_continue_event_object): Don't
5710         declare or define.
5711         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5712         declare or define.
5713         * python/py-all-events.def: New file.
5714
5715 2017-09-11  Tom Tromey  <tom@tromey.com>
5716
5717         * python/py-threadevent.c (create_thread_event_object): Return
5718         gdbpy_ref.
5719         * python/py-stopevent.h (create_stop_event_object)
5720         (create_breakpoint_event_object, create_signal_event_object):
5721         Update.
5722         * python/py-stopevent.c (create_stop_event_object): Return
5723         gdbpy_ref.
5724         (emit_stop_event): Update.
5725         * python/py-signalevent.c (create_signal_event_object): Return
5726         gdbpy_ref.
5727         * python/py-infevents.c (create_inferior_call_event_object):
5728         Update.
5729         * python/py-event.h (create_event_object)
5730         (create_thread_event_object): Update.
5731         * python/py-event.c (create_event_object): Return gdbpy_ref.
5732         * python/py-continueevent.c: Return gdbpy_ref.
5733         * python/py-bpevent.c (create_breakpoint_event_object): Return
5734         gdbpy_ref.
5735
5736 2017-09-11  Tom Tromey  <tom@tromey.com>
5737
5738         PR python/15622:
5739         * NEWS: Add entry.
5740         * python/python.c (do_start_initialization): Initialize new event
5741         types.
5742         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5743         (gdbpy_initialize_inferior_deleted_event)
5744         (gdbpy_initialize_new_thread_event): Declare.
5745         * python/py-threadevent.c (create_thread_event_object): Add option
5746         "thread" parameter.
5747         * python/py-inferior.c (new_thread_event_object_type)
5748         (new_inferior_event_object_type)
5749         (inferior_deleted_event_object_type): Declare.
5750         (python_new_inferior, python_inferior_deleted): New functions.
5751         (add_thread_object): Emit new_thread event.
5752         (gdbpy_initialize_inferior): Attach new functions to corresponding
5753         observers.
5754         (new_thread, new_inferior, inferior_deleted): Define new event
5755         types.
5756         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5757         registries.
5758         * python/py-events.h (events_object) <new_inferior,
5759         inferior_deleted, new_thread>: New fields.
5760         * python/py-event.h (create_thread_event_breakpoint): Add optional
5761         "thread" parameter.
5762
5763 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5764
5765         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5766         check current_ui instead.
5767         (internal_vproblem): Likewise.
5768
5769 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5770
5771         * thread.c (print_thread_info_1): Remove unnecessary calls to
5772         uiout->is_mi_like_p.
5773
5774 2017-09-09  Tom Tromey  <tom@tromey.com>
5775
5776         * namespace.h (add_using_directive): Update.
5777         * namespace.c (add_using_directive): Change type of excludes to
5778         std::vector.
5779         * dwarf2read.c (read_import_statement): Use std::vector.
5780         (read_namespace): Update.
5781         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5782
5783 2017-09-09  Tom Tromey  <tom@tromey.com>
5784
5785         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5786
5787 2017-09-09  Tom Tromey  <tom@tromey.com>
5788
5789         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5790
5791 2017-09-09  Tom Tromey  <tom@tromey.com>
5792
5793         * stack.c (func_command): Use gdb::def_vector.
5794
5795 2017-09-09  Tom Tromey  <tom@tromey.com>
5796
5797         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5798         ui_out_emit_list, ui_out_emit_tuple.
5799         (mi_cmd_var_update): Likewise.
5800
5801 2017-09-09  Tom Tromey  <tom@tromey.com>
5802
5803         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5804         ui_out_redirect_pop.
5805         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5806         ui_out_redirect_pop.
5807         * utils.c (do_ui_out_redirect_pop)
5808         (make_cleanup_ui_out_redirect_pop): Remove.
5809         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5810         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5811         * ui-out.h (ui_out_redirect_pop): New class.
5812
5813 2017-09-09  Tom Tromey  <tom@tromey.com>
5814
5815         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5816         (list_available_thread_groups, mi_cmd_list_thread_groups)
5817         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5818         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5819         Likewise.
5820
5821 2017-09-09  Tom Tromey  <tom@tromey.com>
5822
5823         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5824         ui_out_emit_tuple.
5825
5826 2017-09-09  Tom Tromey  <tom@tromey.com>
5827
5828         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5829         * stack.c (print_frame): Use ui_out_emit_tuple.
5830         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5831         (info_spu_mailbox_command, info_spu_dma_command)
5832         (info_spu_proxydma_command): Likewise.
5833         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5834         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5835         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5836         ui_out_emit_tuple.
5837         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5838
5839 2017-09-09  Tom Tromey  <tom@tromey.com>
5840
5841         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5842         (class ui_out_emit_table): Update comment.
5843         * ui-out.c (do_cleanup_table_end)
5844         (make_cleanup_ui_out_table_begin_end): Remove.
5845         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5846         (info_spu_dma_cmdlist): Likewise.
5847         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5848         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5849         ui_out_emit_table.
5850
5851 2017-09-09  Tom Tromey  <tom@tromey.com>
5852
5853         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5854         ui_out_emit_list, gdb::optional.
5855
5856 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5857
5858         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5859         prototype.
5860         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5861         prototype.
5862         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5863         prototype.
5864         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5865         * ada-exp.y: Remove _initialize_ada_exp prototype.
5866         * ada-lang.c: Remove _initialize_ada_language prototype.
5867         * ada-tasks.c: Remove _initialize_tasks prototype.
5868         * addrmap.c: Remove _initialize_addrmap prototype.
5869         * agent.c: Remove _initialize_agent prototype.
5870         * aix-thread.c: Remove _initialize_aix_thread prototype.
5871         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5872         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5873         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5874         prototype.
5875         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5876         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5877         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5878         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5879         prototype.
5880         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5881         prototype.
5882         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5883         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5884         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5885         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5886         prototype.
5887         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5888         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5889         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5890         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5891         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5892         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5893         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5894         prototype.
5895         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5896         prototype.
5897         * annotate.c: Remove _initialize_annotate prototype.
5898         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5899         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5900         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5901         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5902         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5903         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5904         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5905         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5906         prototype.
5907         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5908         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5909         * auto-load.c: Remove _initialize_auto_load prototype.
5910         * auxv.c: Remove _initialize_auxv prototype.
5911         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5912         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5913         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5914         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5915         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5916         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5917         prototype.
5918         * break-catch-throw.c: Remove _initialize_break_catch_throw
5919         prototype.
5920         * breakpoint.c: Remove _initialize_breakpoint prototype.
5921         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5922         * btrace.c: Remove _initialize_btrace prototype.
5923         * charset.c: Remove _initialize_charset prototype.
5924         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5925         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5926         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5927         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5928         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5929         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5930         * coffread.c: Remove _initialize_coffread prototype.
5931         * compile/compile.c: Remove _initialize_compile prototype.
5932         * complaints.c: Remove _initialize_complaints prototype.
5933         * completer.c: Remove _initialize_completer prototype.
5934         * copying.awk: Remove _initialize_copying prototype.
5935         * copying.c: Regenerate.
5936         * core-regset.c: Remove _initialize_core_regset prototype.
5937         * corefile.c: Remove _initialize_core prototype.
5938         * corelow.c: Remove _initialize_corelow prototype.
5939         * cp-abi.c: Remove _initialize_cp_abi prototype.
5940         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5941         * cp-support.c: Remove _initialize_cp_support prototype.
5942         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5943         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5944         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5945         * ctf.c: Remove _initialize_ctf prototype.
5946         * d-lang.c: Remove _initialize_d_language prototype.
5947         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5948         prototype.
5949         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5950         * dbxread.c: Remove _initialize_dbxread prototype.
5951         * dcache.c: Remove _initialize_dcache prototype.
5952         * demangle.c: Remove _initialize_demangler prototype.
5953         * disasm-selftests.c: Remove _initialize_disasm_selftests
5954         prototype.
5955         * disasm.c: Remove _initialize_disasm prototype.
5956         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5957         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5958         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5959         prototype.
5960         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5961         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5962         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5963         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5964         * elfread.c: Remove _initialize_elfread prototype.
5965         * exec.c: Remove _initialize_exec prototype.
5966         * extension.c: Remove _initialize_extension prototype.
5967         * f-lang.c: Remove _initialize_f_language prototype.
5968         * f-valprint.c: Remove _initialize_f_valprint prototype.
5969         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5970         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5971         * filesystem.c: Remove _initialize_filesystem prototype.
5972         * findcmd.c: Remove _initialize_mem_search prototype.
5973         * fork-child.c: Remove _initialize_fork_child prototype.
5974         * frame-base.c: Remove _initialize_frame_base prototype.
5975         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5976         * frame.c: Remove _initialize_frame prototype.
5977         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5978         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5979         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5980         * gcore.c: Remove _initialize_gcore prototype.
5981         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5982         * gdbarch.c: Regenerate.
5983         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5984         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5985         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5986         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5987         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5988         * go-lang.c: Remove _initialize_go_language prototype.
5989         * go32-nat.c: Remove _initialize_go32_nat prototype.
5990         * guile/guile.c: Remove _initialize_guile prototype.
5991         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5992         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5993         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5994         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5995         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5996         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5997         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5998         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5999         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6000         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6001         prototype.
6002         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6003         prototype.
6004         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6005         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6006         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6007         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6008         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6009         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6010         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6011         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6012         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6013         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6014         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6015         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6016         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6017         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6018         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6019         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6020         prototype.
6021         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6022         prototype.
6023         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6024         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6025         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6026         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6027         * infcall.c: Remove _initialize_infcall prototype.
6028         * infcmd.c: Remove _initialize_infcmd prototype.
6029         * inferior.c: Remove _initialize_inferiors prototype.
6030         * inflow.c: Remove _initialize_inflow prototype.
6031         * infrun.c: Remove _initialize_infrun prototype.
6032         * interps.c: Remove _initialize_interpreter prototype.
6033         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6034         * jit.c: Remove _initialize_jit prototype.
6035         * language.c: Remove _initialize_language prototype.
6036         * linux-fork.c: Remove _initialize_linux_fork prototype.
6037         * linux-nat.c: Remove _initialize_linux_nat prototype.
6038         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6039         * linux-thread-db.c: Remove _initialize_thread_db prototype.
6040         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6041         * m2-lang.c: Remove _initialize_m2_language prototype.
6042         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6043         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6044         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6045         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6046         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6047         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6048         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6049         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6050         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6051         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6052         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6053         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6054         * machoread.c: Remove _initialize_machoread prototype.
6055         * macrocmd.c: Remove _initialize_macrocmd prototype.
6056         * macroscope.c: Remove _initialize_macroscope prototype.
6057         * maint.c: Remove _initialize_maint_cmds prototype.
6058         * mdebugread.c: Remove _initialize_mdebugread prototype.
6059         * memattr.c: Remove _initialize_mem prototype.
6060         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6061         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6062         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6063         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6064         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6065         * microblaze-linux-tdep.c: Remove
6066         _initialize_microblaze_linux_tdep prototype.
6067         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6068         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6069         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6070         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6071         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6072         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6073         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6074         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6075         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6076         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6077         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6078         prototype.
6079         * mipsread.c: Remove _initialize_mipsread prototype.
6080         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6081         prototype.
6082         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6083         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6084         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6085         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6086         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6087         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6088         prototype.
6089         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6090         * nto-procfs.c: Remove _initialize_procfs prototype.
6091         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6092         * objc-lang.c: Remove _initialize_objc_language prototype.
6093         * objfiles.c: Remove _initialize_objfiles prototype.
6094         * observer.c: Remove observer_test_first_notification_function,
6095         observer_test_second_notification_function,
6096         observer_test_third_notification_function, and
6097         _initialize_observer prototypes.
6098         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6099         * osabi.c: Remove _initialize_gdb_osabi prototype.
6100         * osdata.c: Remove _initialize_osdata prototype.
6101         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6102         * parse.c: Remove _initialize_parse prototype.
6103         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6104         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6105         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6106         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6107         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6108         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6109         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6110         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6111         * printcmd.c: Remove _initialize_printcmd prototype.
6112         * probe.c: Remove _initialize_probe prototype.
6113         * proc-api.c: Remove _initialize_proc_api prototype.
6114         * proc-events.c: Remove _initialize_proc_events prototype.
6115         * proc-service.c: Remove _initialize_proc_service prototype.
6116         * procfs.c: Remove _initialize_procfs prototype.
6117         * psymtab.c: Remove _initialize_psymtab prototype.
6118         * python/python.c: Remove _initialize_python prototype.
6119         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6120         * record-btrace.c: Remove _initialize_record_btrace prototype.
6121         * record-full.c: Remove _initialize_record_full prototype.
6122         * record.c: Remove _initialize_record prototype.
6123         * regcache.c: Remove _initialize_regcache prototype.
6124         * reggroups.c: Remove _initialize_reggroup prototype.
6125         * remote-notif.c: Remove _initialize_notif prototype.
6126         * remote-sim.c: Remove _initialize_remote_sim prototype.
6127         * remote.c: Remove _initialize_remote prototype.
6128         * reverse.c: Remove _initialize_reverse prototype.
6129         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6130         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6131         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6132         prototype.
6133         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6134         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6135         * rust-exp.y: Remove _initialize_rust_exp prototype.
6136         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6137         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6138         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6139         * score-tdep.c: Remove _initialize_score_tdep prototype.
6140         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6141         prototype.
6142         * ser-go32.c: Remove _initialize_ser_dos prototype.
6143         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6144         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6145         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6146         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6147         * serial.c: Remove _initialize_serial prototype.
6148         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6149         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6150         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6151         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6152         * skip.c: Remove _initialize_step_skip prototype.
6153         * sol-thread.c: Remove _initialize_sol_thread prototype.
6154         * solib-aix.c: Remove _initialize_solib_aix prototype.
6155         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6156         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6157         * solib-frv.c: Remove _initialize_frv_solib prototype.
6158         * solib-spu.c: Remove _initialize_spu_solib prototype.
6159         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6160         * solib-target.c: Remove _initialize_solib_target prototype.
6161         * solib.c: Remove _initialize_solib prototype.
6162         * source.c: Remove _initialize_source prototype.
6163         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6164         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6165         prototype.
6166         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6167         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6168         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6169         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6170         prototype.
6171         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6172         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6173         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6174         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6175         prototype.
6176         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6177         prototype.
6178         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6179         prototype.
6180         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6181         prototype.
6182         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6183         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6184         prototype.
6185         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6186         prototype.
6187         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6188         prototype.
6189         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6190         prototype.
6191         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6192         prototype.
6193         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6194         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6195         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6196         * stabsread.c: Remove _initialize_stabsread prototype.
6197         * stack.c: Remove _initialize_stack prototype.
6198         * stap-probe.c: Remove _initialize_stap_probe prototype.
6199         * std-regs.c: Remove _initialize_frame_reg prototype.
6200         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6201         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6202         * symfile.c: Remove _initialize_symfile prototype.
6203         * symmisc.c: Remove _initialize_symmisc prototype.
6204         * symtab.c: Remove _initialize_symtab prototype.
6205         * target-dcache.c: Remove _initialize_target_dcache prototype.
6206         * target-descriptions.c: Remove _initialize_target_descriptions
6207         prototype.
6208         * thread.c: Remove _initialize_thread prototype.
6209         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6210         prototype.
6211         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6212         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6213         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6214         prototype.
6215         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6216         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6217         * tracefile.c: Remove _initialize_tracefile prototype.
6218         * tracepoint.c: Remove _initialize_tracepoint prototype.
6219         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6220         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6221         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6222         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6223         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6224         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6225         * tui/tui.c: Remove _initialize_tui prototype.
6226         * typeprint.c: Remove _initialize_typeprint prototype.
6227         * user-regs.c: Remove _initialize_user_regs prototype.
6228         * utils.c: Remove _initialize_utils prototype.
6229         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6230         * valarith.c: Remove _initialize_valarith prototype.
6231         * valops.c: Remove _initialize_valops prototype.
6232         * valprint.c: Remove _initialize_valprint prototype.
6233         * value.c: Remove _initialize_values prototype.
6234         * varobj.c: Remove _initialize_varobj prototype.
6235         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6236         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6237         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6238         * windows-nat.c: Remove _initialize_windows_nat,
6239         _initialize_check_for_gdb_ini, and _initialize_loadable
6240         prototypes.
6241         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6242         * xcoffread.c: Remove _initialize_xcoffread prototype.
6243         * xml-support.c: Remove _initialize_xml_support prototype.
6244         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6245         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6246         prototype.
6247         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6248         prototype.
6249         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6250
6251 2017-09-08  Keith Seitz  <keiths@redhat.com>
6252
6253         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6254         field.
6255
6256 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6257
6258         * f-valprint.c (f_val_print): Remove check for one byte
6259         sized integers. Remove printing of character type.
6260
6261 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6262             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6263             Bernhard Heckel  <bernhard.heckel@intel.com>
6264
6265         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6266         to maintain proper indentation when printing pointers/refs.
6267
6268 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6269
6270         GDB 8.0.1 released.
6271
6272 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6273
6274         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6275
6276 2017-09-05  Tom Tromey  <tom@tromey.com>
6277
6278         * parse.c (funcall_chain): Now a std::vector.
6279         (start_arglist, end_arglist): Simplify.
6280         (free_funcalls): Remove.
6281         (parse_exp_in_context_1): Remove cleanup.
6282
6283 2017-09-05  Tom Tromey  <tom@tromey.com>
6284
6285         * go-exp.y (go_parse): Don't create a cleanup.
6286
6287 2017-09-05  Tom Tromey  <tom@tromey.com>
6288
6289         * d-exp.y (PrimaryExpression): Use std::string.
6290         (d_parse): Don't create a cleanup.
6291
6292 2017-09-05  Tom Tromey  <tom@tromey.com>
6293
6294         * utils.c (do_clear_parser_state): Remove.
6295         (make_cleanup_clear_parser_state): Remove.
6296         * p-exp.y (pascal_parse): Use scoped_restore.
6297         * m2-exp.y (m2_parse): Use scoped_restore.
6298         * f-exp.y (f_parse): Use scoped_restore.
6299         * d-exp.y (d_parse): Use scoped_restore.
6300         * c-exp.y (c_parse): Use scoped_restore.
6301         * ada-exp.y (ada_parse): Use scoped_restore.
6302         * utils.h (make_cleanup_clear_parser_state): Remove.
6303
6304 2017-09-06  Keith Seitz  <keiths@redhat.com>
6305
6306         * dwarf2read.c (dw2_linkage_name_attr): New function.
6307         (dw2_linkage_name): New function.
6308         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6309         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6310         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6311
6312 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6313
6314         * config/djgpp/djconfig.sh: Correct shell portability issue.
6315
6316 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6317
6318         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6319
6320 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6321
6322         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6323         * NEWS: Mention new FreeBSD/mips native configuration.
6324         * configure.host: Add aarch64*-*-freebsd*.
6325         * configure.nat: Likewise.
6326         * aarch64-fbsd-nat.c: New file.
6327
6328 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6329
6330         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6331         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6332         * NEWS: Mention new FreeBSD/aarch64 target.
6333         * configure.tgt: Add aarch64*-*-freebsd*.
6334         * aarch64-fbsd-tdep.c: New file.
6335         * aarch64-fbsd-tdep.h: New file.
6336
6337 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6338
6339         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6340
6341 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6342
6343         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6344         of TLS symbols.
6345
6346 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6347
6348         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6349         call.
6350
6351 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6352
6353         * infrun.c (follow_exec): Call add_thread after
6354         target_find_description.
6355
6356 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6357
6358         * infrun.c (handle_inferior_event_1): When exec'ing, read
6359         stop_pc after follow_exec.
6360
6361 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6362
6363         * remote.c (process_g_packet): Update error message.
6364
6365 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6366
6367         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6368         targets.
6369
6370 2017-09-05  Pedro Alves  <palves@redhat.com>
6371
6372         * eval.c (eval_call, evaluate_funcall): New functions, factored
6373         out from ...
6374         (evaluate_subexp_standard): ... this.
6375
6376 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6377
6378         * amd64-tdep.c (amd64_target_description): Create target
6379         descriptions.
6380         (_initialize_amd64_tdep): Don't call functions
6381         initialize_tdesc_amd64_*.  Add self tests.
6382         * arch/amd64.c (amd64_create_target_description): Add parameter
6383         is_linux.  Call set_tdesc_osabi if is_linux is true.
6384         * arch/amd64.h (amd64_create_target_description): Update the
6385         declaration.
6386         * arch/i386.c (i386_create_target_description): Add parameter
6387         is_linux.  Call set_tdesc_osabi if is_linux is true.
6388         * arch/i386.h (i386_create_target_description): Update
6389         declaration.
6390         * configure.tgt: Add i386.o to gdb_target_obs.
6391         * features/Makefile (XMLTOC): Remove i386/*.xml.
6392         * features/i386/amd64-avx-avx512.c: Remove.
6393         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6394         * features/i386/amd64-avx-mpx.c: Remove.
6395         * features/i386/amd64-avx.c: Remove.
6396         * features/i386/amd64-mpx.c: Remove.
6397         * features/i386/amd64.c: Remove.
6398         * features/i386/i386-avx-avx512.c: Remove.
6399         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6400         * features/i386/i386-avx-mpx.c: Remove.
6401         * features/i386/i386-avx.c: Remove.
6402         * features/i386/i386-mmx.c: Remove.
6403         * features/i386/i386-mpx.c: Remove.
6404         * features/i386/i386.c: Remove.
6405         * i386-tdep.c: Don't include features/i386/i386*.c., include
6406         target-descriptions.h and arch/i386.h.
6407         (i386_target_description): Create target descriptions.
6408         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6409         functions.  Do self tests.
6410
6411 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6412
6413         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6414         * features/i386/amd64-avx-avx512-linux.c: Removed.
6415         * features/i386/amd64-avx-linux.c: Removed.
6416         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6417         * features/i386/amd64-avx-mpx-linux.c: Removed.
6418         * features/i386/amd64-linux.c: Removed.
6419         * features/i386/amd64-mpx-linux.c: Removed.
6420         * features/i386/x32-avx-avx512-linux.c: Removed.
6421         * features/i386/x32-avx-linux.c: Removed.
6422         * features/i386/x32-linux.c: Removed.
6423
6424 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6425
6426         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6427         features/i386/*.c.
6428         (amd64_linux_read_description): Call
6429         amd64_create_target_description.
6430         * arch/amd64.c: New file.
6431         * arch/amd64.h: New file.
6432         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6433         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6434
6435 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6436
6437         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6438         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6439         (amd64_linux_read_description): Create target descriptions.
6440         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6441         functions.  Add unit tests.
6442         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6443         x32-core.xml.
6444         * features/i386/64bit-avx.c: Generated.
6445         * features/i386/64bit-avx512.c: Generated.
6446         * features/i386/64bit-core.c: Generated.
6447         * features/i386/64bit-linux.c: Generated.
6448         * features/i386/64bit-mpx.c: Generated.
6449         * features/i386/64bit-pkeys.c: Generated.
6450         * features/i386/64bit-segments.c: Generated.
6451         * features/i386/64bit-sse.c: Generated.
6452         * features/i386/x32-core.c: Generated.
6453         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6454         c files for amd64-linux and x32-linux.
6455
6456 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6457
6458         * amd64-linux-tdep.c (amd64_linux_read_description): New
6459         function.
6460         (amd64_linux_core_read_description): Call
6461         amd64_linux_read_description.
6462         (amd64_linux_init_abi): Likewise.
6463         (amd64_x32_linux_init_abi): Likewise.
6464         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6465         * x86-linux-nat.c (x86_linux_read_description): Call
6466         amd64_linux_read_description.
6467
6468 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6469
6470         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6471         comments.
6472
6473 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6474
6475         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6476         * features/i386/i386-avx-avx512-linux.c: Remove.
6477         * features/i386/i386-avx-linux.c: Remove.
6478         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6479         * features/i386/i386-avx-mpx-linux.c: Remove.
6480         * features/i386/i386-linux.c: Remove.
6481         * features/i386/i386-mmx-linux.c: Remove.
6482         * features/i386/i386-mpx-linux.c: Remove.
6483
6484 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6485
6486         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6487         (SFILES): Add arch/i386.c.
6488         (HFILES_NO_SRCDIR): Add arch/i386.h.
6489         * arch/i386.c: New file.
6490         * arch/i386.h: New file.
6491         * arch/tdesc.h (allocate_target_description): Declare.
6492         (set_tdesc_architecture): Declare.
6493         (set_tdesc_osabi): Declare.
6494         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6495         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6496         include arch/i386.h.
6497         (i386_linux_read_description): Remove code and call
6498         i386_create_target_description.
6499         (set_tdesc_architecture): New function.
6500         (set_tdesc_osabi): New function.
6501         * target-descriptions.h (allocate_target_description): Remove.
6502
6503 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6504
6505         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6506         * target-descriptions.c (tdesc_create_feature): Likewise, and
6507         adjust code.
6508         * features/i386/32bit-avx.c: Re-generated.
6509         * features/i386/32bit-avx512.c: Re-generated.
6510         * features/i386/32bit-core.c: Re-generated.
6511         * features/i386/32bit-linux.c: Re-generated.
6512         * features/i386/32bit-mpx.c: Re-generated.
6513         * features/i386/32bit-pkeys.c: Re-generated.
6514         * features/i386/32bit-sse.c: Re-generated.
6515
6516 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6517
6518         * regformats/regdef.h (struct reg): Override operator == and !=.
6519
6520 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6521
6522         * arch/tdesc.h: New file.
6523         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6524         * target-descriptions.c: Update comments.
6525         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6526         declarations.
6527         * features/i386/32bit-avx.c: Re-generated.
6528         * features/i386/32bit-avx512.c: Re-generated.
6529         * features/i386/32bit-core.c: Re-generated.
6530         * features/i386/32bit-linux.c: Re-generated.
6531         * features/i386/32bit-mpx.c: Re-generated.
6532         * features/i386/32bit-pkeys.c: Re-generated.
6533         * features/i386/32bit-sse.c: Re-generated.
6534
6535 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6536
6537         * regformats/regdat.sh: Update generated code.
6538
6539 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6540
6541         * regformats/regdat.sh: Adjust code order.
6542
6543 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6544
6545         * expprint.c (dump_subexp_body_standard): Use constant format
6546         string in fprintf_filtered call.
6547
6548 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6549
6550         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6551         NetBSD/i386.
6552         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6553
6554 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6555
6556         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6557
6558 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6559
6560         * bsd-kvm.o: Define _KMEMUSER.
6561         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6562         * configure: Regenerate.
6563
6564 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6565
6566         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6567         * i386-fbsd-nat.c: Likewise.
6568
6569 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6570
6571         * unittests/array-view-selftests.c: Add include of <array>.
6572
6573 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6574
6575         * spu-tdep.c (flush_ea_cache): Add missing argument to
6576         call_function_by_hand.
6577
6578 2017-09-04  Pedro Alves  <palves@redhat.com>
6579
6580         * NEWS (Safer support for debugging with no debug info): New.
6581
6582 2017-09-04  Pedro Alves  <palves@redhat.com>
6583
6584         * c-exp.y (function_method, function_method_void): Add current
6585         instance flags to TYPE_INSTANCE.
6586         * dwarf2read.c (check_modifier): New.
6587         (compute_delayed_physnames): Assert that only C++ adds delayed
6588         physnames.  Mark fn_fields as const/volatile depending on
6589         physname.
6590         * eval.c (make_params): New type_instance_flags parameter.  Use
6591         it as the new type's instance flags.
6592         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6593         flags element and pass it to make_params.
6594         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6595         instance flags element.
6596         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6597         * gdbtypes.h: Include "enum-flags.h".
6598         (type_instance_flags): New enum-flags type.
6599         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6600         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6601         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6602         (follow_type_instance_flags): New function.
6603         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6604         * parser-defs.h (follow_type_instance_flags): Declare.
6605         * valops.c (value_struct_elt_for_reference): const/volatile must
6606         match too.
6607
6608 2017-09-04  Pedro Alves  <palves@redhat.com>
6609
6610         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6611         function/method scopes; lookup the nested name as a function local
6612         static variable.
6613
6614 2017-09-04  Pedro Alves  <palves@redhat.com>
6615
6616         (%type <voidval>): Add function_method.
6617         * c-exp.y (exp): New production for calls with no arguments.
6618         (function_method, function_method_void_or_typelist): New
6619         productions.
6620         (exp): New production for "method()::static_var".
6621         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6622         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6623         Handle OP_FUNC_STATIC_VAR.
6624         * parse.c (operator_length_standard):
6625         Handle OP_FUNC_STATIC_VAR.
6626
6627 2017-09-04  Pedro Alves  <palves@redhat.com>
6628
6629         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6630         handling.
6631         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6632         Ditto.
6633         * parse.c (operator_length_standard, operator_check_standard):
6634         Ditto.
6635         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6636
6637 2017-09-04  Pedro Alves  <palves@redhat.com>
6638
6639         * ax-gdb.c: Include "typeprint.h".
6640         (gen_expr_for_cast): New function.
6641         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6642         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6643         type is unknown.
6644         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6645         nodebug_data_symbol.
6646         * eval.c: Include "typeprint.h".
6647         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6648         Error out if symbol has unknown type.
6649         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6650         evaluate_subexp_for_cast.
6651         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6652         OP_VAR_MSYM_VALUE.
6653         (evaluate_subexp_for_cast): New function.
6654         * gdbtypes.c (init_nodebug_var_type): New function.
6655         (objfile_type): Use it to initialize types of variables with no
6656         debug info.
6657         * typeprint.c (error_unknown_type): New.
6658         * typeprint.h (error_unknown_type): New declaration.
6659         * compile/compile-c-types.c (convert_type_basic): Handle
6660         TYPE_CODE_ERROR; warn and fallback to int for variables with
6661         unknown type.
6662
6663 2017-09-04  Pedro Alves  <palves@redhat.com>
6664
6665         * eval.c (evaluate_var_value): New function, factored out from ...
6666         (evaluate_subexp_standard): ... here.
6667
6668 2017-09-04  Pedro Alves  <palves@redhat.com>
6669
6670         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6671         Remove useless assignments to 'op'.
6672
6673 2017-09-04  Pedro Alves  <palves@redhat.com>
6674
6675         * eval.c (eval_skip_value): New function.
6676         (evaluate_subexp_standard): Use it.
6677
6678 2017-09-04  Pedro Alves  <palves@redhat.com>
6679
6680         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6681         function name from symbol/minsym and pass it to
6682         error_call_unknown_return_type.
6683
6684 2017-09-04  Pedro Alves  <palves@redhat.com>
6685
6686         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6687         * ax-gdb.c (gen_msym_var_ref): New function.
6688         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6689         * eval.c (evaluate_var_msym_value): New function.
6690         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6691         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6692         to call_function_by_hand.
6693         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6694         Handle OP_VAR_MSYM_VALUE.
6695         (union exp_element) <msymbol>: New field.
6696         * minsyms.h (struct type): Forward declare.
6697         (find_minsym_type_and_address): Declare.
6698         * parse.c (write_exp_elt_msym): New function.
6699         (write_exp_msymbol): Delete, refactored as ...
6700         (find_minsym_type_and_address): ... this new function.
6701         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6702         (operator_length_standard, operator_check_standard): Handle
6703         OP_VAR_MSYM_VALUE.
6704         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6705
6706 2017-09-04  Pedro Alves  <palves@redhat.com>
6707
6708         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6709         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6710         unknown.
6711         * ada-typeprint.c (print_func_type): Handle functions with unknown
6712         return type.
6713         * c-typeprint.c (c_type_print_base): Handle functions and methods
6714         with unknown return type.
6715         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6716         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6717         * compile/compile-c-types.c: Include "objfiles.h".
6718         (convert_func): For functions with unknown return type, warn and
6719         default to int.
6720         * compile/compile-object-run.c (compile_object_run): Adjust call
6721         to call_function_by_hand_dummy.
6722         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6723         call_function_by_hand.
6724         * eval.c (evaluate_subexp_standard): Adjust calls to
6725         call_function_by_hand.  Handle functions and methods with unknown
6726         return type.  Pass expect_type to call_function_by_hand.
6727         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6728         return type.
6729         * gcore.c (call_target_sbrk): Adjust call to
6730         call_function_by_hand.
6731         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6732         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6733         an integer address type instead of nodebug.
6734         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6735         call_function_by_hand.
6736         * infcall.c (error_call_unknown_return_type): New function.
6737         (call_function_by_hand): New "default_return_type" parameter.
6738         Pass it down.
6739         (call_function_by_hand_dummy): New "default_return_type"
6740         parameter.  Use it instead of defaulting to int.  If there's no
6741         default and the return type is unknown, throw an error.  If
6742         there's a default return type, and the called function has no
6743         debug info, then assume the function is prototyped.
6744         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6745         New "default_return_type" parameter.
6746         (error_call_unknown_return_type): New declaration.
6747         * linux-fork.c (call_lseek): Cast return type of lseek.
6748         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6749         call_function_by_hand.
6750         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6751         calls to call_function_by_hand.
6752         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6753         return type.
6754         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6755         (value_nsstring, print_object_command): Adjust calls to
6756         call_function_by_hand.
6757         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6758         functions with unknown return type.
6759         (pascal_type_print_func_varspec_suffix): New function.
6760         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6761         TYPE_CODE_METHOD>: Use it.
6762         * python/py-value.c (valpy_call): Adjust call to
6763         call_function_by_hand.
6764         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6765         call_function_by_hand.
6766         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6767         call_function_by_hand.
6768         * valops.c (value_allocate_space_in_inferior): Adjust call to
6769         call_function_by_hand.
6770         * typeprint.c (type_print_unknown_return_type): New function.
6771         * typeprint.h (type_print_unknown_return_type): New declaration.
6772
6773 2017-09-04  Pedro Alves  <palves@redhat.com>
6774
6775         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6776         types with more than one parameter as prototyped.
6777
6778 2017-09-04  Pedro Alves  <palves@redhat.com>
6779
6780         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6781         (disassemble_command): Use gdb_disassembly_flags instead of bare
6782         int.
6783         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6784         (dump_insns, do_mixed_source_and_assembly_deprecated)
6785         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6786         Use gdb_disassembly_flags instead of bare int.
6787         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6788         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6789         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6790         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6791         (enum gdb_disassembly_flag): ... values of this new enumeration.
6792         (gdb_disassembly_flags): Define.
6793         (gdb_disassembly)
6794         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6795         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6796         gdb_disassembly_flags instead of bare int.
6797         * record-btrace.c (btrace_insn_history)
6798         (record_btrace_insn_history, record_btrace_insn_history_range)
6799         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6800         instead of bare int.
6801         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6802         Use gdb_disassembly_flags instead of bare int.
6803         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6804         Define.
6805         * target-delegates.c: Regenerate.
6806         * target.c (target_insn_history, target_insn_history_from)
6807         (target_insn_history_range): Use gdb_disassembly_flags instead of
6808         bare int.
6809         * target.h: Include "disasm.h".
6810         (struct target_ops) <to_insn_history, to_insn_history_from,
6811         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6812         int.
6813         (target_insn_history, target_insn_history_from)
6814         (target_insn_history_range): Use gdb_disassembly_flags instead of
6815         bare int.
6816
6817 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6818
6819         * cli/cli-script.c (build_command_line): For if/while commands,
6820         check whether args is empty.
6821
6822 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6823
6824         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6825         (enum command_control_type): Likewise.
6826         (struct command_line): Likewise.
6827         (free_command_lines): Likewise.
6828         (struct command_lines_deleter): Likewise.
6829         (command_line_up): Likewise.
6830         (read_command_lines): Likewise.
6831         (read_command_lines_1): Likewise.
6832         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6833         (enum command_control_type): Likewise.
6834         (struct command_line): Likewise.
6835         (free_command_lines): Likewise.
6836         (struct command_lines_deleter): Likewise.
6837         (command_line_up): Likewise.
6838         (read_command_lines): Likewise.
6839         (read_command_lines_1): Likewise.
6840         * breakpoint.h: Include cli/cli-script.h.
6841         * extension-priv.h: Likewise.
6842         * gdbcmd.h: Likewise.
6843
6844 2017-09-04  Pedro Alves  <palves@redhat.com>
6845
6846         * ada-lang.c (is_known_support_routine): Move sal declaration to
6847         where it is initialized.
6848         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6849         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6850         (clear_command, update_static_tracepoint): Remove init_sal
6851         references.  Move declarations closer to initializations.
6852         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6853         initializations.
6854         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6855         references.  Move sal declarations closer to initializations.
6856         * frame.c (find_frame_sal): Return a symtab_and_line via function
6857         return instead of output parameter.  Remove init_sal references.
6858         * frame.h (find_frame_sal): Return a symtab_and_line via function
6859         return instead of output parameter.
6860         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6861         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6862         instead of memset.
6863         (gdbscm_find_pc_line): Remove init_sal reference.
6864         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6865         references.  Move declarations closer to initializations.
6866         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6867         initializations.
6868         (finish_backward): Remove init_sal references.  Move declarations
6869         closer to initializations.
6870         * infrun.c (process_event_stop_test, handle_step_into_function)
6871         (insert_hp_step_resume_breakpoint_at_frame)
6872         (insert_step_resume_breakpoint_at_caller): Likewise.
6873         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6874         (symbol_to_sal): Likewise.
6875         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6876         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6877         to its initialization.
6878         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6879         init_sal references.  Move declarations closer to initializations.
6880         * source.c (get_current_source_symtab_and_line): Remove brace
6881         initialization.
6882         (set_current_source_symtab_and_line): Now takes the sal by const
6883         reference.  Remove brace initialization.
6884         (line_info): Remove init_sal reference.
6885         * source.h (set_current_source_symtab_and_line): Now takes a
6886         symtab_and_line via const reference.
6887         * stack.c (set_current_sal_from_frame): Adjust.
6888         (print_frame_info): Adjust.
6889         (get_last_displayed_sal): Return the sal via function return
6890         instead of via output parameter.  Simplify.
6891         (frame_info): Adjust.
6892         * stack.h (get_last_displayed_sal): Return the sal via function
6893         return instead of via output parameter.
6894         * symtab.c (init_sal): Delete.
6895         (find_pc_sect_line): Remove init_sal references.  Move
6896         declarations closer to initializations.
6897         (find_function_start_sal): Remove init_sal references.  Move
6898         declarations closer to initializations.
6899         * symtab.h (struct symtab_and_line): In-class initialize all
6900         fields.
6901         * tracepoint.c (set_traceframe_context)
6902         (print_one_static_tracepoint_marker): Remove init_sal references.
6903         Move declarations closer to initializations.
6904         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6905         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6906         declarations closer to initializations.
6907         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6908         init_sal references.  Adjust.
6909
6910 2017-09-04  Pedro Alves  <palves@redhat.com>
6911
6912         * ax-gdb.c (agent_command_1): Use range-for.
6913         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6914         * breakpoint.c: Include "common/array-view.h".
6915         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6916         parameter from struct symtabs_and_lines to
6917         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6918         (breakpoint_sals_to_pc): Change sals parameter from struct
6919         symtabs_and_lines to std::vector reference.
6920         (check_fast_tracepoint_sals): Change sals parameter from struct
6921         symtabs_and_lines to std::array_view.  Use range-for.
6922         (decode_static_tracepoint_spec): Return a std::vector instead of
6923         symtabs_and_lines.  Update.
6924         (create_breakpoint): Update.
6925         (break_range_command, until_break_command, clear_command): Update.
6926         (base_breakpoint_decode_location, bkpt_decode_location)
6927         (bkpt_probe_create_sals_from_location)
6928         (bkpt_probe_decode_location, tracepoint_decode_location)
6929         (tracepoint_probe_decode_location)
6930         (strace_marker_create_sals_from_location): Return a std::vector
6931         instead of symtabs_and_lines.
6932         (strace_marker_create_breakpoints_sal): Update.
6933         (strace_marker_decode_location): Return a std::vector instead of
6934         symtabs_and_lines.  Update.
6935         (update_breakpoint_locations): Change struct symtabs_and_lines
6936         parameters to gdb::array_view.  Adjust.
6937         (location_to_sals): Return a std::vector instead of
6938         symtabs_and_lines.  Update.
6939         (breakpoint_re_set_default): Use std::vector instead of struct
6940         symtabs_and_lines.
6941         (decode_location_default): Return a std::vector instead of
6942         symtabs_and_lines.  Update.
6943         * breakpoint.h: Include "common/array-view.h".
6944         (struct breakpoint_ops) <decode_location>: Now returns a
6945         std::vector instead of returning a symtabs_and_lines via output
6946         parameter.
6947         (update_breakpoint_locations): Change sals parameters to use
6948         gdb::array_view.
6949         * cli/cli-cmds.c (edit_command, list_command): Update to use
6950         std::vector and gdb::array_view.
6951         (ambiguous_line_spec): Adjust to use gdb::array_view and
6952         range-for.
6953         (compare_symtabs): Rename to ...
6954         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6955         const reference and adjust.
6956         (filter_sals): Rewrite using std::vector and standard algorithms.
6957         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6958         (jump_command): Update to use std::vector.
6959         * linespec.c (struct linespec_state) <canonical_names>: Update
6960         comment.
6961         (add_sal_to_sals_basic): Delete.
6962         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6963         (decode_line_2, create_sals_line_offset)
6964         (convert_address_location_to_sals, convert_linespec_to_sals)
6965         (convert_explicit_location_to_sals, parse_linespec)
6966         (event_location_to_sals, decode_line_full, decode_line_1)
6967         (decode_line_with_current_source)
6968         (decode_line_with_last_displayed, decode_objc)
6969         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6970         (linespec_result::~linespec_result): Adjust to use std::vector
6971         instead of symtabs_and_lines.
6972         * linespec.h (linespec_sals::sals): Now a std::vector.
6973         (struct linespec_result): Use std::vector, bool, and in-class
6974         initialization.
6975         (decode_line_1, decode_line_with_current_source)
6976         (decode_line_with_last_displayed): Return std::vector.
6977         * macrocmd.c (info_macros_command): Use std::vector.
6978         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6979         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6980         std::vector.
6981         * probe.h (parse_probes): Return a std::vector.
6982         * python/python.c (gdbpy_decode_line): Use std::vector and
6983         gdb::array_view.
6984         * source.c (select_source_symtab, line_info): Use std::vector.
6985         * stack.c (func_command): Use std::vector.
6986         * symtab.h (struct symtabs_and_lines): Delete.
6987         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6988
6989 2017-09-04  Pedro Alves  <palves@redhat.com>
6990
6991         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6992         unittests/array-view-selftests.c.
6993         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6994         * common/array-view.h: New file.
6995         * unittests/array-view-selftests.c: New file.
6996
6997 2017-09-04  Pedro Alves  <palves@redhat.com>
6998
6999         * cli/cli-cmds.c (edit_command): Pass message to
7000         ambiguous_line_spec.
7001         (list_command): Pass message to ambiguous_line_spec.  Say
7002         "first"/"last" instead of "start" and "end" to be consistent with
7003         the manual.
7004         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
7005         them to print formatted message.
7006
7007 2017-09-04  Pedro Alves  <palves@redhat.com>
7008
7009         * btrace.c (ftrace_add_pt): Pass btrace_insn to
7010         ftrace_update_insns by reference instead of pointer.
7011
7012 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7013
7014         * i386-go32-tdep.c: Include x86-xstate.h.
7015         (i386_go32_init_abi): Call i386_target_description.
7016         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7017         if xcr0 is X86_XSTATE_X87_MASK.
7018         * i386-tdep.h (tdesc_i386): Remove the declaration.
7019         (tdesc_i386_mmx): Likewise.
7020
7021 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7022
7023         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7024         X86_XSTATE_SSE_MASK instead of 0.
7025
7026 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7027
7028         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7029         i386_target_description.
7030         * i386-fbsd-nat.c (i386fbsd_read_description): Call
7031         i386_target_description.
7032         * i386-tdep.c (i386_gdbarch_init): Likewise.
7033
7034 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7035
7036         * amd64-darwin-tdep.c: Include "x86-xstate.h".
7037         (x86_darwin_init_abi_64): Call amd64_target_description.
7038         * amd64-dicos-tdep.c: Likewise.
7039         * amd64-fbsd-nat.c: Likewise.
7040         * amd64-fbsd-tdep.c: Likewise.
7041         * amd64-nbsd-tdep.c: Likewise.
7042         * amd64-obsd-tdep.c: Likewise.
7043         * amd64-sol2-tdep.c: Likewise.
7044         * amd64-windows-tdep.c: Likewise.
7045         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7046
7047 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7048
7049         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7050         (btrace_function) <insn>: Change type to use std::vector.
7051         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7052         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7053         ftrace_update_insns, ftrace_compute_global_level_offset,
7054         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7055         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7056         change to std::vector.
7057         (ftrace_update_insns): Adjust to change to std::vector, change
7058         type of INSN parameter.
7059         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7060         * record-btrace.c (btrace_call_history_insn_range,
7061         btrace_compute_src_line_range,
7062         record_btrace_frame_prev_register): Adjust to change to
7063         std::vector.
7064         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7065         to change to std::vector.
7066
7067 2017-09-03  Tom Tromey  <tom@tromey.com>
7068
7069         * corefile.c (reopen_exec_file): Use std::string.
7070
7071 2017-09-03  Tom Tromey  <tom@tromey.com>
7072
7073         * compile/compile.c (compile_register_name_mangled): Return
7074         std::string.
7075         * compile/compile-loc2c.c (pushf_register_address): Update.
7076         (pushf_register): Update.
7077         * compile/compile-c-types.c (convert_array): Update.
7078         * compile/compile-c-symbols.c (generate_vla_size): Update.
7079         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7080         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7081         (convert_one_symbol): Update.
7082         (generate_c_for_for_one_variable): Update.
7083         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7084         std::string.
7085         (generate_register_struct): Update.
7086         * compile/compile-internal.h (c_get_range_decl_name): Return a
7087         std::string.
7088         (compile_register_name_mangled): Return std::string.
7089
7090 2017-09-03  Tom Tromey  <tom@tromey.com>
7091
7092         * utils.c (perror_string): Return a std::string.
7093         (throw_perror_with_name, perror_warning_with_name): Update.
7094
7095 2017-09-03  Tom Tromey  <tom@tromey.com>
7096
7097         * demangle.c (demangle_command): Use std::string,
7098         unique_xmalloc_ptr.
7099
7100 2017-09-03  Tom Tromey  <tom@tromey.com>
7101
7102         * cli/cli-setshow.c (do_set_command): Use std::string.
7103
7104 2017-09-03  Tom Tromey  <tom@tromey.com>
7105
7106         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7107
7108 2017-09-03  Tom Tromey  <tom@tromey.com>
7109
7110         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7111
7112 2017-09-03  Tom Tromey  <tom@tromey.com>
7113
7114         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7115         gdb::unique_xmalloc_ptr.
7116
7117 2017-09-03  Tom Tromey  <tom@tromey.com>
7118
7119         * thread.c (print_thread_info_1): Use string_printf.
7120         (thread_apply_command, thread_apply_all_command): Use
7121         std::string.
7122
7123 2017-09-03  Tom Tromey  <tom@tromey.com>
7124
7125         * valprint.c (val_print_string): Update.
7126         * gdbcore.h (memory_error_message): Return std::string.
7127         * corefile.c (memory_error_message): Return std::string.
7128         (memory_error): Update.
7129         * breakpoint.c (insert_bp_location): Update.
7130
7131 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7132
7133         * target/waitstatus.h (target_waitstatus_to_string): Change
7134         return type to std::string.
7135         * target/waitstatus.c (target_waitstatus_to_string): Return
7136         std::string.
7137         * target.h (target_waitstatus_to_string): Remove declaration.
7138         * infrun.c (resume, clear_proceed_status_thread,
7139         print_target_wait_results, do_target_wait, save_waitstatus,
7140         stop_all_threads): Adjust.
7141         * record-btrace.c (record_btrace_wait): Adjust.
7142         * target-debug.h
7143         (target_debug_print_struct_target_waitstatus_p): Adjust.
7144
7145 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7146
7147         PR gdb/22046
7148         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7149         detection.
7150
7151 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7152
7153         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7154         for setting/unsetting environment variables on the remote target.
7155         (New remote packets): Add entries for QEnvironmentHexEncoded,
7156         QEnvironmentUnset and QEnvironmentReset.
7157         * common/environ.c (gdb_environ::operator=): Extend method to
7158         handle m_user_set_env_list and m_user_unset_env_list.
7159         (gdb_environ::clear): Likewise.
7160         (match_var_in_string): Change type of first parameter from 'char
7161         *' to 'const char *'.
7162         (gdb_environ::set): Extend method to handle
7163         m_user_set_env_list and m_user_unset_env_list.
7164         (gdb_environ::unset): Likewise.
7165         (gdb_environ::clear_user_set_env): New method.
7166         (gdb_environ::user_set_envp): Likewise.
7167         (gdb_environ::user_unset_envp): Likewise.
7168         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7169         m_user_unset_env_list on move constructor/assignment.
7170         (unset): Add new default parameter 'update_unset_list = true'.
7171         (clear_user_set_env): New method.
7172         (user_set_envp): Likewise.
7173         (user_unset_envp): Likewise.
7174         (m_user_set_env_list): New std::set.
7175         (m_user_unset_env_list): Likewise.
7176         * common/rsp-low.c (hex2str): New function.
7177         (bin2hex): New overload for bin2hex function.
7178         * common/rsp-low.c (hex2str): New prototype.
7179         (str2hex): New overload prototype.
7180         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7181         QEnvironmentUnset and QEnvironmentReset.
7182         (remote_protocol_features): Add QEnvironmentHexEncoded,
7183         QEnvironmentUnset and QEnvironmentReset packets.
7184         (send_environment_packet): New function.
7185         (extended_remote_environment_support): Likewise.
7186         (extended_remote_create_inferior): Call
7187         extended_remote_environment_support.
7188         (_initialize_remote): Add QEnvironmentHexEncoded,
7189         QEnvironmentUnset and QEnvironmentReset packet configs.
7190         * unittests/environ-selftests.c (gdb_selftest_env_var):
7191         New variable.
7192         (test_vector_initialization): New function.
7193         (test_init_from_host_environ): Likewise.
7194         (test_reinit_from_host_environ): Likewise.
7195         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7196         Likewise.
7197         (test_unset_set_empty_vector): Likewise.
7198         (test_vector_clear): Likewise.
7199         (test_std_move): Likewise.
7200         (test_move_constructor):
7201         (test_self_move): Likewise.
7202         (test_set_unset_reset): Likewise.
7203         (run_tests): Rewrite in terms of the functions above.
7204
7205 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7206
7207         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7208         (adi_available): Use a temp variable of type CORE_ADDR as argument
7209         3 when calling target_auxv_search.
7210         (adi_normalize_address): Use masks and xor operators to calculate
7211         normalized address.
7212         (adi_read_versions, adi_write_versions, adi_print_versions)
7213         (do_examine, do_assign): Use paddress.
7214
7215 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7216
7217         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7218         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7219         out of loop and add supply of FIR.
7220         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7221         add collect of FIR.
7222
7223 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7224
7225         PR gdb/21827
7226         * cli/cli-script.c (define_command): Don't convert command name
7227         to lower case.
7228
7229 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7230
7231         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7232         Update all callers accordingly. Remove all code blocks handling
7233         the case where DISPP is not NULL.
7234
7235 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7236
7237         PR symtab/22003
7238         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7239         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7240         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7241
7242 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7243
7244         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7245         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7246         (read_comp_units_from_section): New parameter abbrev_section, use
7247         read_and_check_comp_unit_head, allocate signatured_type if needed.
7248         (create_all_comp_units): Update read_comp_units_from_section caller.
7249
7250 2017-08-23  Pedro Alves  <palves@redhat.com>
7251
7252         PR remote/21852
7253         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7254         to null_ptid and switch to thread without reading the registers
7255         after adding the inferior.
7256
7257 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7258
7259         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7260         compile-gcc.
7261         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7262         (compile_to_object): Implement compile_gcc.
7263         (_initialize_compile): Install "set compile-gcc".  Initialize
7264         compile_gcc.
7265
7266 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7267
7268         * compile/compile.c (compile_to_object): Conditionally call
7269         set_verbose.  Conditionally call compile or compile_v0.
7270
7271 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7272
7273         * sparc64-tdep.h: (adi_normalize_address): New export.
7274         * sparc-nat.h: (open_adi_tag_fd): New export.
7275         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7276         * sparc64-linux-tdep.c:
7277         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7278         (sparc64_linux_handle_segmentation_fault): New function.
7279         (sparc64_linux_init_abi): Register
7280         sparc64_linux_handle_segmentation_fault
7281         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7282         (sparc64_addr_bits_remove): New function.
7283         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7284         (MAX_PROC_NAME_SIZE): New macro.
7285         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7286         (sparc64adilist): New variable.
7287         (adi_proc_list): New variable.
7288         (find_adi_info): New function.
7289         (add_adi_info): New function.
7290         (get_adi_info_proc): New function.
7291         (get_adi_info): New function.
7292         (info_adi_command): New function.
7293         (read_maps_entry): New function.
7294         (adi_available): New function.
7295         (adi_normalize_address): New function.
7296         (adi_align_address): New function.
7297         (adi_convert_byte_count): New function.
7298         (adi_tag_fd): New function.
7299         (adi_is_addr_mapped): New function.
7300         (adi_read_versions): New function.
7301         (adi_write_versions): New function.
7302         (adi_print_versions): New function.
7303         (do_examine): New function.
7304         (do_assign): New function.
7305         (adi_examine_command): New function.
7306         (adi_assign_command): New function.
7307         (_initialize_sparc64_adi_tdep): New function.
7308
7309 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7310
7311         * breakpoint.c (breakpoints_info): Rename to ...
7312         (info_breakpoints_command): ... this.
7313         (watchpoints_info): Rename to ...
7314         (info_watchpoints_command): ... this.
7315         (tracepoints_info): Rename to ...
7316         (info_tracepoints_command): ... this.
7317         (_initialize_breakpoint): Adjust.
7318         * dcache.c (dcache_info): Rename to ...
7319         (info_display_command): ... this.
7320         (_initialize_dcache): Adjust.
7321         * frame.h (args_info): Rename to ...
7322         (info_args_command): ... this.
7323         (locals_info): Rename to ...
7324         (info_locals_command): ... this.
7325         * infcmd.c (nofp_registers_info): Rename to ...
7326         (info_registers_command): ... this.
7327         (float_info): Rename to ...
7328         (info_float_command): ... this.
7329         (program_info): Rename to ...
7330         (info_program_command): ... this.
7331         (all_registers_info): Rename to ...
7332         (info_all_registers_command): ... this.
7333         (vector_info): Rename to ...
7334         (info_vector_command): ... this.
7335         (float_info): Rename to ...
7336         (info_float_command): ... this.
7337         (_initialize_infcmd): Adjust.
7338         * inferior.h (term_info): Rename to ...
7339         (info_terminal_command): ... this.
7340         * inflow.c (term_info): Rename to ...
7341         (info_terminal_command): ... this.
7342         (_initialize_inflow): Adjust.
7343         * infrun.c (signals_info): Rename to ...
7344         (info_signals_command): ... this.
7345         (_initialize_infrun): Adjust.
7346         * objc-lang.c (classes_info): Rename to ...
7347         (info_classes_command): ... this.
7348         (selectors_info): Rename to ...
7349         (info_selectors_command): ... this.
7350         (_initialize_objc_language): Adjust.
7351         * printcmd.c (sym_info): Rename to ...
7352         (info_symbol_command): ... this.
7353         (address_info): Rename to ...
7354         (info_address_command): ... this.
7355         (display_info): Rename to ...
7356         (info_display_command): ... this.
7357         (_initialize_printcmd): Adjust.
7358         * reverse.c (bookmarks_info): Rename to ...
7359         (info_breakpoints_command): ... this.
7360         (_initialize_reverse): Adjust.
7361         * ser-go32.c (dos_info): Rename to ...
7362         (info_serial_command): ... this.
7363         (_initialize_ser_dos): Adjust.
7364         * skip.c (skip_info): Rename to ...
7365         (info_skip_command): ... this.
7366         (_initialize_step_skip): Adjust.
7367         * source.c (line_info): Rename to ...
7368         (info_line_command): ... this.
7369         (source_info): Rename to ...
7370         (info_source_command)
7371         * stack.c (frame_info): Rename to ...
7372         (info_frame_command): ... this.
7373         (locals_info): Rename to ...
7374         (info_locals_command): ... this.
7375         (args_info): Rename to ...
7376         (info_args_command): ... this.
7377         (_initialize_stack): Adjust.
7378         * symtab.c (sources_info): Rename to ...
7379         (info_sources_command): ... this.
7380         (variables_info): Rename to ...
7381         (info_variables_command): ... this.
7382         (functions_info): Rename to ...
7383         (info_functions_command): ... this.
7384         (types_info): Rename to ...
7385         (info_types_command): ... this.
7386         (_initialize_symtab): Adjust.
7387         * target.c (target_info): Rename to ...
7388         (info_target_command): ... this.
7389         (initialize_targets): Adjust.
7390         * tracepoint.c (tvariables_info): Rename to ...
7391         (info_tvariables_command): ... this.
7392         (scope_info): Rename to ...
7393         (info_scope_command): ... this.
7394         (trace_dump_actions): Adjust.
7395         (_initialize_tracepoint): Adjust.
7396
7397 2017-08-22  Tom Tromey  <tom@tromey.com>
7398
7399         * breakpoint.h (install_breakpoint): Update.
7400         * breakpoint.c (add_solib_catchpoint): Update.
7401         (install_breakpoint): Change argument to a std::unique_ptr.
7402         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7403         (create_breakpoint_sal, create_breakpoint): Update.
7404         (watch_command_1, catch_exec_command_1)
7405         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7406         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7407         Return the breakpoint.
7408         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7409         (new_single_step_breakpoint): Update.
7410         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7411         std::unique_ptr.
7412         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7413         std::unique_ptr.
7414         * break-catch-sig.c (create_signal_catchpoint): Use
7415         std::unique_ptr.
7416         * ada-lang.c (create_ada_exception_catchpoint): Use
7417         std::unique_ptr.
7418
7419 2017-08-22  Tom Tromey  <tom@tromey.com>
7420
7421         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7422
7423 2017-08-22  Tom Tromey  <tom@tromey.com>
7424
7425         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7426         (lookup_partial_symbol): Update.
7427
7428 2017-08-22  Tom Tromey  <tom@tromey.com>
7429
7430         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7431         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7432         (find_and_open_source, symtab_to_fullname): Update.
7433         * psymtab.c (psymtab_to_fullname): Update.
7434
7435 2017-08-22  Tom Tromey  <tom@tromey.com>
7436
7437         * exec.c (exec_file_attach): Update.
7438         * linux-thread-db.c (try_thread_db_load): Update.
7439         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7440         * utils.c (gdb_realpath): Change return type.
7441         (gdb_realpath_keepfile): Update.
7442         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7443         (_initialize_utils): Register the new self test.
7444         * source.c (openp): Update.
7445         (find_and_open_source): Update.
7446         * nto-tdep.c (nto_find_and_open_solib): Update.
7447         * main.c (set_gdb_data_directory): Update.
7448         (captured_main_1): Update.
7449         * dwarf2read.c (dwarf2_get_dwz_file): Update
7450         (dw2_map_symbol_filenames): Update.
7451         * auto-load.c (auto_load_safe_path_vec_update): Update.
7452         (filename_is_in_auto_load_safe_path_vec): Change type of
7453         "filename_realp".
7454         (auto_load_objfile_script): Update.
7455         (file_is_auto_load_safe): Update.  Use std::string.
7456         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7457
7458 2017-08-22  Tom Tromey  <tom@tromey.com>
7459
7460         * utils.c (gdb_realpath_keepfile): Return a
7461         gdb::unique_xmalloc_ptr.
7462         * exec.c (exec_file_attach): Update.
7463         * utils.h (gdb_realpath_keepfile): Return a
7464         gdb::unique_xmalloc_ptr.
7465
7466 2017-08-22  Tom Tromey  <tom@tromey.com>
7467
7468         * compile/compile.c (compile_file_command): Use
7469         gdb::unique_xmalloc_ptr, std::string.
7470         * utils.c (gdb_abspath): Change return type.
7471         * source.c (openp): Update.
7472         * objfiles.c (allocate_objfile): Update.
7473         * main.c (set_gdb_data_directory): Update.
7474         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7475
7476 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7477
7478         * cli-cmds.c (list_commands): List actual code around more than
7479         one location.
7480
7481 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7482
7483         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7484
7485 2017-08-21  Pedro Alves  <palves@redhat.com>
7486
7487         PR gdb/19487
7488         * c-exp.y (variable production): Handle function aliases.
7489         * minsyms.c (msymbol_is_text): New function.
7490         * minsyms.h (msymbol_is_text): Declare.
7491         * symtab.c (find_function_alias_target): New function.
7492         * symtab.h (find_function_alias_target): Declare.
7493
7494 2017-08-21  Pedro Alves  <palves@redhat.com>
7495
7496         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7497         typedefs.
7498         * typeprint.c (whatis_exp): If handling "whatis", and expression
7499         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7500         typedefs here.
7501         * valops.c (value_cast): Save "to" type before resolving
7502         stubs/typedefs.  Use that type as resulting value's type.
7503
7504 2017-08-18  Tom Tromey  <tom@tromey.com>
7505             Pedro Alves  <palves@redhat.com>
7506
7507         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7508         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7509         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7510         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7511         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7512         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7513         (linux_get_siginfo_data): Add "thread" argument.  Use
7514         scoped_restore.
7515         * linux-nat.c (linux_child_follow_fork)
7516         (check_stopped_by_watchpoint): Use scoped_restore.
7517         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7518         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7519         (restore_inferior_ptid, save_inferior_ptid): Remove.
7520         * btrace.c (btrace_fetch): Use scoped_restore.
7521         * bsd-uthread.c (bsd_uthread_fetch_registers)
7522         (bsd_uthread_store_registers): Use scoped_restore.
7523         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7524         scoped_restore.
7525         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7526         (aix_thread_xfer_partial): Use scoped_restore.
7527         * inferior.h (save_inferior_ptid): Remove.
7528
7529 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7530
7531         PR tdep/21818
7532         * arm-tdep.c (gdb_print_insn_arm): Mark
7533         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7534
7535 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7536
7537         * NEWS: Mention GDBserver's new option "--selftest".
7538         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7539         * selftest.c: Move it to common/selftest.c.
7540         * selftest.h: Move it to common/selftest.h.
7541         * selftest-arch.c (reset): New function.
7542         (tests_with_arch): Call reset.
7543
7544 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7545
7546         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7547         instead of exception_fprintf and printf_filtered.
7548
7549 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7550
7551         * selftest.c (register_self_test): Rename it to
7552         selftests::register_test.
7553         (run_self_tests): selftest::run_tests.
7554         * selftest.h: Update declarations.
7555         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7556         selftests::register_test_foreach_arch.
7557         * selftest-arch.h: Update declaration.
7558         * aarch64-tdep.c: Update.
7559         * arm-tdep.c: Likewise.
7560         * disasm-selftests.c: Likewise.
7561         * dwarf2loc.c: Likewise.
7562         * dwarf2-frame.c: Likewise.
7563         * findvar.c: Likewise.
7564         * gdbarch-selftests.c: Likewise.
7565         * maint.c (maintenance_selftest): Likewise.
7566         * regcache.c: Likewise.
7567         * rust-exp.y: Likewise.
7568         * selftest-arch.c: Likewise.
7569         * unittests/environ-selftests.c: Likewise.
7570         * unittests/function-view-selftests.c: Likewise.
7571         * unittests/offset-type-selftests.c: Likewise.
7572         * unittests/optional-selftests.c: Likewise.
7573         * unittests/scoped_restore-selftests.c: Likewise.
7574         * utils-selftests.c: Likewise.
7575
7576 2017-08-17  Pedro Alves  <palves@redhat.com>
7577
7578         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7579         local.
7580
7581 2017-08-17  Pedro Alves  <palves@redhat.com>
7582
7583         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7584         field.
7585         (reset_die_in_process): Delete, replaced by ...
7586         (process_die_scope): ... this new class.  Make it responsible for
7587         freeing cu->line_header too.
7588         (process_die): Use process_die_scope.
7589         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7590         cu->line_header_die_owner.  Don't release the line header if it's
7591         owned by the CU.
7592         (setup_type_unit_groups): Make the CU/DIE own the line header.
7593         Don't release the line header here.
7594
7595 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7596
7597         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7598
7599 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7600
7601         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7602         Single-Key mode
7603
7604 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7605
7606         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7607         mode command list.
7608
7609 2017-08-15  Stafford Horne  <shorne@gmail.com>
7610
7611         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7612
7613 2017-08-15  Stafford Horne  <shorne@gmail.com>
7614
7615         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7616
7617 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7618
7619         PR gdb/21954
7620         * infcmd.c (unset_environment_command): Use the 'clear' method on
7621         the environment instead of resetting it.
7622
7623 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7624
7625         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7626         platforms.
7627
7628 2017-08-14  Tom Tromey  <tom@tromey.com>
7629
7630         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7631         (print_binary_chars): Likewise.
7632         (BITS_IN_BYTES): Remove.
7633
7634 2017-08-14  Tom Tromey  <tom@tromey.com>
7635
7636         PR gdb/21675
7637         * valprint.c (LOW_ZERO): Change value to 034.
7638         (print_octal_chars): Add static_asserts for octal constants.
7639         * printcmd.c (print_scalar_formatted): Add 'd' case.
7640
7641 2017-08-11  Tom Tromey  <tom@tromey.com>
7642
7643         * symfile.c (add_symbol_file_command): Use std::vector.
7644
7645 2017-08-14  Tom Tromey  <tom@tromey.com>
7646
7647         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7648         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7649         std::move.
7650         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7651
7652 2017-08-11  Pedro Alves  <palves@redhat.com>
7653
7654         * infrun.c (process_event_stop_test): Adjust
7655         function_name_is_marked_for_skip call.
7656         * skip.c: Include <list>.
7657         (skiplist_entry): Make it a class with private fields, and
7658         getters/setters.
7659         (skiplist_entry_chain): Delete.
7660         (skiplist_entries): New.
7661         (skiplist_entry_count): Delete.
7662         (highest_skiplist_entry_num): New.
7663         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7664         (add_skiplist_entry): Delete.
7665         (skiplist_entry::skiplist_entry): New.
7666         (skiplist_entry::add_entry): New.
7667         (skip_file_command, skip_function): Adjust.
7668         (compile_skip_regexp): Delete.
7669         (skip_command): Don't compile regexp here.  Adjust to use
7670         skiplist_entry::add_entry.
7671         (skip_info): Adjust to use range-for and getters.
7672         (skip_enable_command, skip_disable_command): Adjust to use
7673         range-for and setters.
7674         (skip_delete_command): Adjust to use std::list.
7675         (add_skiplist_entry): Delete.
7676         (skip_file_p): Delete, refactored as ...
7677         (skiplist_entry::do_skip_file_p): ... this new method.
7678         (skip_gfile_p): Delete, refactored as ...
7679         (skiplist_entry::do_gskip_file_p): ... this new method.
7680         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7681         (skiplist_entry::skip_function_p): ... this new method.
7682         (function_name_is_marked_for_skip): Now returns bool, and takes
7683         the function sal by const reference.  Adjust to use range-for and
7684         skiplist_entry methods.
7685         (_initialize_step_skip): Remove references to
7686         skiplist_entry_chain, skiplist_entry_count.
7687         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7688         takes the function sal by const reference.
7689
7690 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7691
7692         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7693         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7694         (dwarf2_frame_cache):
7695         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7696         RETURN_MASK_ALL and set *this_case to NULL.
7697         * frame-unwind.h: Update comments.
7698
7699 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7700
7701         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7702         (dwarf2_frame_state_copy_regs): Remove.
7703         (dwarf2_frame_state_free_regs): Remove.
7704         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7705         (dwarf2_restore_rule): Call method .alloc_regs instead of
7706         dwarf2_frame_state_alloc_regs.
7707         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7708         constructor.  Call std::move.
7709         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7710         (dwarf2_frame_cache): Likewise.
7711
7712         [GDB_SELF_TEST]: Include selftest.h and
7713         selftest-arch.h.
7714         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7715         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7716         execute_cfa_program_test.
7717
7718         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7719         copy ctor, assignment operator, move assignment.
7720         <alloc_regs>: New method.
7721         <swap>: New method.
7722         (struct dwarf2_frame_state): Delete dtor.
7723         (dwarf2_frame_state_alloc_regs): Remove declaration.
7724         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7725         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7726
7727 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7728
7729         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7730         (dwarf2_frame_state::dwarf2_frame_state): New.
7731         (dwarf2_frame_state::~dwarf2_frame_state): New.
7732         (dwarf2_fetch_cfa_info): Update.
7733         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7734         rather than a pointer.  Update code.
7735         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7736         dtor.
7737         <data_align, code_align, retaddr_column>: Change them to const.
7738         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7739         to bool.
7740
7741 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7742
7743         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7744         <loc.exp>: New field.
7745         * dwarf2-frame.c (execute_cfa_program): Update.
7746         (dwarf2_frame_prev_register): Update.
7747
7748 2017-08-10  Pedro Alves  <palves@redhat.com>
7749
7750         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7751
7752 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7753
7754         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7755         (fbsd_pending_children): Use std::list.
7756         (fbsd_remember_child): Likewise.
7757         (fbsd_is_child_pending): Likewise.
7758         (fbsd_pending_vfork_done): Use std::forward_list.
7759         (fbsd_add_vfork_done): Likewise.
7760         (fbsd_is_vfork_done_pending): Likewise.
7761         (fbsd_next_vfork_done): Likewise.
7762
7763 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7764
7765         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7766         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7767         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7768         for `mapfilename'.
7769         (fbsd_xfer_partial): Use gdb::byte_vector.
7770         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7771
7772 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7773
7774         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7775         "filestuff.h".
7776         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7777
7778 2017-08-09  Tom Tromey  <tom@tromey.com>
7779
7780         * skip.c (skiplist_entry): New constructor.
7781         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7782         (skiplist_entry::file_is_glob): Now bool.
7783         (skiplist_entry::file, skiplist_entry::function): Now
7784         std::string.
7785         (make_skip_entry): Return a unique_ptr.  Use new.
7786         (free_skiplist_entry, free_skiplist_entry_cleanup)
7787         (make_free_skiplist_entry_cleanup): Remove.
7788         (skip_command, skip_disable_command, add_skiplist_entry)
7789         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7790         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7791         (function_name_is_marked_for_skip): Update.
7792         (skip_delete_command): Update.  Use delete.
7793
7794 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7795
7796         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7797         (aarch64_linux_core_read_description): New function.
7798         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7799
7800 2017-08-09  Pedro Alves  <palves@redhat.com>
7801
7802         * cp-name-parser.y (cp_comp_to_string): Return a
7803         gdb::unique_xmalloc_ptr<char>.
7804         * cp-support.c (replace_typedefs_qualified_name)
7805         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7806         (cp_canonicalize_string_full): Use op= instead of explicit
7807         convertion.
7808         (cp_class_name_from_physname, method_name_from_physname)
7809         (cp_func_name, cp_remove_params): Adjust to use
7810         gdb::unique_xmalloc_ptr<char>.
7811         * cp-support.h (cp_comp_to_string): Return a
7812         gdb::unique_xmalloc_ptr<char>.
7813         * python/py-type.c (typy_lookup_type): Adjust to use
7814         gdb::unique_xmalloc_ptr<char>.
7815
7816 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7817
7818         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7819
7820 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7821             Yao Qi  <yao.qi@linaro.org>
7822
7823         * cp-support.c (cp_canonicalize_string_full): Use
7824         gdb::unique_xmalloc_ptr<char>.
7825         (cp_canonicalize_string): Likewise.
7826
7827 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7828
7829         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7830         * regformats/i386/amd64-avx-avx512.dat: Remove.
7831         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7832         * regformats/i386/amd64-avx-mpx.dat:Remove.
7833         * regformats/i386/amd64-avx.dat: Remove.
7834         * regformats/i386/amd64-mpx.dat: Remove.
7835         * regformats/i386/i386-avx-avx512.dat: Remove.
7836         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7837         * regformats/i386/i386-avx-mpx.dat: Remove.
7838         * regformats/i386/i386-mmx.dat: Remove.
7839         * regformats/i386/i386-mpx.dat: Remove.
7840
7841 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7842
7843         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7844         * amd64-tdep.c: Don't include features/i386/x32*.c.
7845         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7846         functions.
7847         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7848         and i386/x32-avx-avx512.
7849         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7850         and i386/x32.xml.
7851         * features/i386/x32-avx-avx512.c: Removed.
7852         * features/i386/x32-avx-avx512.xml: Removed.
7853         * features/i386/x32-avx.c: Removed.
7854         * features/i386/x32-avx.xml: Removed.
7855         * features/i386/x32.c: Removed.
7856         * features/i386/x32.xml: Removed.
7857         * regformats/i386/x32-avx-avx512.dat: Removed.
7858         * regformats/i386/x32-avx.dat: Removed.
7859         * regformats/i386/x32.dat: Removed.
7860
7861 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7862
7863         PR breakpoints/21886
7864         * mem-break.c (default_memory_insert_breakpoint): Use
7865         `->placed_address' rather than `->reqstd_address' for the
7866         breakpoint location.
7867
7868 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7869
7870         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7871         assertions.
7872
7873 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7874
7875         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7876         a union of `tdep_info', `tdesc_data' and `id'.
7877         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7878         rather than `info.tdep_info'.
7879         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7880         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7881         * i386-tdep.c (i386_gdbarch_init): Likewise.
7882         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7883         * mips-tdep.c (mips_gdbarch_init): Likewise.
7884         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7885         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7886         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7887         `info.tdep_info'.
7888         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7889         `info.tdep_info'.
7890         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7891         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7892         `info.tdep_info'.
7893         * spu-tdep.c (spu_gdbarch_init): Likewise.
7894         * gdbarch.h: Regenerate.
7895
7896 2017-08-07  Leszek Swirski  <leszeks@google.com>
7897
7898         PR symtab/20899
7899         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7900
7901 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7902
7903         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7904         (gdbsim_open): Rename gdb_argv args object to argv.
7905
7906 2017-08-05  Tom Tromey  <tom@tromey.com>
7907
7908         * compile/compile-object-load.c (compile_object_load): Use
7909         gdb::unique_xmalloc_ptr.
7910         * cli/cli-dump.c (scan_filename): Rename from
7911         scan_filename_with_cleanup.  Change return type.
7912         (scan_expression): Rename from scan_expression_with_cleanup.
7913         Change return type.
7914         (dump_memory_to_file, dump_value_to_file, restore_command):
7915         Use gdb::unique_xmalloc_ptr.  Update.
7916         * cli/cli-cmds.c (find_and_open_script): Use
7917         gdb::unique_xmalloc_ptr.
7918         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7919         * symmisc.c (maintenance_print_symbols)
7920         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7921         * symfile.c (symfile_bfd_open, generic_load)
7922         (add_symbol_file_command, remove_symbol_file_command): Use
7923         gdb::unique_xmalloc_ptr.
7924         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7925         * psymtab.c (maintenance_print_psymbols): Use
7926         gdb::unique_xmalloc_ptr.
7927         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7928         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7929         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7930         (reload_shared_libraries_1): Likewise.
7931
7932 2017-08-05  Tom Tromey  <tom@tromey.com>
7933
7934         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7935         (rust_op_vector, rust_set_vector): New typedefs.
7936         (current_parser): New global.
7937         (work_obstack): Change to pointer type.  Update all users.
7938         (rust_ast, pstate): Remove globals.
7939         (struct rust_parser): New.
7940         (%union) <params, field_inits>: Change type.
7941         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7942         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7943         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7944         (convert_params_to_types, convert_params_to_expression): Change
7945         type of "params".
7946         (ast_string): Change type of "fields".
7947         (rust_parse): Make a rust_parser.  Remove cleanups.
7948         (rust_lex_tests): Make and install an auto_obstack.
7949
7950 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7951
7952         * configure.srv (ipa_x32_linux_regobj): New.
7953         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7954         instead of X86_TDESC_AVX512.
7955         (initialize_low_tracepoint): Call
7956         init_registers_x32_avx_avx512_linux.
7957
7958 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7959
7960         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7961
7962 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7963
7964         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7965
7966 2017-08-03  Tom Tromey  <tom@tromey.com>
7967
7968         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7969         Remove.
7970         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7971
7972 2017-08-03  Tom Tromey  <tom@tromey.com>
7973
7974         * python/py-param.c (compute_enum_values): Use gdb_argv.
7975
7976 2017-08-03  Tom Tromey  <tom@tromey.com>
7977
7978         * utils.h (struct gdb_argv_deleter): New.
7979         (gdb_argv): New class.
7980         * utils.c (gdb_argv::reset): New method.
7981         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7982         * tracefile.c (tsave_command): Use gdb_argv.
7983         * top.c (new_ui_command): Use gdb_argv.
7984         * symmisc.c (maintenance_print_symbols)
7985         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7986         * symfile.c (symbol_file_command, generic_load)
7987         (remove_symbol_file_command): Use gdb_argv.
7988         * stack.c (backtrace_command): Use gdb_argv.
7989         * source.c (add_path, show_substitute_path_command)
7990         (unset_substitute_path_command, set_substitute_path_command):
7991         Use gdb_argv.
7992         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7993         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7994         * remote.c (extended_remote_run, remote_put_command)
7995         (remote_get_command, remote_delete_command): Use gdb_argv.
7996         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7997         (gdbsim_open): Use gdb_argv.
7998         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7999         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8000         * procfs.c (procfs_info_proc): Use gdb_argv.
8001         * interps.c (interpreter_exec_cmd): Use gdb_argv.
8002         * infrun.c (handle_command): Use gdb_argv.
8003         * inferior.c (add_inferior_command, clone_inferior_command):
8004         Use gdb_argv.
8005         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8006         * exec.c (exec_file_command): Use gdb_argv.
8007         * cli/cli-cmds.c (alias_command): Use gdb_argv.
8008         * compile/compile.c (build_argc_argv): Use gdb_argv.
8009
8010 2017-08-03  Tom Tromey  <tom@tromey.com>
8011
8012         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8013
8014 2017-08-03  Tom Tromey  <tom@tromey.com>
8015
8016         * python/python.c (compute_python_string): Return std::string.
8017         (gdbpy_eval_from_control_command): Update.
8018         (do_start_initialization): Use std::string.
8019         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8020         xstrprintf.
8021         * python/py-breakpoint.c (local_setattro): Use string_printf, not
8022         xstrprintf.
8023
8024 2017-08-03  Tom Tromey  <tom@tromey.com>
8025
8026         * top.h (do_restore_instream_cleanup): Remove.
8027         * top.c (do_restore_instream_cleanup): Remove.
8028         (read_command_file): Use scoped_restore.
8029         * cli/cli-script.c (execute_user_command): Use scoped_restore.
8030
8031 2017-08-03  Tom Tromey  <tom@tromey.com>
8032
8033         * cli/cli-script.c (execute_user_command)
8034         (execute_control_command): Use scoped_restore.
8035
8036 2017-08-03  Tom Tromey  <tom@tromey.com>
8037
8038         * cli/cli-script.c (do_restore_user_call_depth): Remove.
8039         (execute_user_command): Remove user_call_depth; use
8040         user_args_stack's size instead.
8041
8042 2017-08-03  Tom Tromey  <tom@tromey.com>
8043
8044         * top.h (in_user_command): Remove.
8045         * top.c (in_user_command): Remove.
8046         * cli/cli-script.c (do_restore_user_call_depth)
8047         (execute_user_command): Update.
8048
8049 2017-08-03  Tom Tromey  <tom@tromey.com>
8050
8051         * valops.c (search_struct_method): Use gdb::byte_vector.
8052         * valarith.c (value_concat): Use std::vector.
8053         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8054         (simple_search_memory): Likewise.
8055         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8056         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8057         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8058         * elfread.c (elf_rel_plt_read): Use std::string.
8059         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8060         * cli/cli-dump.c (restore_section_callback): Use
8061         gdb::byte_vector.
8062
8063 2017-08-03  Tom Tromey  <tom@tromey.com>
8064
8065         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8066
8067 2017-08-03  Tom Tromey  <tom@tromey.com>
8068
8069         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8070         (tui_register_format): Use scoped_restore.
8071
8072 2017-08-03  Tom Tromey  <tom@tromey.com>
8073
8074         * reverse.c (exec_direction_default): Remove.
8075         (exec_reverse_once): Use scoped_restore.
8076         * remote.c (restore_remote_timeout): Remove.
8077         (remote_flash_erase, remote_flash_write, remote_flash_done)
8078         (readchar, remote_serial_write): Use scoped_restore.
8079         * cli/cli-script.c (struct source_cleanup_lines_args)
8080         (source_cleanup_lines): Remove.
8081         (script_from_file): Use scoped_restore.
8082         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8083         (source_command): Use scoped_restore.
8084
8085 2017-08-03  Tom Tromey  <tom@tromey.com>
8086
8087         * utils.h (make_cleanup_free_so): Remove.
8088         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8089         * solist.h (struct so_deleter): New.
8090         (so_list_up): New typedef.
8091         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8092
8093 2017-08-03  Tom Tromey  <tom@tromey.com>
8094
8095         * utils.h (make_cleanup_restore_current_language): Remove.
8096         * utils.c (do_restore_current_language)
8097         (make_cleanup_restore_current_language): Remove.
8098         * parse.c (parse_exp_in_context_1)
8099         (parse_expression_with_language): Use
8100         scoped_restore_current_language.
8101         * mi/mi-main.c (mi_cmd_execute): Use
8102         scoped_restore_current_language.
8103         * language.h (scoped_restore_current_language): New class.
8104
8105 2017-08-03  Tom Tromey  <tom@tromey.com>
8106
8107         * compile/compile.c (cleanup_unlink_file): Remove.
8108         (compile_to_object): Use gdb::unlinker.
8109         (eval_compile_command): Likewise.
8110
8111 2017-08-03  Tom Tromey  <tom@tromey.com>
8112
8113         * utils.h (make_cleanup_fclose): Remove.
8114         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8115
8116 2017-08-03  Tom Tromey  <tom@tromey.com>
8117
8118         * top.c (open_terminal_stream): Return gdb_file_up.
8119         (new_ui_command): Update.
8120
8121 2017-08-03  Tom Tromey  <tom@tromey.com>
8122
8123         * source.c (print_source_lines_base, forward_search_command)
8124         (reverse_search_command): Use gdb_file_up.
8125
8126 2017-08-03  Tom Tromey  <tom@tromey.com>
8127
8128         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8129
8130 2017-08-03  Tom Tromey  <tom@tromey.com>
8131
8132         * cli/cli-cmds.c (find_and_open_script): Change return type.
8133         Remove "streamp" and "full_path" parameters.
8134         (source_script_with_search): Update.
8135         * auto-load.c (source_script_file): Update.
8136         * cli/cli-cmds.h (find_and_open_script): Change type.
8137         (open_script): New struct.
8138
8139 2017-08-03  Tom Tromey  <tom@tromey.com>
8140
8141         * xml-support.c (xml_fetch_content_from_file): Update.
8142         * ui-file.c (stdio_file::open): Update.
8143         * tracefile-tfile.c (tfile_start): Update.
8144         * remote.c (remote_file_put, remote_file_get): Update.
8145         * nat/linux-procfs.c (linux_proc_get_int)
8146         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8147         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8148         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8149         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8150         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8151         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8152         * linux-nat.c (linux_proc_pending_signals): Update.
8153         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8154         (file_closer): Remove.
8155         * compile/compile.c (compile_to_object): Update.
8156         * common/filestuff.h (struct gdb_file_deleter): New.
8157         (gdb_file_up): New typedef.
8158         (gdb_fopen_cloexec): Change return type.
8159         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8160         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8161         (dump_binary_file, restore_binary_file): Update.
8162         * auto-load.c (auto_load_objfile_script_1): Update.
8163
8164 2017-08-03  Tom Tromey  <tom@tromey.com>
8165
8166         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8167         (info_static_tracepoint_markers_command): Likewise.
8168         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8169         * skip.c (skip_info): Use ui_out_emit_table.
8170         * progspace.c (print_program_space): Use ui_out_emit_table.
8171         * osdata.c (info_osdata): Use ui_out_emit_table.
8172         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8173         ui_out_emit_table.
8174         * linux-thread-db.c (info_auto_load_libthread_db): Use
8175         ui_out_emit_table.
8176         * inferior.c (print_inferior): Use ui_out_emit_table.
8177         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8178         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8179         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8180         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8181         * ui-out.h (class ui_out_emit_table): New.
8182
8183 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8184
8185         * mips-tdep.c (mips_fpu_type_str): New function.
8186         (mips_dump_tdep): Call it.
8187
8188 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8189
8190         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8191         `->mips_fpu_type'.
8192
8193 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8194
8195         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8196
8197 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8198
8199         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8200
8201 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8202
8203         * cli/cli-cmds.c (maintenancechecklist): New variable.
8204         * gdbcmd.h (maintenancechecklist): Declare it.
8205         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8206         Call i386_linux_read_description with different masks.
8207         * maint.c (maintenance_check_command): New function.
8208         (_initialize_maint_cmds): Call add_prefix_cmd.
8209         * target-descriptions.c (tdesc_reg): override operator != and ==.
8210         (tdesc_type): Likewise.
8211         (tdesc_feature): Likewise.
8212         (target_desc): Likewise.
8213         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8214         (maintenance_check_xml_descriptions): New function.
8215         (_initialize_target_descriptions) Add command "xml-descriptions".
8216         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8217
8218 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8219
8220         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8221         Include features/i386/32bit-*.c.
8222         (i386_linux_read_description): Generate target description if it
8223         doesn't exist.
8224         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8225         functions.
8226         * features/i386/32bit-linux.c: Re-generated.
8227         * features/i386/32bit-sse.c: Likewise.
8228         * target-descriptions.c (print_c_feature::visit): Print code to
8229         set register number if needed.
8230         (print_c_feature) <m_next_regnum>: New field.
8231
8232 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8233
8234         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8235         (FEATURE_XMLFILES): New.
8236         (FEATURE_CFILES): New.
8237         New rules.
8238         (clean-cfiles): Remove generated c files.
8239         * features/i386/32bit-avx.c: Generated.
8240         * features/i386/32bit-avx512.c: Generated.
8241         * features/i386/32bit-core.c: Generated.
8242         * features/i386/32bit-linux.c: Generated.
8243         * features/i386/32bit-mpx.c: Generated.
8244         * features/i386/32bit-pkeys.c: Generated.
8245         * features/i386/32bit-sse.c: Generated.
8246         * target-descriptions.c: Include algorithm.
8247         (tdesc_element_visitor): Add method visit_end.
8248         (print_c_tdesc): Implement visit_end.
8249         (print_c_tdesc:: m_filename_after_features): Move it to
8250         protected.
8251         (print_c_feature): New class.
8252         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8253         name starts with "i386/32bit-".
8254
8255 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8256
8257         * target-descriptions.c (tdesc_element_visitor): New class.
8258         (tdesc_element): New class.
8259         (tdesc_reg): Inherit from tdesc_element.
8260         (tdesc_reg::accept): New function.
8261         (tdesc_type): Inherit from tdesc_element.
8262         (tdesc_type::accept): New function.
8263         (tdesc_feature): Inherit from tdesc_element.
8264         (tdesc_feature::accept): New function.
8265         (target_desc): Inherit from tdesc_element.
8266         (target_desc::target_desc): New.
8267         (target_desc::~target_desc): New.
8268         (target_desc::accept): New.
8269         (allocate_target_description): Use new.
8270         (free_target_description): Use delete.
8271         (print_c_tdesc): New class.
8272         (maint_print_c_tdesc_cmd): Adjust.
8273
8274         * features/aarch64.c: Re-generated.
8275         * features/arc-arcompact.c: Re-generated.
8276         * features/arc-v2.c: Re-generated.
8277         * features/arm/arm-with-iwmmxt.c: Re-generated.
8278         * features/arm/arm-with-m.c: Re-generated.
8279         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8280         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8281         * features/arm/arm-with-neon.c: Re-generated.
8282         * features/arm/arm-with-vfpv2.c: Re-generated.
8283         * features/arm/arm-with-vfpv3.c: Re-generated.
8284         * features/i386/amd64-avx-avx512.c: Re-generated.
8285         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8286         * features/i386/amd64-avx.c: Re-generated.
8287         * features/i386/amd64-avx-linux.c: Re-generated.
8288         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8289         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8290         * features/i386/amd64-avx-mpx.c: Re-generated.
8291         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8292         * features/i386/amd64.c: Re-generated.
8293         * features/i386/amd64-linux.c: Re-generated.
8294         * features/i386/amd64-mpx.c: Re-generated.
8295         * features/i386/amd64-mpx-linux.c: Re-generated.
8296         * features/i386/i386-avx-avx512.c: Re-generated.
8297         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8298         * features/i386/i386-avx.c: Re-generated.
8299         * features/i386/i386-avx-linux.c: Re-generated.
8300         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8301         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8302         * features/i386/i386-avx-mpx.c: Re-generated.
8303         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8304         * features/i386/i386.c: Re-generated.
8305         * features/i386/i386-linux.c: Re-generated.
8306         * features/i386/i386-mmx.c: Re-generated.
8307         * features/i386/i386-mmx-linux.c: Re-generated.
8308         * features/i386/i386-mpx.c: Re-generated.
8309         * features/i386/i386-mpx-linux.c: Re-generated.
8310         * features/i386/x32-avx-avx512.c: Re-generated.
8311         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8312         * features/i386/x32-avx.c: Re-generated.
8313         * features/i386/x32-avx-linux.c: Re-generated.
8314         * features/i386/x32.c: Re-generated.
8315         * features/i386/x32-linux.c: Re-generated.
8316         * features/microblaze.c: Re-generated.
8317         * features/microblaze-with-stack-protect.c: Re-generated.
8318         * features/mips64-dsp-linux.c: Re-generated.
8319         * features/mips64-linux.c: Re-generated.
8320         * features/mips-dsp-linux.c: Re-generated.
8321         * features/mips-linux.c: Re-generated.
8322         * features/nds32.c: Re-generated.
8323         * features/nios2.c: Re-generated.
8324         * features/nios2-linux.c: Re-generated.
8325         * features/rs6000/powerpc-32.c: Re-generated.
8326         * features/rs6000/powerpc-32l.c: Re-generated.
8327         * features/rs6000/powerpc-403.c: Re-generated.
8328         * features/rs6000/powerpc-403gc.c : Re-generated.
8329         * features/rs6000/powerpc-405.c: Re-generated.
8330         * features/rs6000/powerpc-505.c: Re-generated.
8331         * features/rs6000/powerpc-601.c: Re-generated.
8332         * features/rs6000/powerpc-602.c: Re-generated.
8333         * features/rs6000/powerpc-603.c: Re-generated.
8334         * features/rs6000/powerpc-604.c: Re-generated.
8335         * features/rs6000/powerpc-64.c: Re-generated.
8336         * features/rs6000/powerpc-64l.c: Re-generated.
8337         * features/rs6000/powerpc-7400.c: Re-generated.
8338         * features/rs6000/powerpc-750.c: Re-generated.
8339         * features/rs6000/powerpc-860.c: Re-generated.
8340         * features/rs6000/powerpc-altivec32.c: Re-generated.
8341         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8342         * features/rs6000/powerpc-altivec64.c: Re-generated.
8343         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8344         * features/rs6000/powerpc-cell32l.c: Re-generated.
8345         * features/rs6000/powerpc-cell64l.c: Re-generated.
8346         * features/rs6000/powerpc-e500.c: Re-generated.
8347         * features/rs6000/powerpc-e500l.c: Re-generated.
8348         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8349         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8350         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8351         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8352         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8353         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8354         * features/rs6000/powerpc-vsx32.c: Re-generated.
8355         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8356         * features/rs6000/powerpc-vsx64.c: Re-generated.
8357         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8358         * features/rs6000/rs6000.c: Re-generated.
8359         * features/s390-linux32.c: Re-generated.
8360         * features/s390-linux32v1.c: Re-generated.
8361         * features/s390-linux32v2.c: Re-generated.
8362         * features/s390-linux64.c: Re-generated.
8363         * features/s390-linux64v1.c: Re-generated.
8364         * features/s390-linux64v2.c: Re-generated.
8365         * features/s390-te-linux64.c: Re-generated.
8366         * features/s390-tevx-linux64.c: Re-generated.
8367         * features/s390-vx-linux64.c: Re-generated.
8368         * features/s390x-linux64.c: Re-generated.
8369         * features/s390x-linux64v1.c: Re-generated.
8370         * features/s390x-linux64v2.c: Re-generated.
8371         * features/s390x-te-linux64.c: Re-generated.
8372         * features/s390x-tevx-linux64.c: Re-generated.
8373         * features/s390x-vx-linux64.c: Re-generated.
8374         * features/sparc/sparc32-solaris.c: Re-generated.
8375         * features/sparc/sparc64-solaris.c: Re-generated.
8376         * features/tic6x-c62x.c: Re-generated.
8377         * features/tic6x-c62x-linux.c: Re-generated.
8378         * features/tic6x-c64x.c: Re-generated.
8379         * features/tic6x-c64x-linux.c: Re-generated.
8380         * features/tic6x-c64xp.c: Re-generated.
8381         * features/tic6x-c64xp-linux.c: Re-generated.
8382
8383 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8384
8385         * i386-linux-tdep.c (i386_linux_read_description): New function.
8386         (i386_linux_core_read_description): Call
8387         i386_linux_read_description.
8388         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8389         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8390         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8391         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8392         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8393         * x86-linux-nat.c (x86_linux_read_description): Call
8394         i386_linux_read_description.
8395
8396 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8397
8398         * NEWS: Mention it.
8399         * features/Makefile (%.c: %.xml): Pass the xml file name to
8400         command "maint print c-tdesc".
8401         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8402         name from 'arg'.
8403
8404 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8405
8406         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8407         in-class initialization.
8408         (tdesc_create_feature): Call new instead of XCNEW.
8409         (free_target_description): Ue delete.
8410
8411 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8412
8413         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8414
8415 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8416
8417         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8418         constant.
8419         (amd64_x32_init_abi): Likewise.
8420         * amd64-tdep.h (amd64_init_abi): Update declaration.
8421         (amd64_x32_init_abi): Likewise.
8422
8423 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8424
8425         PR tdep/21717
8426         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8427         condition for FPSCR.
8428         (arm_linux_store_inferior_registers): Likewise.
8429
8430 2017-07-22  Tom Tromey  <tom@tromey.com>
8431
8432         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8433         <syscalls_counts>: Now a std::vector.
8434         (get_catch_syscall_inferior_data): Use "new".
8435         (catch_syscall_inferior_data_cleanup): Use "delete".
8436         (insert_catch_syscall, remove_catch_syscall)
8437         (clear_syscall_counts): Update.
8438
8439 2017-07-22  Tom Tromey  <tom@tromey.com>
8440
8441         * break-catch-syscall.c (syscall_catchpoint)
8442         <syscalls_to_be_caught>: Now a std::vector<int>
8443         (~syscall_catchpoint): Remove.
8444         (insert_catch_syscall, remove_catch_syscall)
8445         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8446         (print_mention_catch_syscall, print_recreate_catch_syscall):
8447         Update.
8448         (create_syscall_event_catchpoint): Change type of "filter"
8449         parameter.
8450         (catch_syscall_split_args): Return a std::vector.
8451         (catch_syscall_command_1, catching_syscall_number_1): Update.
8452
8453 2017-07-22  Tom Tromey  <tom@tromey.com>
8454
8455         * break-catch-throw.c (struct exception_catchpoint)
8456         <exception_rx>: Now a std::string.
8457         (~exception_catchpoint): Remove.
8458         (print_one_detail_exception_catchpoint): Update.
8459         (handle_gnu_v3_exceptions): Change type of except_rx.
8460         (extract_exception_regexp): Return a std::string.
8461         (catch_exception_command_1): Update.
8462
8463 2017-07-22  Tom Tromey  <tom@tromey.com>
8464
8465         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8466         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8467         std::vector.
8468         <catch_all>: Now a bool.
8469         (~signal_catchpoint): Remove.
8470         (signal_catchpoint_insert_location)
8471         (signal_catchpoint_remove_location)
8472         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8473         (signal_catchpoint_print_mention)
8474         (signal_catchpoint_print_recreate)
8475         (signal_catchpoint_explains_signal): Update.
8476         (create_signal_catchpoint): Change type of "filter" and
8477         "catch_all".
8478         (catch_signal_split_args): Return a std::vector.  Change type of
8479         "catch_all".
8480         (catch_signal_command): Update.
8481
8482 2017-07-20  Pedro Alves  <palves@redhat.com>
8483
8484         * ada-lang.c (ada_language_defn): Make extern.
8485         (_initialize_ada_language): Remove add_language call.
8486         * c-lang.c (c_language_defn, cplus_language_defn)
8487         (asm_language_defn, minimal_language_defn): Make extern.
8488         (_initialize_c_language): Delete.
8489         * completer.c (compare_cstrings): Delete, moved to utils.h.
8490         * d-lang.c (d_language_defn): Make extern.
8491         (_initialize_d_language): Remove add_language calls.
8492         * defs.h (enum language): Add comment.
8493         * f-lang.c (f_language_defn): Make extern.
8494         (_initialize_f_language): Remove add_language call.
8495         * go-lang.c (go_language_defn): Make extern.
8496         (_initialize_go_language): Remove add_language call.
8497         * language.c: Include <algorithm>.
8498         (languages): Redefine as const array.
8499         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8500         (set_language_command): Handle "local".  Use for-range loop.
8501         (set_language): Remove loop.
8502         (language_enum): Rewrite.
8503         (language_def, language_str): Remove loops.
8504         (add_language): Delete.
8505         (add_set_language_command): New, based on add_languages.
8506         (skip_language_trampoline): Adjust.
8507         (local_language_defn): Delete.
8508         (language_gdbarch_post_init): Adjust.
8509         (_initialize_language): Remove add_language calls.  Call
8510         add_set_language_command.
8511         * language.h (add_language): Delete.
8512         (auto_language_defn)
8513         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8514         (asm_language_defn, c_language_defn, cplus_language_defn)
8515         (d_language_defn, f_language_defn, go_language_defn)
8516         (m2_language_defn, objc_language_defn, opencl_language_defn)
8517         (pascal_language_defn, rust_language_defn): Declare.
8518         * m2-lang.c (m2_language_defn): Make extern.
8519         (_initialize_m2_language): Remove add_language call.
8520         * objc-lang.c (objc_language_defn): Make extern.
8521         (_initialize_objc_language): Remove add_language call.
8522         * opencl-lang.c (opencl_language_defn): Make extern.
8523         (_initialize_opencl_language): Remove add_language call.
8524         * p-lang.c (pascal_language_defn): Make extern.
8525         (_initialize_pascal_language): Delete.
8526         * rust-lang.c (rust_language_defn): Make extern.
8527         (_initialize_rust_language): Delete.
8528         * utils.h (compare_cstrings): New static inline function.
8529
8530 2017-07-20  Pedro Alves  <palves@redhat.com>
8531
8532         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8533         (get_var_value): Constify parameters.
8534         (get_int_var_value): Change prototype.
8535         (to_fixed_range_type): Adjust.
8536         * ada-lang.h (get_int_var_value): Change prototype.
8537
8538 2017-07-20  Pedro Alves  <palves@redhat.com>
8539
8540         * dwarf2read.c (dw2_lookup_symbol): Use
8541         SYMBOL_MATCHES_SEARCH_NAME.
8542         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8543
8544 2017-07-20  Pedro Alves  <palves@redhat.com>
8545
8546         * block.c (block_iter_name_step, block_iter_name_first)
8547         (block_iter_name_next): Delete.
8548         (block_lookup_symbol_primary): Adjust to use
8549         dict_iter_match_first/dict_iter_match_next.
8550         * block.h (block_iter_name_first, block_iter_name_next): Delete
8551         declarations.
8552         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8553         dict_iter_match_first/dict_iter_match_next.
8554
8555 2017-07-20  Pedro Alves  <palves@redhat.com>
8556
8557         * cp-support.c (cp_find_first_component_aux): Add missing case for
8558         end of string.
8559
8560 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8561
8562         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8563         of dwo_cu's dwo_file.
8564
8565 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8566
8567         * remote.c (store_registers_using_G): Remove one line comment.
8568
8569 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8570
8571         * regcache.c (regcache_cpy): Simplify it.
8572         (regcache::cpy_no_passthrough): Remove it.
8573         * regcache.h (cpy_no_passthrough): Remove it.
8574         (regcache_dup, regcache_cpy): Update comments.
8575
8576 2017-07-18  Pedro Alves  <palves@redhat.com>
8577
8578         * remote-sim.c (sim_command_completer): Adjust to work with a
8579         completion_tracker instead of a VEC.
8580
8581 2017-07-17  Pedro Alves  <palves@redhat.com>
8582
8583         * completer.c (complete_source_filenames): New function.
8584         (complete_address_and_linespec_locations): New function.
8585         (location_completer): Use complete_address_and_linespec_locations.
8586         (completion_tracker::build_completion_result): Honor the tracker's
8587         request to suppress append.
8588         * completer.h (completion_tracker::suppress_append_ws)
8589         (completion_tracker::set_suppress_append_ws): New methods.
8590         (completion_tracker::m_suppress_append_ws): New field.
8591         (complete_source_filenames): New declaration.
8592         * linespec.c (linespec_complete_what): New.
8593         (struct ls_parser) <complete_what, completion_word,
8594         completion_quote_char, completion_quote_end, completion_tracker>:
8595         New fields.
8596         (string_find_incomplete_keyword_at_end): New.
8597         (linespec_lexer_lex_string): Record quote char.  If in completion
8598         mode, don't throw.
8599         (linespec_lexer_consume_token): Advance the completion word point.
8600         (linespec_lexer_peek_token): Save/restore completion info.
8601         (save_stream_and_consume_token): New.
8602         (set_completion_after_number): New.
8603         (linespec_parse_basic): Set what to complete next depending on
8604         token.  Handle function and label completions specially.
8605         (parse_linespec): Disable objc shortcut in completion mode.  Set
8606         what to complete next depending on token type.  Skip keyword if in
8607         completion mode.
8608         (complete_linespec_component, linespec_complete): New.
8609         * linespec.h (linespec_complete): Declare.
8610
8611 2017-07-17  Pedro Alves  <palves@redhat.com>
8612
8613         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8614         Handle 'operator<' / 'operator<<'.
8615
8616 2017-07-17  Pedro Alves  <palves@redhat.com>
8617
8618         * completer.c (collect_explicit_location_matches): Handle
8619         MATCH_LABEL.
8620         (convert_explicit_location_to_linespec): New, factored out from
8621         ...
8622         (convert_explicit_location_to_sals): ... this.
8623         (complete_label): New.
8624         (linespec_complete_label, find_label_symbols_in_block): New.
8625         (find_label_symbols): Add completion_mode parameter and adjust to
8626         call find_label_symbols_in_block.
8627         * linespec.h (linespec_complete_label): Declare.
8628
8629 2017-07-17  Pedro Alves  <palves@redhat.com>
8630
8631         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8632         complete_symbol_mode parameter.
8633         * cli/cli-cmds.c (complete_command): Get the completion result out
8634         of the handle_brkchars tracker if used a custom word point.
8635         * completer.c: Include "linespec.h".
8636         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8637         (advance_to_expression_complete_word_point): New.
8638         (completion_tracker::completes_to_completion_word): New.
8639         (complete_files_symbols): Pass down
8640         complete_symbol_mode::EXPRESSION.
8641         (explicit_options, probe_options): New.
8642         (collect_explicit_location_matches): Complete on the
8643         explictit_loc->foo instead of word.  Use
8644         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8645         keyword and options completions.
8646         (backup_text_ptr): Delete.
8647         (skip_keyword): New.
8648         (complete_explicit_location): Remove 'word' parameter.  Add
8649         language, quoted_arg_start and quoted_arg_end parameters.
8650         Rewrite, parsing left to right.
8651         (location_completer): Rewrite.
8652         (location_completer_handle_brkchars): New function.
8653         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8654         (enum complete_line_internal_reason): Adjust comments.
8655         (completion_tracker::discard_completions): New.
8656         (completer_handle_brkchars_func_for_completer): Handle
8657         location_completer.
8658         (gdb_custom_word_point_brkchars)
8659         (gdb_org_rl_basic_quote_characters): New.
8660         (gdb_completion_word_break_characters_throw)
8661         (completion_find_completion_word): Handle trackers that use a
8662         custom word point.
8663         (completion_tracker::advance_custom_word_point_by): New.
8664         (completion_tracker::build_completion_result): Don't rely on
8665         readline appending the quote char.
8666         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8667         use a custom word point.
8668         (gdb_rl_attempted_completion_function): Restore
8669         rl_basic_quote_characters.
8670         * completer.h (class completion_tracker): Extend intro comment.
8671         (completion_tracker::set_quote_char)
8672         (completion_tracker::quote_char)
8673         (completion_tracker::set_use_custom_word_point)
8674         (completion_tracker::use_custom_word_point)
8675         (completion_tracker::custom_word_point)
8676         (completion_tracker::set_custom_word_point)
8677         (completion_tracker::advance_custom_word_point_by)
8678         (completion_tracker::completes_to_completion_word)
8679         (completion_tracker::discard_completions): New methods.
8680         (completion_tracker::m_quote_char)
8681         (completion_tracker::m_use_custom_word_point)
8682         (completion_tracker::m_custom_word_point): New fields.
8683         (advance_to_expression_complete_word_point): Declare.
8684         * f-lang.c (f_collect_symbol_completion_matches): Add
8685         complete_symbol_mode parameter.
8686         * language.h (struct language_defn)
8687         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8688         parameter.
8689         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8690         (linespec_complete_function): New function.
8691         (linespec_lexer_lex_keyword): Adjust.
8692         * linespec.h (linespec_keywords, linespec_complete_function): New
8693         declarations.
8694         * location.c (find_end_quote): New function.
8695         (explicit_location_lex_one): Add explicit_completion_info
8696         parameter.  Save quoting info.  Don't throw if being called for
8697         completion.  Don't handle Ada operators here.
8698         (is_cp_operator, skip_op_false_positives, first_of)
8699         (explicit_location_lex_one_function): New function.
8700         (string_to_explicit_location): Replace 'dont_throw' parameter with
8701         an explicit_completion_info pointer parameter.  Handle it.  Don't
8702         use explicit_location_lex_one to lex function names.  Use
8703         explicit_location_lex_one_function instead.
8704         * location.h (struct explicit_completion_info): New.
8705         (string_to_explicit_location): Replace 'dont_throw' parameter with
8706         an explicit_completion_info pointer parameter.
8707         * symtab.c (default_collect_symbol_completion_matches_break_on):
8708         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8709         (default_collect_symbol_completion_matches)
8710         (collect_symbol_completion_matches): Add complete_symbol_mode
8711         parameter.
8712         (collect_symbol_completion_matches_type): Pass down
8713         complete_symbol_mode::EXPRESSION.
8714         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8715         parameter.  Handle LINESPEC mode.
8716         * symtab.h (complete_symbol_mode): New.
8717         (default_collect_symbol_completion_matches_break_on)
8718         (default_collect_symbol_completion_matches)
8719         (collect_symbol_completion_matches)
8720         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8721         parameter.
8722
8723 2017-07-17  Pedro Alves  <palves@redhat.com>
8724
8725         * utils.c (enum class strncmp_iw_mode): New.
8726         (strcmp_iw): Rename to ...
8727         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8728         parameters.  Handle them.
8729         (strncmp_iw): New.
8730         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8731         * utils.h (strncmp_iw): Declare.
8732         (strcmp_iw): Move describing comments here.
8733
8734 2017-07-17  Pedro Alves  <palves@redhat.com>
8735
8736         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8737         CP_OPERATOR_STR.
8738         * c-typeprint.c (is_type_conversion_operator): Use
8739         CP_OPERATOR_STR.
8740         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8741         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8742         CP_OPERATOR_LEN.
8743         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8744         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8745         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8746         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8747         CP_OPERATOR_STR.
8748         * location.c: Include "cp-support.h".
8749         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8750         CP_OPERATOR_STR.
8751         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8752         CP_OPERATOR_LEN.
8753
8754 2017-07-17  Pedro Alves  <palves@redhat.com>
8755
8756         * cli/cli-cmds.c (complete_command): Use a completion tracker
8757         along with completion_find_completion_word for handle_brkchars
8758         phase.
8759         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8760         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8761         (struct gdb_rl_completion_word_info): New.
8762         (gdb_rl_find_completion_word): New.
8763         (completion_find_completion_word): New.
8764         * completer.h (completion_find_completion_word): Declare.
8765
8766 2017-07-17  Pedro Alves  <palves@redhat.com>
8767
8768         * ada-lang.c (symbol_completion_match): Adjust comments.
8769         (symbol_completion_add): Replace vector parameter with
8770         completion_tracker parameter.  Use it.
8771         (ada_make_symbol_completion_list): Rename to...
8772         (ada_collect_symbol_completion_matches): ... this.  Add
8773         completion_tracker parameter and use it.
8774         (ada_language_defn): Adjust.
8775         * break-catch-syscall.c (catch_syscall_completer): Adjust
8776         prototype and work with completion_tracker instead of VEC.
8777         * breakpoint.c (condition_completer): Adjust prototype and work
8778         with completion_tracker instead of VEC.
8779         * c-lang.c (c_language_defn, cplus_language_defn)
8780         (asm_language_defn, minimal_language_defn): Adjust to renames.
8781         * cli/cli-cmds.c (complete_command): Rework using
8782         completion_tracker.  Catch exceptions when completing.
8783         * cli/cli-decode.c (integer_unlimited_completer)
8784         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8785         with completion_tracker instead of VEC.
8786         * command.h (struct completion_tracker): Forward declare.
8787         (completer_ftype, completer_handle_brkchars_ftype): Change
8788         types.
8789         (complete_on_cmdlist, complete_on_enum): Adjust.
8790         * completer.c: Include <algorithm>.
8791         (struct gdb_completer_state): New.
8792         (current_completion): New global.
8793         (readline_line_completion_function): Delete.
8794         (noop_completer, filename_completer)
8795         (filename_completer_handle_brkchars, complete_files_symbols)
8796         (linespec_location_completer): Adjust to work with a
8797         completion_tracker instead of a VEC.
8798         (string_or_empty): New.
8799         (collect_explicit_location_matches): Adjust to work with a
8800         completion_tracker instead of a VEC.
8801         (explicit_location_completer): Rename to ...
8802         (complete_explicit_location): ... this and adjust to work with a
8803         completion_tracker instead of a VEC.
8804         (location_completer): Adjust to work with a completion_tracker
8805         instead of a VEC.
8806         (add_struct_fields): Adjust to work with a completion_list instead
8807         of VEC.
8808         (expression_completer): Rename to ...
8809         (complete_expression): ... this and adjust to work with a
8810         completion_tracker instead of a VEC.  Use complete_files_symbols.
8811         (expression_completer): Reimplement on top of complete_expression.
8812         (symbol_completer): Adjust to work with a completion_tracker
8813         instead of a VEC.
8814         (enum complete_line_internal_reason): Add describing comments.
8815         (complete_line_internal_normal_command): Adjust to work with a
8816         completion_tracker instead of a VEC.
8817         (complete_line_internal): Rename to ...
8818         (complete_line_internal_1): ... this and adjust to work with a
8819         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8820         handle_brkchars phase.
8821         (new_completion_tracker): Delete.
8822         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8823         complete_line_internal_1.
8824         (free_completion_tracker): Delete.
8825         (INITIAL_COMPLETION_HTAB_SIZE): New.
8826         (completion_tracker::completion_tracker)
8827         (completion_tracker::~completion_tracker): New.
8828         (maybe_add_completion): Delete.
8829         (completion_tracker::maybe_add_completion)
8830         (completion_tracker::add_completion)
8831         (completion_tracker::add_completions): New.
8832         (throw_max_completions_reached_error): Delete.
8833         (complete_line): Adjust to work with a completion_tracker instead
8834         of a VEC.  Don't create a completion_tracker_t or check for max
8835         completions here.
8836         (command_completer, command_completer_handle_brkchars)
8837         (signal_completer, reg_or_group_completer_1)
8838         (reg_or_group_completer, default_completer_handle_brkchars):
8839         Adjust to work with a completion_tracker.
8840         (gdb_completion_word_break_characters_throw): New.
8841         (gdb_completion_word_break_characters): Reimplement.
8842         (line_completion_function): Delete.
8843         (completion_tracker::recompute_lowest_common_denominator)
8844         (expand_preserving_ws)
8845         (completion_tracker::build_completion_result)
8846         (completion_result::completion_result)
8847         (completion_result::completion_result)
8848         (completion_result::~completion_result)
8849         (completion_result::completion_result)
8850         (completion_result::release_match_list, compare_cstrings)
8851         (completion_result::sort_match_list)
8852         (completion_result::reset_match_list)
8853         (gdb_rl_attempted_completion_function_throw)
8854         (gdb_rl_attempted_completion_function): New.
8855         * completer.h (completion_list, struct completion_result)
8856         (class completion_tracker): New.
8857         (complete_line): Add completion_tracker parameter.
8858         (readline_line_completion_function): Delete.
8859         (gdb_rl_attempted_completion_function): New.
8860         (noop_completer, filename_completer, expression_completer)
8861         (location_completer, symbol_completer, command_completer)
8862         (signal_completer, reg_or_group_completer): Update prototypes.
8863         (completion_tracker_t, new_completion_tracker)
8864         (make_cleanup_free_completion_tracker): Delete.
8865         (enum maybe_add_completion_enum): Delete.
8866         (maybe_add_completion): Delete.
8867         (throw_max_completions_reached_error): Delete.
8868         * corefile.c (complete_set_gnutarget): Adjust to work with a
8869         completion_tracker instead of a VEC.
8870         * cp-abi.c (cp_abi_completer): Adjust to work with a
8871         completion_tracker instead of a VEC.
8872         * d-lang.c (d_language_defn): Adjust.
8873         * disasm.c (disassembler_options_completer): Adjust to work with a
8874         completion_tracker instead of a VEC.
8875         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8876         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8877         with a completion_tracker instead of a VEC.
8878         (f_language_defn): Adjust.
8879         * go-lang.c (go_language_defn): Adjust.
8880         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8881         Adjust to work with a completion_tracker instead of a VEC.
8882         * infrun.c (handle_completer): Likewise.
8883         * interps.c (interpreter_completer): Likewise.
8884         * interps.h (interpreter_completer): Likewise.
8885         * language.c (unknown_language_defn, auto_language_defn)
8886         (local_language_defn): Adjust.
8887         * language.h (language_defn::la_make_symbol_completion_list):
8888         Rename to ...
8889         (language_defn::la_collect_symbol_completion_matches): ... this
8890         and adjust to work with a completion_tracker instead of a VEC.
8891         * m2-lang.c (m2_language_defn): Adjust.
8892         * objc-lang.c (objc_language_defn): Adjust.
8893         * opencl-lang.c (opencl_language_defn): Adjust.
8894         * p-lang.c (pascal_language_defn): Adjust.
8895         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8896         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8897         with a completion_tracker.
8898         * rust-lang.c (rust_language_defn): Adjust.
8899         * symtab.c (free_completion_list, do_free_completion_list)
8900         (return_val, completion_tracker): Delete.
8901         (completion_list_add_name, completion_list_add_symbol)
8902         (completion_list_add_msymbol, completion_list_objc_symbol)
8903         (completion_list_add_fields, add_symtab_completions): Add
8904         completion_tracker parameter and use it.
8905         (default_make_symbol_completion_list_break_on_1): Rename to...
8906         (default_collect_symbol_completion_matches_break_on): ... this.
8907         Add completion_tracker parameter and use it instead of allocating
8908         a completion tracker here.
8909         (default_make_symbol_completion_list_break_on): Delete old
8910         implementation.
8911         (default_make_symbol_completion_list): Delete.
8912         (default_collect_symbol_completion_matches): New.
8913         (make_symbol_completion_list): Delete.
8914         (collect_symbol_completion_matches): New.
8915         (make_symbol_completion_type): Rename to ...
8916         (collect_symbol_completion_matches_type): ... this.  Add
8917         completion_tracker parameter and use it instead of VEC.
8918         (make_file_symbol_completion_list_1): Rename to...
8919         (collect_file_symbol_completion_matches): ... this.  Add
8920         completion_tracker parameter and use it instead of VEC.
8921         (make_file_symbol_completion_list): Delete.
8922         (add_filename_to_list): Use completion_list instead of a VEC.
8923         (add_partial_filename_data::list): Now a completion_list.
8924         (make_source_files_completion_list): Work with a completion_list
8925         instead of a VEC.
8926         * symtab.h: Include "completer.h".
8927         (default_make_symbol_completion_list_break_on)
8928         (default_make_symbol_completion_list, make_symbol_completion_list)
8929         (make_symbol_completion_type, make_file_symbol_completion_list)
8930         (make_source_files_completion_list): Delete.
8931         (default_collect_symbol_completion_matches_break_on)
8932         (default_collect_symbol_completion_matches)
8933         (collect_symbol_completion_matches)
8934         (collect_symbol_completion_matches_type)
8935         (collect_file_symbol_completion_matches)
8936         (make_source_files_completion_list): New.
8937         * top.c (init_main): Don't install a rl_completion_entry_function
8938         hook.  Install a rl_attempted_completion_function hook instead.
8939         * tui/tui-layout.c (layout_completer): Adjust to work with a
8940         completion_tracker.
8941         * tui/tui-regs.c (tui_reggroup_completer):
8942         * tui/tui-win.c (window_name_completer, focus_completer)
8943         (winheight_completer): Adjust to work with a completion_tracker.
8944         * value.c: Include "completer.h".
8945         (complete_internalvar): Adjust to work with a completion_tracker.
8946         * value.h (complete_internalvar): Likewise.
8947
8948 2017-07-17  Pedro Alves  <palves@redhat.com>
8949
8950         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8951         renames.
8952         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8953         comments to completer_ftype's declaration.
8954         <completer_handle_brkchars>: Change type to
8955         completer_handle_brkchars_ftype.
8956         * command.h (completer_ftype): Add describing comment and give
8957         names to parameters.
8958         (completer_ftype_void): Rename to ...
8959         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8960         (set_cmd_completer_handle_brkchars): Adjust.
8961         * completer.c (filename_completer_handle_brkchars): New function.
8962         (complete_line_internal_normal_command): New function, factored
8963         out from ...
8964         (complete_line_internal): ... here.
8965         (command_completer_handle_brkchars)
8966         (default_completer_handle_brkchars)
8967         (completer_handle_brkchars_func_for_completer): New functions.
8968         * completer.h (set_gdb_completion_word_break_characters): Delete
8969         declaration.
8970         (completer_handle_brkchars_func_for_completer): New declaration.
8971         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8972         completer_handle_brkchars_func_for_completer.
8973
8974 2017-07-17  Pedro Alves  <palves@redhat.com>
8975
8976         * completer.c (symbol_completer): New function, based on
8977         make_symbol_completion_list_fn.
8978         * completer.h (symbol_completer): New declaration.
8979         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8980         * python/py-cmd.c (completers): Adjust.
8981         * symtab.c (make_symbol_completion_list_fn): Delete.
8982         * symtab.h (make_symbol_completion_list_fn): Delete.
8983         * cli/cli-decode.c (add_cmd): Adjust.
8984
8985 2017-07-17  Pedro Alves  <palves@redhat.com>
8986
8987         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8988         * dwarf2read.c: Include "filename-seen-cache.h".
8989         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8990         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8991         * filename-seen-cache.c: New file.
8992         * filename-seen-cache.h: New file.
8993         * symtab.c: Include "filename-seen-cache.h".
8994         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8995         (create_filename_seen_cache, clear_filename_seen_cache)
8996         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8997         to filename-seen-cache.h/filename-seen-cache.c.
8998         (output_source_filename, sources_info)
8999         (maybe_add_partial_symtab_filename)
9000         (make_source_files_completion_list): Adjust to use
9001         filename_seen_cache.
9002
9003 2017-07-17  Pedro Alves  <palves@redhat.com>
9004
9005         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9006         fields.
9007         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9008         dwarf2_debug_sections*)): New.
9009         (dwarf2_per_objfile::dwarf2_per_objfile(const
9010         dwarf2_per_objfile&)): Declare as deleted.
9011         (dwarf2_per_objfile::operator=): Declare as deleted.
9012         (dwarf2_per_objfile::dwarf2_per_objfile)
9013         (dwarf2_per_objfile::~dwarf2_per_objfile)
9014         (dwarf2_per_objfile::free_cached_comp_units): New.
9015         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9016         ctor.  Call dwarf2_per_objfile's ctor manually.
9017         (dwarf2_locate_sections): Deleted/refactored as ...
9018         (dwarf2_per_objfile::locate_sections): ... this new method.
9019         (free_cached_comp_units): Defer to
9020         dwarf2_per_objfile::free_cached_comp_units.
9021         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9022
9023 2017-07-14  Tom Tromey  <tom@tromey.com>
9024
9025         PR rust/21764:
9026         * rust-exp.y (convert_ast_to_expression): Add "want_type"
9027         parameter.
9028         <UNOP_SIZEOF>: Split into separate case.
9029         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
9030
9031 2017-07-14  Tom Tromey  <tom@tromey.com>
9032
9033         PR rust/21763:
9034         * symtab.c (symbol_matches_domain): Add language_rust to special
9035         case.
9036         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9037         treat LOC_TYPEDEF symbols as variables.
9038
9039 2017-07-14  Pedro Alves  <palves@redhat.com>
9040
9041         * symtab.c (make_file_symbol_completion_list_1): Iterate over
9042         symtabs matching all symtabs with SRCFILE as file name instead of
9043         only considering the first hit, with lookup_symtab.
9044
9045 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9046
9047         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9048         operator_name parameters.
9049         (gen_expr): Update function call.
9050
9051 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9052
9053         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9054         parameter.
9055         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9056         Likewise.
9057         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9058         parameter, use agent_expr::gdbarch instead, update function
9059         calls.
9060         (locexpr_tracepoint_var_ref): Likewise.
9061         (loclist_tracepoint_var_ref): Likewise.
9062         * ax-gdb.c (gen_trace_static_fields): Likewise.
9063         (gen_traced_pop): Likewise.
9064         (gen_frame_args_address): Likewise.
9065         (gen_frame_locals_address): Likewise.
9066         (gen_var_ref): Likewise.
9067         (gen_struct_ref_recursive): Likewise.
9068         (gen_static_field): Likewise.
9069         (gen_maybe_namespace_elt): Likewise.
9070         (gen_expr): Likewise.
9071         (gen_trace_for_var): Likewise.
9072         (gen_trace_for_expr): Likewise.
9073         (gen_trace_for_return_address): Likewise.
9074
9075 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9078         parameter.
9079         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9080
9081 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9082
9083         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9084         from ax, update calls.
9085         (gen_usual_arithmetic): Likewise.
9086         (gen_integral_promotions): Likewise.
9087         (gen_bitfield_ref): Likewise.
9088         (gen_primitive_field): Likewise.
9089         (gen_struct_ref_recursive): Likewise.
9090         (gen_struct_ref): Likewise.
9091         (gen_maybe_namespace_elt): Likewise.
9092         (gen_struct_elt_for_reference): Likewise.
9093         (gen_namespace_elt): Likewise.
9094         (gen_aggregate_elt_ref): Likewise.
9095         (gen_expr): Get gdbarch from ax, update calls.
9096         (gen_expr_binop_rest): Likewise.
9097
9098 2017-07-13  Pedro Alves  <palves@redhat.com>
9099
9100         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9101         as default tdesc.
9102         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9103         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9104         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9105         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9106         tdep.
9107         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9108         Get final tdesc from the tdep.
9109         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9110         default tdesc.
9111         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9112         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9113         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9114         Use it as default tdesc.
9115         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9116         down to amd_init_abi.  No longer handle fallback tdesc here.
9117         * amd64-tdep.h (tdesc_x32): Declare.
9118         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9119         parameter.
9120         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9121         as default tdesc.
9122
9123 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9124
9125         * s390-linux-tdep.c (s390_process_record): Add support for
9126         instructions new in arch12.
9127
9128 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9129
9130         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9131         PT_GETFSBASE and PT_GETGSBASE.
9132         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9133         PT_SETGSBASE.
9134
9135 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9136
9137         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9138         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9139         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9140         those rules.
9141         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9142         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9143         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9144         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9145         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9146         * features/i386/amd64.xml: Add 64bit-segments.xml.
9147         * features/i386/amd64-avx-avx512.c: Regenerated.
9148         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9149         * features/i386/amd64-avx-mpx.c: Regenerated.
9150         * features/i386/amd64-avx.c: Regenerated.
9151         * features/i386/amd64-mpx.c: Regenerated.
9152         * features/i386/amd64.c: Regenerated.
9153         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9154         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9155         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9156         * regformats/i386/amd64-avx.dat: Regenerated.
9157         * regformats/i386/amd64-mpx.dat: Regenerated.
9158         * regformats/i386/amd64.dat: Regenerated.
9159
9160 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9161
9162         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9163         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9164
9165 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9166
9167         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9168         unsetenv.
9169         * gnulib/aclocal.m4: Regenerate.
9170         * gnulib/config.in: Regenerate.
9171         * gnulib/configure: Regenerate.
9172         * gnulib/import/Makefile.am: Regenerate.
9173         * gnulib/import/Makefile.in: Regenerate.
9174         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9175         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9176         * gnulib/import/m4/environ.m4: New file.
9177         * gnulib/import/m4/setenv.m4: New file.
9178         * gnulib/import/setenv.c: New file.
9179         * gnulib/import/unsetenv.c: New file.
9180
9181 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9182
9183         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9184         address when op is DW_OP_addr.
9185
9186 2017-07-09  Tom Tromey  <tom@tromey.com>
9187
9188         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9189         check and apply to outer type.
9190
9191 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9192
9193         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9194         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9195         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9196         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9197
9198 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9199
9200         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9201
9202 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9203
9204         * corelow.c (get_core_siginfo): Remove.
9205         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9206         instead of get_core_siginfo.
9207         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9208         * gdbarch.h: Re-generate.
9209         * gdbarch.c: Re-generate.
9210         * linux-tdep.c (linux_core_xfer_siginfo): New.
9211         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9212
9213 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9214
9215         * corelow.c (thread_section_name): Move to ...
9216         * gdbcore.h (thread_section_name): ... here.
9217
9218 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9219
9220         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9221         (struct siginfo32): New.
9222         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9223         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9224         via ptrace(PT_LWPINFO).
9225
9226 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9227
9228         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9229         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9230         (fbsd_get_siginfo_type): New.
9231         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9232         (_initialize_fbsd_tdep): New.
9233
9234 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9235
9236         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9237         a singular dwo_unit*) to support multiple CUs in the same way that
9238         multiple TUs are supported.
9239         (create_cus_hash_table): Replace create_dwo_cu with a function for
9240         parsing multiple CUs from a DWO file.
9241         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9242         create_dwo_cu.
9243         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9244         htab_find, rather than comparing the signature to a singleton CU in
9245         the dwo_file.
9246
9247 2017-07-06  Pedro Alves  <palves@redhat.com>
9248
9249         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9250
9251 2017-07-04  Pedro Alves  <palves@redhat.com>
9252
9253         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9254         * gdbtypes.h (TYPE_STATIC): Delete.
9255         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9256         is_synchronized, is_native>: Delete.
9257         <dummy>: Bump.
9258         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9259         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9260         (TYPE_FN_FIELD_ABSTRACT): Delete.
9261
9262 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9263
9264         * buffer.h (buffer_finish): Fix spelling mistakes.
9265
9266 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9267
9268         * .dir-locals.el: Automatically switch to C-style comments in
9269         versions of Emacs that support the feature.
9270
9271 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9272             Pedro Alves  <palves@redhat.com>
9273
9274         PR cli/21688
9275         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9276         (process_next_line): New variable 'inline_cmd'.
9277         Adjust 'if' clauses for "python", "compile" and "guile" to use
9278         'command_name_equals' and check for '!inline_cmd'.
9279
9280 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9281
9282         PR cli/21688
9283         * cli/cli-script.c (command_name_equals_not_inline): New function.
9284         (process_next_line): Adjust 'if' clauses for "python", "compile"
9285         and "guile" to use command_name_equals_not_inline.
9286
9287 2017-06-29  Pedro Alves  <palves@redhat.com>
9288
9289         * completer.c (expression_completer): Call
9290         linespec_location_completer instead of location_completer.
9291
9292 2017-06-29  Pedro Alves  <palves@redhat.com>
9293
9294         * completer.c (expression_completer): Remove code that recomputes
9295         'text' from 'word'.
9296
9297 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9298
9299         * regformats/regdat.sh: Generate code with
9300         "ifndef IN_PROCESS_AGENT".
9301
9302 2017-06-28  Pedro Alves  <palves@redhat.com>
9303
9304         * command.h: Include "common/scoped_restore.h".
9305
9306 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9307
9308         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9309         instead of obstack_grow.
9310
9311 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9312
9313         PR gdb/21337
9314         * symfile.c (reread_symbols): Call objfiles_changed just before
9315         read_symbols.
9316
9317 2017-06-27  Pedro Alves  <palves@redhat.com>
9318
9319         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9320         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9321         (completion_list_add_symbol, completion_list_add_msymbol):
9322         ... these new functions.
9323         (add_symtab_completions)
9324         (default_make_symbol_completion_list_break_on_1): Adjust.
9325
9326 2017-06-27  Pedro Alves  <palves@redhat.com>
9327
9328         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9329         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9330         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9331         dtor.
9332         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9333         'storage_obstack' field an auto_obstack.  In-class initialize all
9334         non-bitfield fields.  Make minsyms_read bool.
9335         * symfile.c (read_symbols): Adjust.
9336
9337 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9338
9339         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9340         (gdbsim_store_register): Likewise.
9341
9342 2017-06-27  Pedro Alves  <palves@redhat.com>
9343
9344         * c-exp.y (name_obstack): Now an auto_obstack.
9345         (yylex): Use auto_obstack::clear.
9346         (c_parse): Use auto_obstack::clear instead of reinitializing and
9347         freeing the obstack.
9348         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9349         * d-exp.y (name_obstack): Now an auto_obstack.
9350         (yylex): Use auto_obstack::clear.
9351         (d_parse): Use auto_obstack::clear instead of reinitializing and
9352         freeing the obstack.
9353         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9354         auto_obstack.
9355         * dwarf2read.c (create_addrmap_from_index)
9356         (dwarf2_build_psymtabs_hard)
9357         (update_enumeration_type_from_children): Likewise.
9358         * gdb_obstack.h (auto_obstack): New type.
9359         * go-exp.y (name_obstack): Now an auto_obstack.
9360         (build_packaged_name): Use auto_obstack::clear.
9361         (go_parse): Use auto_obstack::clear instead of reinitializing and
9362         freeing the obstack.
9363         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9364         auto_obstack.
9365         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9366         * rust-exp.y (work_obstack): Now an auto_obstack.
9367         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9368         reinitializing and freeing the obstack.
9369         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9370         (host_char_to_target): Use auto_obstack.
9371         * utils.h (make_cleanup_obstack_free): Delete declaration.
9372         * valprint.c (generic_emit_char, generic_printstr): Use
9373         auto_obstack.
9374
9375 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9376
9377         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9378         thread.
9379         (darwin_init_thread_list): Don't update dummy thread.
9380         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9381
9382 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9383
9384         * record-full.c (netorder16): Remove.
9385
9386 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9387
9388         * common/diagnostics.h: Define macros for GCC.
9389         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9390         * common/vec.h: Include diagnostics.h.
9391         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9392         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9393         warning.
9394
9395 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9396
9397         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9398         New macro.
9399         * ada-lex.l: Ignore deprecated register warnings.
9400
9401 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9402
9403         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9404         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9405
9406 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9407
9408         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9409         its own line.
9410
9411 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9412
9413         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9414
9415 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9416
9417         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9418         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9419         (xtensa_register_read_masked): Likewise.
9420
9421 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9422
9423         * common/environ.c (gdb_environ::unset): Update comment.
9424
9425 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9426
9427         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9428         registers.
9429
9430 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9431
9432         * record-full.c (record_full_exec_insn): Use byte_vector.
9433
9434 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9435
9436         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9437         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9438
9439 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9440
9441         * remote.c (cached_reg): Move from here...
9442         * regcache.h (cached_reg): ...to here.
9443         * python/py-unwind.c (struct reg_info): Remove.
9444         (cached_frame_info): Use cached_reg_t.
9445         (pyuw_prev_register): Likewise.
9446         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9447         (pyuw_dealloc_cache): Free all registers.
9448
9449 2017-06-22  Pedro Alves  <palves@redhat.com>
9450             Simon Marchi  <simon.marchi@ericsson.com>
9451
9452         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9453         warning.
9454         * common/diagnostics.h: New file.
9455
9456 2017-06-22  Pedro Alves  <palves@redhat.com>
9457
9458         * common/agent.h: Add include guards.
9459
9460 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9461
9462         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9463         talk about addressable units instead of bytes.
9464
9465 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9466
9467         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9468         of '::const_iterator'.
9469
9470 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9471
9472         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9473         'unittests/environ-selftests.c'.
9474         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9475         * charset.c (find_charset_names): Declare object 'iconv_env'.
9476         Update code to use 'iconv_env' object.  Remove call to
9477         'free_environ'.
9478         * common/environ.c: Include <utility>.
9479         (make_environ): Delete function.
9480         (free_environ): Delete function.
9481         (gdb_environ::clear): New function.
9482         (gdb_environ::operator=): New function.
9483         (gdb_environ::get): Likewise.
9484         (environ_vector): Delete function.
9485         (set_in_environ): Delete function.
9486         (gdb_environ::set): New function.
9487         (unset_in_environ): Delete function.
9488         (gdb_environ::unset): New function.
9489         (gdb_environ::envp): Likewise.
9490         * common/environ.h: Include <vector>.
9491         (struct gdb_environ): Delete; transform into...
9492         (class gdb_environ): ... this class.
9493         (free_environ): Delete prototype.
9494         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9495         environ_vector): Likewise.
9496         * infcmd.c (run_command_1): Update code to call
9497         'envp' from 'gdb_environ' class.
9498         (environment_info): Update code to call methods from 'gdb_environ'
9499         class.
9500         (unset_environment_command): Likewise.
9501         (path_info): Likewise.
9502         (path_command): Likewise.
9503         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9504         (inferior::inferior): Initialize 'environment' using the host's
9505         information.
9506         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9507         Include "environ.h".
9508         (class inferior) <environment>: Change type from 'struct
9509         gdb_environ' to 'gdb_environ'.
9510         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9511         methods from 'gdb_environ' class.
9512         * solib.c (solib_find_1): Likewise
9513         * unittests/environ-selftests.c: New file.
9514
9515 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9516
9517         * features/i386/i386-linux.xml: Exchange the order of including
9518         32bit-linux.xml and 32bit-sse.xml.
9519         * features/i386/i386-linux.c: Regenerated.
9520
9521 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9522
9523         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9524         Delete copy ctor and assignment operator.
9525         (tdesc_type): Likewise.
9526         (tdesc_feature): Likewise.
9527         (tdesc_free_reg): Remove.
9528         (tdesc_create_reg): Use new.
9529         (tdesc_free_type): Remove.
9530         (tdesc_create_vector): Use new.
9531         (tdesc_create_union): Likewise.
9532         (tdesc_create_flags): Likewise.
9533         (tdesc_create_enum): Likewise.
9534         (tdesc_free_feature): Delete.
9535         (free_target_description): Use delete.
9536
9537 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9538
9539         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9540         registers.
9541
9542 2017-06-19  Pedro Alves  <palves@redhat.com>
9543
9544         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9545         after gdb::unlinker.
9546
9547 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9548
9549         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9550         gdb_environ to access an environment variable.
9551
9552 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9553
9554         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9555         gdb_byte*.
9556
9557 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9558
9559         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9560
9561 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9562
9563         * configure: Re-generate.
9564         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9565
9566 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9567
9568         * configure: Re-generate.
9569         * warning.m4: Pass -Werror to compiler when checking for
9570         supported warning flags.
9571
9572 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9573
9574         * Makefile.in (COMPILE.pre): Add "-x c++".
9575
9576 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9577             Pedro Alves  <palves@redhat.com>
9578             Yao Qi  <yao.qi@linaro.org>
9579
9580         * defs.h (RequireLongest): New.
9581         (extract_integer): Declare function template.
9582         (extract_signed_integer): Remove the declaration, but define it
9583         static inline.
9584         (extract_unsigned_integer): Likewise.
9585         (store_integer): Declare function template.
9586         (store_signed_integer): Remove the declaration, but define it
9587         static inline.
9588         (store_unsigned_integer): Likewise.
9589         * findvar.c (extract_integer): New function template.
9590         (extract_signed_integer): Remove.
9591         (extract_unsigned_integer): Remove.
9592         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9593         instantiations.
9594         (store_integer): New function template.
9595         (store_signed_integer): Remove.
9596         (store_unsigned_integer): Remove.
9597         (store_integer): Explicit instantiations.
9598         * regcache.c (regcache_raw_read_signed): Update.
9599         (regcache::raw_read): New function.
9600         (regcache::raw_read_signed): Remove.
9601         (regcache::raw_read_unsigned): Remove.
9602         (regcache_raw_read_unsigned): Update.
9603         (regcache_raw_write_unsigned): Update.
9604         (regcache::raw_write_signed): Remove.
9605         (regcache::raw_write): New function.
9606         (regcache_cooked_read_signed): Update.
9607         (regcache::raw_write_unsigned): Remove.
9608         (regcache::cooked_read_signed): Remove.
9609         (regcache_cooked_read_unsigned): Update.
9610         (regcache::cooked_read_unsigned): Remove.
9611         (regcache_cooked_write_signed): Update.
9612         (regcache_cooked_write_unsigned): Update.
9613         * regcache.h (regcache) <raw_read_signed>: Remove.
9614         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9615         <raw_read, raw_write>: New.
9616         <cooked_read_signed, cooked_write_signed>: Remove.
9617         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9618         <cooked_read, cooked_write>: New.
9619         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9620         (sh64_pseudo_register_write): Update.
9621
9622 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9623
9624         * arc-tdep.c (arc_disassembler_options): New variable.
9625         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9626         of default_print_insn.
9627         (arc_delayed_print_insn): Set info->section when needed,
9628         use default_print_insn to retrieve a disassembler.
9629
9630 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9631
9632         PR gdb/21574
9633         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9634         to mention $SHELL and startup-with-shell.
9635
9636 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9637
9638         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9639
9640 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9641
9642         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9643         default_print_insn instead of print_insn_aarch64.
9644         * arm-tdep.c (gdb_print_insn_arm): Call
9645         default_print_insn instead of print_insn_big_arm
9646         and print_insn_little_arm.
9647         * i386-tdep.c (i386_print_insn): Call default_print_insn
9648         instead of print_insn_i386.
9649         * ia64-tdep.c (ia64_print_insn): Call
9650         default_print_insn instead of print_insn_ia64.
9651         * mips-tdep.c (gdb_print_insn_mips): Call
9652         default_print_insn instead of print_insn_big_mips
9653         and print_insn_little_mips.
9654         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9655         instead of print_insn_spu.
9656
9657 2017-06-14  Pedro Alves  <palves@redhat.com>
9658
9659         * ada-lang.c: Include "common/byte-vector.h".
9660         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9661         * charset.c (wchar_iterator::iterate): Resize the vector instead
9662         of reserving it.
9663         * common/byte-vector.h: Include "common/def-vector.h".
9664         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9665         * cli/cli-dump.c: Include "common/byte-vector.h".
9666         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9667         * common/byte-vector.h: New file.
9668         * common/def-vector.h: New file.
9669         * common/default-init-alloc.h: New file.
9670         * dwarf2loc.c: Include "common/byte-vector.h".
9671         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9672         instead of reserving it.
9673         * dwarf2read.c: Include "common/byte-vector.h".
9674         (data_buf::m_vec): Now a gdb::byte_vector.
9675         * gdb_regex.c: Include "common/def-vector.h".
9676         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9677         * mi/mi-main.c: Include "common/byte-vector.h".
9678         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9679         * printcmd.c: Include "common/byte-vector.h".
9680         (print_scalar_formatted): Use gdb::byte_vector.
9681         * valprint.c: Include "common/byte-vector.h".
9682         (maybe_negate_by_bytes, print_decimal_chars): Use
9683         gdb::byte_vector.
9684
9685 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9686
9687         * darwin-nat.c: Include "nat/fork-inferior.h".
9688
9689 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9690
9691         * configure.nat: Factor out Darwin bits that are not
9692         architecture-specific.  Add fork-inferior.o.
9693
9694 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9695
9696         * configure.nat: Factor out AIX bits that are not
9697         architecture-specific.  Add fork-inferior.o.
9698
9699 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9700
9701         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9702         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9703         wrappers that just call rw_pieced_value.
9704
9705 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9706
9707         * dwarf2loc.c (write_pieced_value): When writing the data for a
9708         memory piece, use write_memory_with_notification instead of
9709         write_memory.
9710
9711 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9712
9713         * valops.c (read_value_memory): Change embedded_offset to
9714         represent a bit offset instead of a byte offset.
9715         * value.h (read_value_memory): Adjust comment.
9716
9717 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9718
9719         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9720         dest_offset_bits and source_offset_bits.
9721         (write_pieced_value): Likewise.
9722
9723 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9724
9725         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9726         given by DW_OP_bit_piece.
9727         (write_pieced_value): Likewise.
9728
9729 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9730
9731         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9732         some other preparations to the places where sufficient information
9733         is available.
9734         (write_pieced_value): Likewise.
9735
9736 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9737
9738         * dwarf2loc.c (bits_to_bytes): New function.
9739         (read_pieced_value): Fix offset calculations for register pieces
9740         on big-endian targets.
9741         (write_pieced_value): Likewise.
9742
9743 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9744
9745         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9746         (write_pieced_value): Likewise.
9747
9748 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9749
9750         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9751         transfer the source value's least significant bits, instead of its
9752         lowest-addressed ones.  Rename type_len to max_offset.
9753         (read_pieced_value): Mirror above changes to write_pieced_value as
9754         applicable.
9755
9756 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9757
9758         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9759         truncate full bytes from dest_offset_bits before using it as an
9760         offset into the buffer.
9761
9762 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9763
9764         * dwarf2loc.c (write_pieced_value): Include transfer size in
9765         byte-wise check.
9766
9767 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9768
9769         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9770         calculation of this_size.
9771
9772 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9773
9774         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9775         when targeting a bit-field.
9776         (write_pieced_value): Likewise.
9777
9778 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9779
9780         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9781         (allocate_piece_closure): Drop addr_size parameter.
9782         (dwarf2_evaluate_loc_desc_full): Adjust call to
9783         allocate_piece_closure.
9784
9785 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9786
9787         PR gdb/21226
9788         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9789         the LSB end, independent of endianness.
9790
9791 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9792
9793         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9794         size capping.
9795
9796 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9797
9798         * mips-linux-nat.c: Move include features/mips*-linux.c to
9799         mips-linux-tdep.c.
9800         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9801         to mips-linux-tdep.c.
9802         * mips-linux-tdep.c: Include features/mips*-linux.c
9803         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9804         functions.
9805         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9806         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9807         (tdesc_mips64_dsp_linux): Declare.
9808
9809 2017-06-12  Tom Tromey  <tom@tromey.com>
9810
9811         * valprint.h (val_print_type_code_int): Remove.
9812         * valprint.c (generic_val_print_int): Always call
9813         val_print_scalar_formatted.
9814         (val_print_type_code_int): Remove.
9815         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9816         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9817         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9818         * ada-valprint.c (ada_val_print_num): Use
9819         val_print_scalar_formatted.
9820
9821 2017-06-12  Tom Tromey  <tom@tromey.com>
9822
9823         * printcmd.c (print_scalar_formatted): Unify the two switches.
9824         Don't convert scalars to LONGEST.
9825
9826 2017-06-12  Tom Tromey  <tom@tromey.com>
9827
9828         PR exp/16225:
9829         * valprint.h (print_decimal_chars): Update.
9830         * valprint.c (maybe_negate_by_bytes): New function.
9831         (print_decimal_chars): Add "is_signed" argument.
9832         * printcmd.c (print_scalar_formatted): Update.
9833
9834 2017-06-12  Tom Tromey  <tom@tromey.com>
9835
9836         PR exp/16225:
9837         * valprint.h (print_binary_chars, print_hex_chars): Update.
9838         * valprint.c (val_print_type_code_int): Update.
9839         (print_binary_chars): Add "zero_pad" argument.
9840         (emit_octal_digit): New function.
9841         (print_octal_chars): Don't zero-pad.
9842         (print_decimal_chars): Likewise.
9843         (print_hex_chars): Add "zero_pad" argument.
9844         * sh64-tdep.c (sh64_do_fp_register): Update.
9845         * regcache.c (regcache::dump): Update.
9846         * printcmd.c (print_scalar_formatted): Update.
9847         * infcmd.c (default_print_one_register_info): Update.
9848
9849 2017-06-12  Pedro Alves  <palves@redhat.com>
9850             Alan Hayward  <alan.hayward@arm.com>
9851
9852         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9853         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9854         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9855         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9856         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9857
9858 2017-06-12  Pedro Alves  <palves@redhat.com>
9859
9860         * dwarf2read.c (mapped_symtab::data): Now a vector of
9861         symtab_index_entry instead of vector of
9862         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9863         whether an element's name is NULL instead of checking whether the
9864         element itself is NULL.
9865         (find_slot): Change return type.  Adjust.
9866         (hash_expand, , add_index_entry, uniquify_cu_indices)
9867         (write_hash_table): Adjust.
9868
9869 2017-06-12  Pedro Alves  <palves@redhat.com>
9870
9871         * dwarf2read.c (recursively_count_psymbols): New function.
9872         (write_psymtabs_to_index): Call it to compute number of psyms and
9873         pass estimate size of psyms_seen to unordered_set's ctor.
9874
9875 2017-06-12  Pedro Alves  <palves@redhat.com>
9876
9877         * dwarf2read.c (write_hash_table): Check if key already exists
9878         before emplacing.
9879
9880 2017-06-12  Pedro Alves  <palves@redhat.com>
9881
9882         * dwarf2read.c (data_buf::append_space): Rename to...
9883         (data_buf::grow): ... this, and make private.  Adjust all callers.
9884         (data_buf::append_uint): New method.
9885         (add_address_entry, write_one_signatured_type)
9886         (write_psymtabs_to_index): Use it.
9887
9888 2017-06-12  Pedro Alves  <palves@redhat.com>
9889
9890         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9891         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9892         (data_buf::file_write): Call ::fwrite directly.
9893
9894 2017-06-12  Pedro Alves  <palves@redhat.com>
9895
9896         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9897         std::vector::erase.
9898
9899 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9900
9901         Code cleanup: C++ify .gdb_index producer.
9902         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9903         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9904         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9905         (create_strtab, add_string): Remove.
9906         (file_write, data_buf): New.
9907         (struct symtab_index_entry): Use std::vector for cu_indices.
9908         (struct mapped_symtab): Use std::vector for data.
9909         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9910         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9911         Remove.
9912         (find_slot): Change return type.  Update it to the new data structures.
9913         (hash_expand, add_index_entry): Update it to the new data structures.
9914         (offset_type_compare): Remove.
9915         (uniquify_cu_indices): Update it to the new data structures.
9916         (c_str_view, c_str_view_hasher, vector_hasher): New.
9917         (add_indices_to_cpool): Remove.
9918         (write_hash_table): Update it to the new data structures.
9919         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9920         (eq_psymtab_cu_index): Remove.
9921         (psym_index_map): New typedef.
9922         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9923         reference and std::unordered_map for cu_index_htab.
9924         (add_address_entry, add_address_entry_worker, write_address_map)
9925         (write_psymbols): Update it to the new data structures.
9926         (write_obstack): Remove.
9927         (struct signatured_type_index_data): Change types_list to a data_buf
9928         reference and psyms_seen to a std::unordered_set reference.
9929         (write_one_signatured_type, recursively_write_psymbols)
9930         (write_psymtabs_to_index): Update it to the new data structures.
9931
9932 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9933
9934         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9935         separate-debug-file commands.
9936         * symfile.h (separate_debug_file_debug): New global.
9937         * symfile.c (separate_debug_file_debug): New global.
9938         (separate_debug_file_exists, find_separate_debug_file): Add
9939         debug output.
9940         (_initialize_symfile): Add "set debug separate-debug-file"
9941         command.
9942         * build-id.c (build_id_to_debug_bfd,
9943         find_separate_debug_file_by_buildid): Add debug output.
9944
9945 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9946
9947         * gdbarch.sh (displaced_step_free_closure): Remove.
9948         * gdbarch.h, gdbarch.c: Re-generate.
9949         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9950         displaced_step_free_closure.
9951         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9952         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9953         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9954         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9955         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9956         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9957         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9958         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9959         * infrun.c (displaced_step_clear): Call xfree instead of
9960         gdbarch_displaced_step_free_closure.
9961
9962 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9963
9964         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9965         NULL".
9966
9967 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9968
9969         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9970         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9971         (mn10300_push_dummy_call): Likewise.
9972
9973 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9974
9975         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9976
9977 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9978
9979         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9980
9981 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9982
9983         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9984         able to start inferiors using a shell.
9985         (New remote packets): Announce new packet "QStartupWithShell".
9986         * remote.c: Add PACKET_QStartupWithShell.
9987         (extended_remote_create_inferior): Handle new
9988         PACKET_QStartupWithShell.
9989         (remote_protocol_features) <QStartupWithShell>: New entry for
9990         PACKET_QStartupWithShell.
9991         (_initialize_remote): Call "add_packet_config_cmd" for
9992         QStartupShell.
9993
9994 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9995             Pedro Alves  <palves@redhat.com>
9996
9997         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9998         and "nat/fork-inferior.h".
9999         * common/common-inferior.h: New file, with contents from
10000         "gdb/inferior.h".
10001         * commom/common-utils.c: Include "common-utils.h".
10002         (stringify_argv): New function.
10003         * common/common-utils.h (stringify_argv): New prototype.
10004         * configure.nat: Add "fork-inferior.o" as a dependency for
10005         "*linux*", "fbsd*" and "nbsd*" hosts.
10006         * corefile.c (get_exec_file): Update comment.
10007         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10008         instead of "startup_inferior".
10009         (darwin_create_inferior): Call "add_thread_silent" after
10010         "fork_inferior".
10011         * fork-child.c: Cleanup unnecessary includes.
10012         (SHELL_FILE): Move to "common/common-fork-child.c".
10013         (environ): Likewise.
10014         (exec_wrapper): Initialize.
10015         (get_exec_wrapper): New function.
10016         (breakup_args): Move to "common/common-fork-child.c"; rename to
10017         "breakup_args_for_exec".
10018         (escape_bang_in_quoted_argument): Move to
10019         "common/common-fork-child.c".
10020         (saved_ui): New variable.
10021         (prefork_hook): New function.
10022         (postfork_hook): Likewise.
10023         (postfork_child_hook): Likewise.
10024         (gdb_startup_inferior): Likewise.
10025         (fork_inferior): Move to "common/common-fork-child.c".  Update
10026         function to support gdbserver.
10027         (startup_inferior): Likewise.
10028         * gdbcore.h (get_exec_file): Remove declaration.
10029         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10030         instead of "startup_inferior".  Call "add_thread_silent" after
10031         "fork_inferior".
10032         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10033         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10034         instead of "startup_inferior".  Call "add_thread_silent" after
10035         "fork_inferior".
10036         * inferior.h: Include "common-inferior.h".
10037         (trace_start_error): Move to "common/common-utils.h".
10038         (trace_start_error_with_name): Likewise.
10039         (fork_inferior): Move prototype to "nat/fork-inferior.h".
10040         (startup_inferior): Likewise.
10041         (gdb_startup_inferior): New prototype.
10042         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10043         * nat/fork-inferior.h: New file.
10044         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10045         instead of "startup_inferior".  Call "add_thread_silent" after
10046         "fork_inferior".
10047         * target.h (target_terminal_init): Move prototype to
10048         "target/target.h".
10049         (target_terminal_inferior): Likewise.
10050         (target_terminal_ours): Likewise.
10051         * target/target.h (target_terminal_init): New prototype, moved
10052         from "target.h".
10053         (target_terminal_inferior): Likewise.
10054         (target_terminal_ours): Likewise.
10055         * utils.c (gdb_flush_out_err): New function.
10056
10057 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10058
10059         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10060         * common/common-gdbthread.h: New file, with parts from
10061         "gdb/gdbthread.h".
10062         * gdbthread.h: Include "common-gdbthread.h".
10063         (switch_to_thread): Moved to "common/common-gdbthread.h".
10064
10065 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10066
10067         * Makefile.in (SFILES): Add "common/job-control.c".
10068         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10069         (COMMON_OBS): Add "job-control.o".
10070         * common/job-control.c: New file, with contents from
10071         "gdb/inflow.c".
10072         * common/job-control.h: New file, with contents from "terminal.h".
10073         * fork-child.c: Include "job-control.h".
10074         * inflow.c: Include "job-control.h".
10075         (gdb_setpgid): Move to "common/common-inflow.c".
10076         (_initialize_inflow): Move setting of "job_control" to
10077         "handle_job_control".
10078         * terminal.h (job_control): Moved to "common/common-terminal.h".
10079         (gdb_setpgid): Likewise.
10080         * top.c: Include "job_control.h".
10081         * utils.c: Likewise.
10082         (job_control): Moved to "job-control.c".
10083
10084 2017-06-07  Pedro Alves  <palves@redhat.com>
10085
10086         * Makefile.in (SFILES): Add gdb_regex.c.
10087         (COMMON_OBS): Add gdb_regex.o.
10088         * ada-lang.c (ada_add_standard_exceptions)
10089         (ada_add_exceptions_from_frame, name_matches_regex)
10090         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10091         parameter type to compiled_regex.  Adjust.
10092         (ada_exceptions_list): Use compiled_regex.
10093         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10094         std::unique_ptr<compiled_regex>.
10095         (exception_catchpoint::~exception_catchpoint): Remove regfree
10096         call.
10097         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10098         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10099         * breakpoint.c (solib_catchpoint::compiled): Now a
10100         std::unique_ptr<compiled_regex>.
10101         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10102         (check_status_catch_solib): Adjust to use compiled_regex.
10103         (add_solib_catchpoint): Adjust to use compiled_regex.
10104         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10105         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10106         compiled_regex reference.  Adjust to use it.
10107         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10108         declaration.  Include "gdb_regex.h".
10109         (apropos_cmd): Change regex parameter to compiled_regex reference.
10110         * gdb_regex.c: New file.
10111         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10112         declarations.
10113         (class compiled_regex): New.
10114         * linux-tdep.c: Include "common/gdb_optional.h".
10115         (struct mapping_regexes): New, factored out from
10116         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10117         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10118         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10119         * probe.c: Include "common/gdb_optional.h".
10120         (collect_probes): Use compiled_regex and gdb::optional and remove
10121         cleanups.
10122         * skip.c: Include "common/gdb_optional.h".
10123         (skiplist_entry::compiled_function_regexp): Now a
10124         gdb::optional<compiled_regex>.
10125         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10126         (free_skiplist_entry): Remove regfree call.
10127         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10128         compiled_regex and gdb::optional.
10129         * symtab.c: Include "common/gdb_optional.h".
10130         (search_symbols): Use compiled_regex and gdb::optional.
10131         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10132         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10133         to gdb_regex.c.
10134
10135 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10136
10137         * regcache.c (regcache::save): Avoid buffer use.
10138         (regcache::dump): Likewise.
10139
10140 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10141
10142         * sh-tdep.c (sh_pseudo_register_read): Remove
10143         MAX_REGISTER_SIZE.
10144         (sh_pseudo_register_write): Likewise.
10145         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10146         (sh64_pseudo_register_write): Likewise
10147
10148 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10149
10150         * aarch64-tdep.c (aarch64_store_return_value): Use
10151         V_REGISTER_SIZE.
10152         (aarch64_pseudo_read_value): Likewise.
10153         (aarch64_pseudo_write): Likewise.
10154
10155 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10156
10157         * regformats/regdef.h (set_register_cache): Remove the
10158         declaration.
10159
10160 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10161
10162         * frame.c (frame_unwind_register_signed): Use
10163         frame_unwind_register_value.
10164
10165 2017-06-06  Pedro Alves  <palves@redhat.com>
10166
10167         PR breakpoints/21553
10168         * breakpoint.c (create_breakpoints_sal_default)
10169         (init_breakpoint_sal, create_breakpoint_sal): Use
10170         gdb::unique_xmalloc_ptr for string parameters.
10171         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10172         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10173         (base_breakpoint_create_breakpoints_sal)
10174         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10175         (strace_marker_create_breakpoints_sal)
10176         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10177         string parameters.
10178         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10179         gdb::unique_xmalloc_ptr for string parameters.
10180         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10181         parameters.
10182
10183 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10184
10185         * alpha-tdep.c (alpha_register_to_value): Use
10186         get_frame_register_value.
10187         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10188
10189 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10190
10191         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10192         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10193         (ia64_value_to_register): Likewise.
10194         (ia64_extract_return_value): Likewise.
10195         (ia64_store_return_value): Likewise.
10196         (ia64_push_dummy_call): Likewise.
10197
10198 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10199
10200         GDB 8.0 released.
10201
10202 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10203
10204         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10205
10206 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10207
10208         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10209         parameter.
10210         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10211
10212 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10213
10214         * event-loop.c (poll_timers): Unallocate timer using delete
10215         instead of xfree.
10216
10217 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10218
10219         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10220         (struct breakpoint) <~breakpoint>: New.
10221         (struct watchpoint): Inherit from breakpoint.
10222         <~watchpoint>: New.
10223         <base>: Remove.
10224         (struct tracepoint): Inherit from breakpoint.
10225         <base>: Remove.
10226         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10227         (struct longjmp_breakpoint): Inherit from breakpoint.
10228         <~longjmp_breakpoint>: New.
10229         <base>: Remove.
10230         (new_breakpoint_from_type): Remove casts.
10231         (watchpoint_in_thread_scope): Remove reference to base field.
10232         (watchpoint_del_at_next_stop): Likewise.
10233         (update_watchpoint): Likewise.
10234         (watchpoint_check): Likewise.
10235         (bpstat_check_watchpoint): Likewise.
10236         (set_longjmp_breakpoint): Likewise.
10237         (struct fork_catchpoint): Inherit from breakpoint.
10238         <base>: Remove.
10239         (struct solib_catchpoint): Inherit from breakpoint.
10240         <~solib_catchpoint>: New.
10241         <base>: Remove.
10242         (dtor_catch_solib): Change to ...
10243         (solib_catchpoint::~solib_catchpoint): ... this.
10244         (breakpoint_hit_catch_solib): Remove reference to base field.
10245         (add_solib_catchpoint): Likewise.
10246         (create_fork_vfork_event_catchpoint): Likewise.
10247         (struct exec_catchpoint): Inherit from breakpoint.
10248         <~exec_catchpoint>: New.
10249         <base>: Remove.
10250         (dtor_catch_exec): Change to ...
10251         (exec_catchpoint::~exec_catchpoint): ... this.
10252         (dtor_watchpoint): Change to ...
10253         (watchpoint::~watchpoint): ... this.
10254         (watch_command_1): Remove reference to base field.
10255         (catch_exec_command_1): Likewise.
10256         (base_breakpoint_dtor): Change to ...
10257         (breakpoint::~breakpoint): ... this.
10258         (base_breakpoint_ops): Remove dtor field value.
10259         (longjmp_bkpt_dtor): Change to ...
10260         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10261         (strace_marker_create_breakpoints_sal): Remove reference to base
10262         field.
10263         (delete_breakpoint): Don't manually call breakpoint destructor.
10264         (create_tracepoint_from_upload): Remove reference to base field.
10265         (trace_pass_set_count): Likewise.
10266         (initialize_breakpoint_ops): Don't initialize
10267         momentary_breakpoint_ops, don't set dtors.
10268         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10269         <~ada_catchpoint>: New.
10270         <base>: Remove.
10271         (create_excep_cond_exprs): Remove reference to base field.
10272         (dtor_exception): Change to ...
10273         (ada_catchpoint::~ada_catchpoint): ... this.
10274         (dtor_catch_exception): Remove.
10275         (dtor_catch_exception_unhandled): Remove.
10276         (dtor_catch_assert): Remove.
10277         (create_ada_exception_catchpoint): Remove reference to base
10278         field.
10279         (initialize_ada_catchpoint_ops): Don't set dtors.
10280         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10281         breakpoint.
10282         <~signal_catchpoint>: New.
10283         <base>: Remove.
10284         (signal_catchpoint_dtor): Change to ...
10285         (signal_catchpoint::~signal_catchpoint): ... this.
10286         (create_signal_catchpoint): Remove reference to base field.
10287         (initialize_signal_catchpoint_ops): Don't set dtor.
10288         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10289         from breakpoint.
10290         <~syscall_catchpoint>: New.
10291         <base>: Remove.
10292         (dtor_catch_syscall): Change to ...
10293         (syscall_catchpoint::~syscall_catchpoint): ... this.
10294         (create_syscall_event_catchpoint): Remove reference to base
10295         field.
10296         (initialize_syscall_catchpoint_ops): Don't set dtor.
10297         * break-catch-throw.c (struct exception_catchpoint): Inherit
10298         from breakpoint.
10299         <~exception_catchpoint>: New.
10300         <base>: Remove.
10301         (dtor_exception_catchpoint): Change to ...
10302         (exception_catchpoint::~exception_catchpoint): ... this.
10303         (handle_gnu_v3_exceptions): Remove reference to base field.
10304         (initialize_throw_catchpoint_ops): Don't set dtor.
10305         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10306         field.
10307         * remote.c (remote_get_tracepoint_status): Likewise.
10308         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10309         * tracefile.c (tracefile_fetch_registers): Likewise.
10310         * tracepoint.c (actions_command): Likewise.
10311         (validate_actionline): Likewise.
10312         (tfind_1): Likewise.
10313         (get_traceframe_location): Likewise.
10314         (find_matching_tracepoint_location): Likewise.
10315         (parse_tracepoint_status): Likewise.
10316         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10317
10318 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10319
10320         * breakpoint.c (struct longjmp_breakpoint): New struct.
10321         (is_tracepoint_type): Change return type to bool.
10322         (is_longjmp_type): New function.
10323         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10324         (set_raw_breakpoint_without_location): Use
10325         new_breakpoint_from_type.
10326         (set_raw_breakpoint): Likewise.
10327
10328 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10329
10330         * breakpoint.c (new_breakpoint_from_type): New function.
10331         (create_breakpoint_sal): Use new_breakpoint_from_type and
10332         unique_ptr.
10333         (create_breakpoint): Likewise.
10334
10335 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10336
10337         * memattr.c (mem_info_command): Rename to ...
10338         (info_mem_command): ... this.
10339         (mem_enable_command): Rename to ...
10340         (enable_mem_command): ... this.
10341         (mem_disable_command): Rename to ...
10342         (disable_mem_command): ... this.
10343         (mem_delete_command): Rename to ...
10344         (delete_mem_command): ... this.
10345         (_initialize_mem): Adjust function names.
10346
10347 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10348
10349         * btrace.c (handle_pt_insn_events): New.
10350         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10351         STATUS.  Split into this and ...
10352         (handle_pt_insn_event_flags): ... this.
10353
10354 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10355
10356         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10357         and struct pt_insn.resynced.
10358         * configure: Regenerated.
10359         * config.in: Regenerated.
10360
10361 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10362
10363         * btrace.c (ftrace_find_call_by_number): New function.
10364         (ftrace_new_function): Store objects, not pointers.
10365         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10366         ftrace_new_gap, ftrace_update_function,
10367         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10368         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10369         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10370         btrace_ends_with_single_insn, btrace_call_get): Account for
10371         btrace_thread_info::functions now storing objects.
10372         * btrace.h (struct btrace_thread_info): Add constructor.
10373         (struct btrace_thread_info) <functions>: Make std::vector.
10374         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10375         Initialize with default values.
10376         * record-btrace.c (record_btrace_frame_sniffer): Account for
10377         btrace_thread_info::functions now storing objects.
10378
10379 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10380
10381         * btrace.c: Remove typedef bfun_s.
10382         (ftrace_new_gap): Directly add gaps to the list of gaps.
10383         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10384         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10385         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10386         instead of gdb VEC.
10387
10388 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10389
10390         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10391         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10392         with btrace_thread_info::next_segment and
10393         btrace_thread_info::prev_segment.
10394         * btrace.h: Remove struct btrace_func_link.
10395         (struct btrace_function): Replace pair of function segment pointers
10396         with pair of indices.
10397         * python/py-record-btrace.c (btpy_call_prev_sibling,
10398         btpy_call_next_sibling): Replace references to
10399         btrace_thread_info::segment with btrace_thread_info::next_segment and
10400         btrace_thread_info::prev_segment.
10401         * record-btrace.c (record_btrace_frame_this_id): Use
10402         btrace_find_call_by_number.
10403
10404 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10405
10406         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10407         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10408         btrace_insn_next, btrace_insn_prev): Remove references to
10409         btrace_thread_info::flow.
10410         * btrace.h (struct btrace_function): Remove FLOW.
10411
10412 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10413
10414         * btrace.c (ftrace_find_call_by_number): New function.
10415         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10416         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10417         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10418         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10419         index.
10420         * btrace.h (struct btrace_function): Turn UP into an index.
10421         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10422         as an index.
10423         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10424         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10425         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10426
10427 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10428
10429         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10430         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10431         ftrace_update_function, ftrace_compute_global_level_offset,
10432         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10433         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10434         btrace_insn_end, btrace_is_empty): Remove references to
10435         btrace_thread_info::begin and btrace_thread_info::end.
10436         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10437         (struct btrace_thread_info) <functions>: Adjust comment.
10438         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10439         btrace_thread_info::begin.
10440
10441 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10442
10443         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10444         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10445         ftrace_update_function): Remove arguments that implicitly were always
10446         BTINFO->END.
10447         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10448         Don't pass BTINFO->END.
10449
10450 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10451
10452         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10453         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10454         btrace_find_insn_by_number): Replace function segment pointer with
10455         index.
10456         (btrace_insn_cmp): Simplify.
10457         * btrace.h: (struct btrace_insn_iterator) Rename index to
10458         insn_index.  Replace function segment pointer with index into function
10459         segment vector.
10460         * record-btrace.c (record_btrace_call_history): Replace function
10461         segment pointer use with index.
10462         (record_btrace_frame_sniffer): Retrieve function call segment through
10463         vector.
10464         (record_btrace_set_replay): Remove defunc't safety check.
10465
10466 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10467
10468         * btrace.c (btrace_ends_with_single_insn): New function.
10469         (btrace_call_get, btrace_call_number, btrace_call_begin,
10470         btrace_call_end, btrace_call_next, btrace_call_prev,
10471         btrace_find_call_by_number): Use index into call segment vector
10472         instead of pointer.
10473         (btrace_call_cmp): Simplify.
10474         * btrace.h (struct btrace_call_iterator): Replace function call segment
10475         pointer with index into vector.
10476         * record-btrace.c (record_btrace_call_history): Use index instead of
10477         pointer.
10478
10479 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10480
10481         * btrace.c (btrace_insn_begin, btrace_insn_end,
10482         btrace_find_insn_by_number): Add btinfo to iterator.
10483         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10484
10485 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10486
10487         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10488         and save pointers directly.
10489         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10490         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10491         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10492         changed signature of functions.
10493         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10494         (btrace_fetch): Remove code that adds btrace_function pointers to
10495         vector of btrace_functions.
10496         (btrace_clear): Simplify freeing vector of btrace_functions.
10497
10498 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10499
10500         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10501         Replace VEC_* with std::vector functions.
10502         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10503         (struct btrace_thread_info)<functions>: Change type to std::vector.
10504
10505 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10506
10507         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10508         "Removed targets and native configurations" up.  Merge duplicate
10509         "New commands" sub-sections.  Add "New options" sub-sections.
10510
10511 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10512
10513         * defs.h (copy_integer_to_size): New declaration.
10514         * findvar.c (copy_integer_to_size): New function.
10515         (do_cint_test): New selftest function.
10516         (copy_integer_to_size_test): Likewise.
10517         (_initialize_findvar): Likewise.
10518         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10519         (mips_fbsd_collect_reg): Use raw_collect_integer.
10520         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10521         (mips64_fill_gregset): Use raw_collect_integer
10522         (mips64_fill_fpregset): Use raw_supply_integer.
10523         * regcache.c (regcache::raw_supply_integer): New function.
10524         (regcache::raw_collect_integer): Likewise.
10525         * regcache.h: (regcache::raw_supply_integer): New declaration.
10526         (regcache::raw_collect_integer): Likewise.
10527
10528 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10529
10530         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10531         (COMMON_OBS): Add gdbarch-selftests.o.
10532         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10533         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10534         * gdbarch-selftests.c: New file.
10535         * regcache.h (regcache) <~regcache>: Mark it virtual if
10536         GDB_SELF_TEST.
10537         <raw_write>: Likewise.
10538
10539 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10540
10541         * regcache.c (current_regcache): Change it to
10542         regcache::current_regcache.
10543         (regcache_observer_target_changed): Update.
10544         (regcache_thread_ptid_changed): Make it a regcache static
10545         method.
10546         (regcache_thread_ptid_changed): Update.
10547         (class regcache_access): New.
10548         (current_regcache_test): Update.
10549         (_initialize_regcache): Update.
10550         * regcache.h: Include forward_list.
10551         (regcache): Declare regcache_thread_ptid_changed and declare
10552         registers_changed_ptid as friend.
10553
10554 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10555
10556         * i387-tdep.c (i387_register_to_value): Use register_size
10557         instead of TYPE_LENGTH.
10558         * m68k-tdep.c (m68k_register_to_value): Likewise.
10559
10560 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10561
10562         * i387-tdep.c (i387_convert_register_p): Return false if type
10563         code isn't TYPE_CODE_FLT.
10564
10565 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10566
10567         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10568         length is 4.
10569         (alpha_register_to_value): Remove type length check.
10570         (alpha_value_to_register): Likewise.
10571
10572 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10573
10574         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10575         TYPE_CODE_FLT.
10576
10577 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10578
10579         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10580         TYPE_CODE_FLT or not.
10581
10582 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10583
10584         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10585         * avr-tdep.c (avr_gdbarch_init): Likewise.
10586         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10587         * cris-tdep.c (cris_gdbarch_init): Likewise.
10588         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10589         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10590         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10591         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10592         * mep-tdep.c (mep_gdbarch_init): Likewise.
10593         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10594         * mips-tdep.c (mips_gdbarch_init): Likewise.
10595         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10596         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10597         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10598         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10599         * v850-tdep.c (v850_gdbarch_init): Likewise.
10600
10601 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10602
10603         * selftest-arch.c (tests_with_arch): Call registers_changed
10604         and reinit_frame_cache.
10605         * selftest.c (run_self_tests): Likewise.
10606
10607 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10608
10609         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10610         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10611
10612 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10613
10614         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10615         set_gdbarch_print_insn.
10616
10617 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10618
10619         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10620         set_gdbarch_print_insn.
10621
10622 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10623
10624         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10625         set_gdbarch_print_insn.
10626         * arc-tdep.c (arc_gdbarch_init): Likewise.
10627         * arch-utils.c: include dis-asm.h.
10628         (default_print_insn): New function.
10629         * arch-utils.h (default_print_insn): Declare.
10630         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10631         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10632         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10633         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10634         * frv-tdep.c (frv_gdbarch_init): Likewise.
10635         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10636         * gdbarch.sh (print_insn): Use default_print_insn.
10637         * gdbarch.c: Regenerated.
10638         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10639         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10640         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10641         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10642         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10643         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10644         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10645         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10646         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10647         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10648         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10649         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10650         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10651         * mt-tdep.c (mt_gdbarch_init): Likewise.
10652         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10653         * nios2-tdep.c (nios2_print_insn): Remove.
10654         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10655         * rx-tdep.c (rx_gdbarch_init): Likewise.
10656         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10657         * score-tdep.c (score_print_insn): Remove.
10658         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10659         * sh-tdep.c (sh_gdbarch_init): Likewise.
10660         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10661         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10662         * tic6x-tdep.c (tic6x_print_insn): Remove.
10663         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10664         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10665         * v850-tdep.c (v850_gdbarch_init): Likewise.
10666         * vax-tdep.c (vax_gdbarch_init): Likewise.
10667         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10668         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10669
10670 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10671
10672         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10673         (MIPS_FP0_REGNUM): Remove.
10674         (MIPS_FSR_REGNUM): Remove.
10675         (mips_fbsd_supply_fpregs): Use mips_regnum.
10676         (mips_fbsd_supply_gregs): Likewise.
10677         (mips_fbsd_collect_fpregs): Likewise.
10678         (mips_fbsd_collect_gregs): Likewise.
10679
10680 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10681
10682         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10683         (getpfpregs_supplies): New function.
10684         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10685         getfpregs_supplies.
10686         (mips_fbsd_store_inferior_registers): Likewise.
10687
10688 2017-05-22  Pedro Alves <palves@redhat.com>
10689
10690         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10691         maintainer.
10692
10693 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10694
10695         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10696         (store_register): Likewise.
10697         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10698         (get_decimal_float_return_value): Likewise.
10699         (do_ppc_sysv_return_value): Likewise.
10700         (ppc64_sysv_abi_push_integer): Likewise.
10701         (ppc64_sysv_abi_push_freg): Likewise.
10702         (ppc64_sysv_abi_return_value_base): Likewise.
10703         (ppc64_sysv_abi_return_value): Likewise.
10704         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10705         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10706         * rs6000-nat.c: Likewise.
10707         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10708         (rs6000_value_to_register): Likewise.
10709         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10710
10711 2017-05-21  Tom Tromey  <tom@tromey.com>
10712
10713         PR rust/21466:
10714         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10715         arrays as "[T]", not "[T; ]".
10716
10717 2017-05-19  Tom Tromey  <tom@tromey.com>
10718
10719         PR rust/21484:
10720         * rust-lang.c (exp_descriptor_rust): New function.
10721         (rust_language_defn): Use it.
10722         * p-lang.c (pascal_language_defn): Update.
10723         * opencl-lang.c (opencl_language_defn): Update.
10724         * objc-lang.c (objc_language_defn): Update.
10725         * m2-lang.c (m2_language_defn): Update.
10726         * language.h (struct language_defn)
10727         <la_watch_location_expression>: New member.
10728         * language.c (unknown_language_defn, auto_language_defn)
10729         (local_language_defn): Update.
10730         * go-lang.c (go_language_defn): Update.
10731         * f-lang.c (f_language_defn): Update.
10732         * d-lang.c (d_language_defn): Update.
10733         * c-lang.h (c_watch_location_expression): Declare.
10734         * c-lang.c (c_watch_location_expression): New function.
10735         (c_language_defn, cplus_language_defn, asm_language_defn)
10736         (minimal_language_defn): Use it.
10737         * breakpoint.c (watch_command_1): Call
10738         la_watch_location_expression.
10739         * ada-lang.c (ada_language_defn): Update.
10740
10741 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10742
10743         PR tui/21482
10744         * gdb_curses.h (NOMACROS): Define.
10745         (NCURSES_NOMACROS): Define.
10746
10747 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10748
10749         PR tui/21482
10750         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10751         arg to char *.
10752         * tui/tui-wingeneral.c (box_win): Likewise.
10753         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10754         (tui_show_source_line): Likewise.
10755         (tui_show_exec_info_content): Likewise.
10756
10757 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10758
10759         * sparc-tdep.c (sparc_structure_return_p)
10760         (sparc_arg_on_registers_p): New functions.
10761         (sparc32_store_arguments): Use them.
10762         * sparc64-tdep.c (sparc64_16_byte_align_p)
10763         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10764         Handle TYPE_CODE_ARRAY.
10765
10766 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10767
10768         * cli/cli-decode.c (add_alias_cmd): New function.
10769         * command.h (add_alias_cmd): Declare.
10770         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10771         instead call add_alias_cmd.
10772
10773 2017-05-17  Pedro Alves  <palves@redhat.com>
10774
10775         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10776         (nat_makefile_frag): ... this.  All references updated.
10777         * configure.ac: Likewise.
10778         * configure.nat: Likewise.  Enhance comments.
10779         * configure: Regenerate.
10780
10781 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10782
10783         * procfs.c (procfs_create_inferior): Change prototype to match
10784         definition.
10785
10786 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10787
10788         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10789         C++ compiler warning.
10790
10791 2017-05-12  Tom Tromey  <tom@tromey.com>
10792
10793         PR rust/21483:
10794         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10795         recurse, just call value_struct_elt directly.
10796
10797 2017-05-12  Tom Tromey  <tom@tromey.com>
10798
10799         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10800         OP_RUST_ARRAY>: Fix.
10801
10802 2017-05-12  Tom Tromey  <tom@tromey.com>
10803
10804         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10805
10806 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10807
10808         * regcache.c: Include <forward_list>.
10809         (struct regcache_list): Remove.
10810         (current_regcache): Update.
10811         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10812         (regcache_thread_ptid_changed): Likewise.
10813         (registers_changed_ptid): Likewise.
10814         (current_regcache_size): Likewise.
10815
10816 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10817
10818         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10819         (current_regcache_size): New function.
10820         (current_regcache_test): New function.
10821         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10822
10823 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10824
10825         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10826         (print_gp_register_row): Use get_frame_register_value.
10827
10828 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10829
10830         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10831         (mips_supply_fpregset): Likewise.
10832         (mips64_supply_gregset): Likewise.
10833
10834 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10835
10836         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10837         regcache->raw_supply_zeroed.
10838
10839 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10840
10841         * configure.nat: Rearrange 'case' statements to match
10842         host before cpu.
10843
10844 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10845
10846         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10847         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10848         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10849         "@nat_extra_makefile_frag@".
10850         (Makefile): Remove dependency on "@frags@".
10851         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10852         (data-directory/Makefile): Likewise.
10853         * config/aarch64/linux.mh: Deleted; moved contents to
10854         "gdb/configure.nat".
10855         * config/alpha/alpha-linux.mh: Likewise.
10856         * config/alpha/nbsd.mh: Likewise.
10857         * config/arm/linux.mh: Likewise.
10858         * config/arm/nbsdelf.mh: Likewise.
10859         * config/i386/cygwin.mh: Likewise.
10860         * config/i386/cygwin64.mh: Likewise.
10861         * config/i386/darwin.mh: Likewise.
10862         * config/i386/fbsd.mh: Likewise.
10863         * config/i386/fbsd64.mh: Likewise.
10864         * config/i386/go32.mh: Likewise.
10865         * config/i386/i386gnu.mh: Likewise.
10866         * config/i386/i386sol2.mh: Likewise.
10867         * config/i386/linux.mh: Likewise.
10868         * config/i386/linux64.mh: Likewise.
10869         * config/i386/mingw.mh: Likewise.
10870         * config/i386/mingw64.mh: Likewise.
10871         * config/i386/nbsd64.mh: Likewise.
10872         * config/i386/nbsdelf.mh: Likewise.
10873         * config/i386/nto.mh: Likewise.
10874         * config/i386/obsd.mh: Likewise.
10875         * config/i386/obsd64.mh: Likewise.
10876         * config/i386/sol2-64.mh: Likewise.
10877         * config/ia64/linux.mh: Likewise.
10878         * config/m32r/linux.mh: Likewise.
10879         * config/m68k/linux.mh: Likewise.
10880         * config/m68k/nbsdelf.mh: Likewise.
10881         * config/m68k/obsd.mh: Likewise.
10882         * config/m88k/obsd.mh: Likewise.
10883         * config/mips/fbsd.mh: Likewise.
10884         * config/mips/linux.mh: Likewise.
10885         * config/mips/nbsd.mh: Likewise.
10886         * config/mips/obsd64.mh: Likewise.
10887         * config/pa/linux.mh: Likewise.
10888         * config/pa/nbsd.mh: Likewise.
10889         * config/pa/obsd.mh: Likewise.
10890         * config/powerpc/aix.mh: Likewise.
10891         * config/powerpc/fbsd.mh: Likewise.
10892         * config/powerpc/linux.mh: Likewise.
10893         * config/powerpc/nbsd.mh: Likewise.
10894         * config/powerpc/obsd.mh: Likewise.
10895         * config/powerpc/ppc64-linux.mh: Likewise.
10896         * config/powerpc/spu-linux.mh: Likewise.
10897         * config/s390/linux.mh: Likewise.
10898         * config/sh/nbsd.mh: Likewise.
10899         * config/sparc/fbsd.mh: Likewise.
10900         * config/sparc/linux.mh: Likewise.
10901         * config/sparc/linux64.mh: Likewise.
10902         * config/sparc/nbsd64.mh: Likewise.
10903         * config/sparc/nbsdelf.mh: Likewise.
10904         * config/sparc/obsd64.mh: Likewise.
10905         * config/sparc/sol2.mh: Likewise.
10906         * config/tilegx/linux.mh: Likewise.
10907         * config/vax/nbsdelf.mh: Likewise.
10908         * config/vax/obsd.mh: Likewise.
10909         * config/xtensa/linux.mh: Likewise.
10910         * config/i386/i386gnu.mn: New file, with excerpts from
10911         "config/i386/i386gnu.mh".
10912         * configure: Regenerate.
10913         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10914         *.mh files under "gdb/config".
10915         * configure.nat: New file, with contents from the
10916         "gdb/config/*/*.mh" files.
10917
10918 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10919
10920         * btrace.c (btrace_clear): Free insn vector.
10921
10922 2017-05-05  Pedro Alves  <palves@redhat.com>
10923
10924         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10925         * configure: Regenerate.
10926
10927 2017-05-04  Pedro Alves  <palves@redhat.com>
10928
10929         * Makefile.in (SFILES): Add progspace-and-thread.c.
10930         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10931         (COMMON_OBS): Add progspace-and-thread.o.
10932         * breakpoint.c: Include "progspace-and-thread.h".
10933         (update_inserted_breakpoint_locations)
10934         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10935         Use scoped_restore_current_pspace_and_thread.
10936         (create_std_terminate_master_breakpoint): Use
10937         scoped_restore_current_program_space.
10938         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10939         (print_breakpoint_location): Use
10940         scoped_restore_current_program_space.
10941         (bp_loc_is_permanent): Use
10942         scoped_restore_current_pspace_and_thread.
10943         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10944         (download_tracepoint_locations): Use
10945         scoped_restore_current_pspace_and_thread.
10946         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10947         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10948         (enum step_over_calls_kind): Moved from inferior.h.
10949         (class scoped_restore_current_thread): New class.
10950         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10951         declaration.
10952         (scoped_restore_current_thread): New class.
10953         * infcmd.c: Include "common/gdb_optional.h".
10954         (continue_1, proceed_after_attach): Use
10955         scoped_restore_current_thread.
10956         (notice_new_inferior): Use scoped_restore_current_thread.
10957         * inferior.c: Include "progspace-and-thread.h".
10958         (restore_inferior, save_current_inferior): Delete.
10959         (add_inferior_command, clone_inferior_command): Use
10960         scoped_restore_current_pspace_and_thread.
10961         * inferior.h (scoped_restore_current_inferior): New class.
10962         * infrun.c: Include "progspace-and-thread.h" and
10963         "common/gdb_optional.h".
10964         (follow_fork_inferior): Use
10965         scoped_restore_current_pspace_and_thread.
10966         (scoped_restore_exited_inferior): New class.
10967         (handle_vfork_child_exec_or_exit): Use
10968         scoped_restore_exited_inferior,
10969         scoped_restore_current_pspace_and_thread,
10970         scoped_restore_current_thread and scoped_restore.
10971         (fetch_inferior_event): Use scoped_restore_current_thread.
10972         * linespec.c (decode_line_full, decode_line_1): Use
10973         scoped_restore_current_program_space.
10974         * mi/mi-main.c: Include "progspace-and-thread.h".
10975         (exec_continue): Use scoped_restore_current_thread.
10976         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10977         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10978         * proc-service.c (ps_pglobal_lookup): Use
10979         scoped_restore_current_program_space.
10980         * progspace-and-thread.c: New file.
10981         * progspace-and-thread.h: New file.
10982         * progspace.c (release_program_space, clone_program_space): Use
10983         scoped_restore_current_program_space.
10984         (restore_program_space, save_current_program_space)
10985         (save_current_space_and_thread): Delete.
10986         (switch_to_program_space_and_thread): Moved to
10987         progspace-and-thread.c.
10988         * progspace.h (save_current_program_space)
10989         (save_current_space_and_thread): Delete declarations.
10990         (scoped_restore_current_program_space): New class.
10991         * remote.c (remote_btrace_maybe_reopen): Use
10992         scoped_restore_current_thread.
10993         * symtab.c: Include "progspace-and-thread.h".
10994         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10995         * thread.c (print_thread_info_1): Use
10996         scoped_restore_current_thread.
10997         (struct current_thread_cleanup): Delete.
10998         (do_restore_current_thread_cleanup)
10999         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11000         (scoped_restore_current_thread::~scoped_restore_current_thread):
11001         ... this new dtor.
11002         (make_cleanup_restore_current_thread): Rename/convert to ...
11003         (scoped_restore_current_thread::scoped_restore_current_thread):
11004         ... this new ctor.
11005         (thread_apply_all_command): Use scoped_restore_current_thread.
11006         (thread_apply_command): Use scoped_restore_current_thread.
11007         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11008         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11009
11010 2017-05-04  Pedro Alves  <palves@redhat.com>
11011
11012         * thread.c (make_cleanup_restore_current_thread): Move
11013         find_thread_ptid call before the is_stopped call.  Assert that the
11014         thread is found.  Replace is_stopped call by checking the thread's
11015         state directly.  Remove unnecessary NULL-thread check.
11016
11017 2017-05-04  Pedro Alves  <palves@redhat.com>
11018
11019         * corelow.c (thread_section_name): New class.
11020         (get_core_register_section, get_core_siginfo): Use it.
11021
11022 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11023
11024         * corelow.c (sniff_core_bfd): Remove extra semicolon.
11025         (get_core_register_section): Remove xfree of NULL pointer.
11026
11027 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
11028
11029         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11030         * regcache.c (regcache::raw_supply_zeroed): New function.
11031         * regcache.h (regcache::raw_supply_zeroed): New declaration.
11032
11033 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
11034
11035         * gdbarch.sh: Remove commented out definition of
11036         TARGET_CHAR_BIT.
11037         * gdbarch.h: Re-generate.
11038
11039 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
11040
11041         * configure: Regenerate.
11042
11043 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11044
11045         * solib-target.c (solib_target_relocate_section_addresses):
11046         Remove num_section_bases, num_bases, segment_bases variables.
11047
11048 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11049
11050         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11051
11052 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11053
11054         * solib-target.c: Include <vector>
11055         (struct lm_info_target) <~lm_info_target>: Remove.
11056         <segment_bases, section_bases>: Change type to
11057         std::vector<CORE_ADDR>.
11058         (library_list_start_segment, library_list_start_section,
11059         library_list_end_library,
11060         solib_target_relocate_section_addresses): Adjust.
11061
11062 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11063
11064         * gdbarch.sh (software_single_step): Change return type to
11065         std::vector<CORE_ADDR>.
11066         * gdbarch.c, gdbarch.h: Re-generate.
11067         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11068         Adjust.
11069         (arm_deal_with_atomic_sequence_raw): Adjust.
11070         (thumb_get_next_pcs_raw): Adjust.
11071         (arm_get_next_pcs_raw): Adjust.
11072         (arm_get_next_pcs): Adjust.
11073         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11074         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11075         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11076         (alpha_software_single_step): Adjust.
11077         * alpha-tdep.h (alpha_software_single_step): Adjust.
11078         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11079         * arm-tdep.c (arm_software_single_step): Adjust.
11080         (arm_breakpoint_kind_from_current_state): Adjust.
11081         * arm-tdep.h (arm_software_single_step): Adjust.
11082         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11083         * cris-tdep.c (cris_software_single_step): Adjust.
11084         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11085         (micromips_deal_with_atomic_sequence): Adjust.
11086         (deal_with_atomic_sequence): Adjust.
11087         (mips_software_single_step): Adjust.
11088         * mips-tdep.h (mips_software_single_step): Adjust.
11089         * moxie-tdep.c (moxie_software_single_step): Adjust.
11090         * nios2-tdep.c (nios2_software_single_step): Adjust.
11091         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11092         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11093         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11094         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11095         * sparc-tdep.c (sparc_software_single_step): Adjust.
11096         * spu-tdep.c (spu_software_single_step): Adjust.
11097         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11098
11099 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11100
11101         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11102         * gdbarch.h: Re-generate.
11103
11104 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11105
11106         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11107         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11108         * python/py-instruction.c, python/py-instruction.h: New file.
11109         * python/py-record.c: Add py-instruction.h include.
11110         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11111         gdb.RecordInstruction.
11112         * python/python-internal.h: Add gdbpy_initialize_instruction
11113         declaration.
11114         * python/python.c (do_start_initialization): Add
11115         gdbpy_initialize_instruction.
11116
11117 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11118
11119         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11120         Remove.
11121         (btrace_func_from_recpy_func): New function.
11122         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11123         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11124         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11125         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11126         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11127         Also, use new helper functions.
11128         (btpy_list_item): Use new helper functions.
11129         (recpy_bt_function_call_history): Use new type name.
11130         (btpy_call_getset): Remove.
11131         (gdbpy_initialize_btrace): Remove code to initialize
11132         gdb.BtraceFunctionCall.
11133         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11134         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11135         recpy_bt_func_prev, recpy_bt_func_next): New export.
11136         * python/py-record.c (recpy_func_type): New static object.
11137         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11138         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11139         recpy_func_next): New function.
11140         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11141         (recpy_func_getset): New static object.
11142         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11143         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11144
11145 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11146
11147         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11148         (btpy_object, btpy_insn_type, btpy_new): Remove.
11149         (btpy_list_object): Use gdb.RecordInstruction type instead of
11150         gdb.BtraceInstruction type.
11151         (btrace_insn_from_recpy_insn): New function.
11152         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11153         btpy_new.
11154         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11155         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11156         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11157         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11158         instead of btpy_object.
11159         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11160         btpy_insn_data, btpy_insn_decode): Rename to ...
11161         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11162         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11163         recpy_bt_insn_decode): This.  Also, use new helper functions.
11164         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11165         recpy_insn_type.
11166         (btpy_insn_getset): Remove.
11167         (gdbpy_initialize_btrace): Remove code to initialize
11168         gdb.BtraceInstruction.  Use recpy_element_object.
11169         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11170         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11171         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11172         * python/py-record.c (recpy_insn_type): New static object.
11173         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11174         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11175         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11176         New function.
11177         (recpy_insn_getset): New static object.
11178         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11179         * python/py-record.h (recpy_element_object): New typedef.
11180         (recpy_insn_type, recpy_insn_new): New export.
11181
11182 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11183
11184         * py-record-btrace.c (btpy_insn_new): Removed.
11185         (btpy_insn_or_gap_new): New function.
11186         (btpy_insn_error): Removed.
11187         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11188         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11189         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11190         btpy_insn_or_gap_new instead of btpy_insn_new.
11191         (btpy_insn_getset): Remove btpy_insn_error.
11192         * py-record.c (recpy_gap_type): New static object.
11193         (recpy_gap_object): New typedef.
11194         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11195         recpy_gap_reason_string): New function.
11196         (recpy_gap_getset): New static object.
11197         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11198         * py-record.h (recpy_gap_new): New export.
11199
11200 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11201
11202         * python/py-record.c (recpy_ptid): Remove.
11203         (recpy_record_getset): Remove recpy_ptid.
11204
11205 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11206
11207         * btrace.c (btrace_fetch): Set inferior_ptid.
11208         * python/py-record-btrace.c: Add "py-record.h" include.
11209         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11210         recpy_bt_end, recpy_bt_instruction_history,
11211         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11212         in gdb.Record object instead of current ptid.
11213         * python/py-record.c: Include new "py-record.h" file.
11214         (recpy_record_object): Moved to py-record.h.
11215         * python/py-record.h: New file.
11216
11217 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11218
11219         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11220         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11221         indentation.
11222
11223 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11224
11225         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11226         the past maintainers section.
11227
11228 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11229
11230         * infcmd.c (get_return_value): Use regcache ctor, and remove
11231         cleanup.
11232
11233 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11234             Pedro Alves  <palves@redhat.com>
11235
11236         * regcache.c (regcache::regcache): New tag dispatch ctor.
11237         (do_cooked_read): Moved above.
11238         (regcache_dup): Use the tag dispatch ctor..
11239         * regcache.h (regcache): Declare ctor, delete copy ctor and
11240         assignment operator, remove friend regcache_dup.
11241
11242 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11243
11244         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11245         call method save instead of regcache_cpy.
11246         * regcache.h (struct regcache): Make regcache_dup a friend.
11247
11248 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11249
11250         * regcache.c (struct regcache): Move to regcache.h
11251         (regcache::arch): New method.
11252         (regcache_get_ptid): Update.
11253         (get_regcache_arch): Call arch method.
11254         (get_regcache_aspace): Call method aspace.
11255         (register_buffer): Change it to method.
11256         (regcache_save): Change it to regcache::save.
11257         (regcache_restore): Likewise.
11258         (regcache_cpy_no_passthrough): Remove the declaration.
11259         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11260         (regcache_cpy_no_passthrough): Change it to method
11261         cpy_no_passthrough.
11262         (regcache_register_status): Change it to method
11263         get_register_status.
11264         (regcache_invalidate): Change it to method invalidate.
11265         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11266         (regcache_raw_update): Change it to method raw_update.
11267         (regcache_raw_read): Likewise.
11268         (regcache_raw_read_signed): Likewise.
11269         (regcache_raw_read_unsigned): Likewise.
11270         (regcache_raw_write_signed): Likewise.
11271         (regcache_raw_write_unsigned): Likewise.
11272         (regcache_cooked_read): Likewise.
11273         (regcache_cooked_read_value): Likewise.
11274         (regcache_cooked_read_signed): Likewise.
11275         (regcache_cooked_read_unsigned): Likewise.
11276         (regcache_cooked_write_signed): Likewise.
11277         (regcache_cooked_write_unsigned): Likewise.
11278         (regcache_raw_set_cached_value): Likewise.
11279         (regcache_raw_write): Likewise.
11280         (regcache_cooked_write): Likewise.
11281         (regcache_xfer_part): Likewise.
11282         (regcache_raw_read_part): Likewise.
11283         (regcache_raw_write_part): Likewise.
11284         (regcache_cooked_read_part): Likewise.
11285         (regcache_cooked_write_part): Likewise.
11286         (regcache_raw_supply): Likewise.
11287         (regcache_raw_collect): Likewise.
11288         (regcache_transfer_regset): Likewise.
11289         (regcache_supply_regset): Likewise.
11290         (regcache_collect_regset): Likewise.
11291         (regcache_debug_print_register): Likewise.
11292         (enum regcache_dump_what): Move it to regcache.h.
11293         (regcache_dump): Change it to method dump.
11294         * regcache.h (enum regcache_dump_what): New.
11295         (class regcache): New.
11296         * target.c (target_fetch_registers): Call method
11297         debug_print_register.
11298         (target_store_registers): Likewise.
11299
11300 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11301
11302         * windows-nat.c (struct lm_info_windows): Initialize field.
11303         (windows_make_so): Allocate lm_info_windows with new.
11304         (windows_free_so): Free lm_info_windows with delete.
11305
11306 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11307
11308         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11309         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11310         cleanup.
11311         (darwin_free_so): Free lm_info_darwin with delete.
11312
11313 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11314
11315         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11316         <l_addr_p>: Change type to bool.
11317         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11318         (svr4_free_so): Free lm_info_svr4 with delete.
11319         (svr4_copy_library_list): Replace memcpy with call to copy
11320         constructor.
11321         (library_list_start_library, svr4_default_sos): Allocate
11322         lm_info_svr4 with new.
11323
11324 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11325
11326         * solib-target.c (struct lm_info_target): Add destructor,
11327         initialize fields.
11328         <name>: Change type to std::string.
11329         (library_list_start_library): Allocate lm_info_target with new.
11330         (solib_target_free_library_list): Free lm_info_target with
11331         delete.
11332         (solib_target_current_sos): Adapt to std::string.
11333         (solib_target_free_so): Free lm_info_target with delete.
11334
11335 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11336
11337         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11338         fields.
11339         (frv_current_sos): Allocate lm_info_frv with new.
11340         (frv_relocate_main_executable): Free lm_info_frv with delete,
11341         allocate with new.
11342         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11343
11344 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11345
11346         * solib-frv.c (struct lm_info_frv): Fix indentation.
11347
11348 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11349
11350         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11351         map field.
11352         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11353         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11354         and allocate with new.
11355         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11356
11357 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11358
11359         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11360         <filename, member_name>: Change type to std::string.
11361         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11362         (library_list_start_library): Allocate lm_info_aix with new.
11363         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11364         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11365         with copy constructor.
11366
11367 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11368
11369         * solist.h (struct lm_info): Remove.
11370         (struct lm_info_base): New class.
11371         (struct so_list) <lm_info>: Change type to lm_info_base *.
11372         * nto-tdep.c (struct lm_info): Remove.
11373         (lm_addr): Adjust.
11374         * solib-aix.c (struct lm_info): Rename to ...
11375         (struct lm_info_aix): ... this.  Extend lm_info_base.
11376         (lm_info_p): Rename to ...
11377         (lm_info_aix_p): ... this, and adjust.
11378         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11379         solib_aix_parse_libraries, library_list_start_library,
11380         solib_aix_free_library_list, solib_aix_parse_libraries,
11381         solib_aix_get_library_list,
11382         solib_aix_relocate_section_addresses, solib_aix_free_so,
11383         solib_aix_get_section_offsets,
11384         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11385         Adjust.
11386         (struct solib_aix_inferior_data) <library_list>: Adjust.
11387         * solib-darwin.c (struct lm_info): Rename to ...
11388         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11389         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11390         * solib-dsbt.c (struct lm_info): Rename to ...
11391         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11392         (struct dsbt_info) <main_executable_lm_info): Adjust.
11393         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11394         dsbt_relocate_section_addresses): Adjust.
11395         * solib-frv.c (struct lm_info): Rename to ...
11396         (struct lm_info_frv): ... this.  Extend lm_info_base.
11397         (main_executable_lm_info): Adjust.
11398         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11399         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11400         find_canonical_descriptor_in_load_object,
11401         frv_fdpic_find_canonical_descriptor): Adjust.
11402         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11403         to lm_info_svr4.
11404         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11405         svr4_clear_so, svr4_copy_library_list,
11406         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11407         svr4_current_sos, svr4_fetch_objfile_link_map,
11408         solist_update_incremental): Adjust.
11409         * solib-svr4.h (struct lm_info_svr4): Move here from
11410         solib-svr4.c.
11411         * solib-target.c (struct lm_info): Rename to ...
11412         (struct lm_info_target): ... this.  Extend lm_info_base.
11413         (lm_info_p): Rename to ...
11414         (lm_info_target_p): ... this.
11415         (solib_target_parse_libraries, library_list_start_segment,
11416         library_list_start_section, library_list_start_library,
11417         library_list_end_library, solib_target_free_library_list,
11418         solib_target_current_sos, solib_target_free_so,
11419         solib_target_relocate_section_addresses): Adjust.
11420         * windows-nat.c (struct lm_info): Rename to ...
11421         (struct lm_info_windows): ... this.  Extend lm_info_base.
11422         (windows_make_so, handle_load_dll, handle_unload_dll,
11423         windows_xfer_shared_libraries): Adjust.
11424
11425 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11426
11427         * solib-darwin.c (struct darwin_so_list): Remove.
11428         (darwin_current_sos): Allocate an so_list object instead of a
11429         darwin_so_list, separately allocate an lm_info object.
11430         (darwin_free_so): Free lm_info.
11431
11432 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11433
11434         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11435         with fprintf_filtered.
11436
11437 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11438
11439         * regcache.c (regcache::regcache): New function.
11440         (regcache::~regcache): New function.
11441         (regcache_xmalloc_1): Remove.
11442         (regcache_xmalloc): Call new regcache.
11443         (regcache_xfree): Call delete regcache.
11444         (get_thread_arch_aspace_regcache): Call new regcache.
11445
11446 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11447
11448         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11449         lwp instead of ptid_get_lwp.
11450
11451 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11452
11453         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11454         lwp_info instead of getting from inferior_ptid.
11455
11456 2017-04-27  Keith Seitz  <keiths@redhat.com>
11457
11458         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11459         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11460         (CV_CONVERSION_BADNESS): Define.
11461         (rank_one_type): Remove overly restrictive rvalue reference
11462         rank checks.
11463         Add cv-qualifier checks and subranks for type equality.
11464         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11465         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11466         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11467
11468 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11469
11470         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11471         count when creating the object.
11472
11473 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11474             Ulrich Weigand  <uweigand@de.ibm.com>
11475
11476         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11477         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11478         is used in AIX.
11479         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11480         (process_xcoff_symbol): Likewise.
11481         (scan_xcoff_symtab): Likewise.
11482
11483 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11484
11485         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11486         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11487         (ia64_access_reg): Use get_frame_register_unsigned.
11488         (ia64_access_rse_reg): Likewise.
11489         (ia64_libunwind_frame_prev_register): Likewise.
11490
11491 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11492
11493         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11494         * gdbarch.c: Regenerated.
11495         * gdbarch.h: Regenerated.
11496         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11497         visibility external.
11498         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11499         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11500         (enum cfa_how_kind): Move to ...
11501         (struct dwarf2_frame_state_reg_info): Likewise.
11502         (struct dwarf2_frame_state): Likewise.
11503         * dwarf2-frame.h: ... here.
11504         (dwarf2_frame_state_alloc_regs): New declaration.
11505         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11506         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11507
11508 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11509
11510         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11511         regcache_raw_read_unsigned.
11512         (xtensa_pseudo_register_write): Likewise.
11513
11514 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11515
11516         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11517         (nds32_pseudo_register_write): Likewise.
11518
11519 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11520
11521         * regcache.c (struct regcache) <readonly_p>: Change its type
11522         to bool.
11523         (regcache_xmalloc_1): Update parameter type and callers update.
11524
11525 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11526
11527         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11528         set_gdbarch_wchar_bit.
11529         * arm-tdep.c (arm_gdbarch_init): Likewise.
11530
11531 2017-04-25  Pedro Alves  <palves@redhat.com>
11532
11533         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11534         (BothAreRelocatable, memcopy, memmove): Don't define.
11535         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11536         macros.
11537
11538 2017-04-25  Pedro Alves  <palves@redhat.com>
11539
11540         * common/common-defs.h: Include "common/poison.h".
11541         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11542         and adjust.
11543         * common/poison.h: New file.
11544         * common/traits.h: Include <type_traits>.
11545         (Not, Or, Requires): New, moved from common/function-view.h.
11546
11547 2017-04-25  Pedro Alves  <palves@redhat.com>
11548
11549         * breakpoint.h (struct breakpoint): In-class initialize all
11550         fields.  Make boolean fields "bool".
11551         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11552         memset call and initializations no longer necessary.
11553
11554 2017-04-25  Pedro Alves  <palves@redhat.com>
11555
11556         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11557         reference.
11558         (pt_btrace_insn): New function.
11559         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11560
11561 2017-04-25  Pedro Alves  <palves@redhat.com>
11562
11563         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11564         "base" field and inherit from "bp_location" instead.  Add
11565         non-default ctor.
11566         (allocate_location_exception): Use new non-default ctor.
11567         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11568         (init_bp_location): Convert to ...
11569         (bp_location::bp_location): ... this new ctor, and remove memset
11570         call.
11571         (base_breakpoint_allocate_location): Use the new non-default ctor.
11572         * breakpoint.h (bp_location): Now a class.  Declare default and
11573         non-default ctors.  In-class initialize all members.
11574         (init_bp_location): Remove declaration.
11575
11576 2017-04-25  Pedro Alves  <palves@redhat.com>
11577
11578         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11579         assignment operator.
11580
11581 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11582
11583         * doublest.c (convert_doublest_to_floatformat): Call
11584         floatformat_totalsize_bytes.
11585
11586 2017-04-22  Tom Tromey  <tom@tromey.com>
11587
11588         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11589         ui_out_emit_list.
11590         * stack.c (print_frame): Use ui_out_emit_list.
11591         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11592         ui_out_emit_list.
11593         * mi/mi-main.c (print_one_inferior)
11594         (mi_cmd_data_list_register_names)
11595         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11596         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11597         ui_out_emit_list.
11598         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11599         (mi_output_solib_attribs): Use ui_out_emit_list,
11600         ui_out_emit_tuple.
11601         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11602         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11603         (mi_cmd_stack_list_args, list_args_or_locals): Use
11604         ui_out_emit_list.
11605         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11606         * breakpoint.c (print_solib_event, output_thread_groups): Use
11607         ui_out_emit_list.
11608
11609 2017-04-22  Tom Tromey  <tom@tromey.com>
11610
11611         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11612         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11613         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11614
11615 2017-04-22  Tom Tromey  <tom@tromey.com>
11616
11617         * tracepoint.c (tvariables_info_1)
11618         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11619
11620 2017-04-22  Tom Tromey  <tom@tromey.com>
11621
11622         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11623         annotate_arg_emitter.
11624         * breakpoint.c (print_mention_watchpoint)
11625         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11626         * annotate.h (struct annotate_arg_emitter): New.
11627
11628 2017-04-22  Tom Tromey  <tom@tromey.com>
11629
11630         * record-btrace.c (record_btrace_insn_history)
11631         (record_btrace_insn_history_range, record_btrace_call_history)
11632         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11633         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11634         ui_out_emit_tuple.
11635         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11636         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11637         * skip.c (skip_info): Use ui_out_emit_tuple.
11638         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11639         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11640         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11641         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11642         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11643         ui_out_emit_tuple.
11644         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11645         (output_register, mi_cmd_data_read_memory)
11646         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11647         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11648         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11649         Use ui_out_emit_tuple.
11650         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11651         ui_out_emit_tuple.
11652         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11653         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11654         * linux-thread-db.c (info_auto_load_libthread_db): Use
11655         ui_out_emit_tuple.
11656         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11657         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11658         * disasm.c (do_mixed_source_and_assembly_deprecated)
11659         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11660         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11661         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11662         * breakpoint.c (print_one_breakpoint_location)
11663         (print_one_breakpoint): Use ui_out_emit_tuple.
11664         * auto-load.c (print_script, info_auto_load_cmd): Use
11665         ui_out_emit_tuple.
11666         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11667
11668 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11669
11670         * thread.c (print_thread_info_1): Remove dead code.
11671
11672 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11673
11674         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11675         GDB_SELF_TEST.
11676         * arm-tdep.c (selftests::arm_record_test): Likewise.
11677
11678 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11679
11680         * regcache.c (regcache_restore): Remove argument 2.  Replace
11681         argument 3 with regcache.  Get register status from
11682         src->register_status and get register contents from
11683         register_buffer (src, regnum).
11684         (regcache_cpy): Update.
11685
11686 2017-04-19  Pedro Alves  <palves@redhat.com>
11687
11688         * gdbthread.h (thread): Add missing closing parenthesis in
11689         comment.
11690
11691 2017-04-19  Pedro Alves  <palves@redhat.com>
11692
11693         * common/refcounted-object.h: New file.
11694         * gdbthread.h: Include "common/refcounted-object.h".
11695         (thread_info): Inherit from refcounted_object and add comments.
11696         (thread_info::incref, thread_info::decref)
11697         (thread_info::m_refcount): Delete.
11698         (thread_info::deletable): Use the refcounted_object::refcount()
11699         method.
11700         * inferior.c (current_inferior_): Add comment.
11701         (set_current_inferior): Increment/decrement refcounts.
11702         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11703         not-deletable instead of comparing with the current inferior.
11704         (initialize_inferiors): Increment the initial inferior's refcount.
11705         * inferior.h (struct inferior): Forward declare.
11706         Include "common/refcounted-object.h".
11707         (current_inferior, set_current_inferior): Move declaration to
11708         before struct inferior's definition, and fix comment.
11709         (inferior): Inherit from refcounted_object.  Add comments.
11710         * thread.c (switch_to_thread_no_regs): Reference the thread's
11711         inferior pointer directly instead of doing a ptid lookup.
11712         (switch_to_no_thread): New function.
11713         (switch_to_thread(thread_info *)): New function, factored out
11714         from ...
11715         (switch_to_thread(ptid_t)): ... this.
11716         (restore_current_thread): Delete.
11717         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11718         fields, and add 'inf' field.
11719         (do_restore_current_thread_cleanup): Check whether old->inf is
11720         alive instead of looking up an inferior by ptid.  Use
11721         switch_to_thread and switch_to_no_thread.
11722         (restore_current_thread_cleanup_dtor): Use old->inf directly
11723         instead of lookup up an inferior by id.  Decref the inferior.
11724         Don't restore 'removable'.
11725         (make_cleanup_restore_current_thread): Same the inferior pointer
11726         in old, instead of the inferior number.  Incref the inferior.
11727         Don't save/clear 'removable'.
11728
11729 2017-04-19  Pedro Alves  <palves@redhat.com>
11730
11731         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11732         unittests/scoped_restore-selftests.c.
11733         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11734         * common/scoped_restore.h (scoped_restore_base): Make "class".
11735         (scoped_restore_base::release): New public method.
11736         (scoped_restore_base::scoped_restore_base): New protected ctor.
11737         (scoped_restore_base::m_saved_var): New protected field.
11738         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11739         scoped_restore_base base class instead of m_saved_var directly.
11740         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11741         (scoped_restore_tmpl::scoped_restore_tmpl(const
11742         scoped_restore_tmpl<T>&)): Likewise.
11743         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11744         method.
11745         (scoped_restore_tmpl::saved_var): New method.
11746         (scoped_restore_tmpl::m_saved_var): Delete.
11747         * inferior.h (inferior::detaching): Now a bool.
11748         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11749         cleanup.
11750         * unittests/scoped_restore-selftests.c: New file.
11751
11752 2017-04-19  Pedro Alves  <palves@redhat.com>
11753
11754         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11755         Re-sort in alphabetic order.
11756
11757 2017-04-18  Pedro Alves  <palves@redhat.com>
11758
11759         * xml-support.c (obstack_xml_printf): Delete.
11760         * xml-support.h (obstack_xml_printf): Delete.
11761
11762 2017-04-18  Pedro Alves  <palves@redhat.com>
11763
11764         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11765         vdebug, verror, body_text, start_element, end_element, name,
11766         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11767         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11768         is_xinclude>: Make private and add m_ prefix.
11769         (gdb_xml_parser::body_text): New method, based on ...
11770         (gdb_xml_body_text): ... this.  Adjust.
11771         (gdb_xml_parser::vdebug): New method, based on ...
11772         (gdb_xml_debug): ... this.  Adjust.
11773         (gdb_xml_parser::verror): New method, based on ...
11774         (gdb_xml_error): ... this.  Adjust.
11775         (gdb_xml_parser::start_element): New method, based on ...
11776         (gdb_xml_start_element): ... this.  Adjust.
11777         (gdb_xml_start_element_wrapper): Defer to
11778         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11779         (gdb_xml_parser::end_element): New method, based on ...
11780         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11781         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11782         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11783         (gdb_xml_parser::use_dtd): New method, based on ...
11784         (gdb_xml_use_dtd): ... this.  Adjust.
11785         (gdb_xml_parser::parse): New method, based on ...
11786         (gdb_xml_parse): ... this.  Adjust.
11787         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11788         (xinclude_start_include): Adjust to call the parser's name method.
11789         (xml_xinclude_default, xml_xinclude_start_doctype)
11790         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11791         method.
11792         (xml_process_xincludes): Adjust to call parser methods.
11793         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11794         declarations.
11795
11796 2017-04-18  Pedro Alves  <palves@redhat.com>
11797
11798         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11799         gdb::optional<std::string>.
11800         * xml-support.c: Include <string>.
11801         (scope_level::scope_level(scope_level &&))
11802         (scope_level::~scope_level): Delete.
11803         (scope_level::body): Now a std::string.
11804         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11805         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11806         parameter.
11807         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11808         (xinclude_parsing_data::output): Now a std::string reference.
11809         (xinclude_start_include): Adjust.
11810         (xml_xinclude_default): Adjust.
11811         (xml_process_xincludes): Add 'output' parameter, and return bool.
11812         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11813         and return bool.
11814         * xml-tdesc.c: Include <unordered_map> and <string>.
11815         (tdesc_xml_cache): Delete.
11816         (tdesc_xml_cache_s): Delete.
11817         (xml_cache): Now an std::unordered_map.
11818         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11819         (target_fetch_description_xml): Change return type to
11820         gdb::optional<std::string>, and adjust.
11821         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11822         (target_fetch_description_xml): Change return type to
11823         gdb::optional<std::string>.
11824
11825 2017-04-18  Pedro Alves  <palves@redhat.com>
11826
11827         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11828         unittests/optional-selftests.c.
11829         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11830         * unittests/optional-selftests.c: New file.
11831         * unittests/optional/assignment/1.cc: New file.
11832         * unittests/optional/assignment/2.cc: New file.
11833         * unittests/optional/assignment/3.cc: New file.
11834         * unittests/optional/assignment/4.cc: New file.
11835         * unittests/optional/assignment/5.cc: New file.
11836         * unittests/optional/assignment/6.cc: New file.
11837         * unittests/optional/assignment/7.cc: New file.
11838         * unittests/optional/cons/copy.cc: New file.
11839         * unittests/optional/cons/default.cc: New file.
11840         * unittests/optional/cons/move.cc: New file.
11841         * unittests/optional/cons/value.cc: New file.
11842         * unittests/optional/in_place.cc: New file.
11843         * unittests/optional/observers/1.cc: New file.
11844         * unittests/optional/observers/2.cc: New file.
11845
11846 2017-04-18  Pedro Alves  <palves@redhat.com>
11847
11848         * common/gdb_optional.h: Include common/traits.h.
11849         (in_place_t): New type.
11850         (in_place): New constexpr variable.
11851         (optional::optional): Remove member initialization of
11852         m_instantiated.
11853         (optional::optional(in_place_t...)): New constructor.
11854         (optional::~optional): Use reset.
11855         (optional::optional(const optional&)): New.
11856         (optional::optional(const optional&&)): New.
11857         (optional::optional(T &)): New.
11858         (optional::optional(T &&)): New.
11859         (operator::operator=(const optional &)): New.
11860         (operator::operator=(optional &&)): New.
11861         (operator::operator= (const T &))
11862         (operator::operator= (T &&))
11863         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11864         (operator::reset): New.
11865         (operator::m_instantiated):: Add in-class initializer.
11866         * common/traits.h: Include <type_traits>.
11867         (struct And): New types.
11868
11869 2017-04-18  Pedro Alves  <palves@redhat.com>
11870
11871         * xml-support.c: Include <vector>.
11872         (scope_level::scope_level(const gdb_xml_element *))
11873         (scope_level::scope_level(scope_level&&)): New.
11874         (scope_level::~scope_level): New.
11875         (scope_level_s): Delete.
11876         (gdb_xml_parser::scopes): Now a std::vector.
11877         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11878         Use std::vector.
11879         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11880         scope cleanup code.
11881         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11882         of the scopes member.  Use std::vector::emplace_back.
11883
11884 2017-04-18  Pedro Alves  <palves@redhat.com>
11885
11886         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11887         a bool.
11888         (gdb_xml_end_element): Change type of first parameter.
11889         (gdb_xml_cleanup): Rename to ...
11890         (gdb_xml_parser::~gdb_xml_parser): ... this.
11891         (gdb_xml_create_parser_and_cleanup): Delete with ...
11892         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11893         to this new ctor.
11894         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11895         using gdb_xml_create_parser_and_cleanup.
11896         (xinclude_parsing_data): Add ctor/dtor.
11897         (xml_xinclude_cleanup): Delete.
11898         (xml_process_xincludes): Create a local xinclude_parsing_data
11899         instead of heap-allocating one.  Create a local gdb_xml_parser
11900         instead of heap-allocating one with
11901         gdb_xml_create_parser_and_cleanup.
11902
11903 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11904
11905         PR threads/20743
11906         * fbsd-nat.c (resume_one_thread_cb): Remove.
11907         (resume_all_threads_cb): Remove.
11908         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11909         iterate_over_threads.
11910
11911 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11912
11913         * NEWS: Create a new section for the next release branch.
11914         Rename the section of the current branch, now that it has
11915         been cut.
11916
11917 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11918
11919         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11920         * version.in: Bump version to 8.0.50.DATE-git.
11921
11922 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11923
11924         PR gdb/21385
11925         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11926         independently of the host, and fix build breakage on Cygwin.
11927
11928 2017-04-13  Pedro Alves  <palves@redhat.com>
11929
11930         * inferior.c (free_inferior): Convert to ...
11931         (inferior::~inferior): ... this dtor.
11932         (inferior::inferior): New ctor, factored out from ...
11933         (add_inferior_silent): ... here.  Allocate the inferior with a new
11934         expression.
11935         (delete_inferior): Call delete instead of free_inferior.
11936         * inferior.h (gdb_environ, continuation): Forward declare.
11937         (inferior): Now a class.  Add in-class initialization to all
11938         members.  Make boolean fields bool, except 'detaching'.
11939         (inferior::inferior): New explicit ctor.
11940         (inferior::~inferior): New.
11941
11942 2017-04-13  Pedro Alves  <palves@redhat.com>
11943
11944         * inferior.c (init_inferior_list): Delete.
11945         * inferior.h (init_inferior_list): Delete.
11946
11947 2017-04-13  Pedro Alves  <palves@redhat.com>
11948
11949         PR threads/13217
11950         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11951         (top level): Call it twice, with different thread sets.
11952
11953 2017-04-13  Pedro Alves  <palves@redhat.com>
11954
11955         * thread.c: Include <algorithm>.
11956         (thread_array_cleanup): Delete.
11957         (scoped_inc_dec_ref): New class.
11958         (live_threads_count): New function.
11959         (set_thread_refcount): Delete.
11960         (tp_array_compar_ascending): Now a bool.
11961         (tp_array_compar): Convert to a std::sort comparison function.
11962         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11963         and live_threads_count.
11964
11965 2017-04-13  Pedro Alves  <palves@redhat.com>
11966
11967         * infrun.c (follow_fork_inferior): Also switch the current
11968         inferior.
11969
11970 2017-04-13  Pedro Alves  <palves@redhat.com>
11971
11972         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11973         before calling create_internal_breakpoint.
11974
11975 2017-04-13  Pedro Alves  <palves@redhat.com>
11976
11977         * fork-child.c (execv_argv): New class.
11978         (breakup_args): Refactored as ...
11979         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11980         Copy arguments to storage and replace separators with NULL
11981         terminators in place.
11982         (escape_bang_in_quoted_argument): Adjust to return bool.
11983         (execv_argv::execv_argv): New ctor.
11984         (execv_argv::init_for_shell): New method, factored out from
11985         fork_inferior.  Don't strdup strings into the vector.
11986         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11987         Remove free_vector_argv call.
11988
11989 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11990
11991         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11992         tdep->rx_psw_type.
11993
11994 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11995
11996         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11997         * rx-tdep.c (rx_gdbarch_init): Likewise.
11998
11999 2017-04-13  Pedro Alves  <palves@redhat.com>
12000
12001         * breakpoint.h (struct breakpoint): Reindent.
12002
12003 2017-04-13  Pedro Alves  <palves@redhat.com>
12004
12005         * breakpoint.c (bp_location): Rename to ...
12006         (bp_locations): ... this.  All references updated.
12007         (bp_location_count): Rename to ...
12008         (bp_locations_count): ... this.  All references updated.
12009         (bp_location_placed_address_before_address_max): Rename to ...
12010         (bp_locations_placed_address_before_address_max): ... this.  All
12011         references updated.
12012         (bp_location_shadow_len_after_address_max): Rename to ...
12013         (bp_locations_shadow_len_after_address_max): ... this.  All
12014         references updated.
12015         (bp_location_compare_addrs): Rename to ...
12016         (bp_locations_compare_addrs): ... this.  All references updated.
12017         (bp_location_compare):Rename to ...
12018         (bp_locations_compare): ... this.  All references updated.
12019         (bp_location_target_extensions_update): Rename to ...
12020         (bp_locations_target_extensions_update): ... this.  All references
12021         updated.
12022
12023 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12024
12025         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12026         * common/common.m4: Check headers 'termios.h', 'termio.h' and
12027         'sgtty.h'.
12028         * common/gdb_termios.h: New file, with parts of "terminal.h".
12029         * inflow.c: Include "gdb_termios.h".
12030         * ser-unix.c: Include "gdb_termios.h".
12031         * terminal.h: Move terminal-related defines to
12032         "common/gdb_termios.h".
12033
12034 2017-04-12  Tom Tromey  <tom@tromey.com>
12035
12036         * probe.c (parse_probes): Update.
12037         * location.h (delete_event_location): Don't declare.
12038         (event_location_deleter::operator()): Update.
12039         * location.c (event_location_deleter::operator()): Rename from
12040         delete_event_location.
12041         * linespec.h (linespec_result) <location>: Change type to
12042         event_location_up.
12043         * linespec.c (canonicalize_linespec, event_location_to_sals)
12044         (decode_objc): Update.
12045         (linespec_result): Don't call delete_event_location.
12046         * breakpoint.c (create_breakpoints_sal)
12047         (bkpt_probe_create_sals_from_location)
12048         (strace_marker_create_sals_from_location): Update.
12049
12050 2017-04-12  Tom Tromey  <tom@tromey.com>
12051
12052         * linespec.h (struct linespec_result): Add constructor and
12053         destructor.
12054         (init_linespec_result, destroy_linespec_result)
12055         (make_cleanup_destroy_linespec_result): Don't declare.
12056         * linespec.c (init_linespec_result): Remove.
12057         (linespec_result::~linespec_result): Rename from
12058         destroy_linespec_result.  Update.
12059         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12060         Remove.
12061         * breakpoint.c (create_breakpoint, break_range_command)
12062         (decode_location_default): Update.
12063         * ax-gdb.c (agent_command_1): Update.
12064
12065 2017-04-12  Tom Tromey  <tom@tromey.com>
12066
12067         * remote.c (remote_download_tracepoint): Update.
12068         * python/py-breakpoint.c (bppy_get_location): Update.
12069         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12070         (gdbscm_breakpoint_location): Update.
12071         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12072         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12073         Change type to event_location_up.
12074         * breakpoint.c (create_overlay_event_breakpoint)
12075         (create_longjmp_master_breakpoint)
12076         (create_std_terminate_master_breakpoint)
12077         (create_exception_master_breakpoint)
12078         (breakpoint_event_location_empty_p, print_breakpoint_location)
12079         (print_one_breakpoint_location, create_thread_event_breakpoint)
12080         (init_breakpoint_sal, create_breakpoint)
12081         (print_recreate_ranged_breakpoint, break_range_command)
12082         (init_ada_exception_breakpoint, say_where): Update.
12083         (base_breakpoint_dtor): Don't call delete_event_location.
12084         (bkpt_print_recreate, tracepoint_print_recreate)
12085         (dprintf_print_recreate, update_static_tracepoint)
12086         (breakpoint_re_set_default): Update.
12087
12088 2017-04-12  Tom Tromey  <tom@tromey.com>
12089
12090         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12091         type of "to_do".  Update.
12092         (compute_stack_depth): Use std::vector.
12093
12094 2017-04-12  Tom Tromey  <tom@tromey.com>
12095
12096         * printcmd.c (find_instruction_backward): Use std::vector.
12097
12098 2017-04-12  Tom Tromey  <tom@tromey.com>
12099
12100         * symfile.c (objfilep): Remove typedef.
12101         (reread_symbols): Use a std::vector.
12102
12103 2017-04-12  Tom Tromey  <tom@tromey.com>
12104
12105         * mi/mi-main.c (exec_direction_forward): Remove.
12106         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12107         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12108         scoped_restore.
12109         * guile/guile.c (guile_repl_command, guile_command)
12110         (gdbscm_execute_gdb_command): Use scoped_restore.
12111         * go-exp.y (go_parse): Use scoped_restore.
12112         * d-exp.y (d_parse): Use scoped_restore.
12113         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12114         * c-exp.y (c_parse): Use scoped_restore.
12115
12116 2017-04-12  Tom Tromey  <tom@tromey.com>
12117
12118         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12119         (mi_parse): Update return type.
12120         (mi_parse_free): Remove.
12121         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12122         (mi_parse::~mi_parse): Rename from mi_parse_free.
12123         (mi_parse_cleanup): Remove.
12124         (mi_parse): Return a unique_ptr.  Use new.
12125         * mi/mi-main.c (mi_execute_command): Update.
12126
12127 2017-04-12  Tom Tromey  <tom@tromey.com>
12128
12129         * location.c (explicit_location_lex_one): Return a
12130         unique_xmalloc_ptr.
12131         (string_to_explicit_location): Update.  Remove cleanups.
12132
12133 2017-04-12  Tom Tromey  <tom@tromey.com>
12134
12135         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12136         (compare_value_and_voffset): Change type.  Update.
12137         (compute_vtable_size): Change type of "offset_vec".
12138         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12139         (gnuv3_get_typeid): Remove extraneous declaration.
12140
12141 2017-04-12  Tom Tromey  <tom@tromey.com>
12142
12143         * charset.h (wchar_iterator): Fix comment.
12144
12145 2017-04-12  Tom Tromey  <tom@tromey.com>
12146
12147         * charset.c (iconv_wrapper): New class.
12148         (cleanup_iconv): Remove.
12149         (convert_between_encodings): Use it.
12150
12151 2017-04-12  Tom Tromey  <tom@tromey.com>
12152
12153         * symfile.h (increment_reading_symtab): Update type.
12154         * symfile.c (decrement_reading_symtab): Remove.
12155         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12156         * psymtab.c (psymtab_to_symtab): Update.
12157         * dwarf2read.c (dw2_instantiate_symtab): Update.
12158
12159 2017-04-12  Tom Tromey  <tom@tromey.com>
12160
12161         * jit.c (struct jit_reader): Declare separately.  Add constructor
12162         and destructor.  Change type of "handle".
12163         (loaded_jit_reader): Define separately.
12164         (jit_reader_load): Update.  New "new".
12165         (jit_reader_unload_command): Use "delete".
12166         * gdb-dlfcn.h (struct dlclose_deleter): New.
12167         (gdb_dlhandle_up): New typedef.
12168         (gdb_dlopen, gdb_dlsym): Update types.
12169         (gdb_dlclose): Remove.
12170         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12171         (gdb_dlsym): Change type of "handle".
12172         (make_cleanup_dlclose): Remove.
12173         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12174         * compile/compile-c-support.c (load_libcc): Update.
12175
12176 2017-04-12  Tom Tromey  <tom@tromey.com>
12177
12178         * symtab.h (find_pcs_for_symtab_line): Change return type.
12179         * symtab.c (find_pcs_for_symtab_line): Change return type.
12180         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12181         type of "vec".  Update.
12182         (ltpy_get_pcs_for_line): Update.
12183         * linespec.c (decode_digits_ordinary): Update.
12184
12185 2017-04-12  Tom Tromey  <tom@tromey.com>
12186
12187         * tracepoint.c (actions_command): Update.
12188         * python/python.c (python_command, python_interactive_command):
12189         Update.
12190         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12191         * guile/guile.c (guile_command): Update.
12192         * defs.h (read_command_lines, read_command_lines_1): Return
12193         command_line_up.
12194         (command_lines_deleter): New struct.
12195         (command_line_up): New typedef.
12196         * compile/compile.c (compile_code_command)
12197         (compile_print_command): Update.
12198         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12199         command_line_up.
12200         (make_cleanup_free_command_lines): Remove.
12201         * cli/cli-script.c (get_command_line, read_command_lines_1)
12202         (copy_command_lines): Return command_line_up.
12203         (while_command, if_command, read_command_lines, define_command)
12204         (document_command): Update.
12205         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12206         Remove.
12207         * breakpoint.h (breakpoint_set_commands): Change type of
12208         "commands".
12209         * breakpoint.c (breakpoint_set_commands): Change type of
12210         "commands".  Update.
12211         (do_map_commands_command, update_dprintf_command_list)
12212         (create_tracepoint_from_upload): Update.
12213
12214 2017-04-12  Tom Tromey  <tom@tromey.com>
12215
12216         * tracepoint.c (scope_info): Update.
12217         * spu-tdep.c (spu_catch_start): Update.
12218         * python/python.c (gdbpy_decode_line): Update.
12219         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12220         * python/py-breakpoint.c (bppy_init): Update.
12221         * probe.c (parse_probes): Update.
12222         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12223         * location.h (event_location_deleter): New struct.
12224         (event_location_up): New typedef.
12225         (new_linespec_location, new_address_location, new_probe_location)
12226         (new_explicit_location, copy_event_location)
12227         (string_to_event_location, string_to_event_location_basic)
12228         (string_to_explicit_location): Update return type.
12229         (make_cleanup_delete_event_location): Remove.
12230         * location.c (new_linespec_location, new_address_location)
12231         (new_probe_location, new_explicit_location, copy_event_location):
12232         Return event_location_up.
12233         (delete_event_location_cleanup)
12234         (make_cleanup_delete_event_location): Remove.
12235         (string_to_explicit_location, string_to_event_location_basic)
12236         (string_to_event_location): Return event_location_up.
12237         * linespec.c (canonicalize_linespec, event_location_to_sals)
12238         (decode_line_with_current_source)
12239         (decode_line_with_last_displayed, decode_objc): Update.
12240         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12241         * completer.c (location_completer): Update.
12242         * cli/cli-cmds.c (edit_command, list_command): Update.
12243         * breakpoint.c (create_overlay_event_breakpoint)
12244         (create_longjmp_master_breakpoint)
12245         (create_std_terminate_master_breakpoint)
12246         (create_exception_master_breakpoint)
12247         (create_thread_event_breakpoint): Update.
12248         (init_breakpoint_sal): Update.  Remove some dead code.
12249         (create_breakpoint_sal): Change type of "location".  Update.
12250         (create_breakpoints_sal, create_breakpoint, break_command_1)
12251         (dprintf_command, break_range_command, until_break_command)
12252         (init_ada_exception_breakpoint)
12253         (strace_marker_create_sals_from_location)
12254         (update_static_tracepoint, trace_command, ftrace_command)
12255         (strace_command, create_tracepoint_from_upload): Update.
12256         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12257         * ax-gdb.c (agent_command_1): Update.
12258
12259 2017-04-12  Pedro Alves  <palves@redhat.com>
12260
12261         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12262         * configure.tgt: Handle i[34567]86-*-go32* and
12263         i[34567]86-*-msdosdjgpp*.
12264         * i386-tdep.c (i386_svr4_reg_to_regnum):
12265         Make extern.
12266         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12267         i386-go32-tdep.c.
12268         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12269         * i386-go32-tdep.c: New file.
12270         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12271         declarations.
12272
12273 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12274
12275         * aix-thread.c (pd_status2str): Change return type to const char *.
12276
12277 2017-04-12  Pedro Alves  <palves@redhat.com>
12278
12279         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12280         calls to set_gdbarch_gnu_triplet_regexp.
12281
12282 2017-04-12  Pedro Alves  <palves@redhat.com>
12283
12284         PR gdb/21323
12285         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12286         New enum value.
12287         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12288         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12289         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12290         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12291         * gdbarch.h, gdbarch.c: Regenerate.
12292         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12293         gdbarch_wchar_bit and gdbarch_wchar_signed.
12294         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12295         * arm-tdep.c (arm_gdbarch_init): Likewise.
12296         * avr-tdep.c (avr_gdbarch_init): Likewise.
12297         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12298         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12299         * i386-tdep.c (i386_go32_init_abi): Likewise.
12300         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12301         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12302         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12303         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12304         * sh-tdep.c (sh_gdbarch_init): Likewise.
12305         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12306         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12307         * windows-tdep.c (windows_init_abi): Likewise.
12308         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12309
12310 2017-04-12  Pedro Alves  <palves@redhat.com>
12311
12312         PR c++/21323
12313         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12314         cplus_primitive_type_char32_t>: New enum values.
12315         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12316         and cplus_primitive_type_char32_t.
12317         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12318         32, use the archtecture's built-in type for char16_t and char32_t,
12319         respectively.  Otherwise, fallback to init_integer_type as before,
12320         but make the type unsigned, and issue a complaint.
12321         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12322
12323 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12324
12325         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12326         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12327
12328 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12329
12330         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12331         'const char *'.
12332
12333 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12334
12335         * common/common-utils.c (free_vector_argv): New function.
12336         * common/common-utils.h: Include <vector>.
12337         (free_vector_argv): New prototype.
12338         * darwin-nat.c (darwin_create_inferior): Rewrite function
12339         prototype in order to constify "exec_file" and accept a
12340         "std::string" for "allargs".
12341         * fork-child.c: Include <vector>.
12342         (breakup_args): Rewrite function, using C++.
12343         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12344         and accept "std::string" for "allargs".  Update the code to
12345         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12346         and "execvp".
12347         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12348         order to constify "exec_file" and accept a "std::string" for
12349         "allargs".
12350         * go32-nat.c (go32_create_inferior): Likewise.
12351         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12352         * infcmd.c (run_command_1): Constify "exec_file".  Use
12353         "std::string" for inferior arguments.
12354         * inferior.h (fork_inferior): Update prototype.
12355         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12356         prototype in order to constify "exec_file" and accept a
12357         "std::string" for "allargs".
12358         * nto-procfs.c (procfs_create_inferior): Likewise.
12359         * procfs.c (procfs_create_inferior): Likewise.
12360         * remote-sim.c (gdbsim_create_inferior): Likewise.
12361         * remote.c (extended_remote_run): Update code to accept
12362         "std::string" as argument.
12363         (extended_remote_create_inferior): Rewrite function prototype in
12364         order to constify "exec_file" and accept a "std::string" for
12365         "allargs".
12366         * rs6000-nat.c (super_create_inferior): Likewise.
12367         (rs6000_create_inferior): Likewise.
12368         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12369         * windows-nat.c (windows_create_inferior): Likewise.
12370
12371 2017-04-11  Pedro Alves  <palves@redhat.com>
12372
12373         * thread.c: Fix whitespace throughout.
12374
12375 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12376
12377         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12378
12379 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12380
12381         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12382
12383 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12384
12385         PR gdb/21364
12386         * osdata.c (info_osdata): Check if 'type' is an empty string
12387         instead of NULL.
12388
12389 2017-04-10  Pedro Alves  <palves@redhat.com>
12390
12391         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12392         (ptid_to_global_thread_id, in_thread_list)
12393         (do_captured_list_thread_ids, set_resumed, set_running)
12394         (set_executing, set_stop_requested, finish_thread_state)
12395         (validate_registers_access, can_access_registers_ptid)
12396         (print_thread_info_1, switch_to_thread)
12397         (do_restore_current_thread_cleanup)
12398         (make_cleanup_restore_current_thread, thread_command)
12399         (thread_name_command): Use operator== instead of ptid_equal.
12400
12401 2017-04-10  Pedro Alves  <palves@redhat.com>
12402
12403         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12404         (current_thread_cleanup_chain): Delete.
12405         (restore_current_thread_cleanup_dtor)
12406         (make_cleanup_restore_current_thread): Remove references to
12407         current_thread_cleanup_chain.
12408
12409 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12410
12411         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12412         REG_UNKNOWN.
12413
12414 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12415
12416         PR gdb/19942
12417         * gdbthread.h (thread_info::deletable): New method.
12418         (thread_info::incref): New method.
12419         (thread_info::decref): New method.
12420         (thread_info::refcount): Move it to private.
12421         * infrun.c (save_stop_context): Call inc_refcount.
12422         (release_stop_context_cleanup): Likewise.
12423         * thread.c (set_thread_exited): New function.
12424         (init_thread_list): Delete "tp" only it is deletable, otherwise
12425         call set_thread_exited.
12426         (delete_thread_1): Call set_thread_exited.
12427         (current_thread_cleanup) <inferior_pid>: Remove.
12428         <thread>: New field.
12429         (restore_current_thread_ptid_changed): Removed.
12430         (do_restore_current_thread_cleanup): Adjust.
12431         (restore_current_thread_cleanup_dtor): Don't call
12432         find_thread_ptid.
12433         (set_thread_refcount): Use dec_refcount.
12434         (make_cleanup_restore_current_thread): Adjust.
12435         (thread_apply_all_command): Call inc_refcount.
12436         (_initialize_thread): Don't call
12437         observer_attach_thread_ptid_changed.
12438
12439 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12440
12441         * thread.c (delete_thread_1): Hoist code on marking thread as
12442         exited.
12443
12444 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12445
12446         * windows-nat.c (windows_detach): Initialize ptid with
12447         minus_one_ptid.
12448
12449 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12450
12451         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12452
12453 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12454
12455         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12456         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12457         (bfin_pseudo_register_write): Likewise
12458
12459 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12460
12461         * common/ptid.h (struct ptid): Change to...
12462         (class ptid_t): ... this.
12463         <ptid_t>: New constructors.
12464         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12465         matches>: New methods.
12466         <make_null, make_minus_one>: New static methods.
12467         <pid>: Rename to...
12468         <m_pid>: ...this.
12469         <lwp>: Rename to...
12470         <m_lwp>: ...this.
12471         <tid>: Rename to...
12472         <m_tid>: ...this.
12473         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12474         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12475         as references, move comment to class ptid_t.
12476         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12477         ptid_t static methods.
12478         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12479         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12480         Take ptid arguments as references, implement using ptid_t methods.
12481         * unittests/ptid-selftests.c: New file.
12482         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12483         unittests/ptid-selftests.c.
12484         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12485
12486 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12487
12488         * python/python.c (python_run_simple_file): Cast mode literal to
12489         non-const char pointer as expected by PyFile_FromString.
12490
12491 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12492
12493         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12494         minus_one_ptid and null_ptid.
12495
12496 2017-04-05  Pedro Alves  <palves@redhat.com>
12497
12498         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12499         * configure: Regenerate.
12500
12501 2017-04-05  Pedro Alves  <palves@redhat.com>
12502
12503         * ada-exp.y (yyerror): Constify.
12504         * ada-lang.c (bound_name, get_selections)
12505         (ada_variant_discrim_type)
12506         (ada_variant_discrim_name, ada_value_struct_elt)
12507         (ada_lookup_struct_elt_type, is_unchecked_variant)
12508         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12509         (catch_ada_exception_command_split)
12510         (catch_ada_assert_command_split, catch_assert_command)
12511         (ada_op_name): Constify.
12512         * ada-lang.h (ada_yyerror, get_selections)
12513         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12514         * arc-tdep.c (arc_print_frame_cache): Constify.
12515         * arm-tdep.c (arm_skip_stub): Constify.
12516         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12517         (gen_aggregate_elt_ref): Constify.
12518         * bcache.c (print_bcache_statistics): Constify.
12519         * bcache.h (print_bcache_statistics): Constify.
12520         * break-catch-throw.c (catch_exception_command_1):
12521         * breakpoint.c (struct ep_type_description::description):
12522         Constify.
12523         (add_solib_catchpoint): Constify.
12524         (catch_fork_command_1): Add cast.
12525         (add_catch_command): Constify.
12526         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12527         Constify.
12528         * bsd-uthread.c (bsd_uthread_state): Constify.
12529         * buildsym.c (patch_subfile_names): Constify.
12530         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12531         Constify.
12532         * c-exp.y (yyerror): Constify.
12533         (token::oper): Constify.
12534         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12535         * c-varobj.c (cplus_describe_child): Constify.
12536         * charset.c (find_charset_names): Add cast.
12537         (find_charset_names): Constify array and add const_cast.
12538         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12539         (edit_command): Constify.
12540         * cli/cli-decode.c (lookup_cmd): Constify.
12541         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12542         Constify.
12543         (struct dump_context): Constify.
12544         (add_dump_command, restore_command): Constify.
12545         * cli/cli-script.c (get_command_line): Constify.
12546         * cli/cli-script.h (get_command_line): Constify.
12547         * cli/cli-utils.c (check_for_argument): Constify.
12548         * cli/cli-utils.h (check_for_argument): Constify.
12549         * coff-pe-read.c (struct read_pe_section_data): Constify.
12550         * command.h (lookup_cmd): Constify.
12551         * common/print-utils.c (decimal2str): Constify.
12552         * completer.c (gdb_print_filename): Constify.
12553         * corefile.c (set_gnutarget): Constify.
12554         * cp-name-parser.y (yyerror): Constify.
12555         * cp-valprint.c (cp_print_class_member): Constify.
12556         * cris-tdep.c (cris_register_name, crisv32_register_name):
12557         Constify.
12558         * d-exp.y (yyerror): Constify.
12559         (struct token::oper): Constify.
12560         * d-lang.h (d_yyerror): Constify.
12561         * dbxread.c (struct header_file_location::name): Constify.
12562         (add_old_header_file, add_new_header_file, last_function_name)
12563         (dbx_next_symbol_text, add_bincl_to_list)
12564         (find_corresponding_bincl_psymtab, set_namestring)
12565         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12566         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12567         * defs.h (command_line_input, print_address_symbolic)
12568         (deprecated_readline_begin_hook): Constify.
12569         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12570         Constify.
12571         * event-top.c (handle_line_of_input): Constify and add cast.
12572         * exceptions.c (catch_errors): Constify.
12573         * exceptions.h (catch_errors): Constify.
12574         * expprint.c (print_subexp_standard, op_string, op_name)
12575         (op_name_standard, dump_raw_expression, dump_raw_expression):
12576         * expression.h (op_name, op_string, dump_raw_expression):
12577         Constify.
12578         * f-exp.y (yyerror): Constify.
12579         (struct token::oper): Constify.
12580         (struct f77_boolean_val::name): Constify.
12581         * f-lang.c (f_word_break_characters): Constify.
12582         * f-lang.h (f_yyerror): Constify.
12583         * fork-child.c (fork_inferior): Add cast.
12584         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12585         (new_variant): Constify.
12586         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12587         * gdbarch.c: Regenerate.
12588         * gdbcore.h (set_gnutarget): Constify.
12589         * go-exp.y (yyerror): Constify.
12590         (token::oper): Constify.
12591         * go-lang.h (go_yyerror): Constify.
12592         * go32-nat.c (go32_sysinfo): Constify.
12593         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12594         * guile/scm-cmd.c (cmdscm_function): Constify.
12595         * guile/scm-param.c (pascm_param_value): Constify.
12596         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12597         (h8300sx_register_name): Constify.
12598         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12599         Constify.
12600         * ia64-tdep.c (ia64_register_names): Constify.
12601         * infcmd.c (construct_inferior_arguments): Constify.
12602         (path_command, attach_post_wait): Constify.
12603         * language.c (show_range_command, show_case_command)
12604         (unk_lang_error): Constify.
12605         * language.h (language_defn::la_error)
12606         (language_defn::la_name_of_this): Constify.
12607         * linespec.c (decode_line_2): Constify.
12608         * linux-thread-db.c (thread_db_err_str): Constify.
12609         * lm32-tdep.c (lm32_register_name): Constify.
12610         * m2-exp.y (yyerror): Constify.
12611         * m2-lang.h (m2_yyerror): Constify.
12612         * m32r-tdep.c (m32r_register_names): Constify and make static.
12613         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12614         * m88k-tdep.c (m88k_register_name): Constify.
12615         * macroexp.c (appendmem): Constify.
12616         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12617         (upgrade_type, parse_external, parse_partial_symbols)
12618         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12619         (new_symbol): Constify.
12620         * memattr.c (mem_info_command): Constify.
12621         * mep-tdep.c (register_name_from_keyword): Constify.
12622         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12623         Constify.
12624         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12625         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12626         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12627         cast.
12628         (mi_execute_async_cli_command): Constify.
12629         * mips-tdep.c (mips_register_name): Constify.
12630         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12631         (am33_register_name, am33_2_register_name)
12632         * moxie-tdep.c (moxie_register_names): Constify.
12633         * nat/linux-osdata.c (osdata_type): Constify fields.
12634         * nto-tdep.c (nto_parse_redirection): Constify.
12635         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12636         (lookup_child_selector): Constify.
12637         (objc_methcall::name): Constify.
12638         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12639         (lookup_struct_typedef): Constify.
12640         * objfiles.c (pc_in_section): Constify.
12641         * objfiles.h (pc_in_section): Constify.
12642         * p-exp.y (struct token::oper): Constify.
12643         (yyerror): Constify.
12644         * p-lang.h (pascal_yyerror): Constify.
12645         * parser-defs.h (op_name_standard): Constify.
12646         (op_print::string): Constify.
12647         (exp_descriptor::op_name): Constify.
12648         * printcmd.c (print_address_symbolic): Constify.
12649         * psymtab.c (print_partial_symbols): Constify.
12650         * python/py-breakpoint.c (stop_func): Constify.
12651         (bppy_get_expression): Constify.
12652         * python/py-cmd.c (cmdpy_completer::name): Constify.
12653         (cmdpy_function): Constify.
12654         * python/py-event.c (evpy_add_attribute)
12655         (gdbpy_initialize_event_generic): Constify.
12656         * python/py-event.h (evpy_add_attribute)
12657         (gdbpy_initialize_event_generic): Constify.
12658         * python/py-evts.c (add_new_registry): Constify.
12659         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12660         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12661         * python/py-inferior.c (get_buffer): Add cast.
12662         * python/py-param.c (parm_constant::name): Constify.
12663         * python/py-unwind.c (fprint_frame_id): Constify.
12664         * python/python.c (gdbpy_parameter_value): Constify.
12665         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12666         * remote.c (memory_packet_config::name): Constify.
12667         (show_packet_config_cmd, remote_write_bytes)
12668         (remote_buffer_add_string):
12669         * reverse.c (exec_reverse_once): Constify.
12670         * rs6000-tdep.c (variant::name, variant::description): Constify.
12671         * rust-exp.y (rustyyerror): Constify.
12672         * rust-lang.c (rust_op_name): Constify.
12673         * rust-lang.h (rustyyerror): Constify.
12674         * serial.h (serial_ops::name): Constify.
12675         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12676         (sh_sh3e_register_name, sh_sh2e_register_name)
12677         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12678         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12679         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12680         (sh_sh4al_dsp_register_name): Constify.
12681         * sh64-tdep.c (sh64_register_name): Constify.
12682         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12683         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12684         * stabsread.c (patch_block_stabs, read_type_number)
12685         (ref_map::stabs, ref_add, process_reference)
12686         (symbol_reference_defined, define_symbol, define_symbol)
12687         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12688         (read_one_struct_field, read_struct_fields, read_baseclasses)
12689         (read_tilde_fields, read_struct_type, read_array_type)
12690         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12691         (read_huge_number, read_range_type, read_args, common_block_start)
12692         (find_name_end): Constify.
12693         * stabsread.h (common_block_start, define_symbol)
12694         (process_one_symbol, symbol_reference_defined, ref_add):
12695         * symfile.c (get_section_index, add_symbol_file_command):
12696         * symfile.h (get_section_index): Constify.
12697         * target-descriptions.c (tdesc_type::name): Constify.
12698         (tdesc_free_type): Add cast.
12699         * target.c (find_default_run_target):
12700         (add_deprecated_target_alias, find_default_run_target)
12701         (target_announce_detach): Constify.
12702         (do_option): Constify.
12703         * target.h (add_deprecated_target_alias): Constify.
12704         * thread.c (print_thread_info_1): Constify.
12705         * top.c (deprecated_readline_begin_hook, command_line_input):
12706         Constify.
12707         (init_main): Add casts.
12708         * top.h (handle_line_of_input): Constify.
12709         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12710         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12711         (tfind_command): Rename to ...
12712         (tfind_command_1): ... this and constify.
12713         (tfind_command): New function.
12714         (tfind_end_command, tfind_start_command): Adjust.
12715         (encode_source_string): Constify.
12716         * tracepoint.h (encode_source_string): Constify.
12717         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12718         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12719         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12720         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12721         * tui/tui-win.c (parse_scrolling_args): Constify.
12722         * tui/tui-windata.c (tui_erase_data_content): Constify.
12723         * tui/tui-windata.h (tui_erase_data_content): Constify.
12724         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12725         * tui/tui.c (tui_enable): Add cast.
12726         * utils.c (defaulted_query): Constify.
12727         (init_page_info): Add cast.
12728         (puts_debug, subset_compare): Constify.
12729         * utils.h (subset_compare): Constify.
12730         * varobj.c (varobj_format_string): Constify.
12731         * varobj.h (varobj_format_string): Constify.
12732         * vax-tdep.c (vax_register_name): Constify.
12733         * windows-nat.c (windows_detach): Constify.
12734         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12735         * xml-support.c (gdb_xml_end_element): Constify.
12736         * xml-tdesc.c (tdesc_start_reg): Constify.
12737         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12738         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12739         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12740
12741 2017-04-05  Pedro Alves  <palves@redhat.com>
12742
12743         * proc-api.c (struct trans): Constify.
12744         (procfs_note): Constify.
12745         * proc-events.c (struct trans, syscall_table):
12746         * proc-flags.c (struct trans): Constify.
12747         * proc-utils.h (procfs_note): Constify.
12748         * proc-why.c (struct trans): Constify.
12749         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12750         (procfs_detach): Constify.
12751         * sol-thread.c (struct string_map): Constify.
12752         (td_err_string, td_state_string): Constify.
12753
12754 2017-04-05  Pedro Alves  <palves@redhat.com>
12755
12756         * proc-api.c (procfs_filename): Don't initialize
12757         procfs_filename.
12758         (prepare_to_trace): Assume procfs_filename is non-NULL.
12759         (_initialize_proc_api): Give procfs_filename a default value here.
12760
12761 2017-04-05  Pedro Alves  <palves@redhat.com>
12762
12763         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12764         'cond_string' parameter.
12765         (extract_exception_regexp): Constify 'string' parameter.
12766         (catch_exception_command_1): Constify.
12767         * breakpoint.c (init_catchpoint)
12768         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12769         parameter.
12770         (ep_parse_optional_if_clause, catch_fork_command_1)
12771         (catch_exec_command_1): Constify.
12772         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12773         parameter.
12774         (ep_parse_optional_if_clause): Constify.
12775         * cli/cli-utils.c (remove_trailing_whitespace)
12776         (check_for_argument): Constify.
12777         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12778         non-const overload.
12779         (check_for_argument): Likewise.
12780
12781 2017-04-05  Pedro Alves  <palves@redhat.com>
12782
12783         * event-top.c (command_line_handler): Add cast to execute_command
12784         call.
12785         * record-btrace.c (cmd_record_btrace_bts_start)
12786         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12787         (cmd_record_btrace_start): Add cast to execute_command call.
12788         * record-full.c (record_full_goto_insn):
12789         * record.c (record_start, record_stop): Add cast to
12790         execute_command_to_string calls.
12791         (cmd_record_start): Add cast to execute_command calls.
12792
12793 2017-04-05  Pedro Alves  <palves@redhat.com>
12794
12795         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12796         static inline function.
12797         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12798         array and use gdb_PyArg_ParseTupleAndKeywords.
12799         * python/py-cmd.c (cmdpy_init): Likewise.
12800         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12801         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12802         (infpy_search_memory): Likewise.
12803         * python/py-objfile.c (objfpy_add_separate_debug_file)
12804         (gdbpy_lookup_objfile): Likewise.
12805         * python/py-symbol.c (gdbpy_lookup_symbol)
12806         (gdbpy_lookup_global_symbol): Likewise.
12807         * python/py-type.c (gdbpy_lookup_type): Likewise.
12808         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12809         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12810         Likewise.
12811
12812 2017-04-05  Pedro Alves  <palves@redhat.com>
12813
12814         * python/python-internal.h (gdb_PyGetSetDef): New type.
12815         * python/py-block.c (block_object_getset)
12816         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12817         * python/py-event.c (event_object_getset)
12818         (finish_breakpoint_object_getset): Likewise.
12819         * python/py-inferior.c (inferior_object_getset): Likewise.
12820         * python/py-infthread.c (thread_object_getset): Likewise.
12821         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12822         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12823         * python/py-objfile.c (objfile_getset): Likewise.
12824         * python/py-progspace.c (pspace_getset): Likewise.
12825         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12826         Likewise.
12827         * python/py-record.c (recpy_record_getset): Likewise.
12828         * python/py-symbol.c (symbol_object_getset): Likewise.
12829         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12830         Likewise.
12831         * python/py-type.c (type_object_getset, field_object_getset):
12832         Likewise.
12833         * python/py-value.c (value_object_getset): Likewise.
12834
12835 2017-04-05  Pedro Alves  <palves@redhat.com>
12836
12837         * python/python-internal.h (gdb_PyObject_CallMethod)
12838         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12839         New functions.
12840         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12841         (PySys_GetObject, PySys_SetPath): New macros.
12842
12843 2017-04-05  Pedro Alves  <palves@redhat.com>
12844
12845         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12846         info_osdata_command.
12847         * osdata.c (info_osdata_command): Rename to ...
12848         (info_osdata): ... this.  Constify 'type' parameter, and remove
12849         the 'from_tty' parameter.  Accept NULL TYPE.
12850         (info_osdata_command): New function.
12851         * osdata.h (info_osdata_command): Remove declaration.
12852         (info_osdata): New declaration.
12853
12854 2017-04-05  Pedro Alves  <palves@redhat.com>
12855
12856         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12857         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12858         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12859         parameter.
12860         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12861         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12862         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12863         parameter.
12864         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12865         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12866         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12867         (mi_cmd_file_list_exec_source_files)
12868         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12869         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12870         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12871         parameter.
12872         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12873         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12874         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12875         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12876         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12877         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12878         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12879         'command' parameter.
12880         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12881         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12882         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12883         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12884         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12885         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12886         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12887         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12888         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12889         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12890         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12891         parameter.
12892         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12893         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12894         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12895         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12896         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12897         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12898         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12899         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12900         (mi_cmd_data_list_changed_registers)
12901         (mi_cmd_data_write_register_values)
12902         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12903         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12904         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12905         (mi_cmd_list_features, mi_cmd_list_target_features)
12906         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12907         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12908         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12909         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12910         (mi_cmd_trace_frame_collected): Constify 'command'
12911         parameter.
12912         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12913         'command' parameter.
12914
12915 2017-04-05  Pedro Alves  <palves@redhat.com>
12916
12917         * ada-lang.c (ada_completer_word_break_characters): Now a const
12918         array.
12919         (ada_get_gdb_completer_word_break_characters): Constify.
12920         * completer.c (gdb_completer_command_word_break_characters)
12921         (gdb_completer_file_name_break_characters)
12922         (gdb_completer_quote_characters): Now const arrays.
12923         (get_gdb_completer_quote_characters): Constify.
12924         (set_rl_completer_word_break_characters): New function.
12925         (set_gdb_completion_word_break_characters)
12926         (complete_line_internal): Use it.
12927         * completer.h (get_gdb_completer_quote_characters): Constify.
12928         (set_rl_completer_word_break_characters): Declare.
12929         * f-lang.c (f_word_break_characters): Constify.
12930         * language.c (default_word_break_characters): Constify.
12931         * language.h (language_defn::la_word_break_characters): Constify.
12932         (default_word_break_characters): Constify.
12933         * top.c (init_main): Use set_rl_completer_word_break_characters.
12934
12935 2017-04-05  Pedro Alves  <palves@redhat.com>
12936
12937         * aix-thread.c (aix_thread_pid_to_str)
12938         (aix_thread_extra_thread_info): Constify.
12939         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12940         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12941         (bsd_uthread_pid_to_str): Constify.
12942         * corelow.c (core_pid_to_str): Constify.
12943         * darwin-nat.c (darwin_pid_to_str): Constify.
12944         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12945         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12946         Constify.
12947         * gnu-nat.c (gnu_pid_to_str): Constify.
12948         * go32-nat.c (go32_pid_to_str): Constify.
12949         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12950         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12951         * inferior.c (inferior_pid_to_str): Constify.
12952         * linux-nat.c (linux_nat_pid_to_str): Constify.
12953         * linux-tdep.c (linux_core_pid_to_str): Constify.
12954         * linux-thread-db.c (thread_db_pid_to_str)
12955         (thread_db_extra_thread_info): Constify.
12956         * nto-tdep.c (nto_extra_thread_info): Constify.
12957         * nto-tdep.h (nto_extra_thread_info): Constify.
12958         * obsd-nat.c (obsd_pid_to_str): Constify.
12959         * procfs.c (procfs_pid_to_str): Constify.
12960         * ravenscar-thread.c (ravenscar_extra_thread_info)
12961         (ravenscar_pid_to_str): Constify.
12962         * remote-sim.c (gdbsim_pid_to_str): Constify.
12963         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12964         Constify.
12965         * sol-thread.c (solaris_pid_to_str): Constify.
12966         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12967         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12968         * target.c (default_pid_to_str, target_pid_to_str)
12969         (normal_pid_to_str, default_pid_to_str): Constify.
12970         * target.h (target_ops::to_pid_to_str)
12971         (target_ops::to_extra_thread_info): Constify.
12972         (target_pid_to_str, normal_pid_to_str): Constify.
12973         * windows-nat.c (windows_pid_to_str): Constify.
12974         * gdbarch.sh (core_pid_to_str): Constify.
12975         * target-delegates.c: Regenerate.
12976         * gdbarch.h, gdbarch.c: Regenerate.
12977
12978 2017-04-05  Pedro Alves  <palves@redhat.com>
12979
12980         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12981         the memory of the temporary warning_pre_print override.
12982         * utils.c (warning_pre_print): Constify.
12983         * utils.h (warning_pre_print): Constify.
12984
12985 2017-04-05  Pedro Alves  <palves@redhat.com>
12986
12987         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12988         (shell_command): New function.
12989         (make_command): Use std::string.
12990         (init_cli_cmds): Register shell_command instead of shell_escape.
12991
12992 2017-04-05  Pedro Alves  <palves@redhat.com>
12993
12994         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12995         * tracepoint.c (default_collect): Don't initialize.
12996
12997 2017-04-05  Pedro Alves  <palves@redhat.com>
12998
12999         * macroexp.c (macro_buffer::shared): Now a bool.
13000         (init_buffer): Update.
13001         (init_shared_buffer): Constify 'addr' parameter.
13002         (substitute_args, expand, macro_expand, macro_expand_next): Remove
13003         casts.
13004
13005 2017-04-05  Pedro Alves  <palves@redhat.com>
13006
13007         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13008         * disasm.c (set_disassembler_options): Constify local.
13009         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13010
13011 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
13012
13013         PR gdb/21352
13014         * tracefile.c (tsave_command): Fix argument parsing for '-r'
13015         option.
13016
13017 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13018
13019         * frame.c (frame_unwind_register_unsigned): Call
13020         frame_unwind_register_value.
13021
13022 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13023
13024         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13025         Use gdb_test_multiple, and don't match anchor.
13026
13027 2017-04-05  Pedro Alves  <palves@redhat.com>
13028
13029         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13030         (Write After Approval): Remove Simon Marchi.
13031
13032 2017-04-05  Pedro Alves  <palves@redhat.com>
13033
13034         * common/gdb_optional.h (optional::optional): Make constexpr and
13035         initialize m_dummy.
13036
13037 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13038
13039         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13040         (amd64fbsd_jmp_buf_reg_offset): Remove.
13041         (amd64fbsd_supply_uthread): Remove function.
13042         (amd64fbsd_collect_uthread): Remove function.
13043         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13044         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13045         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13046         (fbsd-nat.c): Update comment.
13047         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13048         (i386fbsd_jmp_buf_reg_offset): Remove.
13049         (i386fbsd_supply_uthread): Remove function.
13050         (i386fbsd_collect_uthread): Remove function.
13051         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13052
13053 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13054
13055         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13056         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13057         * NEWS: Mention that support for FreeBSD/alpha was removed.
13058         * alpha-fbsd-tdep.c: Delete file.
13059         * config/alpha/fbsd.mh: Delete file.
13060         * configure.host: Delete alpha*-*-freebsd* and
13061         alpha*-*-kfreebsd*-gnu.
13062         * configure.tgt: Delete alpha*-*-freebsd* and
13063         alpha*-*-kfreebsd*-gnu.
13064
13065 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13066
13067         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13068         amd64bsd_store_inferior_registers): Use ptid from regcache.
13069
13070 2017-04-04  Pedro Alves  <palves@redhat.com>
13071
13072         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13073         data fields, make them private and add "m_" prefixes.
13074         (lnp_state_machine::lnp_state_machine): New ctor.
13075         (record_line, check_line_address, handle_set_discriminator)
13076         (handle_set_address, handle_advance_pc, handle_special_opcode)
13077         (handle_advance_line, handle_set_file, handle_negate_stmt)
13078         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13079         (end_sequence, advance_line): New methods.
13080         (m_gdbarch, m_record_lines_p): New fields.
13081         (lnp_reader_state): Delete.
13082         (dwarf_record_line): Rename to ...
13083         (lnp_state_machine::record_line): ... adjust.
13084         (init_lnp_state_machine): Delete.
13085         (lnp_state_machine::lnp_state_machine): New.
13086         (check_line_address): Rename to ...
13087         (lnp_state_machine::check_line_address): This.
13088         (dwarf_decode_lines_1): Remove reference to "reader_state".
13089         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13090         State machine internal state manipulation moved to
13091         lnp_state_machine methods.
13092
13093 2017-04-04  Pedro Alves  <palves@redhat.com>
13094
13095         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13096         unittests/offset-type-selftests.c.
13097         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13098         * common/offset-type.h: New file.
13099         * common/preprocessor.h: New file.
13100         * common/traits.h: New file.
13101         * common/valid-expr.h: New file.
13102         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13103         sect_offset and cu_offset strong typedefs throughout.
13104         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13105         typedefs throughout.
13106         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13107         sect_offset and cu_offset strong typedefs throughout.
13108         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13109         typedefs throughout.
13110         * gdbtypes.h: Include "common/offset-type.h".
13111         (cu_offset): Now an offset type (strong typedef) instead of a
13112         struct.
13113         (sect_offset): Likewise.
13114         (union call_site_parameter_u): Rename "param_offset" field to
13115         "param_cu_off".
13116         * unittests/offset-type-selftests.c: New file.
13117
13118 2017-04-04  Pedro Alves  <palves@redhat.com>
13119
13120         * common/underlying.h: New file.
13121         * dwarf2read.c: Include "common/gdb_optional.h" and
13122         "common/underlying.h".
13123         (dir_index, file_name_index): New types.
13124         (file_entry): Use them.
13125         (file_entry::include): Use to_underlying.
13126         (line_header::add_file_name): Use dir_index.
13127         (read_formatted_entries): Use gdb::optional.  Read form before
13128         writting to file_entry.
13129         (dwarf_decode_line_header): Use dir_index.
13130         (lnp_state_machine::current_file): Use to_underlying.
13131         (lnp_state_machine::file): Change type to file_name_index.
13132         (dwarf_record_line): Use to_underlying.
13133         (init_lnp_state_machine): Use file_name_index.
13134         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13135
13136 2017-04-04  Pedro Alves  <palves@redhat.com>
13137
13138         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13139         operator bool, has_value and get methods.
13140
13141 2017-04-04  Pedro Alves  <palves@redhat.com>
13142
13143         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13144         fields.
13145         (line_header): Initialize all data fields.  Change type of
13146         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13147         Change type of include_dirs to std::vector<const char *>.  Remove
13148         num_include_dirs, include_dirs_size.  Change type of file_names to
13149         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13150         (line_header::line_header): New.
13151         (line_header::add_include_dir, line_header::add_file_name): New
13152         methods.
13153         (line_header::include_dir_at): Remove NULL check.
13154         (line_header::file_name_at): Add const overload.
13155         (line_header_up): New unique_ptr typedef.
13156         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13157         std::vector.  Remove free_line_header call.
13158         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13159         free_line_header call.
13160         (free_cu_line_header): Delete.
13161         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13162         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13163         Adjust to use std::vector.
13164         (free_line_header): Delete.
13165         (free_line_header_voidp): Use delete.
13166         (add_include_dir): Replace with ...
13167         (line_header::add_include_dir): ... this method.  Use std::vector.
13168         (add_file_name): Replace with ...
13169         (line_header::add_file_name): ... this method.  Use std::vector.
13170         (add_include_dir_stub): Delete.
13171         (read_formatted_entries): Remove memset.
13172         (dwarf_decode_line_header): Return a line_header_up instead of a
13173         raw pointer.  Remove cleanup handling.  Pass lambdas to
13174         read_formatted_entries.  Adjust to use line_header methods.
13175         (dwarf_decode_lines_1): Adjust to use line_header methods.
13176         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13177         use std::vector.
13178
13179 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13180
13181         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13182         instead of struct ptid.
13183
13184 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13185
13186         * frame.c (get_frame_register_bytes): Unwind using value.
13187         (put_frame_register_bytes): Likewise.
13188
13189 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13190
13191         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13192         aggregate-like.
13193
13194 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13195
13196         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13197
13198 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13199
13200         * gdbthread.h (struct thread_info): Declare constructor and
13201         destructor.  Add some in-class member initializers.
13202         * thread.c (free_thread): Remove.
13203         (init_thread_list): Call delete instead of free_thread.
13204         (new_thread): Call thread_info constructor.
13205         (thread_info::thread_info): New function.
13206         (thread_info::~thread_info): New function.
13207         (delete_thread_1): Call delete instead of free_thread.
13208         (make_cleanup_restore_current_thread): Move tp and frame to
13209         inner block.
13210
13211 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13212
13213         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13214         (arc_skip_prologue): Likewise.
13215         (arc_make_frame_cache): Likewise.
13216         (arc_pv_get_operand): New function.
13217         (arc_is_in_prologue): Likewise.
13218         (arc_analyze_prologue): Likewise.
13219         (arc_print_frame_cache): Likewise.
13220         (MAX_PROLOGUE_LENGTH): New constant.
13221
13222 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13223
13224         * configure.tgt: Add arc-insn.o.
13225         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13226         (dump_arc_instruction_command): New function.
13227         (arc_fprintf_disasm): Likewise.
13228         (arc_disassemble_info): Likewise.
13229         (arc_insn_get_operand_value): Likewise.
13230         (arc_insn_get_operand_value_signed): Likewise.
13231         (arc_insn_get_memory_base_reg): Likewise.
13232         (arc_insn_get_memory_offset): Likewise.
13233         (arc_insn_get_branch_target): Likewise.
13234         (arc_insn_dump): Likewise.
13235         (arc_insn_get_linear_next_pc): Likewise.
13236         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13237         (arc_disassemble_info): Likewise.
13238         (arc_insn_get_branch_target): Likewise.
13239         (arc_insn_get_linear_next_pc): Likewise.
13240         * NEWS: Mention new "maint print arc arc-instruction".
13241
13242 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13243
13244         * arc-tdep (maintenance_print_arc_list): New variable.
13245         (maintenance_print_arc_command): New function.
13246
13247 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13248
13249         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13250         Add "limm" and "reserved".
13251         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13252         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13253         * arc-tdep.h (arc_regnum): Likewise.
13254
13255 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13256
13257         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13258         for THREADPTR register.
13259         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13260         register.
13261         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13262         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13263         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13264
13265 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13266
13267         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13268         registers above gdbarch_num_regs (gdbarch) as privileged in
13269         call0 ABI.
13270
13271 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13272
13273         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13274         for a single specified register or for all registers in
13275         a0_base..a0_base + C0_NREGS range.
13276         (supply_gregset_reg): Call regcache_raw_supply for a single
13277         specified register or for all registers in a0_base..a0_base +
13278         C0_NREGS range.
13279
13280 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13281
13282         * arch/xtensa.h (C0_NREGS): Add definition.
13283         * xtensa-tdep.c (C0_NREGS): Remove definition.
13284
13285 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13286
13287         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13288         Drop xtensa_default_isa initialization.
13289         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13290
13291 2017-03-27  Pedro Alves  <palves@redhat.com>
13292
13293         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13294         (file_entry::include_dir): New method.
13295         (line_header::include_dir_at, line_header::file_name_at): New
13296         methods.
13297         (setup_type_unit_groups, setup_type_unit_groups)
13298         (psymtab_include_file_name): Simplify using the new methods.
13299         (lnp_state_machine) <the_line_header>: New field.
13300         <file>: Add comment.
13301         (lnp_state_machine::current_file): New method.
13302         (dwarf_record_line): Simplify using the new methods.
13303         (init_lnp_state_machine): Initialize the "the_line_header" field.
13304         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13305         Simplify using the new methods.
13306
13307 2017-03-27  Pedro Alves  <palves@redhat.com>
13308
13309         * cp-name-parser.y (make_empty): Delete.
13310         (demangler_special, nested_name, ptr_operator, array_indicator)
13311         (direct_declarator, declarator_1): Use fill_comp instead of
13312         make_empty.
13313
13314 2017-03-27  Pedro Alves  <palves@redhat.com>
13315
13316         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13317         to ATTRIBUTE_PRINTF.
13318         * solib-target.c (library_list_start_list): Print "string" not
13319         "version".
13320         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13321         gdb_xml_error call.
13322
13323 2017-03-27  Pedro Alves  <palves@redhat.com>
13324
13325         * dwarf2read.c (struct file_and_directory): New.
13326         (dwarf2_get_dwz_file): Adjust to use std::string.
13327         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13328         (find_file_and_directory): Adjust to return a file_and_directory
13329         object.
13330         (read_file_scope): Adjust to use file_and_directory.  Remove
13331         make_cleanup/do_cleanups calls.
13332         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13333         make_cleanup/do_cleanups calls.
13334         * python/python.c (do_start_initialization): Adjust to ldirname
13335         returning a std::string.
13336         * utils.c (ldirname): Now returns a std::string.
13337         * utils.h (ldirname): Change return type to std::string.
13338         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13339         returning a std::string.
13340         * xml-tdesc.c (file_read_description_xml): Likewise.
13341
13342 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13343
13344         * regcache.c (regcache_debug_print_register): New function.
13345         * regcache.h (regcache_debug_print_register): New declaration.
13346         * target.c (debug_print_register): Remove.
13347         (target_fetch_registers): Call regcache_debug_print_register.
13348         (target_store_registers): Likewise.
13349
13350 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13351
13352         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13353         reference beyond the 'lh->include_dirs' array before accessing to
13354         it.
13355         (psymtab_include_file_name): Likewise.
13356         (dwarf_decode_lines_1): Likewise.
13357         (dwarf_decode_lines): Likewise.
13358         (file_file_name): Likewise.
13359
13360 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13361
13362         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13363         inferior_ptid.
13364         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13365         ps_lsetfpregs): Likewise.
13366         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13367         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13368         ps_lsetfpregs): Likewise.
13369         * target.c (target_fetch_registers, target_store_registers):
13370         Remove asserts.
13371
13372 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13373
13374         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13375
13376 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13377
13378         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13379         (_initialize_aarch64_tdep): Register it.
13380         (aarch64_record_load_store): Handle PRFM instruction.
13381         (aarch64_process_record_test): New function.
13382
13383 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13384
13385         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13386         indentation.
13387
13388 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13389
13390         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13391
13392 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13393
13394         python/python.c (do_start_initialization): Fix memory leak.
13395
13396 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13397
13398         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13399         using get_ptrace_pid.
13400         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13401         inferior_ptid.
13402         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13403         inferior_ptid instead of pid.
13404
13405 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13406
13407         * aarch64-tdep.c: Wrap locally used classes in anonymous
13408         namespace.
13409         * arm-tdep.c: Likewise.
13410         * linespec.c: Likewise.
13411         * ui-out.c: Likewise.
13412
13413 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13414
13415         PR gdb/19637
13416         * python/lib/gdb/printer/bound_registers.py: Import sys.
13417
13418 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13419
13420         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13421         windows_thread_info parameter and use it instead of
13422         current_thread.
13423         (windows_fetch_inferior_registers): Don't set current_thread,
13424         pass the thread to do_windows_fetch_inferior_registers.  Use
13425         ptid from regcache instead of inferior_ptid.
13426         (do_windows_store_inferior_registers): Add windows_thread_info
13427         parameter and use it instead of current_thread.
13428         (windows_store_inferior_registers): Don't set current_thread,
13429         pass the thread to do_windows_store_inferior_registers.  Use
13430         ptid from regcache instead of inferior_ptid.
13431
13432 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13433
13434         * ser-mingw.c (ser_windows_raw): Remove reference to
13435         struct serial::current_timeout.
13436
13437 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13438
13439         PR tdep/20928
13440         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13441         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13442         (sparc64_fsr_type): Fix %fsr decoding.
13443
13444 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13445
13446         * python/py-record-btrace.c (btpy_insn_data): Change return type
13447         for Python 2.
13448
13449 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13450
13451         * spu-linux-nat.c (spu_fetch_inferior_registers,
13452         spu_store_inferior_registers): Use ptid from regcache, set and
13453         restore inferior_ptid.
13454         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13455         Likewise.
13456
13457 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13458
13459         * i386-linux-nat.c (fetch_register, store_register,
13460         i386_linux_fetch_inferior_registers,
13461         i386_linux_store_inferior_registers): Use ptid from regcache.
13462         * ia64-linux-nat.c (ia64_linux_fetch_register,
13463         ia64_linux_store_register): Likewise.
13464         * inf-ptrace.c (inf_ptrace_fetch_register,
13465         inf_ptrace_store_register): Likewise.
13466         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13467         m32r_linux_store_inferior_registers): Likewise.
13468         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13469         m68kbsd_store_inferior_registers): Likewise.
13470         * m68k-linux-nat.c (fetch_register, store_register,
13471         m68k_linux_fetch_inferior_registers,
13472         m68k_linux_store_inferior_registers): Likewise.
13473         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13474         m88kbsd_store_inferior_registers): Likewise.
13475         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13476         mips_fbsd_store_inferior_registers): Likewise.
13477         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13478         mips64_linux_regsets_store_registers): Likewise.
13479         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13480         mipsnbsd_store_inferior_registers): Likewise.
13481         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13482         mips64obsd_store_inferior_registers): Likewise.
13483         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13484         Likewise.
13485         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13486         ppcfbsd_store_inferior_registers): Likewise.
13487         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13488         ppc_linux_store_inferior_registers): Likewise.
13489         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13490         ppcnbsd_store_inferior_registers): Likewise.
13491         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13492         ppcobsd_store_registers): Likewise.
13493         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13494         Likewise.
13495         * ravenscar-thread.c (ravenscar_fetch_registers,
13496         ravenscar_store_registers, ravenscar_prepare_to_store):
13497         Likewise.
13498         * record-btrace.c (record_btrace_fetch_registers,
13499         record_btrace_store_registers, record_btrace_prepare_to_store):
13500         Likewise.
13501         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13502         Lookup inferior using ptid from regcache, instead of
13503         current_inferior.
13504         * remote.c (remote_fetch_registers, remote_store_registers): Use
13505         ptid from regcache.
13506         * rs6000-nat.c (fetch_register, store_register): Likewise.
13507         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13508         s390_linux_store_inferior_registers): Likewise.
13509         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13510         shnbsd_store_inferior_registers): Likewise.
13511         * sol-thread.c (sol_thread_fetch_registers,
13512         sol_thread_store_registers): Likewise.
13513         * sparc-nat.c (sparc_fetch_inferior_registers,
13514         sparc_store_inferior_registers): Likewise.
13515         * tilegx-linux-nat.c (fetch_inferior_registers,
13516         store_inferior_registers): Likewise.
13517         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13518         vaxbsd_store_inferior_registers): Likewise.
13519         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13520         store_xtregs): Likewise.
13521
13522 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13523
13524         PR gdb/14441
13525         * NEWS: Mention support for rvalue references in GDB and python.
13526         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13527         supports both lvalue and rvalue references.
13528
13529 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13530
13531         PR gdb/14441
13532         * gdbtypes.c (rank_one_type): Implement overloading
13533         resolution rules regarding rvalue references.
13534
13535 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13536
13537         PR gdb/14441
13538         * aarch64-tdep.c (aarch64_type_align)
13539         (aarch64_extract_return_value, aarch64_store_return_value): Change
13540         lvalue reference type checks to general reference type checks.
13541         * amd64-tdep.c (amd64_classify): Likewise.
13542         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13543         Likewise.
13544         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13545         (arm_store_return_value): Likewise.
13546         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13547         * c-typeprint.c (c_print_type): Likewise.
13548         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13549         (cplus_number_of_children, cplus_describe_child): Likewise.
13550         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13551         * completer.c (expression_completer): Likewise.
13552         * cp-support.c (make_symbol_overload_list_adl_namespace):
13553         Likewise.
13554         * darwin-nat-info.c (info_mach_region_command): Likewise.
13555         * dwarf2loc.c (entry_data_value_coerce_ref)
13556         (value_of_dwarf_reg_entry): Likewise.
13557         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13558         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13559         Likewise.
13560         * findvar.c (extract_typed_address, store_typed_address):
13561         Likewise.
13562         * gdbtypes.c (rank_one_type): Likewise.
13563         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13564         * infcall.c (value_arg_coerce): Likewise.
13565         * language.c (pointer_type): Likewise.
13566         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13567         Likewise.
13568         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13569         * mn10300-tdep.c (mn10300_type_align): Likewise.
13570         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13571         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13572         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13573         Likewise.
13574         * printcmd.c (print_formatted, x_command): Likewise.
13575         * python/py-type.c (typy_get_composite, typy_template_argument):
13576         Likewise.
13577         * python/py-value.c (valpy_referenced_value)
13578         (valpy_get_dynamic_type, value_has_field): Likewise.
13579         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13580         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13581         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13582         * spu-tdep.c (spu_scalar_value_p): Likewise.
13583         * symtab.c (lookup_symbol_aux): Likewise.
13584         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13585         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13586         Likewise.
13587         * valops.c (value_cast_pointers, value_cast)
13588         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13589         (value_struct_elt, value_struct_elt_bitpos)
13590         (value_find_oload_method_list, find_overload_match)
13591         (value_rtti_indirect_type): Likewise.
13592         * valprint.c (val_print_scalar_type_p, generic_val_print):
13593         Likewise.
13594         * value.c (value_actual_type, value_as_address, unpack_long)
13595         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13596         (coerce_ref): Likewise.
13597         * varobj.c (varobj_get_value_type): Likewise.
13598
13599 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13600
13601         PR gdb/14441
13602         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13603         table of constants.
13604         * python/lib/gdb/command/explore.py: Support exploring values
13605         of rvalue reference types.
13606         * python/lib/gdb/types.py: Implement get_basic_type() for
13607         rvalue reference types.
13608         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13609         constant.
13610         * python/py-value.c (valpy_getitem): Add an rvalue reference
13611         check.
13612         (valpy_reference_value): Add new parameter "refcode".
13613         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13614         New wrappers for valpy_reference_value().
13615         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13616         (gdbpy_invoke_xmethod): Likewise.
13617
13618 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13619
13620         PR gdb/14441
13621         * dwarf2read.c (process_die, read_type_die_1): Handle the
13622         DW_TAG_rvalue_reference_type DIE.
13623         (read_tag_reference_type): Add new parameter "refcode".
13624
13625 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13626
13627         PR gdb/14441
13628         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13629         (c_type_print_modifier, c_type_print_varspec_suffix)
13630         (c_type_print_base): Support printing rvalue reference types.
13631         * c-valprint.c (c_val_print, c_value_print): Support printing
13632         rvalue reference values.
13633
13634 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13635
13636         PR gdb/14441
13637         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13638         typename.
13639         * cp-support.c (replace_typedefs): Handle
13640         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13641         * python/py-type.c (typy_lookup_type): Likewise.
13642
13643 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13644
13645         PR gdb/14441
13646         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13647         * parse.c (insert_type): Change assert statement.
13648         (follow_types): Handle rvalue reference types.
13649         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13650         constant.
13651
13652 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13653
13654         PR gdb/14441
13655         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13656         value_ref() interface.
13657         * c-valprint.c (c_value_print): Likewise.
13658         * infcall.c (value_arg_coerce): Likewise.
13659         * python/py-value.c (valpy_reference_value): Likewise.
13660         * valops.c (value_cast, value_reinterpret_cast)
13661         (value_dynamic_cast, typecmp): Likewise.
13662         (value_ref): Parameterize by kind of return value reference type.
13663         * value.h (value_ref): Add new parameter "refcode".
13664
13665 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13666
13667         PR gdb/14441
13668         * dwarf2read.c (read_tag_reference_type): Use
13669         lookup_lvalue_reference_type() instead of lookup_reference_type().
13670         * eval.c (evaluate_subexp_standard): Likewise.
13671         * f-exp.y: Likewise.
13672         * gdbtypes.c (make_reference_type, lookup_reference_type):
13673         Generalize with rvalue reference types.
13674         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13675         convenience wrappers for lookup_reference_type().
13676         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13677         reference kind parameter.
13678         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13679         wrappers for lookup_reference_type().
13680         * guile/scm-type.c (gdbscm_type_reference): Use
13681         lookup_lvalue_reference_type() instead of lookup_reference_type().
13682         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13683         * parse.c (follow_types): Likewise.
13684         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13685         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13686         Likewise.
13687         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13688         (gdbpy_invoke_xmethod): Likewise.
13689         * stabsread.c: Provide extra argument to make_reference_type()
13690         call.
13691         * valops.c (value_ref, value_rtti_indirect_type): Use
13692         lookup_lvalue_reference_type() instead of lookup_reference_type().
13693
13694 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13695
13696         PR gdb/14441
13697         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13698         (TYPE_IS_REFERENCE): New macro.
13699         (struct type): Add rvalue_reference_type field.
13700         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13701
13702 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13703
13704         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13705         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13706         New function definition.
13707         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13708         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13709         New function declaration.
13710         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13711         * mi/mi-interp.h: New file.
13712         * solib.c (info_sharedlibrary_command): Replace for loop with
13713         ALL_SO_LIBS macro
13714         * solib.h (update_solib_list): New function declaration.
13715         (so_list_head): Move macro.
13716         * solist.h (ALL_SO_LIBS): New macro.
13717
13718 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13719
13720         * infcmd.c (post_create_inferior): Remove unused argument in
13721         call to solib_add.
13722         * remote.c (remote_start_remote): Likewise.
13723         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13724         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13725         (enable_break): Likewise.
13726         * solib.c (update_solib_list): Remove unused target argument
13727         and its documentation.
13728         (solib_add): Remove unused target argument.  Remove unused
13729         argument in call to update_solib_list.
13730         (info_sharedlibrary_command): Remove unused argument in call
13731         to update_solib_list.
13732         (sharedlibrary_command): Remove unused argument in call to
13733         solib_add.
13734         (handle_solib_event): Likewise.
13735         (reload_shared_libraries): Likewise.
13736         * solib.h (solib_add): Remove unused target argument.
13737
13738 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13739
13740         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13741         (s390_displaced_step_fixup): Cover relative branches with the
13742         default fixup handling.  This fixes lack of support for some
13743         relative branch instructions.
13744
13745 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13746
13747         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13748         ptid from regcache.
13749
13750 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13751
13752         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13753         i386_darwin_store_inferior_registers): Use ptid from regcache.
13754
13755 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13756
13757         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13758         i386bsd_store_inferior_registers): Use ptid from regcache.
13759
13760 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13761
13762         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13763         hppaobsd_store_registers): Use ptid from regcache.
13764
13765 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13766
13767         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13768         hppanbsd_store_registers): Use ptid from regcache.
13769
13770 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13771
13772         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13773         from regcache.  Use get_ptrace_pid.
13774
13775 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13776
13777         * corelow.c (get_core_register_section): Use ptid from regcache,
13778         update doc.
13779
13780 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13781
13782         * bsd-uthread.c (bsd_uthread_fetch_registers,
13783         bsd_uthread_store_registers): Use ptid from regcache, set and
13784         restore inferior_ptid.
13785
13786 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13787
13788         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13789         fetch_fp_regs, store_register, store_regs, store_fp_register,
13790         store_fp_regs): Use ptid from regcache.
13791
13792 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13793
13794         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13795         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13796         store_vfp_regs): Use ptid from regcache.
13797
13798 2017-03-17  Pedro Alves  <palves@redhat.com>
13799
13800         PR remote/21188
13801         * ser-base.c (ser_base_wait_for): Add comment.
13802         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13803         version.
13804         * ser-unix.c (hardwire_raw): Remove reference to
13805         scb->current_timeout.
13806         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13807         (hardwire_ops): Install ser_base_readchar instead of
13808         hardwire_readchar.
13809         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13810         Remove fields.
13811
13812 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13813
13814         PR gdb/19637
13815         * python/lib/gdb/printer/bound_registers.py: Add support for
13816         Python 3.
13817
13818 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13819
13820         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13821         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13822         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13823         byte_offset to subobj_byte_offset.  Fix the handling of
13824         DWARF_VALUE_STACK on big-endian targets when coming via an
13825         implicit pointer.
13826         (dwarf2_evaluate_loc_desc): Adjust call to
13827         dwarf2_evaluate_loc_desc_full.
13828         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13829         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13830
13831 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13832
13833         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13834         and REVSH instructions.
13835
13836 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13837
13838         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13839         (arm_record_test): Declare.
13840         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13841         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13842         align with the manual.
13843         (thumb_record_misc): Adjust the code order to align with the
13844         manual.
13845         (thumb2_record_decode_insn_handler): Fix instruction matching.
13846         (instruction_reader_thumb): New class.
13847         (arm_record_test): New function.
13848
13849 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13850
13851         * arm-tdep.c (abstract_memory_reader): New class.
13852         (instruction_reader): New class.
13853         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13854         (decode_insn): Likewise.
13855
13856 2017-03-16  Doug Evans  <dje@google.com>
13857
13858         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13859         member.  Change type of TYPE member to SCM.  All uses updated.
13860         (lsscm_make_lazy_string_smob): Add assert.
13861         (lsscm_make_lazy_string): Flag bad length values.
13862         (lsscm_elt_type): New function.
13863         (gdbscm_lazy_string_to_value): Rewrite to use
13864         lsscm_safe_lazy_string_to_value.
13865         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13866         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13867         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13868         in incoming type.
13869         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13870         * guile/scm-type.c (tyscm_scm_to_type): New function.
13871
13872 2017-03-15  Doug Evans  <dje@google.com>
13873
13874         PR python/17728, python/18439, python/18779
13875         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13876         member.  Change type of TYPE member to PyObject *.  All uses updated.
13877         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13878         (gdbpy_create_lazy_string_object): Flag bad length values.
13879         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13880         Handle typedefs in incoming type.
13881         (stpy_lazy_string_elt_type): New function.
13882         (gdbpy_extract_lazy_string): Call it.
13883         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13884         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13885         typedefs in incoming type.
13886
13887 2017-03-16  Doug Evans  <dje@google.com>
13888
13889         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13890         * guile/scm-type.c (tyscm_scm_to_type): New function.
13891
13892 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13893
13894         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13895         "ULONGEST" for "skip".
13896
13897 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13898
13899         PR gdb/21220
13900         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13901         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13902         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13903         over ptrace peek/poke until end of buffer or error.
13904
13905 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13906
13907         * parse.c (length_of_subexp): Make static.
13908         * parser-defs.h (length_of_subexp): Remove.
13909
13910 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13911
13912         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13913         as well.
13914
13915 2017-03-14  Pedro Alves  <palves@redhat.com>
13916
13917         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13918         (main): Use std::unique_ptr.  Remove calls to
13919         cp_demangled_name_parse_free.
13920
13921 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13922
13923         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13924         alphabsd_store_inferior_registers): Use regcache->ptid instead
13925         of inferior_ptid.
13926
13927 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13928
13929         * aix-thread.c (aix_thread_fetch_registers,
13930         aix_thread_store_registers): Use regcache->ptid instead of
13931         inferior_ptid.
13932
13933 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13934
13935         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13936         store_gregs_to_thread, fetch_fpregs_from_thread,
13937         store_fpregs_to_thread): Use regcache->ptid instead of
13938         inferior_ptid.
13939
13940 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13941
13942         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13943         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13944         instead of inferior_ptid.
13945
13946 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13947
13948         * target.c (target_fetch_registers, target_store_registers): Add
13949         assert.
13950
13951 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13952
13953         * regcache.h (regcache_get_ptid): New function.
13954         * regcache.c (regcache_get_ptid): New function.
13955
13956 2017-03-13  Mark Wielaard  <mark@klomp.org>
13957
13958         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13959
13960 2017-03-10  Keith Seitz  <keiths@redhat.com>
13961
13962         PR c++/8218
13963         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13964
13965 2017-03-08  Pedro Alves  <palves@redhat.com>
13966
13967         PR gdb/18360
13968         * infrun.c (start_step_over, do_target_resume, resume)
13969         (restart_threads): Assert we're not resuming a thread that is
13970         meant to be stopped.
13971         (infrun_thread_stop_requested_callback): Delete.
13972         (infrun_thread_stop_requested): If the thread is internally
13973         stopped, queue a pending stop event and clear the thread's
13974         inline-frame state.
13975         (handle_stop_requested): New function.
13976         (handle_syscall_event, handle_inferior_event_1): Use
13977         handle_stop_requested.
13978         (handle_stop_requested): New function.
13979         (handle_signal_stop): Set the thread's stop_signal here instead of
13980         at caller.
13981         (finish_step_over): Clear step over info unconditionally.
13982         (handle_signal_stop): If the user had interrupted the event
13983         thread, consider the stop a random signal.
13984         (handle_signal_stop) <signal arrived while stepping over
13985         breakpoint>: Don't restart threads here.
13986         (stop_waiting): Don't clear step-over info here.
13987
13988 2017-03-08  Pedro Alves  <palves@redhat.com>
13989
13990         PR 21206
13991         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13992         goes to argument 2, not 1.
13993
13994 2017-03-08  Pedro Alves  <palves@redhat.com>
13995
13996         PR cli/21218
13997         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13998         display_gdb_prompt.
13999         (command_line_input): Add comment.
14000
14001 2017-03-08  Pedro Alves  <palves@redhat.com>
14002
14003         PR tui/21216
14004         * tui/tui-file.c (tui_file::write): New.
14005         * tui/tui-file.h (tui_file): Override "write".
14006         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14007         factored out from ...
14008         (tui_puts): ... here.
14009         (tui_putc): Use them.
14010         (tui_write): New function.
14011         * tui/tui-io.h (tui_write): Declare.
14012
14013 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
14014
14015         * Makefile.in (SFILES): Replace "environ.c" with
14016         "common/environ.c".
14017         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14018         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
14019         to...
14020         * common/environ.c: ... here.
14021         * environ.h: Moved to...
14022         * common/environ.h: ... here.
14023
14024 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14025
14026         * gdbarch.sh (pstring_ptr): New static function.
14027         (gdbarch_disassembler_options): Use it.
14028         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14029         not valid_disassembler_option->name.
14030         * gdbarch.c: Regenerate.
14031
14032 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14033
14034         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14035
14036 2017-03-07  Pedro Alves  <palves@redhat.com>
14037
14038         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14039
14040 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14041
14042         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14043         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14044         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14045         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14046
14047 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14048
14049         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14050
14051 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14052
14053         * remote.c (remote_add_target_side_commands): Use range-based
14054         for loop.
14055
14056 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14057
14058         PR gdb/21165
14059         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14060         value is lazy.
14061         * valprint.c (common_val_print): Likewise.
14062
14063 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14064
14065         * NEWS: Mention new set/show disassembler-options commands.
14066         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14067         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14068         (prospective_options): New static variable.
14069         (gdb_disassembler::gdb_disassembler): Initialize
14070         m_di.disassembler_options.
14071         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14072         (get_disassembler_options): New function.
14073         (set_disassembler_options): Likewise.
14074         (set_disassembler_options_sfunc): Likewise.
14075         (show_disassembler_options_sfunc): Likewise.
14076         (disassembler_options_completer): Likewise.
14077         (_initialize_disasm): Likewise.
14078         * disasm.h (get_disassembler_options): New prototype.
14079         (set_disassembler_options): Likewise.
14080         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14081         (gdbarch_verify_disassembler_options): Likewise.
14082         * gdbarch.c: Regenerate.
14083         * gdbarch.h: Likewise.
14084         * arm-tdep.c (num_disassembly_options): Delete.
14085         (set_disassembly_style): Likewise.
14086         (arm_disassembler_options): New static variable.
14087         (set_disassembly_style_sfunc): Convert short style name into long
14088         option name.  Call set_disassembler_options.
14089         (show_disassembly_style_sfunc): New function.
14090         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14091         set_gdbarch_verify_disassembler_options.
14092         (_initialize_arm_tdep): Delete regnames variable and update callers.
14093         (arm_disassembler_options): Initialize.
14094         (disasm_options): New variable.
14095         (num_disassembly_options): Rename from this...
14096         (num_disassembly_styles): ...to this.  Compute by scanning through
14097         disasm_options.
14098         (valid_disassembly_styles): Initialize using disasm_options.
14099         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14100         set_arm_regname_option.
14101         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14102         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14103         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14104         set_gdbarch_verify_disassembler_options.
14105         * s390-tdep.c (s390_disassembler_options): New static variable.
14106         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14107         set_gdbarch_verify_disassembler_options.
14108
14109 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14110
14111         * remote.c (remote_add_target_side_condition): Remove "struct"
14112         keyword from range-based for loop.
14113
14114 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14115
14116         * remote.c (remote_add_target_side_condition): Use range-based
14117         for loop.  Update comment.
14118
14119 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14120
14121         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14122
14123 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14124
14125         * regcache.c (regcache_raw_update): New function.
14126         (regcache_raw_read): Move code to regcache_raw_update.
14127         * regcache.h (regcache_raw_update): New declaration.
14128         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14129
14130 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14131
14132         * dwarf2read.c (create_debug_type_hash_table): Initialize
14133         header.signature and header.type_offset_in_tu.
14134
14135 2017-02-24  Pedro Alves  <palves@redhat.com>
14136
14137         * symtab.c (make_file_symbol_completion_list_1): Use
14138         add_symtab_completions.
14139
14140 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14141
14142         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14143
14144 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14145
14146         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14147         I386_MAX_REGISTER_SIZE.
14148         (i386_pseudo_register_write): Likewise.
14149         (i386_process_record): Likewise.
14150         * i387-tdep.c (i387_supply_xsave): Likewise.
14151         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14152         (store_register): Likewise.
14153
14154 2017-02-23  Pedro Alves  <palves@redhat.com>
14155
14156         * ada-lang.c: Include "common/function-view.h".
14157         (ada_iterate_over_symbols): Adjust to use function_view as
14158         callback type.
14159         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14160         (ada_make_symbol_completion_list): Use a lambda.
14161         (ada_exc_search_name_matches): Delete.
14162         (name_matches_regex): New.
14163         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14164         * compile/compile-c-support.c: Include "common/function-view.h".
14165         (print_one_macro): Change prototype to accept a ui_file pointer.
14166         (write_macro_definitions): Use a lambda.
14167         * dwarf2read.c: Include "common/function-view.h".
14168         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14169         (dw2_expand_symtabs_matching): Adjust to use function_view as
14170         callback type.
14171         * language.h: Include "common/function-view.h".
14172         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14173         function_view as callback type.
14174         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14175         * linespec.c: Include "common/function-view.h".
14176         (collect_info::add_symbol): New method.
14177         (struct symbol_and_data_callback, iterate_inline_only, struct
14178         symbol_matcher_data, iterate_name_matcher): Delete.
14179         (iterate_over_all_matching_symtabs): Adjust to use function_view
14180         as callback type and lambdas.
14181         (iterate_over_file_blocks): Adjust to use function_view as
14182         callback type.
14183         (decode_compound_collector): Now a class with private fields.
14184         (decode_compound_collector::release_symbols): New method.
14185         (collect_one_symbol): Rename to...
14186         (decode_compound_collector::operator()): ... this and adjust.
14187         (lookup_prefix_sym): decode_compound_collector construction bits
14188         move to decode_compound_collector ctor.  Pass the
14189         decode_compound_collector object directly as callback.  Remove
14190         cleanups and use decode_compound_collector::release_symbols
14191         instead.
14192         (symtab_collector): Now a class with private fields.
14193         (symtab_collector::release_symtabs): New method.
14194         (add_symtabs_to_list): Rename to...
14195         (symtab_collector::operator()): ... this and adjust.
14196         (collect_symtabs_from_filename): symtab_collector construction
14197         bits move to symtab_collector ctor.  Pass the symtab_collector
14198         object directly as callback.  Remove cleanups and use
14199         symtab_collector::release_symtabs instead.
14200         (collect_symbols): Delete.
14201         (add_matching_symbols_to_info): Use lambdas.
14202         * macrocmd.c (print_macro_callback): Delete.
14203         (info_macro_command): Use a lambda.
14204         (info_macros_command): Pass print_macro_definition as callable
14205         directly.
14206         (print_one_macro): Remove 'ignore' parameter.
14207         (macro_list_command): Adjust.
14208         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14209         (macro_for_each_data::user_data): Delete field.
14210         (foreach_macro): Adjust to call the function_view.
14211         (macro_for_each): Adjust to use function_view as callback type.
14212         (foreach_macro_in_scope): Adjust to call the function_view.
14213         (macro_for_each_in_scope): Adjust to use function_view as callback
14214         type.
14215         * macrotab.h: Include "common/function-view.h".
14216         (macro_callback_fn): Declare a prototype instead of a pointer.
14217         Remove "user_data" parameter.
14218         (macro_for_each, macro_for_each_in_scope): Adjust to use
14219         function_view as callback type.
14220         * psymtab.c (partial_map_expand_apply)
14221         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14222         Adjust to use function_view as callback type and to return bool.
14223         (psym_expand_symtabs_matching): Adjust to use function_view as
14224         callback types.
14225         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14226         to use function_view as callback type and to return bool.
14227         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14228         callback types.
14229         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14230         as callback types.
14231         * symfile.h: Include "common/function-view.h".
14232         (expand_symtabs_file_matcher_ftype)
14233         (expand_symtabs_symbol_matcher_ftype)
14234         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14235         return bool.
14236         (quick_symbol_functions::map_symtabs_matching_filename)
14237         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14238         function_view as callback type and return bool.
14239         (expand_symtabs_matching): Adjust to use function_view as callback
14240         type.
14241         (maintenance_expand_name_matcher)
14242         (maintenance_expand_file_matcher): Delete.
14243         (maintenance_expand_symtabs): Use lambdas.
14244         * symtab.c (iterate_over_some_symtabs): Adjust to use
14245         function_view as callback types and return bool.
14246         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14247         of a cleanup.
14248         (lookup_symtab_callback): Delete.
14249         (lookup_symtab): Use a lambda.
14250         (iterate_over_symbols): Adjust to use function_view as callback
14251         type.
14252         (struct search_symbols_data, search_symbols_file_matches)
14253         (search_symbols_name_matches): Delete.
14254         (search_symbols): Use a pair of lambdas.
14255         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14256         (symtab_expansion_callback): Delete.
14257         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14258         * symtab.h: Include "common/function-view.h".
14259         (iterate_over_some_symtabs): Adjust to use function_view as
14260         callback type and return bool.
14261         (iterate_over_symtabs): Adjust to use function_view as callback
14262         type.
14263         (symbol_found_callback_ftype): Remove 'data' parameter and return
14264         bool.
14265         (iterate_over_symbols): Adjust to use function_view as callback
14266         type.
14267
14268 2017-02-23  Pedro Alves  <palves@redhat.com>
14269
14270         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14271         (%.o) <unittests/%.c>: New pattern.
14272         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14273         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14274         * common/function-view.h: New file.
14275         * unittests/function-view-selftests.c: New file.
14276         * configure: Regenerate.
14277
14278 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14279
14280         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14281         inferior_ptid.
14282         * go32-nat.c (go32_thread_alive): Likewise.
14283
14284 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14285
14286         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14287         delete.
14288
14289 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14290
14291         * varobj.c (varobj_clear_saved_item): Use delete instead of
14292         xfree.
14293         (update_dynamic_varobj_children): Likewise.
14294
14295 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14296
14297         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14298
14299 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14300
14301         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14302         m_enum_value to 0 in default constructor.
14303
14304 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14305
14306         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14307         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14308         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14309         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14310         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14311         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14312         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14313         IS_STORE_CONDITIONAL_INSN.
14314
14315 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14316
14317         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14318
14319 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14320
14321         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14322
14323 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14324
14325         * dwarf2read.c (skip_one_die, read_attribute_value)
14326         (dwarf2_const_value_attr, dump_die_shallow)
14327         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14328         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14329
14330 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14331
14332         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14333         (dwarf_parse_macro_header): Accept DWARF version 5.
14334         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14335
14336 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14337
14338         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14339         DW_AT_GNU_*.
14340         * common/common-exceptions.h (enum errors): Likewise.
14341         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14342         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14343         (dwarf_expr_context::execute_stack_op): Likewise.
14344         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14345         Likewise.
14346         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14347         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14348         (show_entry_values_debug, call_site_to_target_addr)
14349         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14350         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14351         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14352         (value_of_dwarf_block_entry, indirect_pieced_value)
14353         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14354         (disassemble_dwarf_expression): Likewise.
14355         * dwarf2read.c (process_die, inherit_abstract_dies)
14356         (read_call_site_scope): Likewise.
14357         * gdbtypes.h (struct func_type, struct call_site_parameter)
14358         (struct call_site): Likewise.
14359         * stack.c (read_frame_arg): Likewise.
14360         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14361
14362 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14363
14364         * defs.h (read_unsigned_leb128): New declaration.
14365         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14366         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14367         (dwarf2_find_location_expression): Call also
14368         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14369         * dwarf2loc.h (dwarf2_version): New declaration.
14370         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14371         rnglists.
14372         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14373         .debug_rnglists.
14374         (struct dwop_section_names): Add loclists_dwo.
14375         (dwop_section_names): Add .debug_loclists.dwo.
14376         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14377         (struct dwarf2_per_cu_data): Add dwarf_version.
14378         (struct dwo_sections): Add loclists.
14379         (struct attr_abbrev): Add implicit_const.
14380         (read_indirect_line_string): New declaration.
14381         (read_unsigned_leb128): Delete declaration.
14382         (rcuh_kind): New definition.
14383         (read_and_check_comp_unit_head): Change parameter
14384         is_debug_types_section to section_kind.
14385         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14386         (read_comp_unit_head): Change parameter abfd to section, add parameter
14387         section_kind.  Handle DWARF-5.
14388         (error_check_comp_unit_head): Accept also DWARF version 5.
14389         (read_and_check_comp_unit_head): Change parameter
14390         is_debug_types_section to section_kind.
14391         (read_and_check_type_unit_head): Delete function.
14392         (read_abbrev_offset): Handle DWARF-5.
14393         (create_debug_type_hash_table): Add parameter section_kind.  Process
14394         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14395         comp_unit_head.
14396         (create_debug_types_hash_table): Update create_debug_type_hash_table
14397         caller.
14398         (create_all_type_units): Call create_debug_type_hash_table.
14399         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14400         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14401         caller.
14402         (skip_one_die): Handle DW_FORM_implicit_const.
14403         (dwarf2_rnglists_process): New function.
14404         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14405         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14406         (read_attribute_value): Handle DW_FORM_implicit_const,
14407         DW_FORM_line_strp.
14408         (read_attribute): Handle DW_FORM_implicit_const.
14409         (read_indirect_string_at_offset_from): New function from
14410         read_indirect_string_at_offset.
14411         (read_indirect_string_at_offset): Call
14412         read_indirect_string_at_offset_from.
14413         (read_indirect_line_string_at_offset): New function.
14414         (read_indirect_string): New function comment.
14415         (read_indirect_line_string): New function.
14416         (read_unsigned_leb128): Make it global.
14417         (dwarf2_string_attr): Handle DWARF-5.
14418         (add_include_dir_stub, read_formatted_entries): New functions.
14419         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14420         Handle DWARF-5.
14421         (per_cu_header_read_in): Update read_comp_unit_head caller.
14422         (dwarf2_version): New function.
14423         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14424         rnglists.
14425         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14426         fields.
14427
14428 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14429
14430         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14431
14432 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14433
14434         * dwarf2read.c (dwarf2_ranges_process): New function from
14435         dwarf2_ranges_read.
14436         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14437         dwarf2_ranges_process.
14438
14439 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14440
14441         * dwarf2read.c (create_debug_type_hash_table): New function from
14442         create_debug_types_hash_table.
14443         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14444         (create_all_type_units, open_and_init_dwo_file): Update
14445         create_debug_types_hash_table callers.
14446
14447 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14448
14449         PR gdb/16188
14450         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14451         refer to 'ap', not 'args'.
14452
14453 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14454             Pedro Alves  <palves@redhat.com>
14455
14456         PR gdb/16188
14457         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14458         calls succeeded.
14459         * fork-child.c (trace_start_error): New function.
14460         (trace_start_error_with_name): Likewise.
14461         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14462         * inf-ptrace.c (inf_ptrace_me): Likewise.
14463         * inferior.h (trace_start_error): New prototype.
14464         (trace_start_error_with_name): Likewise.
14465
14466 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14467
14468         PR gdb/21164
14469         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14470         NULL before using it.
14471         * symmisc.c (maintenance_print_symbols): Likewise.
14472         (maintenance_print_msymbols): Likewise.
14473
14474 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14475
14476         * NEWS: Add record Python bindings entry.
14477
14478 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14479
14480         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14481         py-record-full.o.
14482         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14483         * python/py-record-btrace.c, python/py-record-btrace.h,
14484         python/py-record-full.c, python/py-record-full.h: New file.
14485         * python/py-record.c: Add include for py-record-btrace.h and
14486         py-record-full.h.
14487         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14488         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14489         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14490         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14491         New definition.
14492         (gdbpy_initialize_btrace): New export.
14493         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14494
14495 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14496
14497         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14498         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14499         * python/py-record.c: New file.
14500         * python/python-internal.h (gdbpy_start_recording,
14501         gdbpy_current_recording, gdpy_stop_recording,
14502         gdbpy_initialize_record): New export.
14503         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14504         (python_GdbMethods): Add gdbpy_start_recording,
14505         gdbpy_current_recording and gdbpy_stop_recording.
14506
14507 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14508
14509         * record-btrace.c (record_btrace_record_method): New function.
14510         (init_record_btrace_ops): Initialize to_record_method.
14511         * record-full.c (record_full_record_method): New function.
14512         (init_record_full_ops, init_record_full_core_ops): Add
14513         record_full_record_method.
14514         * record.h (enum record_method): New enum.
14515         * target-debug.h (target_debug_print_enum_record_method: New define.
14516         * target-delegates.c: Regenerate.
14517         * target.c (target_record_method): New function.
14518         * target.h: Include record.h.
14519         (struct target_ops) <to_record_method>: New field.
14520         (target_record_method): New export.
14521
14522 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14523
14524         * record.h (record_start, record_stop): New export.
14525         * record.c (record_start, record_stop): New function.
14526
14527 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14528
14529         * btrace.c (btrace_fetch): Copy function call segments pointer
14530         into a vector.
14531         (btrace_clear): Clear the vector.
14532         (btrace_find_insn_by_number): Use binary search to find the correct
14533         function call segment.
14534         * btrace.h (brace_fun_p): New typedef.
14535         (struct btrace_thread_info) <functions>: New field.
14536
14537 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14538
14539         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14540         * btrace.c (btrace_decode_error): ... here.  New function.
14541         * btrace.h (btrace_decode_error): New export.
14542
14543 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14544
14545         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14546         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14547         btrace_find_insn_by_number): Remove special case for gaps.
14548         * btrace.h (btrace_insn_get_error): New export.
14549         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14550         * record-btrace.c (btrace_insn_history): Print number for gaps.
14551         (record_btrace_info, record_btrace_goto): Handle gaps.
14552
14553 2017-02-14  Tom Tromey  <tom@tromey.com>
14554
14555         PR python/13598:
14556         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14557         event.
14558         * python/py-evts.c (gdbpy_initialize_py_events): Add
14559         before_prompt registry.
14560         * python/py-events.h (events_object) <before_prompt>: New field.
14561
14562 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14563
14564         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14565
14566 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14567
14568         * symfile (_initialize_symfile): Add usage text to the load command's
14569         help text.
14570
14571 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14572
14573         * utils.c (defaulted_query): Don't query on secondary UIs.
14574
14575 2017-02-10  Tom Tromey  <tom@tromey.com>
14576
14577         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14578
14579 2017-02-10  Tom Tromey  <tom@tromey.com>
14580
14581         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14582         "cleanup" local.
14583         * python/py-type.c (typy_legacy_template_argument): Remove
14584         unnecessary "cleanup" local.
14585
14586 2017-02-10  Tom Tromey  <tom@tromey.com>
14587
14588         * python/python.c (do_start_initialization): New function, from
14589         _initialize_python.
14590         (_initialize_python): Call do_start_initialization.
14591         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14592         goto.
14593
14594 2017-02-10  Tom Tromey  <tom@tromey.com>
14595
14596         * python/py-prettyprint.c (pretty_print_one_value): Use
14597         gdbpy_ref.
14598
14599 2017-02-10  Tom Tromey  <tom@tromey.com>
14600
14601         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14602         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14603         gdbpy_ref.
14604         * python/py-type.c (field_new): Use gdbpy_ref.
14605         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14606         gdbpy_ref.
14607         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14608         (py_free_pspace): Likewise.
14609         (pspace_to_pspace_object): Likewise.
14610         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14611         (py_free_objfile): Likewise.
14612         (objfile_to_objfile_object): Likewise.
14613         * python/py-inferior.c (delete_thread_object): Use
14614         gdbpy_ref.
14615         (infpy_read_memory): Likewise.
14616         (py_free_inferior): Likewise.
14617         * python/py-evtregistry.c (create_eventregistry_object): Use
14618         gdbpy_ref.
14619         * python/py-event.c (create_event_object): Use gdbpy_ref.
14620
14621 2017-02-10  Tom Tromey  <tom@tromey.com>
14622
14623         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14624         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14625         used.
14626         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14627         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14628         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14629         python/py-framefilter.c, python/py-function.c,
14630         python/py-inferior.c, python/py-infevents.c,
14631         python/py-linetable.c, python/py-newobjfileevent.c,
14632         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14633         python/py-signalevent.c, python/py-stopevent.c,
14634         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14635         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14636         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14637         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14638
14639 2017-02-10  Tom Tromey  <tom@tromey.com>
14640
14641         * ui-out.h (ui_out_emit_type): New class.
14642         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14643         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14644         and ui_out_emit_tuple.
14645         (enumerate_locals): Likewise.
14646         (py_mi_print_variables, py_print_locals, py_print_args): Use
14647         ui_out_emit_list.
14648         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14649         ui_out_emit_list.
14650         * common/gdb_optional.h: New file.
14651
14652 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14653
14654         * MAINTAINERS (Write After Approval): Update my e-mail address.
14655
14656 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14657
14658         PR gdb/21122
14659         * breakpoint.c (_initialize_breakpoint): Update the help description
14660         of the 'commands' command to indicate that it takes a list argument.
14661
14662 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14663
14664         * interps.c (current_interp_set_logging): Remove "return".
14665
14666 2017-02-09  Gary Benson  <gbenson@redhat.com>
14667
14668         * symtab.c (add_symtab_completions): Prevent NULL pointer
14669         dereference.
14670
14671 2017-02-08  Pedro Alves  <palves@redhat.com>
14672
14673         * interps.c (interp::interp): Remove reference to quiet_p.
14674         (interp_set): Make static.  Remove dead "Switching to" output
14675         code.
14676         (interp_quiet_p, interp_set_quiet): Delete.
14677         (interpreter_exec_cmd): Don't set the interpreter quiet.
14678         * interps.h (interp_quiet_p): Make static.
14679         (class interp) <quiet_p>: Remove field
14680
14681 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14682
14683         * cli/cli-decode.c (find_command_name_length): Make it extern.
14684         * cli/cli-decode.h (find_command_name_length): Declare.
14685         * cli/cli-script.c (command_name_equals, line_first_arg):
14686         New functions.
14687         (process_next_line): Use cli-decode to parse command names.
14688         (build_command_line): Make args a constant pointer.
14689
14690 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14691
14692         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14693         Remove case-insensitive search.
14694
14695 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14696
14697         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14698         at the end of the line.  Avoids an ARI warning.
14699
14700 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14701
14702         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14703         rdseed instructions.
14704         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14705
14706 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14707
14708         PR tdep/20936
14709         Provide and use sparc32 and sparc64 target description XML files.
14710         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14711         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14712         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14713         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14714         * features/sparc/sparc32-solaris.xml: New file.
14715         * features/sparc/sparc64-solaris.xml: New file.
14716         * features/sparc/sparc32-solaris.c: Generated.
14717         * features/sparc/sparc64-solaris.c: Generated.
14718         * sparc-tdep.h: Account for differences in target descriptions.
14719         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14720         (sparc32_register_type): Use target provided registers.
14721         (validate_tdesc_registers): New function.
14722         (sparc32_gdbarch_init): Use tdesc_has_registers.
14723         Set pseudoregister functions.
14724         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14725         (sparc64_register_type): Use target provided registers.
14726         (sparc64_init_abi): Set pseudoregister functions.
14727
14728 2017-02-03  Tom Tromey  <tom@tromey.com>
14729
14730         PR rust/21097:
14731         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14732         with a single member.
14733
14734 2017-02-03  Pedro Alves  <palves@redhat.com>
14735
14736         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14737         (cli_interp_base::~cli_interp_base): New.
14738         (cli_interp): New struct.
14739         (as_cli_interp): Cast the interp itself to cli_interp.
14740         (cli_interpreter_pre_command_loop): Rename to ...
14741         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14742         parameter.
14743         (cli_interpreter_init): Rename to ...
14744         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14745         boolean.  Make extern.
14746         (cli_interpreter_resume): Rename to ...
14747         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14748         extern.
14749         (cli_interpreter_suspend): Rename to ...
14750         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14751         extern.
14752         (cli_interpreter_exec): Rename to ...
14753         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14754         extern.
14755         (cli_interpreter_supports_command_editing): Rename to ...
14756         (cli_interp_base::supports_command_editing): ... this.  Remove
14757         'interp' parameter.  Make extern.
14758         (cli_ui_out): Rename to ...
14759         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14760         Make extern.
14761         (cli_set_logging): Rename to ...
14762         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14763         parameter.  Make extern.
14764         (cli_interp_procs): Delete.
14765         (cli_interp_factory): Adjust to use "new".
14766         * cli/cli-interp.h: Include "interps.h".
14767         (struct cli_interp_base): New struct.
14768         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14769         (interp_new): Delete.
14770         (interp::interp, interp::~interp): New.
14771         (interp_set): Use bool, and return void.  Assume the interpreter
14772         has suspend, init and resume methods, and that the all return
14773         void.
14774         (set_top_level_interpreter): interp_set returns void.
14775         (interp_ui_out): Adapt.
14776         (current_interp_set_logging): Adapt.
14777         (interp_data): Delete.
14778         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14779         (interp_exec): Adapt.
14780         (top_level_interpreter_data): Delete.
14781         * interps.h (interp_init_ftype, interp_resume_ftype)
14782         (interp_suspend_ftype, interp_exec_ftype)
14783         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14784         (class interp): New.
14785         (interp_new): Delete.
14786         (interp_set): Now returns void.  Use bool.
14787         (interp_data, top_level_interpreter_data): Delete.
14788         * mi/mi-common.h: Include interps.h.
14789         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14790         init, resume, suspect, exec, interp_ui_out, set_logging and
14791         pre_command_loop methods.
14792         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14793         (mi_interpreter_init): Rename to ...
14794         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14795         bool, return void and make extern.  Adjust.
14796         (mi_interpreter_resume): ... Rename to ...
14797         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14798         return void and make extern.  Adjust.
14799         (mi_interpreter_suspend): ... Rename to ...
14800         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14801         return void and make extern.  Adjust.
14802         (mi_interpreter_exec): ... Rename to ...
14803         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14804         extern.  Adjust.
14805         (mi_interpreter_pre_command_loop): ... Rename to ...
14806         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14807         parameter and make extern.
14808         (mi_on_normal_stop_1): Adjust.
14809         (mi_ui_out): Rename to ...
14810         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14811         parameter and make extern.  Adjust.
14812         (mi_set_logging): Rename to ...
14813         (mi_interp::set_logging): ... this.  Remove the 'interp'
14814         parameter and make extern.  Adjust.
14815         (mi_interp_procs): Delete.
14816         (mi_interp_factory): Adjust to use 'new'.
14817         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14818         (mi_print_exception, mi_execute_command, mi_load_progress):
14819         Adjust.
14820         * tui/tui-interp.c (tui_interp): New class.
14821         (as_tui_interp): Return a tui_interp pointer.
14822         (tui_on_normal_stop, tui_on_signal_received)
14823         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14824         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14825         to use interp::interp_ui_out.
14826         (tui_init): Rename to ...
14827         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14828         bool, return void and make extern.  Adjust.
14829         (tui_resume): Rename to ...
14830         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14831         return void and make extern.  Adjust.
14832         (tui_suspend): Rename to ...
14833         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14834         return void and make extern.  Adjust.
14835         (tui_ui_out): Rename to ...
14836         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14837         parameter, and make extern.  Adjust.
14838         (tui_exec): Rename to ...
14839         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14840         make extern.
14841         (tui_interp_procs): Delete.
14842         (tui_interp_factory): Use "new".
14843
14844 2017-02-02  Tom Tromey  <tom@tromey.com>
14845
14846         * rust-exp.y (ends_raw_string, space_then_number)
14847         (rust_identifier_start_p): Return bool.
14848         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14849         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14850         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14851         (rust_chartype_p): Return bool.
14852         (val_print_struct, rust_print_struct_def, rust_print_type):
14853         Update.
14854         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14855         Return bool.
14856
14857 2017-02-02  Tom Tromey  <tom@tromey.com>
14858
14859         * rust-lang.c: Reindent.
14860
14861 2017-02-02  Tom Tromey  <tom@tromey.com>
14862
14863         * rust-lang.h (rust_crate_for_block): Update.
14864         * rust-lang.c (rust_crate_for_block): Return std::string.
14865         (rust_get_disr_info): Use std:;string, not
14866         gdb::unique_xmalloc_ptr.
14867         * rust-exp.y (crate_name): Update.
14868
14869 2017-02-02  Pedro Alves  <palves@redhat.com>
14870
14871         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14872         field out of gdb_disassembler_test and make it static.
14873
14874 2017-02-02  Pedro Alves  <palves@redhat.com>
14875
14876         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14877         mi1_interp and mi_interp fields.
14878
14879 2017-02-02  Pedro Alves  <palves@redhat.com>
14880
14881         * cli/cli-interp.c (struct saved_output_files, saved_output):
14882         Moved from cli/cli-logging.c.
14883         (cli_set_logging): New function.
14884         (cli_interp_procs): Install cli_set_logging.
14885         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14886         Declare.
14887         * cli/cli-logging.c (struct saved_output_files, saved_output):
14888         Moved to cli/cli-interp.c.
14889         (pop_output_files): Don't save outputs here.
14890         (make_logging_output): New function.
14891         (handle_redirections): Don't build tee nor save previous outputs
14892         here.
14893         * interps.c (current_interp_set_logging): Change prototype.
14894         Assume there's always a set_logging_proc method installed.
14895         * interps.h (interp_set_logging_ftype): Change prototype.
14896         (current_interp_set_logging): Change prototype and adjust comment.
14897         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14898         use make_logging_output.
14899         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14900 2017-02-02  Pedro Alves  <palves@redhat.com>
14901
14902         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14903         from ...
14904         (set_logging_overwrite): ... here.
14905         (logging_no_redirect_file): Delete.
14906         (set_logging_redirect): Don't handle redirection on the fly.
14907         Instead warn that "logging off" / "logging on" is necessary.
14908         (pop_output_files): Delete references to logging_no_redirect_file.
14909         (show_logging_command): Always speak in terms of what will happen
14910         once logging is reenabled.
14911
14912 2017-02-02  Pedro Alves  <palves@redhat.com>
14913
14914         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14915
14916 2017-02-02  Pedro Alves  <palves@redhat.com>
14917
14918         * disasm.c (gdb_pretty_print_insn): Rename to ...
14919         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14920         Remove gdbarch parameter.  Adapt to clear the object's buffers
14921         instead of allocating new buffers, and to print using the object's
14922         gdb_disassembler instead of calling gdb_print_insn.
14923         (dump_insns): Use gdb_pretty_print_disassembler.
14924         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14925         (gdb_pretty_print_disassembler): New class.
14926         * record-btrace.c (btrace_insn_history): Use
14927         gdb_pretty_print_disassembler.
14928
14929 2017-02-02  Pedro Alves  <palves@redhat.com>
14930
14931         * ada-lang.c (type_as_string): Use string_file.
14932         * ada-valprint.c (ada_print_floating): Use string_file.
14933         * ada-varobj.c (ada_varobj_scalar_image)
14934         (ada_varobj_get_value_image): Use string_file.
14935         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14936         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14937         * breakpoint.c (update_inserted_breakpoint_locations)
14938         (insert_breakpoint_locations, reattach_breakpoints)
14939         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14940         (print_it_watchpoint): Use string_file.
14941         (save_breakpoints): Use stdio_file.
14942         * c-exp.y (oper): Use string_file.
14943         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14944         tee_file.
14945         (pop_output_files): Use delete.
14946         (handle_redirections): Use stdio_file and tee_file.
14947         * cli/cli-setshow.c (do_show_command): Use string_file.
14948         * compile/compile-c-support.c (c_compute_program): Use
14949         string_file.
14950         * compile/compile-c-symbols.c (generate_vla_size): Take a
14951         'string_file &' instead of a 'ui_file *'.
14952         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14953         of a 'ui_file *'.  Use string_file.
14954         (generate_c_for_variable_locations): Take a 'string_file &'
14955         instead of a 'ui_file *'.
14956         * compile/compile-internal.h (generate_c_for_for_one_variable):
14957         Take a 'string_file &' instead of a 'ui_file *'.
14958         * compile/compile-loc2c.c (push, pushf, unary, binary)
14959         (print_label, pushf_register_address, pushf_register)
14960         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14961         'ui_file *'.  Adjust.
14962         * compile/compile.c (compile_to_object): Use string_file.
14963         * compile/compile.h (compile_dwarf_expr_to_c)
14964         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14965         'ui_file *'.
14966         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14967         (replace_typedefs_qualified_name): Use string_file and
14968         obstack_copy0.
14969         * disasm.c (gdb_pretty_print_insn): Use string_file.
14970         (gdb_disassembly): Adjust reference the null_stream global.
14971         (do_ui_file_delete): Delete.
14972         (gdb_insn_length): Use null_stream.
14973         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14974         * dwarf2loc.c (dwarf2_compile_property_to_c)
14975         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14976         'string_file &' instead of a 'ui_file *'.
14977         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14978         * dwarf2read.c (do_ui_file_peek_last): Delete.
14979         (dwarf2_compute_name): Use string_file.
14980         * event-top.c (gdb_setup_readline): Use stdio_file.
14981         * gdbarch.sh (verify_gdbarch): Use string_file.
14982         * gdbtypes.c (safe_parse_type): Use null_stream.
14983         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14984         string_file.
14985         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14986         'string_file *' instead of a 'ui_file *'.
14987         (gdbscm_arch_disassemble): Use string_file.
14988         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14989         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14990         inherits from ui_file.
14991         (ioscm_file_port_delete, ioscm_file_port_rewind)
14992         (ioscm_file_port_put): Delete.
14993         (ioscm_file_port_write): Rename to ...
14994         (ioscm_file_port::write): ... this.  Remove file_port_magic
14995         checks.
14996         (ioscm_file_port_new): Delete.
14997         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14998         ui_file_up.
14999         * guile/scm-type.c (tyscm_type_name): Use string_file.
15000         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15001         Use string_file.
15002         * infcmd.c (print_return_value_1): Use string_file.
15003         * infrun.c (print_target_wait_results): Use string_file.
15004         * language.c (add_language): Use string_file.
15005         * location.c (explicit_to_string_internal): Use string_file.
15006         * main.c (captured_main_1): Use null_file.
15007         * maint.c (maintenance_print_architecture): Use stdio_file.
15008         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15009         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15010         event_channel>: Change type to mi_console_file pointer.
15011         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15012         (mi_console_file_delete): Delete.
15013         (struct mi_console_file): Delete.
15014         (mi_console_file_magic): Delete.
15015         (mi_console_file_new): Delete.
15016         (mi_console_file::mi_console_file): New.
15017         (mi_console_file_delete): Delete.
15018         (mi_console_file_fputs): Delete.
15019         (mi_console_file::write): New.
15020         (mi_console_raw_packet): Delete.
15021         (mi_console_file::flush): New.
15022         (mi_console_file_flush): Delete.
15023         (mi_console_set_raw): Rename to ...
15024         (mi_console_file::set_raw): ... this.
15025         * mi/mi-console.h (class mi_console_file): New class.
15026         (mi_console_file_new, mi_console_set_raw): Delete.
15027         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15028         (mi_set_logging): Use delete and tee_file.  Adjust.
15029         * mi/mi-main.c (output_register): Use string_file.
15030         (mi_cmd_data_evaluate_expression): Use string_file.
15031         (mi_cmd_data_read_memory): Use string_file.
15032         (mi_cmd_execute, print_variable_or_computed): Use string_file.
15033         * mi/mi-out.c (mi_ui_out::main_stream): New.
15034         (mi_ui_out::rewind): Use main_stream and
15035         string_file.
15036         (mi_ui_out::put): Use main_stream and string_file.
15037         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15038         Allocate a 'string_file' instead.
15039         (mi_out_new): Don't allocate a mem_fileopen stream here.
15040         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15041         (mi_ui_out::main_stream): Declare method.
15042         * printcmd.c (eval_command): Use string_file.
15043         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15044         * python/py-arch.c (archpy_disassemble): Use string_file.
15045         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15046         * python/py-frame.c (frapy_str): Use string_file.
15047         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15048         Use string_file.
15049         * python/py-type.c (typy_str): Use string_file.
15050         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15051         * python/py-value.c (valpy_str): Use string_file.
15052         * record-btrace.c (btrace_insn_history): Use string_file.
15053         * regcache.c (regcache_print): Use stdio_file.
15054         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15055         * remote.c (escape_buffer): Use string_file.
15056         * rust-lang.c (rust_get_disr_info): Use string_file.
15057         * serial.c (serial_open_ops_1): Use stdio_file.
15058         (do_serial_close): Use delete.
15059         * stack.c (print_frame_arg): Use string_file.
15060         (print_frame_args): Remove local mem_fileopen stream, not used.
15061         (print_frame): Use string_file.
15062         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15063         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15064         Take a 'string_file *' instead of a 'ui_file *'.
15065         * top.c (new_ui): Use stdio_file and stderr_file.
15066         (free_ui): Use delete.
15067         (execute_command_to_string): Use string_file.
15068         (quit_confirm): Use string_file.
15069         * tracepoint.c (collection_list::append_exp): Use string_file.
15070         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15071         * tui/tui-file.c: Don't include "ui-file.h".
15072         (enum streamtype, struct tui_stream): Delete.
15073         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15074         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15075         (tui_file::tui_file): New method.
15076         (tui_file_fputs): Delete.
15077         (tui_file_get_strbuf): Delete.
15078         (tui_file::puts): New method.
15079         (tui_file_adjust_strbuf): Delete.
15080         (tui_file_flush): Delete.
15081         (tui_file::flush): New method.
15082         * tui/tui-file.h: Tweak intro comment.
15083         Include ui-file.h.
15084         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15085         (tui_file_adjust_strbuf): Delete declarations.
15086         (class tui_file): New class.
15087         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15088         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15089         (tui_register_format): Use string_stream.
15090         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15091         (tui_get_function_from_frame): Use string_file.
15092         * typeprint.c (type_to_string): Use string_file.
15093         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15094         (null_stream): New global.
15095         (ui_file_delete): Delete.
15096         (ui_file::ui_file): New.
15097         (null_file_isatty): Delete.
15098         (ui_file::~ui_file): New.
15099         (null_file_rewind): Delete.
15100         (ui_file::printf): New.
15101         (null_file_put): Delete.
15102         (null_file_flush): Delete.
15103         (ui_file::putstr): New.
15104         (null_file_write): Delete.
15105         (ui_file::putstrn): New.
15106         (null_file_read): Delete.
15107         (ui_file::putc): New.
15108         (null_file_fputs): Delete.
15109         (null_file_write_async_safe): Delete.
15110         (ui_file::vprintf): New.
15111         (null_file_delete): Delete.
15112         (null_file::write): New.
15113         (null_file_fseek): Delete.
15114         (null_file::puts): New.
15115         (ui_file_data): Delete.
15116         (null_file::write_async_safe): New.
15117         (gdb_flush, ui_file_isatty): Adjust.
15118         (ui_file_put, ui_file_rewind): Delete.
15119         (ui_file_write): Adjust.
15120         (ui_file_write_for_put): Delete.
15121         (ui_file_write_async_safe, ui_file_read): Adjust.
15122         (ui_file_fseek): Delete.
15123         (fputs_unfiltered): Adjust.
15124         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15125         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15126         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15127         (set_ui_file_data): Delete.
15128         (string_file::~string_file, string_file::write)
15129         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15130         (do_ui_file_as_string, ui_file_as_string): Delete.
15131         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15132         (struct mem_file): Delete.
15133         (mem_file_new): Delete.
15134         (stdio_file::stdio_file): New.
15135         (mem_file_delete): Delete.
15136         (stdio_file::stdio_file): New.
15137         (mem_fileopen): Delete.
15138         (stdio_file::~stdio_file): New.
15139         (mem_file_rewind): Delete.
15140         (stdio_file::set_stream): New.
15141         (mem_file_put): Delete.
15142         (stdio_file::open): New.
15143         (mem_file_write): Delete.
15144         (stdio_file_magic, struct stdio_file): Delete.
15145         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15146         (stdio_file::flush): New.
15147         (stdio_file_read): Rename to ...
15148         (stdio_file::read): ... this.  Adjust.
15149         (stdio_file_write): Rename to ...
15150         (stdio_file::write): ... this.  Adjust.
15151         (stdio_file_write_async_safe): Rename to ...
15152         (stdio_file::write_async_safe) ... this.  Adjust.
15153         (stdio_file_fputs): Rename to ...
15154         (stdio_file::puts) ... this.  Adjust.
15155         (stdio_file_isatty): Delete.
15156         (stdio_file_fseek): Delete.
15157         (stdio_file::isatty): New.
15158         (stderr_file_write): Rename to ...
15159         (stderr_file::write) ... this.  Adjust.
15160         (stderr_file_fputs): Rename to ...
15161         (stderr_file::puts) ... this.  Adjust.
15162         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15163         (stderr_file::stderr_file): New.
15164         (tee_file_magic): Delete.
15165         (struct tee_file): Delete.
15166         (tee_file::tee_file): New.
15167         (tee_file_new): Delete.
15168         (tee_file::~tee_file): New.
15169         (tee_file_delete): Delete.
15170         (tee_file_flush): Rename to ...
15171         (tee_file::flush): ... this.  Adjust.
15172         (tee_file_write): Rename to ...
15173         (tee_file::write): ... this.  Adjust.
15174         (tee_file::write_async_safe): New.
15175         (tee_file_fputs): Rename to ...
15176         (tee_file::puts): ... this.  Adjust.
15177         (tee_file_isatty): Rename to ...
15178         (tee_file::isatty): ... this.  Adjust.
15179         * ui-file.h (struct obstack, struct ui_file): Don't
15180         forward-declare.
15181         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15182         (ui_file_write_ftype)
15183         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15184         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15185         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15186         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15187         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15188         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15189         (set_ui_file_fseek): Delete.
15190         (ui_file_data, ui_file_delete, ui_file_rewind)
15191         (struct ui_file): New.
15192         (ui_file_up): New.
15193         (class null_file): New.
15194         (null_stream): Declare.
15195         (ui_file_write_for_put, ui_file_put): Delete.
15196         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15197         Delete.
15198         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15199         (gdb_fopen, tee_file_new): Delete.
15200         (struct string_file): New.
15201         (struct stdio_file): New.
15202         (stdio_file_up): New.
15203         (struct stderr_file): New.
15204         (class tee_file): New.
15205         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15206         of a 'ui_file *'.  Adjust.
15207         * ui-out.h (class ui_out) <field_stream>: Likewise.
15208         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15209         (null_stream): Delete.
15210         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15211         Adjust.
15212         * utils.h (struct ui_file): Delete forward declaration..
15213         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15214         (error_stream): Take a 'string_file &' instead of a
15215         'ui_file *'.
15216         * varobj.c (varobj_value_get_print_value): Use string_file.
15217         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15218         * gdbarch.c: Regenerate.
15219
15220 2017-02-02  Pedro Alves  <palves@redhat.com>
15221
15222         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15223         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15224         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15225         Adjust to call gdb_print_insn instead of
15226         gdb_disassembler::print_insn.
15227         (dump_insns, do_mixed_source_and_assembly_deprecated)
15228         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15229         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15230         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15231         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15232         declaration.
15233         (gdb_pretty_print_insn): Re-add declaration.
15234         * record-btrace.c (btrace_insn_history): Don't allocate a
15235         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15236
15237 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15238
15239         * disasm.h (gdb_disassembly): Remove file_string parameter.
15240         * disasm.c (gdb_disassembly): Likewise.
15241         * cli/cli-cmds.c (print_disassembly): Adapt.
15242         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15243         * stack.c (do_gdb_disassembly): Likewise.
15244
15245 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15246
15247         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15248         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15249         targets.  And if the implicit value is longer than needed, extract
15250         the first bytes instead of the "least significant" ones.
15251
15252 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15253
15254         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15255         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15256         (btrace_fetch): Assert can_access_registers_ptid.
15257         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15258         validate_registers_access.
15259
15260 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15261
15262         * gdbthread.h (can_access_registers_ptid): New.
15263         * thread.c (can_access_registers_ptid): New.
15264
15265 2017-02-01  Pedro Alves  <palves@redhat.com>
15266
15267         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15268
15269 2017-01-31  Pedro Alves  <palves@redhat.com>
15270
15271         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15272         Fix typos.
15273
15274 2017-01-31  Pedro Alves  <palves@redhat.com>
15275
15276         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15277         not used.
15278
15279 2017-01-31  Pedro Alves  <palves@redhat.com>
15280
15281         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15282
15283 2017-01-31  Pedro Alves  <palves@redhat.com>
15284
15285         * common/scoped_restore.h
15286         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15287         change the value's parameter type to T2.
15288         (make_scoped_restore): Likewise.
15289
15290 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15291             Richard Henderson  <rth@redhat.com>
15292
15293         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15294         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15295         GS_BASE for older kernels.
15296         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15297         GS_BASE for older kernels.
15298         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15299         and GS_BASE to the offset table.
15300         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15301         system register group.
15302         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15303         for older kernels.
15304         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15305         amd64 ABI.
15306         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15307         AMD64_GSBASE_REGNUM.
15308         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15309         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15310         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15311         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15312         i386/64bit-segments.xml in those rules.
15313         * features/i386/64bit-segments.xml: New file.
15314         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15315         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15316         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15317         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15318         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15319         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15320         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15321         * features/i386/amd64-avx-linux.c: Regenerated.
15322         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15323         * features/i386/amd64-avx-mpx.c: Regenerated.
15324         * features/i386/amd64-avx512-linux.c: Regenerated.
15325         * features/i386/amd64-linux.c: Regenerated.
15326         * features/i386/amd64-mpx-linux.c: Regenerated.
15327         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15328         * features/i386/i386-avx-mpx.c: Regenerated.
15329         * features/i386/x32-avx-linux.c: Regenerated.
15330         * features/i386/x32-avx512-linux.c: Regenerated.
15331         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15332         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15333         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15334         * regformats/i386/amd64-linux.dat: Regenerated.
15335         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15336         * regformats/i386/x32-avx-linux.dat: Regenerated.
15337         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15338         * regformats/i386/x32-linux.dat: Regenerated.
15339
15340 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15341
15342         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15343         Set to AMD64_NUM_REGS.
15344
15345 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15346
15347         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15348         that checks validity of a register number.
15349
15350 2017-01-27  Kees Cook  <keescook@google.com>
15351
15352         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15353         fetch_fpregs if target has fpa registers.
15354         (arm_linux_store_inferior_registers): Call store_fpregs if target
15355         has fpa registers.
15356
15357 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15358
15359         * cris-tdep.c (cris_gdbarch_init): Remove check for
15360         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15361
15362 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15363
15364         * corelow.c (get_core_register_section): Check for regset
15365         existence before checking for REGSET_VARIABLE_SIZE.
15366
15367 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15368             Pedro Alves  <palves@redhat.com>
15369
15370         PR gdb/20939
15371         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15372         call memory_error, save memaddr instead.
15373         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15374         negative, cal memory_error.
15375         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15376
15377 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15378
15379         * disasm-selftests.c (memory_error_test): New function.
15380         (_initialize_disasm_selftests): Register memory_error_test.
15381
15382 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15383
15384         * Makefile.in (SFILES): Add disasm-selftests.c and
15385         selftest-arch.c.
15386         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15387         * disasm-selftests.c: New file.
15388         * selftest-arch.c: New file.
15389         * selftest-arch.h: New file.
15390
15391 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15392
15393         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15394         to bfd_arch_mep.  Don't return 0 if section is not
15395         found.  Call print_insn_mep.
15396
15397 2017-01-26  Pedro Alves  <palves@redhat.com>
15398             Yao Qi  <yao.qi@linaro.org>
15399
15400         * arm-tdep.c: Include "disasm.h".
15401         (gdb_print_insn_arm): Update code to get gdbarch.
15402         * disasm.c (dis_asm_read_memory): Change it to
15403         gdb_disassembler::dis_asm_read_memory.
15404         (dis_asm_memory_error): Likewise.
15405         (dis_asm_print_address): Likewise.
15406         (gdb_pretty_print_insn): Change it to
15407         gdb_disassembler::pretty_print_insn.
15408         (dump_insns): Add one argument gdb_disassemlber.  All
15409         callers updated.
15410         (do_mixed_source_and_assembly_deprecated): Likewise.
15411         (do_mixed_source_and_assembly): Likewise.
15412         (do_assembly_only): Likewise.
15413         (gdb_disassembler::gdb_disassembler): New.
15414         (gdb_disassembler::print_insn): New.
15415         * disasm.h (class gdb_disassembler): New.
15416         (gdb_pretty_print_insn): Remove declaration.
15417         (gdb_disassemble_info): Likewise.
15418         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15419         (gdbscm_disasm_read_memory_worker): Update.
15420         (gdbscm_disasm_read_memory): Update.
15421         (gdbscm_disasm_memory_error): Remove.
15422         (gdbscm_disasm_print_address): Remove.
15423         (gdbscm_disassembler::gdbscm_disassembler): New.
15424         (gdbscm_print_insn_from_port): Update.
15425         * mips-tdep.c: Include disasm.h.
15426         (gdb_print_insn_mips): Update code to get gdbarch.
15427         * record-btrace.c (btrace_insn_history): Update.
15428         * spu-tdep.c: Include disasm.h.
15429         (struct spu_dis_asm_data): Remove.
15430         (struct spu_dis_asm_info): New.
15431         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15432         SPU id.
15433         (gdb_print_insn_spu): Cast disassemble_info to
15434         spu_dis_asm_info.
15435
15436 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15437
15438         * disasm.c (do_ui_file_delete): Delete.
15439         (gdb_insn_length): Move code creating stream to ...
15440         * utils.c (null_stream): ... here.  New function.
15441         * utils.h (null_stream): Declare.
15442
15443 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15444
15445         * python/py-inferior.c (find_thread_object): Return directly
15446         from the loop.  Remove "found" variable.
15447
15448 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15449
15450         GDB 7.12.1 released.
15451
15452 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15453
15454         * python/py-function.c (fnpy_call): Reorder declarations to have
15455         the gdbpy_enter object declared first.
15456         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15457
15458 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15459
15460         PR python/21068
15461         * python/python-internal.h (PyMem_RawMalloc): Define for
15462         Python < 3.4.
15463         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15464         PyMem_RawMalloc instead of PyMem_Malloc.
15465
15466 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15467             Luis Machado  <lgustavo@codesourcery.com>
15468
15469         * NEWS (New commands): Mention flash-erase.
15470         (New MI commands): Mention target-flash-erase.
15471         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15472         command.
15473         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15474         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15475         * target.c (flash_erase_command): New function.
15476         (initialize_targets): Add new flash-erase command.
15477         * target.h (flash_erase_command): New declaration.
15478
15479 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15480
15481         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15482         HAVE_SYS_PROCFS_H is defined.
15483
15484 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15485
15486         * remote.c (struct cached_reg): Change data into a pointer.
15487         * (stop_reply_dtr): Free data pointers before deleting vector.
15488         (process_stop_reply): Likewise.
15489         (remote_parse_stop_reply): Allocate space for data
15490
15491 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15492
15493         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15494         MAX_REGISTER_SIZE.
15495         (amd64_pseudo_register_read_value): Likewise.
15496         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15497         (store_register_using_P): Likewise.
15498         * regcache.c (regcache_xfer_part): Likewise.
15499
15500 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15501
15502         Split real and pseudo registers.
15503         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15504         (sparc32_pseudo_regnum): New enum.
15505         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15506         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15507         (SPARC32_CP0_REGISTERS): New macro.
15508         (sparc32_pseudo_register_name): New function.
15509         (sparc32_register_name): Use sparc32_pseudo_register_name.
15510         (sparc32_pseudo_register_type): New function.
15511         (sparc32_register_type): Use sparc32_pseudo_register_type.
15512         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15513         pseudo register numbers.
15514         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15515         (SPARC64_CP0_REGISTERS): New macro.
15516         (sparc64_pseudo_register_name): New function.
15517         (sparc64_register_name): Use sparc64_pseudo_register_name.
15518         (sparc64_pseudo_register_type): New function.
15519         (sparc64_register_type): Use sparc64_pseudo_register_type.
15520         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15521         pseudo register numbers.
15522         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15523         sparc64_store_arguments): Handle pseudo register numbers.
15524
15525 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15526
15527         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15528         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15529         output.
15530         (getpkt_or_notif_sane_1): Likewise.
15531
15532 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15533
15534         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15535         of CC.  Pass "-x c++-header" instead of "-x c".
15536
15537 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15538
15539         * remote.c (remote_can_async_p): Update comment.
15540
15541 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15542
15543         * linux-nat.c (linux_nat_can_async_p): Update comment.
15544
15545 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15546
15547         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15548
15549 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15550
15551         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15552
15553 2017-01-10  Tom Tromey  <tom@tromey.com>
15554
15555         * python/py-type.c (typy_legacy_template_argument): Update.
15556         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15557         ~demangle_parse_info): Declare new members.
15558         (cp_demangled_name_to_comp): Return unique_ptr.
15559         (cp_demangled_name_parse_free)
15560         (make_cleanup_cp_demangled_name_parse_free)
15561         (cp_new_demangle_parse_info): Remove.
15562         * cp-support.c (do_demangled_name_parse_free_cleanup)
15563         (make_cleanup_cp_demangled_name_parse_free): Remove.
15564         (inspect_type, cp_canonicalize_string_full)
15565         (cp_canonicalize_string): Update.
15566         (mangled_name_to_comp): Change return type.
15567         (cp_class_name_from_physname, method_name_from_physname)
15568         (cp_func_name, cp_remove_params): Update.
15569         * cp-name-parser.y (demangle_parse_info): New constructor, from
15570         cp_new_demangle_parse_info.
15571         (~demangle_parse_info): New destructor, from
15572         cp_demangled_name_parse_free.
15573         (cp_merge_demangle_parse_infos): Update.
15574         (cp_demangled_name_to_comp): Change return type.
15575
15576 2017-01-10  Tom Tromey  <tom@tromey.com>
15577
15578         * top.c (prevent_dont_repeat): Change return type.
15579         * python/python.c (execute_gdb_command): Use std::string.
15580         Update.
15581         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15582         * command.h (prevent_dont_repeat): Change return type.
15583         * breakpoint.c (bpstat_do_actions_1): Update.
15584
15585 2017-01-10  Tom Tromey  <tom@tromey.com>
15586
15587         * value.h (scoped_value_mark::~scoped_value_mark): Call
15588         free_to_mark.
15589         (scoped_value_mark::free_to_mark): New method.
15590         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15591         scoped_value_mark.
15592
15593 2017-01-10  Tom Tromey  <tom@tromey.com>
15594
15595         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15596         (valpy_reference_value, valpy_const_value, valpy_get_address)
15597         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15598         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15599         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15600         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15601         scoped_value_mark.
15602         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15603         * value.h (scoped_value_mark): New class.
15604
15605 2017-01-10  Tom Tromey  <tom@tromey.com>
15606
15607         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15608         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15609         * psymtab.c (discard_psymtabs_upto): Remove.
15610         (make_cleanup_discard_psymtabs): Remove.
15611         (struct psymtab_state): Remove.
15612
15613 2017-01-10  Tom Tromey  <tom@tromey.com>
15614
15615         * record-full.c (record_full_save_cleanups): Remove.
15616         (record_full_save): Use gdb::unlinker.
15617         * gcore.c (do_bfd_delete_cleanup): Remove.
15618         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15619         cleanups.
15620         * dwarf2read.c (unlink_if_set): Remove.
15621         (write_psymtabs_to_index): Use gdb::unlinker.
15622         * common/gdb_unlinker.h: New file.
15623
15624 2017-01-10  Tom Tromey  <tom@tromey.com>
15625
15626         * windows-tdep.c (windows_xfer_shared_library): Update.
15627         * windows-nat.c (windows_make_so): Update.
15628         * utils.h (make_cleanup_bfd_unref): Remove.
15629         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15630         * symfile.h (symfile_bfd_open)
15631         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15632         * symfile.c (read_symbols, symbol_file_add)
15633         (separate_debug_file_exists): Update.
15634         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15635         (generic_load, reread_symbols): Update.
15636         * symfile-mem.c (symbol_file_add_from_memory): Update.
15637         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15638         (spu_symbol_file_add_from_memory): Update.
15639         * solist.h (struct target_so_ops) <bfd_open>: Return
15640         gdb_bfd_ref_ptr.
15641         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15642         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15643         gdb_bfd_ref_ptr.
15644         (solib_map_sections, reload_shared_libraries_1): Update.
15645         * solib-svr4.c (enable_break): Update.
15646         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15647         * solib-frv.c (enable_break2): Update.
15648         * solib-dsbt.c (enable_break): Update.
15649         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15650         gdb_bfd_ref_ptr.
15651         (darwin_solib_get_all_image_info_addr_at_init): Update.
15652         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15653         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15654         * record-full.c (record_full_save): Update.
15655         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15656         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15657         * minidebug.c (find_separate_debug_file_in_section): Return
15658         gdb_bfd_ref_ptr.
15659         * machoread.c (macho_add_oso_symfile): Change abfd to
15660         gdb_bfd_ref_ptr.
15661         (macho_symfile_read_all_oso): Update.
15662         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15663         (macho_symfile_read): Update.
15664         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15665         (jit_bfd_try_read_symtab): Update.
15666         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15667         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15668         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15669         gdb_bfd_ref_ptr.
15670         (gdb_bfd_ref_policy): New struct.
15671         (gdb_bfd_ref_ptr): New typedef.
15672         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15673         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15674         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15675         gdb_bfd_ref_ptr.
15676         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15677         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15678         (gcore_command): Update.
15679         * exec.c (exec_file_attach): Update.
15680         * elfread.c (elf_symfile_read): Update.
15681         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15682         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15683         (open_and_init_dwo_file): Update.
15684         (open_dwp_file): Return gdb_bfd_ref_ptr.
15685         (open_and_init_dwp_file): Update.
15686         * corelow.c (core_open): Update.
15687         * compile/compile-object-load.c (compile_object_load): Update.
15688         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15689         * coffread.c (coff_symfile_read): Update.
15690         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15691         gdb_bfd_ref_ptr.  Rename.
15692         (dump_bfd_file, restore_command): Update.
15693         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15694         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15695         (find_separate_debug_file_by_buildid): Update.
15696
15697 2017-01-10  Tom Tromey  <tom@tromey.com>
15698
15699         * common/gdb_ref_ptr.h: New file.
15700         * python/py-ref.h (struct gdbpy_ref_policy): New.
15701         (gdbpy_ref): Now a typedef.
15702
15703 2017-01-10  Tom Tromey  <tom@tromey.com>
15704
15705         * utils.h (make_cleanup_htab_delete): Don't declare.
15706         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15707         Remove.
15708         * linespec.c (decode_compound_collector): Add constructor,
15709         destructor.
15710         (lookup_prefix_sym): Remove cleanup.
15711         (symtab_collector): Add constructor, destructor.
15712         (collect_symtabs_from_filename): Remove cleanup.
15713         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15714         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15715         Use htab_up.
15716         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15717         * dwarf2read.c (dw2_expand_symtabs_matching)
15718         (dw2_map_symbol_filenames, dwarf_decode_macros)
15719         (write_psymtabs_to_index): Use htab_up.
15720         * dwarf2loc.c (func_verify_no_selftailcall)
15721         (call_site_find_chain_1, func_verify_no_selftailcall)
15722         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15723         std::vector, gdb::unique_xmalloc_ptr.
15724         (call_sitep): Remove typedef.
15725         (dwarf2_locexpr_baton_eval): Remove unused variable.
15726
15727 2017-01-10  Tom Tromey  <tom@tromey.com>
15728
15729         * python/python-internal.h (make_cleanup_py_decref)
15730         (make_cleanup_py_xdecref): Don't declare.
15731         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15732         (py_xdecref, make_cleanup_py_xdecref): Remove.
15733
15734 2017-01-10  Tom Tromey  <tom@tromey.com>
15735
15736         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15737         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15738
15739 2017-01-10  Tom Tromey  <tom@tromey.com>
15740
15741         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15742
15743 2017-01-10  Tom Tromey  <tom@tromey.com>
15744
15745         * python/py-utils.c (unicode_to_encoded_string)
15746         (python_string_to_target_string)
15747         (python_string_to_target_python_string)
15748         (python_string_to_host_string, gdbpy_obj_to_string)
15749         (get_addr_from_python): Use gdbpy_ref.
15750
15751 2017-01-10  Tom Tromey  <tom@tromey.com>
15752
15753         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15754         gdbpy_ref.
15755
15756 2017-01-10  Tom Tromey  <tom@tromey.com>
15757
15758         * python/python.c (eval_python_command, gdbpy_decode_line)
15759         (gdbpy_run_events, gdbpy_start_type_printers)
15760         (gdbpy_apply_type_printers): Use gdbpy_ref.
15761
15762 2017-01-10  Tom Tromey  <tom@tromey.com>
15763
15764         * python/py-param.c (get_doc_string, compute_enum_values): Use
15765         gdbpy_ref.
15766
15767 2017-01-10  Tom Tromey  <tom@tromey.com>
15768
15769         * python/py-inferior.c (find_thread_object, build_inferior_list):
15770         Use gdbpy_ref.
15771
15772 2017-01-10  Tom Tromey  <tom@tromey.com>
15773
15774         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15775
15776 2017-01-10  Tom Tromey  <tom@tromey.com>
15777
15778         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15779         gdbpy_ref.
15780
15781 2017-01-10  Tom Tromey  <tom@tromey.com>
15782
15783         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15784         extra incref.
15785         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15786         Use gdbpy_ref.
15787
15788 2017-01-10  Tom Tromey  <tom@tromey.com>
15789
15790         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15791         gdbpy_ref.
15792
15793 2017-01-10  Tom Tromey  <tom@tromey.com>
15794
15795         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15796         decref results of PyArg_ParseTupleAndKeywords.
15797
15798 2017-01-10  Tom Tromey  <tom@tromey.com>
15799
15800         * python/python.c (python_run_simple_file): Use
15801         unique_xmalloc_ptr, gdbpy_ref.
15802
15803 2017-01-10  Tom Tromey  <tom@tromey.com>
15804
15805         * python/py-prettyprint.c (print_stack_unless_memory_error)
15806         (print_string_repr, print_children): Use gdbpy_ref.
15807         (dummy_python_frame): New class.
15808         (dummy_python_frame::dummy_python_frame): Rename from
15809         push_dummy_python_frame.
15810         (py_restore_tstate): Remove.
15811
15812 2017-01-10  Tom Tromey  <tom@tromey.com>
15813
15814         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15815
15816 2017-01-10  Tom Tromey  <tom@tromey.com>
15817
15818         * python/python.c (ensure_python_env, restore_python_env):
15819         Remove.
15820         * python/python-internal.h (ensure_python_env): Don't declare.
15821         * varobj.h (varobj_ensure_python_env): Don't declare.
15822         * varobj.c (varobj_ensure_python_env): Remove.
15823
15824 2017-01-10  Tom Tromey  <tom@tromey.com>
15825
15826         * varobj.c (varobj_value_get_print_value): Use
15827         gdbpy_enter_varobj.
15828
15829 2017-01-10  Tom Tromey  <tom@tromey.com>
15830
15831         * python/py-prettyprint.c (print_string_repr, print_children):
15832         Update.
15833         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15834         of "encoding".
15835         * varobj.c (varobj_value_get_print_value): Update.
15836         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15837
15838 2017-01-10  Tom Tromey  <tom@tromey.com>
15839
15840         * varobj.c (varobj_get_display_hint)
15841         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15842         (varobj_set_visualizer, free_variable): Use
15843         gdbpy_enter_varobj.
15844
15845 2017-01-10  Tom Tromey  <tom@tromey.com>
15846
15847         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15848         (do_finish_initialization): New function.  Use gdbpy_ref.
15849         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15850         do_finish_initialization.
15851
15852 2017-01-10  Tom Tromey  <tom@tromey.com>
15853
15854         * python/py-param.c (get_set_value, get_show_value): Use
15855         gdbpy_enter, gdbpy_ref.
15856
15857 2017-01-10  Tom Tromey  <tom@tromey.com>
15858
15859         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15860
15861 2017-01-10  Tom Tromey  <tom@tromey.com>
15862
15863         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15864
15865 2017-01-10  Tom Tromey  <tom@tromey.com>
15866
15867         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15868         Use gdbpy_enter_varobj.
15869
15870 2017-01-10  Tom Tromey  <tom@tromey.com>
15871
15872         * varobj.c (gdbpy_enter_varobj): New constructor.
15873         * python/python-internal.h (gdbpy_enter_varobj): New class.
15874         * python/py-varobj.c (py_varobj_get_iterator): Use
15875         gdbpy_enter_varobj.
15876
15877 2017-01-10  Tom Tromey  <tom@tromey.com>
15878
15879         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15880         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15881         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15882         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15883         unique_xmalloc_ptr.
15884         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15885
15886 2017-01-10  Tom Tromey  <tom@tromey.com>
15887
15888         * python/py-xmethods.c (invoke_match_method): Use
15889         gdbpy_ref.
15890
15891 2017-01-10  Tom Tromey  <tom@tromey.com>
15892
15893         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15894         gdbpy_enter, gdbpy_ref.
15895
15896 2017-01-10  Tom Tromey  <tom@tromey.com>
15897
15898         * python/python.c (python_interactive_command): Use gdbpy_enter.
15899
15900 2017-01-10  Tom Tromey  <tom@tromey.com>
15901
15902         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15903         gdbpy_ref.
15904
15905 2017-01-10  Tom Tromey  <tom@tromey.com>
15906
15907         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15908         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15909
15910 2017-01-10  Tom Tromey  <tom@tromey.com>
15911
15912         * utils.h (htab_deleter): New struct.
15913         (htab_up): New typedef.
15914         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15915         gdbpy_enter, gdbpy_ref, htab_up.
15916
15917 2017-01-10  Tom Tromey  <tom@tromey.com>
15918
15919         * python/py-unwind.c (pending_frame_invalidate): Remove.
15920         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15921
15922 2017-01-10  Tom Tromey  <tom@tromey.com>
15923
15924         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15925         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15926
15927 2017-01-10  Tom Tromey  <tom@tromey.com>
15928
15929         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15930
15931 2017-01-10  Tom Tromey  <tom@tromey.com>
15932
15933         * python/python.c (gdbpy_eval_from_control_command)
15934         (gdbpy_source_script, gdbpy_run_events)
15935         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15936         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15937         gdbpy_enter.
15938
15939 2017-01-10  Tom Tromey  <tom@tromey.com>
15940
15941         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15942
15943 2017-01-10  Tom Tromey  <tom@tromey.com>
15944
15945         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15946
15947 2017-01-10  Tom Tromey  <tom@tromey.com>
15948
15949         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15950         (python_on_inferior_call_pre, python_on_inferior_call_post)
15951         (python_on_memory_change, python_on_register_change)
15952         (python_inferior_exit, python_new_objfile, add_thread_object)
15953         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15954
15955 2017-01-10  Tom Tromey  <tom@tromey.com>
15956
15957         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15958         (bpfinishpy_handle_exit): Use gdbpy_enter.
15959
15960 2017-01-10  Tom Tromey  <tom@tromey.com>
15961
15962         * python/py-cmd.c (cmdpy_destroyer)
15963         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15964         gdbpy_enter.
15965
15966 2017-01-10  Tom Tromey  <tom@tromey.com>
15967
15968         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15969         gdbpy_enter.
15970         (gdbpy_breakpoint_has_cond): Likewise.
15971
15972 2017-01-10  Tom Tromey  <tom@tromey.com>
15973
15974         * python/python.c (gdbpy_enter): New constructor.
15975         (~gdbpy_enter): New destructor.
15976         (restore_python_env, ensure_python_env): Rewrite.
15977         * python/python-internal.h (gdbpy_enter): New class.
15978
15979 2017-01-10  Tom Tromey  <tom@tromey.com>
15980
15981         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15982
15983 2017-01-10  Tom Tromey  <tom@tromey.com>
15984
15985         * python/py-value.c (value_has_field, get_field_flag)
15986         (get_field_type, valpy_getitem, convert_value_from_python): Use
15987         gdbpy_ref.
15988
15989 2017-01-10  Tom Tromey  <tom@tromey.com>
15990
15991         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15992         gdbpy_ref.
15993
15994 2017-01-10  Tom Tromey  <tom@tromey.com>
15995
15996         * python/py-prettyprint.c (search_pp_list)
15997         (find_pretty_printer_from_objfiles)
15998         (find_pretty_printer_from_progspace)
15999         (find_pretty_printer_from_gdb, find_pretty_printer)
16000         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16001         gdbpy_ref.
16002
16003 2017-01-10  Tom Tromey  <tom@tromey.com>
16004
16005         * python/py-param.c (call_doc_function): Use gdbpy_ref.
16006
16007 2017-01-10  Tom Tromey  <tom@tromey.com>
16008
16009         * python/py-linetable.c (build_line_table_tuple_from_pcs)
16010         (ltpy_get_all_source_lines): Use gdbpy_ref.
16011
16012 2017-01-10  Tom Tromey  <tom@tromey.com>
16013
16014         * python/py-framefilter.c (extract_sym, extract_value)
16015         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16016         gdbpy_ref.
16017
16018 2017-01-10  Tom Tromey  <tom@tromey.com>
16019
16020         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16021
16022 2017-01-10  Tom Tromey  <tom@tromey.com>
16023
16024         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16025
16026 2017-01-10  Tom Tromey  <tom@tromey.com>
16027
16028         * python/py-function.c (convert_values_to_python, fnpy_init): Use
16029         gdbpy_ref.
16030
16031 2017-01-10  Tom Tromey  <tom@tromey.com>
16032
16033         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16034
16035 2017-01-10  Tom Tromey  <tom@tromey.com>
16036
16037         * python/py-type.c (convert_field, make_fielditem, typy_fields)
16038         (typy_range): Use gdbpy_ref.
16039
16040 2017-01-10  Tom Tromey  <tom@tromey.com>
16041
16042         * python/py-threadevent.c (create_thread_event_object): Use
16043         gdbpy_ref.
16044         * python/py-stopevent.c (create_stop_event_object): Simplify.
16045         (emit_stop_event): Use gdbpy_ref.
16046         * python/py-signalevent.c (create_signal_event_object): Use
16047         gdbpy_ref.
16048         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16049         (emit_new_objfile_event, create_clear_objfiles_event_object)
16050         (emit_clear_objfiles_event): Use gdbpy_ref.
16051         * python/py-infevents.c (create_inferior_call_event_object)
16052         (create_register_changed_event_object)
16053         (create_memory_changed_event_object, emit_inferior_call_event)
16054         (emit_memory_changed_event, emit_register_changed_event): Use
16055         gdbpy_ref.
16056         * python/py-exitedevent.c (create_exited_event_object)
16057         (emit_exited_event): Use gdbpy_ref.
16058         * python/py-event.h (evpy_emit_event): Remove
16059         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16060         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16061         * python/py-continueevent.c (emit_continue_event): Use
16062         gdbpy_ref.
16063         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16064         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16065         gdbpy_ref.
16066         * python/py-bpevent.c (create_breakpoint_event_object): Use
16067         gdbpy_ref.
16068
16069 2017-01-10  Tom Tromey  <tom@tromey.com>
16070
16071         * python/py-ref.h: New file.
16072
16073 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16074
16075         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16076         void.
16077         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16078         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16079         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16080         * ui-out.c (ui_out::redirect): Likewise.
16081         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16082         * cli/cli-logging.c (set_logging_redirect): Update call site of
16083         ui_out::redirect.
16084         (handle_redirections): Likewise.
16085         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16086         * top.c (execute_command_to_string): Likewise.
16087         * utils.c (do_ui_out_redirect_pop): Likewise.
16088
16089 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16090
16091         * stack.c (_initialize_stack): Update "frame" command help message.
16092
16093 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16094
16095         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16096
16097 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16098
16099         * x86-linux-nat.h: Include gdb_proc_service.h.
16100
16101 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16102
16103         * ser-base.h: Include serial.h.
16104
16105 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16106
16107         * ppc-linux-tdep.h: Include ppc-tdep.h.
16108
16109 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16110
16111         * nat/amd64-linux-siginfo.h: Include signal.h.
16112
16113 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16114
16115         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16116
16117 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16118
16119         * mi/mi-parse.h: Include mi-cmds.h.
16120
16121 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16122
16123         * inf-loop.c: Don't include "target.h".
16124         * inf-loop.h: Include it here.
16125
16126 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16127
16128         * dfp.h: Include "dboulest.h" and "expression.h".
16129
16130 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16131
16132         * ax-gdb.h: Include "ax.h".
16133
16134 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16135
16136         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16137         with nat/gdb_ptrace.h.
16138
16139 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16140
16141         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16142         new line.
16143         (mips64_fbsd_sigframe_init): Likewise.
16144
16145 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16146
16147         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16148         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16149
16150 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16151
16152         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16153         * NEWS: Mention new FreeBSD/mips native configuration.
16154         * config/mips/fbsd.mh: New file.
16155         * configure.host: Add mips*-*-freebsd*.
16156         * mips-fbsd-nat.c: New file.
16157
16158 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16159
16160         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16161         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16162         * NEWS: Mention new FreeBSD/mips target.
16163         * configure.tgt: Add mips*-*-freebsd*.
16164         * mips-fbsd-tdep.c: New file.
16165         * mips-fbsd-tdep.h: New file.
16166
16167 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16168
16169         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16170         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16171
16172 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16173
16174         Update copyright year range in all GDB files.
16175
16176 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16177
16178         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16179
16180 For older changes see ChangeLog-2016.
16181 \f
16182 Local Variables:
16183 mode: change-log
16184 left-margin: 8
16185 fill-column: 74
16186 version-control: never
16187 coding: utf-8
16188 End: