2121e3ec66b8fb2e6799e48e2b5adbc23e371672
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * break-catch-throw.c (fetch_probe_arguments): Use
4         'probe.prob' instead of 'probe.probe'.
5         * breakpoint.c (create_longjmp_master_breakpoint): Call
6         'can_evaluate_arguments' and 'get_relocated_address' methods
7         from probe.
8         (create_exception_master_breakpoint): Likewise.
9         (add_location_to_breakpoint): Use 'sal->prob' instead of
10         'sal->probe'.
11         (bkpt_probe_insert_location): Call 'set_semaphore' method from
12         probe.
13         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
14         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
15         of 'probe_ops'.
16         (probe_key_free): Call 'delete' on probe.
17         (check_exception_resume): Use 'probe.prob' instead of
18         'probe.probe'.
19         * location.c (string_to_event_location_basic): Call
20         'probe_linespec_to_static_ops'.
21         * probe.c (class any_static_probe_ops): New class.
22         (any_static_probe_ops any_static_probe_ops): New variable.
23         (parse_probes_in_pspace): Receive 'static_probe_ops' as
24         argument.  Adjust code to reflect change.
25         (parse_probes): Use 'static_probe_ops' instead of
26         'probe_ops'.  Adjust code to reflect change.
27         (find_probes_in_objfile): Call methods to get name and
28         provider from probe.
29         (find_probe_by_pc): Use 'result.prob' instead of
30         'result.probe'.  Call 'get_relocated_address' method from
31         probe.
32         (collect_probes): Adjust comment and argument list to receive
33         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
34         reflect change.  Call necessary methods from probe.
35         (compare_probes): Call methods to get name and provider from
36         probes.
37         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
38         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
39         adjust code accordingly.
40         (print_ui_out_not_applicables): Likewise.
41         (info_probes_for_ops): Rename to...
42         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
43         as argument instead of 'probe_ops'.  Adjust code.  Call
44         necessary methods from probe.
45         (info_probes_command): Use 'info_probes_for_spops'.
46         (enable_probes_command): Pass correct argument to
47         'collect_probes'.  Call methods from probe.
48         (disable_probes_command): Likewise.
49         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
50         (get_probe_argument_count): Move to
51         'any_static_probe_ops::get_argument_count'.
52         (can_evaluate_probe_arguments): Move to
53         'any_static_probe_ops::can_evaluate_arguments'.
54         (evaluate_probe_argument): Move to
55         'any_static_probe_ops::evaluate_argument'.
56         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
57         'probe.probe'.
58         (probe_linespec_to_ops): Rename to...
59         (probe_linespec_to_static_ops): ...this.  Adjust code.
60         (probe_any_is_linespec): Rename to...
61         (any_static_probe_ops::is_linespec): ...this.
62         (probe_any_get_probes): Rename to...
63         (any_static_probe_ops::get_probes): ...this.
64         (any_static_probe_ops::type_name): New method.
65         (any_static_probe_ops::gen_info_probes_table_header): New
66         method.
67         (compute_probe_arg): Use 'pc_probe.prob' instead of
68         'pc_probe.probe'.  Call methods from probe.
69         (compile_probe_arg): Likewise.
70         (std::vector<const probe_ops *> all_probe_ops): Delete.
71         (std::vector<const static_probe_ops *> all_static_probe_ops):
72         New variable.
73         (_initialize_probe): Use 'all_static_probe_ops' instead of
74         'all_probe_ops'.
75         * probe.h (struct info_probe_column) <field_name>: Delete
76         extraneous newline
77         (info_probe_column_s): Delete type and VEC.
78         (struct probe_ops): Delete.  Replace with...
79         (class static_probe_ops): ...this and...
80         (clas probe): ...this.
81         (struct bound_probe) <bound_probe>: Delete extraneous
82         newline.  Adjust constructor to receive 'probe' instead of
83         'struct probe'.
84         <probe>: Rename to...
85         <prob>: ...this.  Delete extraneous newline.
86         <objfile>: Delete extraneous newline.
87         (register_probe_ops): Delete unused prototype.
88         (info_probes_for_ops): Rename to...
89         (info_probes_for_spops): ...this.  Adjust comment.
90         (get_probe_address): Move to 'probe::get_address'.
91         (get_probe_argument_count): Move to
92         'probe::get_argument_count'.
93         (can_evaluate_probe_arguments): Move to
94         'probe::can_evaluate_arguments'.
95         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
96         * solib-svr4.c (struct svr4_info): Adjust comment.
97         (struct probe_and_action) <probe>: Rename to...
98         <prob>: ...this.
99         (register_solib_event_probe): Receive 'probe' instead of
100         'struct probe' as argument.  Use 'prob' instead of 'probe'
101         when applicable.
102         (solib_event_probe_action): Call 'get_argument_count' method
103         from probe.  Adjust comment.
104         (svr4_handle_solib_event): Adjust comment.  Call
105         'evaluate_argument' method from probe.
106         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
107         from probe.
108         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
109         'struct probe'.  Call 'can_evaluate_arguments' from probe.
110         * symfile.h: Forward declare 'class probe' instead of 'struct
111         probe'.
112         * symtab.h: Likewise.
113         (struct symtab_and_line) <probe>: Rename to...
114         <prob>: ...this.
115         * tracepoint.c (start_tracing): Use 'prob' when applicable.
116         Call probe methods.
117         (stop_tracing): Likewise.
118
119 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
120
121         * ravenscar-thread.c (ravenscar_inferior_created): Remove
122         trailing newline at end of string in call to warning.
123
124 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
125
126         * osdata.h: Include vector isntead of vec.h.
127         (osdata_column_s): Remove typedef.
128         (struct osdata_column): Add constructor.
129         <name, value>: Change type to std::string.
130         (DEF_VEC_O (osdata_column_s)): Remove.
131         (osdata_item_s): Remove typedef.
132         (struct osdata_item) <columns>: Change type to std::vector.
133         (DEF_VEC_O (osdata_item_s)): Remove.
134         (struct osdata): Add constructor.
135         <type>: Change type to std::string.
136         <items>: Change type to std::vector.
137         (osdata_p): Remove typedef.
138         (DEF_VEC_P (osdata_p)): Remove.
139         (osdata_parse): Return a unique_ptr.
140         (osdata_free): Remove.
141         (make_cleanup_osdata_free): Remove.
142         (get_osdata): Return a unique_ptr.
143         (get_osdata_column): Return pointer to std::string, take a
144         reference to osdata_item as parameter.
145         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
146         unique_ptr.
147         <property_name>: Change type to std::string.
148         (osdata_start_osdata): Allocate osdata with new and adjust.
149         (osdata_start_item): Adjust.
150         (osdata_start_column): Adjust.
151         (osdata_end_column): Adjust.
152         (clear_parsing_data): Remove.
153         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
154         (osdata_item_clear): Remove.
155         (get_osdata): return a unique_ptr and adjust.
156         (get_osdata_column): Return a pointer to std::string and adjust.
157         (info_osdata): Adjust.
158         * mi/mi-main.c: Include <map>.
159         (free_vector_of_osdata_items): Remove.
160         (list_available_thread_groups): Adjust, use std::map instead of
161         splay tree.
162
163 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
164
165         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
166         case in switch.
167
168 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
169
170         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
171
172 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
173
174         * varobj.h (struct varobj_update_result): Add constructor, add
175         move constructor, disable copy and assign, initialize fields.
176         <newobj>: Change type to std::vector.
177         (varobj_update): Return std::vector.
178         * varobj.c (install_dynamic_child): Change VEC parameters to
179         std::vector and adjust.
180         (update_dynamic_varobj_children): Likewise.
181         (varobj_update): Return std::vector and adjust.
182         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
183
184 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
185
186         * varobj.h (struct varobj) <parent>: Remove const.
187         <children>: Change type to std::vector.
188         (varobj_list_children): Return std::vector const reference.
189         (varobj_restrict_range): Change parameter type to std::vector
190         const reference.
191         * varobj.c (varobj_has_more): Adjust.
192         (varobj_restrict_range): Change parameter type to std::vector
193         const reference and adjust.
194         (install_dynamic_child): Adjust.
195         (update_dynamic_varobj_children): Adjust.
196         (varobj_list_children): Return std::vector const reference and
197         adjust.
198         (varobj_add_child): Adjust.
199         (update_type_if_necessary): Adjust.
200         (varobj_update): Adjust.
201         (delete_variable_1): Adjust.
202         * ada-varobj.c (ada_value_has_mutated): Adjust.
203         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
204
205 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
206
207         * varobj.h (struct varobj): Add constructor and destructor,
208         initialize fields.
209         * varobj.c (struct varobj_root): Initialize fields.
210         (struct varobj_dynamic): Initialize fields.
211         (varobj_create): Use unique_ptr instead of cleanup.  Create
212         varobj with new instead of new_root_variable.
213         (delete_variable_1): Free variable with delete instead of
214         free_variable.
215         (create_child_with_value): Create variable with new instead of
216         new_variable.
217         (varobj::varobj): New.
218         (varobj::~varobj): New (body mostly coming from free_variable).
219         (new_variable): Remove.
220         (free_variable): Remove.
221         (do_free_variable_cleanup): Remove.
222         (make_cleanup_free_variable): Remove.
223
224 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
225
226         * core-regset.c: Remove file.
227         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
228
229 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
230
231         * NEWS: Document use of GNU MPFR.
232         * README: Likewise.
233
234         * Makefile.in (LIBMPFR): Add define.
235         (CLIBS): Add $(LIBMPFR).
236         * configure.ac: Add --with-mpfr configure option.
237         * configure: Regenerate.
238         * config.in: Regenerate.
239
240         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
241         (class mpfr_float_ops): New type.
242         (mpfr_float_ops::from_target): Two new overloaded functions.
243         (mpfr_float_ops::to_target): Likewise.
244         (mpfr_float_ops::to_string): New function.
245         (mpfr_float_ops::from_string): Likewise.
246         (mpfr_float_ops::to_longest): Likewise.
247         (mpfr_float_ops::from_longest): Likewise.
248         (mpfr_float_ops::from_ulongest): Likewise.
249         (mpfr_float_ops::to_host_double): Likewise.
250         (mpfr_float_ops::from_host_double): Likewise.
251         (mpfr_float_ops::convert): Likewise.
252         (mpfr_float_ops::binop): Likewise.
253         (mpfr_float_ops::compare): Likewise.
254         (get_target_float_ops): Use mpfr_float_ops if available.
255
256 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
257
258         * target-float.c: Do not include <math.h>.
259         Include <cmath> and <limits>.
260         (DOUBLEST): Do not define.
261         (class target_float_ops): New type.
262         (class host_float_ops): New templated type.
263         (class decimal_float_ops): New type.
264
265         (floatformat_to_doublest): Rename to ...
266         (host_float_ops<T>::from_target): ... this.  Use template type T
267         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
268         (host_float_ops<T>::from_target): New overload using a type argument.
269         (floatformat_from_doublest): Rename to ...
270         (host_float_ops<T>::to_target): ... this.  Use template type T
271         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
272         (host_float_ops<T>::to_target): New overload using a type argument.
273         (floatformat_printf_format): New function.
274         (struct printf_length_modifier): New templated type.
275         (floatformat_to_string): Rename to ...
276         (host_float_ops<T>::to_string): ... this.  Use type instead of
277         floatformat argument.  Use floatformat_printf_format and
278         printf_length_modifier.  Remove special handling of invalid numbers,
279         infinities and NaN (moved to target_float_to_string).
280         (struct scanf_length_modifier): New templated type.
281         (floatformat_from_string): Rename to ...
282         (host_float_ops<T>::from_string): ... this.  Use type instead of
283         floatformat argument.  Use scanf_length_modifier.
284         (floatformat_to_longest): Rename to ...
285         (host_float_ops<T>::to_longest): ... this.  Use type instead of
286         floatformat argument.  Handle out-of-range values deterministically.
287         (floatformat_from_longest): Rename to ...
288         (host_float_ops<T>::from_longest): ... this.  Use type instead of
289         floatformat argument.
290         (floatformat_from_ulongest): Rename to ...
291         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
292         floatformat argument.
293         (floatformat_to_host_double): Rename to ...
294         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
295         floatformat argument.
296         (floatformat_from_host_double): Rename to ...
297         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
298         floatformat argument.
299         (floatformat_convert): Rename to ...
300         (host_float_ops<T>::convert): ... this.  Use type instead of
301         floatformat arguments.  Remove handling of no-op conversions.
302         (floatformat_binop): Rename to ...
303         (host_float_ops<T>::binop): ... this.  Use type instead of
304         floatformat arguments.
305         (floatformat_compare): Rename to ...
306         (host_float_ops<T>::compare): ... this.  Use type instead of
307         floatformat arguments.
308
309         (match_endianness): Use type instead of length/byte_order arguments.
310         (set_decnumber_context): Likewise.
311         (decimal_from_number): Likewise.  Update calls.
312         (decimal_to_number): Likewise.
313         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
314         (decimal_float_ops::to_host_double): New dummy function.
315         (decimal_float_ops::from_host_double): Likewise.
316         (decimal_to_string): Rename to ...
317         (decimal_float_ops::to_string): ... this.  Use type instead of
318         length/byte_order arguments.  Update calls.
319         (decimal_from_string): Rename to ...
320         (decimal_float_ops::from_string): ... this.  Use type instead of
321         length/byte_order arguments.  Update calls.
322         (decimal_from_longest): Rename to ...
323         (decimal_float_ops::from_longest): ... this.  Use type instead of
324         length/byte_order arguments.  Update calls.
325         (decimal_from_ulongest): Rename to ...
326         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
327         length/byte_order arguments.  Update calls.
328         (decimal_to_longest): Rename to ...
329         (decimal_float_ops::to_longest): ... this.  Use type instead of
330         length/byte_order arguments.  Update calls.
331         (decimal_binop): Rename to ...
332         (decimal_float_ops::binop): ... this.  Use type instead of
333         length/byte_order arguments.  Update calls.
334         (decimal_compare): Rename to ...
335         (decimal_float_ops::compare): ... this.  Use type instead of
336         length/byte_order arguments.  Update calls.
337         (decimal_convert): Rename to ...
338         (decimal_float_ops::convert): ... this.  Use type instead of
339         length/byte_order arguments.  Update calls.
340
341         (target_float_same_category_p): New function.
342         (target_float_same_format_p): Likewise.
343         (target_float_format_length): Likewise.
344         (enum target_float_ops_kind): New type.
345         (get_target_float_ops_kind): New function.
346         (get_target_float_ops): Three new overloaded functions.
347
348         (target_float_is_zero): Update call.
349         (target_float_to_string): Add special handling of invalid numbers,
350         infinities and NaN (moved from floatformat_to_string).  Use
351         target_float_ops callback.
352         (target_float_from_string): Use target_float_ops callback.
353         (target_float_to_longest): Likewise.
354         (target_float_from_longest): Likewise.
355         (target_float_from_ulongest): Likewise.
356         (target_float_to_host_double): Likewise.
357         (target_float_from_host_double): Likewise.
358         (target_float_convert): Add special case for no-op conversions.
359         Use target_float_ops callback.
360         (target_float_binop): Use target_float_ops callback.
361         (target_float_compare): Likewise.
362
363 2017-11-22  Yao Qi  <yao.qi@linaro.org>
364
365         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
366
367 2017-11-22  Yao Qi  <yao.qi@linaro.org>
368
369         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
370         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
371
372 2017-11-21  Jerome Guitton  <guitton@adacore.com>
373
374         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
375         with event ptid from the lower layer before doing the
376         ravenscar-specific update.
377
378 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
379
380         * ravenscar-thread.c (is_ravenscar_task): Also verify that
381         the ptid's TID is nonzero.
382
383 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
384
385         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
386         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
387         Make non-static.  Change return type to char *.  Adjust code
388         accordingly.  Rewrite the function's documentation.
389         (read_atcb): Adjust call to get_tcb_types_info accordingly.
390         * ravenscar-thread.c (ravenscar_inferior_created): Check that
391         we have enough debugging information in the runtime to support
392         Ada task debugging before we enable the ravenscar-thread layer.
393
394 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
395
396         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
397         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
398         * ravenscar-thread.c: Add into comment.
399         (base_magic_null_ptid): Delete.
400         (base_ptid): Change documentation.
401         (ravenscar_active_task): Renames ravenscar_running_thread.
402         All callers updated throughout.
403         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
404         (ravenscar_task_is_currently_active): Likewise.
405         (get_base_thread_from_ravenscar_task): Ditto.
406         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
407         (ravenscar_runtime_initialized): Likewise.
408         (get_running_thread_id): Add new parameter "cpu".  Adjust
409         implementation to handle this new parameter.
410         (ravenscar_fetch_registers): Small adjustment to use
411         is_ravenscar_task and ravenscar_task_is_currently_active in
412         order to decide whether to use the target beneath or this
413         module's arch_ops.
414         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
415         (ravenscar_stopped_by_sw_breakpoint): Use
416         get_base_thread_from_ravenscar_task to get the underlying
417         thread, rather than using base_ptid.
418         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
419         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
420         Likewise.
421         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
422
423 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
424
425         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
426         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
427         (get_tcb_types_info): Set fieldnos.base_cpu.
428         (read_atcb): Set task_info->base_cpu.
429         (info_task): Print "Base CPU" info if set by runtime.
430
431 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
432
433         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
434         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
435         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
436         New functions.
437         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
438         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
439         to_stopped_data_address and to_core_of_thread fields of
440         ravenscar_ops.
441
442 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
443
444         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
445         (struct gdbarch_tdep): New member long_double_abi.
446         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
447         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
448         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
449         format depending on long_double_abi tdep member.
450         (ppc_floatformat_for_type): Handle __ibm128 type.
451
452 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
453
454         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
455
456 2017-11-21  Pedro Alves  <palves@redhat.com>
457
458         * dwarf2read.c (mapped_index::find_name_components_bounds)
459         <completion mode, upper bound>: Use std::lower_bound instead of
460         std::upper_bound.
461         (test_mapped_index_find_name_component_bounds): Remove incorrect
462         "t1_fund" from expected symbols.
463
464 2017-11-21  Pedro Alves  <palves@redhat.com>
465
466         * dwarf2read.c (mapped_index::name_components_casing): New field.
467         (mapped_index) <build_name_components,
468         find_name_components_bounds): Declare new methods.
469         (mapped_index::find_name_components_bounds)
470         (mapped_index::build_name_components): New methods, factored out
471         from dw2_expand_symtabs_matching_symbol.
472         (check_find_bounds_finds)
473         (test_mapped_index_find_name_component_bounds): New.
474         (run_test): Rename to ...
475         (test_dw2_expand_symtabs_matching_symbol): ... this.
476         (run_test): Reimplement.
477
478 2017-11-21  Pedro Alves  <palves@redhat.com>
479
480         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
481         (symbol_end): Use cp_ident_is_alnum.
482         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
483         * dwarf2read.c (make_sort_after_prefix_name): New function.
484         (dw2_expand_symtabs_matching_symbol): Use it.
485         (test_symbols): Add more symbols.
486         (run_test): Add tests.
487
488 2017-11-17  Tom Tromey  <tom@tromey.com>
489
490         * symtab.h (enum symbol_subclass_kind): New.
491         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
492         Remove.
493         <subclass>: New member.
494         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
495         * rust-lang.c (rust_get_trait_object_pointer): Update.
496         * dwarf2read.c (read_func_scope): Update.
497         (read_variable): Update.
498
499 2017-11-17  Tom Tromey  <tom@tromey.com>
500
501         * dwarf2read.c (read_func_scope): Update.
502         * symtab.h (struct template_symbol): Derive from symbol.
503         <base>: Remove.
504
505 2017-11-17  Tom Tromey  <tom@tromey.com>
506
507         * symtab.h (struct symbol) <is_rust_vtable>: New member.
508         (struct rust_vtable_symbol): New.
509         (find_symbol_at_address): Declare.
510         * symtab.c (find_symbol_at_address): New function.
511         * symfile.h (struct quick_symbol_functions)
512         <find_compunit_symtab_by_address>: New member.
513         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
514         function.
515         (debug_sym_quick_functions): Link to
516         debug_qf_find_compunit_symtab_by_address.
517         * rust-lang.c (rust_get_trait_object_pointer): New function.
518         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
519         rust_get_trait_object_pointer.
520         * psymtab.c (psym_relocate): Clear psymbol_map.
521         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
522         functions.
523         (psym_functions): Link to psym_find_compunit_symtab_by_address.
524         * objfiles.h (struct objfile) <psymbol_map>: New member.
525         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
526         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
527         (rust_containing_type, read_variable): New functions.
528
529 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
530
531         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
532
533 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
534
535         * common/filestuff.c: Include <algorithm>.
536         (open_fds): Change type to std::vector<int>.
537         (do_mark_open_fd): Adjust.
538         (unmark_fd_no_cloexec): Adjust.
539         (do_close): Adjust.
540
541 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
542
543         * breakpoint.c (output_thread_groups): Take an std::vector.
544         (print_one_breakpoint_location): Adjust.
545
546 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
547
548         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
549         (ada_evaluate_subexp_for_cast): New function.
550         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
551         ada_evaluate_subexp_for_cast.
552         (ada_evaluate_subexp) <nosideret>: Replace code by call to
553         eval_skip_value.
554         * eval.c (evaluate_var_value): Make non-static.
555         (evaluate_var_msym_value, eval_skip_value): Likewise.
556         * value.h (evaluate_var_value, evaluate_var_msym_value)
557         (eval_skip_value): Declare.
558
559 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
560
561         * ada-lang.c (ada_value_cast): Remove parameter "noside".
562         Update all callers.
563
564 2017-11-16  Pedro Alves  <palves@redhat.com>
565
566         * python/py-unwind.c (pyuw_sniffer): Translate
567         PyExc_KeyboardInterrupt to a GDB Quit exception.
568
569 2017-11-16  Pedro Alves  <palves@redhat.com>
570
571         * infrun.c (resume_cleanups): Delete.
572         (resume): No longer install a resume_cleanups cleanup nor call
573         QUIT.
574         (proceed): Pass the terminal to the inferior.
575         (keep_going_pass_signal): No longer install a resume_cleanups
576         cleanup.
577
578 2017-11-16  Pedro Alves  <palves@redhat.com>
579
580         * inf-loop.c (inferior_event_handler): Don't swallow the exception
581         if the prompt is blocked.
582
583 2017-11-16  Pedro Alves  <palves@redhat.com>
584
585         * breakpoint.c (insert_bp_location): Replace bp_err and
586         bp_err_message locals by a gdb_exception local.
587
588 2017-11-16  Pedro Alves  <palves@redhat.com>
589
590         * inflow.c (scoped_ignore_sigttou): New class.
591         (child_terminal_ours_1, new_tty): Use it.
592
593 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
594
595         * target-float.c (decimal_from_number): Add byte_order argument and
596         call match_endianness.  Error if unknown floating-point type.
597         (decimal_to_number): Add byte_order argument and call match_endianness.
598         (decimal_from_longest): Update call.  Do not call match_endianness.
599         (decimal_from_ulongest): Likewise.
600         (decimal_binop): Likewise.
601         (decimal_is_zero): Likewise.
602         (decimal_compare): Likewise.
603         (decimal_convert): Likewise.
604
605 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
606
607         * python/python.c (gdbpy_rbreak): New function.
608         * NEWS: Document Python rbreak feature.
609
610 2017-11-16  Yao Qi  <yao.qi@linaro.org>
611
612         * features/tic6x-c62x.xml: Remove.
613         * features/tic6x-c64x.xml: Remove.
614         * features/tic6x-c64xp.xml: Remove.
615
616 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
617
618         * symtab.h: Include <array>.
619
620 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
621
622         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
623         (bsd_kvm_proc_cmd): Likewise.
624
625 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
626
627         * tui/tui-win.c (window_name_completer): Replace VEC with
628         std::vector.
629
630 2017-11-15  Andrew Cagney  <cagney@gnu.org>
631
632         * MAINTAINERS: Remove no-longer applicable entries.
633
634 2017-11-15  Andrew Cagney  <cagney@gnu.org>
635
636         * MAINTAINERS: Move self to Past Maintainers.
637
638 2017-11-15  Yao Qi  <yao.qi@linaro.org>
639
640         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
641         * features/nios2-linux.c: Remove.
642         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
643         initialize_tdesc_nios2_linux.
644
645 2017-11-15  Yao Qi  <yao.qi@linaro.org>
646
647         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
648         M68HC11_LAST_HARD_REG + 1.
649
650 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
651
652         PR gdb/22388
653         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
654         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
655         Return TARGET_XFER_EOF if size of returned data is 0.
656
657 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
658
659         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
660         memory-map-selftests.c.
661         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
662         * memory-map.c (memory_map_start_memory): Fix computation of hi
663         address.
664         * unittests/memory-map-selftests.c: New file.
665
666 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
667
668         * ada-lang.c: Fix some typos in the general command documenting
669         how Ada expressions are being evaluated and how their result
670         is printed.
671
672 2017-11-09  Tom Tromey  <tom@tromey.com>
673
674         * psymtab.c (psymbol_hash): Do not hash string contents.
675         (psymbol_compare): Add comment.
676
677 2017-11-09  Tom Tromey  <tom@tromey.com>
678
679         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
680
681 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
682
683         * ada-exp.y (write_var_from_sym): Remove parameter
684         "orig_left_context".  Update all callers.
685
686 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
687
688         * tracepoint.h (class collection_list) <stringify>: Return
689         std::vector<std::string>.
690         (encode_actions_rsp): Change parameters to
691         std::vector<std::string> *.
692         * tracepoint.c (collection_list::stringify): Return
693         std::vector<std::string> and adjust accordingly.
694         (encode_actions_rsp): Changee parameters to
695         std::vector<std::string> and adjust accordingly.
696         * remote.c (free_actions_list),
697         free_actions_list_cleanup_wrapper): Remove.
698         (remote_download_tracepoint): Adjust to std::vector.
699
700 2017-11-08  Tom Tromey  <tom@tromey.com>
701
702         * dwarf2read.c (symbolp): Remove typedef.
703         (read_func_scope): Use std::vector.
704         (process_structure_scope): Use std::vector.
705
706 2017-11-08  Pedro Alves  <palves@redhat.com>
707
708         * ada-lang.c (ada_make_symbol_completion_list): Use
709         completion_skip_symbol.
710         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
711         (symbol_is_function_or_method(symbol*)): New.
712         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
713         completion_skip_symbol.
714         (default_collect_symbol_completion_matches_break_on): Use
715         completion_skip_symbol.  Pass down mode.
716         (collect_file_symbol_completion_matches): Pass down mode.
717         * symtab.h (symbol_is_function_or_method): New declarations.
718         (completion_skip_symbol): New template function.
719
720 2017-11-08  Pedro Alves  <palves@redhat.com>
721
722         * linespec.c (iterate_over_all_matching_symtabs): Add
723         search_domain parameter.  Pass it down to expand_symtabs_matching.
724         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
725         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
726         search_domain.
727         (add_all_symbol_names_from_pspace): Add search_domain parameter.
728         Pass it down.
729         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
730         symbols.
731         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
732         it down.
733
734 2017-11-08  Pedro Alves  <palves@redhat.com>
735
736         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
737         text_len locals and don't pass them down.
738         * symtab.c (completion_list_add_name): Remove
739         sym_text/sym_text_len parameters and adjust.
740         (completion_list_add_symbol, completion_list_add_msymbol)
741         (completion_list_objc_symbol, completion_list_add_fields)
742         (add_symtab_completions): Likewise.
743         (default_collect_symbol_completion_matches_break_on)
744         (collect_file_symbol_completion_matches): Remove sym_text_len
745         local and don't pass it down.
746         * symtab.h (completion_list_add_name): Remove
747         sym_text/sym_text_len parameters.
748
749 2017-11-08  Pedro Alves  <palves@redhat.com>
750
751         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
752         unittests/lookup_name_info-selftests.c.
753         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
754         * cp-support.c: Include "selftest.h".
755         (cp_remove_params_1): Rename from cp_remove_params.  Add
756         'require_param' parameter, and handle it.
757         (cp_remove_params): Reimplement.
758         (cp_remove_params_if_any): New.
759         (selftests::quote): New.
760         (selftests::check_remove_params): New.
761         (selftests::test_cp_remove_params): New.
762         (_initialize_cp_support): Install
763         selftests::test_cp_remove_params.
764         * cp-support.h (cp_remove_params_if_any): Declare.
765         * dwarf2read.c :Include "selftest.h".
766         (dw2_expand_symtabs_matching_symbol): Use
767         lookup_name_info::make_ignore_params.
768         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
769         (selftests::dw2_expand_symtabs_matching::string_or_null)
770         (selftests::dw2_expand_symtabs_matching::check_match)
771         (selftests::dw2_expand_symtabs_matching::test_symbols)
772         (selftests::dw2_expand_symtabs_matching::run_test): New.
773         (_initialize_dwarf2_read): Register
774         selftests::dw2_expand_symtabs_matching::run_test.
775         * psymtab.c (psym_expand_symtabs_matching): Use
776         lookup_name_info::make_ignore_params.
777         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
778         If the lookup name wants to ignore parameters, strip them.
779         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
780         code handling '('.
781         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
782         (default_collect_symbol_completion_matches_break_on): Don't try to
783         strip parameters.
784         * symtab.h (lookup_name_info::lookup_name_info): Add
785         'ignore_parameters' parameter.
786         (lookup_name_info::ignore_parameters)
787         (lookup_name_info::make_ignore_params): New methods.
788         (lookup_name_info::m_ignore_parameters): New field.
789         * unittests/lookup_name_info-selftests.c: New file.
790
791 2017-11-08  Pedro Alves  <palves@redhat.com>
792
793         * dwarf2read.c (dw2_expand_marked_cus)
794         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
795         (dw2_expand_symtabs_matching): Move further below.
796         (dw2_expand_marked_cus): Reindent.
797
798 2017-11-08  Pedro Alves  <palves@redhat.com>
799
800         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
801         (struct name_component): New.
802         (mapped_index::name_components): New field.
803         (mapped_index::symbol_name_at): New method.
804         (dwarf2_read_index): Call mapped_index ctor.
805         (dw2_map_matching_symbols): Add comment about name_components
806         table.
807         (dw2_expand_symtabs_matching): Factor part to...
808         (dw2_expand_symtabs_matching_symbol): ... this new function.
809         Build name components table, and lookup symbols in it before
810         calling the name matcher.
811         (dw2_expand_marked_cus): New, factored out from
812         dw2_expand_symtabs_matching.
813         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
814
815 2017-11-08   Pedro Alves  <palves@redhat.com>
816
817         * ada-lang.c (ada_encode): Rename to ..
818         (ada_encode_1): ... this.  Add throw_errors parameter and handle
819         it.
820         (ada_encode): Reimplement.
821         (match_name): Delete, folded into full_name.
822         (resolve_subexp): No longer pass the encoded name to
823         ada_lookup_symbol_list.
824         (should_use_wild_match): Delete.
825         (name_match_type_from_name): New.
826         (ada_lookup_simple_minsym): Use lookup_name_info and the
827         language's symbol_name_matcher_ftype.
828         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
829         (ada_add_block_renamings): Adjust to use lookup_name_info.
830         (ada_lookup_name): New.
831         (add_nonlocal_symbols, ada_add_all_symbols)
832         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
833         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
834         (ada_name_for_lookup): Delete.
835         (ada_lookup_encoded_symbol): Construct a verbatim name.
836         (wild_match): Reverse sense of return type.  Use bool.
837         (full_match): Reverse sense of return type.  Inline bits of old
838         match_name here.
839         (ada_add_block_symbols): Adjust to use lookup_name_info.
840         (symbol_completion_match): Delete, folded into...
841         (ada_lookup_name_info::matches): ... .this new method.
842         (symbol_completion_add): Delete.
843         (ada_collect_symbol_completion_matches): Add name_match_type
844         parameter.  Adjust to use lookup_name_info and
845         completion_list_add_name.
846         (get_var_value, ada_add_global_exceptions): Adjust to use
847         lookup_name_info.
848         (ada_get_symbol_name_cmp): Delete.
849         (do_wild_match, do_full_match): New functions.
850         (ada_lookup_name_info::ada_lookup_name_info): New method.
851         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
852         functions.
853         (ada_language_defn): Install ada_get_symbol_name_matcher.
854         * ada-lex.l (processId): If name starts with '<', copy it
855         verbatim.
856         * block.c (block_iter_match_step, block_iter_match_first)
857         (block_iter_match_next, block_lookup_symbol)
858         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
859         lookup_name_info.
860         * block.h (block_iter_match_first, block_iter_match_next)
861         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
862         * c-lang.c (c_language_defn, cplus_language_defn)
863         (asm_language_defn, minimal_language_defn): Adjust comments to
864         refer to la_get_symbol_name_matcher.
865         * completer.c (complete_files_symbols)
866         (collect_explicit_location_matches, symbol_completer): Pass a
867         symbol_name_match_type down.
868         * completer.h (class completion_match, completion_match_result):
869         New classes.
870         (completion_tracker::reset_completion_match_result): New method.
871         (completion_tracker::m_completion_match_result): New field.
872         * cp-support.c (make_symbol_overload_list_block): Adjust to use
873         lookup_name_info.
874         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
875         functions.
876         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
877         * d-lang.c: Adjust comments to refer to
878         la_get_symbol_name_matcher.
879         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
880         Adjust to use lookup_name_info.
881         (dict_iter_match_first, dict_iter_match_next)
882         (iter_match_first_hashed, iter_match_next_hashed)
883         (iter_match_first_linear, iter_match_next_linear): Adjust to work
884         with a lookup_name_info.
885         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
886         Likewise.
887         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
888         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
889         (gdb_index_symbol_name_matcher): New class.
890         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
891         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
892         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
893         with a symbol_name_match_type.
894         (f_language_defn): Adjust comments to refer to
895         la_get_symbol_name_matcher.
896         * go-lang.c (go_language_defn): Adjust comments to refer to
897         la_get_symbol_name_matcher.
898         * language.c (default_symbol_name_matcher)
899         (language_get_symbol_name_matcher): New functions.
900         (unknown_language_defn, auto_language_defn): Adjust comments to
901         refer to la_get_symbol_name_matcher.
902         * language.h (symbol_name_cmp_ftype): Delete.
903         (language_defn) <la_collect_symbol_completion_matches>: Add match
904         type parameter.
905         <la_get_symbol_name_cmp>: Delete field.
906         <la_get_symbol_name_matcher>: New field.
907         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
908         (default_symbol_name_matcher, language_get_symbol_name_matcher):
909         Declare.
910         * linespec.c (iterate_over_all_matching_symtabs)
911         (iterate_over_file_blocks): Adjust to use lookup_name_info.
912         (find_methods): Add language parameter, and use lookup_name_info
913         and the language's symbol_name_matcher_ftype.
914         (linespec_complete_function): Adjust.
915         (lookup_prefix_sym): Use lookup_name_info.
916         (add_all_symbol_names_from_pspace): Adjust.
917         (find_superclass_methods): Add language parameter and pass it
918         down.
919         (find_method): Pass symbol language down.
920         (find_linespec_symbols): Don't demangle or Ada encode here.
921         (search_minsyms_for_name): Add lookup_name_info parameter.
922         (add_matching_symbols_to_info): Add name_match_type parameter.
923         Use lookup_name_info.
924         * m2-lang.c (m2_language_defn): Adjust comments to refer to
925         la_get_symbol_name_matcher.
926         * minsyms.c: Include <algorithm>.
927         (add_minsym_to_demangled_hash_table): Remove table parameter and
928         add objfile parameter.  Use search_name_hash, and add language to
929         demangled languages vector.
930         (struct found_minimal_symbols): New struct.
931         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
932         New functions.
933         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
934         input names here.  Use lookup_name_info instead.  Lookup up
935         demangled names once for each language in the demangled names
936         vector.
937         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
938         demangled names once for each language in the demangled names
939         vector.
940         (build_minimal_symbol_hash_tables): Adjust.
941         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
942         lookup_name_info.
943         * objc-lang.c (objc_language_defn): Adjust comment to refer to
944         la_get_symbol_name_matcher.
945         * objfiles.h: Include <vector>.
946         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
947         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
948         la_get_symbol_name_matcher.
949         * p-lang.c (pascal_language_defn): Adjust comment to refer to
950         la_get_symbol_name_matcher.
951         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
952         (match_partial_symbol): Use symbol_name_match_type,
953         lookup_name_info and psymbol_name_matches.
954         (lookup_partial_symbol): Use lookup_name_info.
955         (map_block): Use symbol_name_match_type and lookup_name_info.
956         (psym_map_matching_symbols): Use symbol_name_match_type.
957         (psymbol_name_matches): New.
958         (recursively_search_psymtabs): Use lookup_name_info and
959         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
960         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
961         'kind' parameter to 'domain'.
962         * rust-lang.c (rust_language_defn): Adjust comment to refer to
963         la_get_symbol_name_matcher.
964         * symfile-debug.c (debug_qf_map_matching_symbols)
965         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
966         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
967         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
968         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
969         Adjust to use symbol_name_match_type.
970         <expand_symtabs_matching>: Adjust to use lookup_name_info.
971         (expand_symtabs_matching): Adjust to use lookup_name_info.
972         * symmisc.c (maintenance_expand_symtabs): Use
973         lookup_name_info::match_any ().
974         * symtab.c (symbol_matches_search_name): New.
975         (eq_symbol_entry): Adjust to use lookup_name_info and the
976         language's matcher.
977         (demangle_for_lookup_info::demangle_for_lookup_info): New.
978         (lookup_name_info::match_any): New.
979         (iterate_over_symbols, search_symbols): Use lookup_name_info.
980         (compare_symbol_name): Add language, lookup_name_info and
981         completion_match_result parameters, and use them.
982         (completion_list_add_name): Make extern.  Add language and
983         lookup_name_info parameters.  Use them.
984         (completion_list_add_symbol, completion_list_add_msymbol)
985         (completion_list_objc_symbol): Add lookup_name_info parameters and
986         adjust.  Pass down language.
987         (completion_list_add_fields): Add lookup_name_info parameters and
988         adjust.  Pass down language.
989         (add_symtab_completions): Add lookup_name_info parameters and
990         adjust.
991         (default_collect_symbol_completion_matches_break_on): Add
992         name_match_type parameter, and use it.  Use lookup_name_info.
993         (default_collect_symbol_completion_matches)
994         (collect_symbol_completion_matches): Add name_match_type
995         parameter, and pass it down.
996         (collect_symbol_completion_matches_type): Adjust.
997         (collect_file_symbol_completion_matches): Add name_match_type
998         parameter, and use lookup_name_info.
999         * symtab.h: Include <string> and "common/gdb_optional.h".
1000         (enum class symbol_name_match_type): New.
1001         (class ada_lookup_name_info): New.
1002         (struct demangle_for_lookup_info): New.
1003         (class lookup_name_info): New.
1004         (symbol_name_matcher_ftype): New.
1005         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1006         (symbol_matches_search_name): Declare.
1007         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1008         (default_collect_symbol_completion_matches)
1009         (collect_symbol_completion_matches)
1010         (collect_file_symbol_completion_matches): Add name_match_type
1011         parameter.
1012         (iterate_over_symbols): Use lookup_name_info.
1013         (completion_list_add_name): Declare.
1014         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1015         (strncmp_iw_with_mode): Now extern.
1016         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1017         (strncmp_iw_with_mode): Declare.
1018
1019 2017-11-08  Keith Seitz  <keiths@redhat.com>
1020             Pedro Alves  <palves@redhat.com>
1021
1022         * ada-lang.c (ada_language_defn): Install
1023         default_search_name_hash.
1024         * buildsym.c (struct buildsym_compunit): <language>: New field.
1025         (finish_block_internal): Pass language when creating dictionaries.
1026         (start_buildsym_compunit, start_symtab): New language parameters.
1027         Use them.
1028         (restart_symtab): Pass down compilation unit's language.
1029         * buildsym.h (enum language): Forward declare.
1030         (start_symtab): New 'language' parameter.
1031         * c-lang.c (c_language_defn, cplus_language_defn)
1032         (asm_language_defn, minimal_language_defn): Install
1033         default_search_name_hash.
1034         * coffread.c (coff_start_symtab): Adjust.
1035         * d-lang.c (d_language_defn): Install default_search_name_hash.
1036         * dbxread.c (struct symloc): Add 'pst_language' field.
1037         (PST_LANGUAGE): Define.
1038         (start_psymtab, read_ofile_symtab): Use it.
1039         (process_one_symbol): New 'language' parameter.  Pass it down.
1040         * dictionary.c (struct dictionary) <language>: New field.
1041         (DICT_LANGUAGE): Define.
1042         (dict_create_hashed, dict_create_hashed_expandable)
1043         (dict_create_linear, dict_create_linear_expandable): New parameter
1044         'language'.  Set the dictionary's language.
1045         (iter_match_first_hashed): Adjust to rename.
1046         (insert_symbol_hashed): Assert we don't see mismatching
1047         languages.  Adjust to rename.
1048         (dict_hash): Rename to ...
1049         (default_search_name_hash): ... this and make extern.
1050         * dictionary.h (struct language_defn): Forward declare.
1051         (dict_create_hashed): New parameter 'language'.
1052         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1053         * f-lang.c (f_language_defn): Install default_search_name_hash.
1054         * go-lang.c (go_language_defn): Install default_search_name_hash.
1055         * jit.c (finalize_symtab): Pass compunit's language to dictionary
1056         creation.
1057         * language.c (unknown_language_defn, auto_language_defn):
1058         * language.h (language_defn::la_search_name_hash): New field.
1059         (default_search_name_hash): Declare.
1060         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1061         * mdebugread.c (new_block): New parameter 'language'.
1062         * mdebugread.c (parse_symbol): Pass symbol language to block
1063         allocation.
1064         (psymtab_to_symtab_1): Pass down language.
1065         (new_symtab): Pass compunit's language to block allocation.
1066         * objc-lang.c (objc_language_defn): Install
1067         default_search_name_hash.
1068         * opencl-lang.c (opencl_language_defn):
1069         * p-lang.c (pascal_language_defn): Install
1070         default_search_name_hash.
1071         * rust-lang.c (rust_language_defn): Install
1072         default_search_name_hash.
1073         * stabsread.h (enum language): Forward declare.
1074         (process_one_symbol): Add 'language' parameter.
1075         * symtab.c (search_name_hash): New function.
1076         * symtab.h (search_name_hash): Declare.
1077         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1078
1079 2017-11-08  Pedro Alves  <palves@redhat.com>
1080
1081         * cp-name-parser.y (main): Don't initialize extra_chars.
1082
1083 2017-11-07  Tom Tromey  <tom@tromey.com>
1084
1085         * event-top.h (command_handler): Constify.
1086         * record-full.c (cmd_record_full_start): Update.
1087         * thread.c (thread_apply_all_command): Update.
1088         * printcmd.c (eval_command): Update.
1089         * mi/mi-main.c (mi_execute_cli_command): Update.
1090         (mi_execute_async_cli_command): Update.
1091         * tui/tui-stack.c (tui_update_command): Update.
1092         * cli/cli-interp.c (safe_execute_command): Constify.
1093         * record.c (record_start): Update.
1094         (record_start, record_stop, cmd_record_start): Update.
1095         * record-btrace.c (cmd_record_btrace_bts_start): Update.
1096         (cmd_record_btrace_pt_start): Update.
1097         (cmd_record_btrace_start): Update.
1098         (cmd_record_btrace_start): Update.
1099         * reverse.c (exec_reverse_once): Update.
1100         * python/python.c (execute_gdb_command): Don't copy the command.
1101         * event-top.c (command_line_handler): Update.
1102         (command_handler): Constify.
1103         * defs.h (deprecated_call_command_hook): Constify.
1104         * cli/cli-script.h (execute_user_command): Constify.
1105         * cli/cli-script.c (execute_user_command): Constify.
1106         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1107         (enum command_control_type): Update.
1108         * main.c (catch_command_errors): Remove non-const overload.
1109         (catch_command_errors_ftype): Remove.
1110         * python/py-cmd.c (cmdpy_function): Constify.
1111         * guile/scm-cmd.c (cmdscm_function): Constify.
1112         * cli/cli-dump.c (call_dump_func): Constify.
1113         * cli/cli-decode.c (do_const_cfunc): Constify.
1114         (do_sfunc): Constify.
1115         (cmd_func): Constify.
1116         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1117         * top.h (execute_command): Constify.
1118         * top.c (execute_command): Constify.
1119         (execute_command_to_string): Constify.
1120         (deprecated_call_command_hook): Constify.
1121         * command.h (cmd_func): Constify.
1122         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1123
1124 2017-11-07  Tom Tromey  <tom@tromey.com>
1125
1126         * ada-lang.c (catch_ada_exception_command): Constify.
1127         (catch_assert_command): Constify.
1128         * break-catch-throw.c (catch_catch_command, catch_throw_command)
1129         (catch_rethrow_command): Constify.
1130         (catch_exception_command_1): Constify.
1131         * breakpoint.h (add_catch_command): Constify.
1132         * break-catch-syscall.c (catch_syscall_command_1): Constify.
1133         (catch_syscall_split_args): Constify.
1134         * break-catch-sig.c (catch_signal_command): Constify.
1135         (catch_signal_split_args): Constify.
1136         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1137         cmd_const_sfunc_ftype.
1138         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1139         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1140         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1141         (add_setshow_string_cmd, struct cmd_list_element)
1142         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1143         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1144         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1145         Constify.
1146         (set_cmd_sfunc): Constify.
1147         (empty_sfunc): Constify.
1148         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1149         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1150         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1151         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1152         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1153         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1154         Constify.
1155         (set_cmd_sfunc): Constify.
1156         (cmd_sfunc_ftype): Remove.
1157         * compile/compile.c (set_compile_args): Constify.
1158         * infrun.c (set_disable_randomization): Constify.
1159         * infcmd.c (set_args_command, set_cwd_command): Constify.
1160         * breakpoint.c (set_condition_evaluation_mode): Constify.
1161         (add_catch_command): Constify.
1162         (catch_fork_command_1, catch_exec_command_1)
1163         (catch_load_command_1, catch_unload_command_1): Constify.
1164         (catch_load_or_unload): Constify.
1165         * guile/scm-param.c (pascm_set_func): Constify.
1166         (add_setshow_generic): Constify.
1167         * python/py-param.c (get_set_value): Constify.
1168         * top.h (set_verbose): Constify.
1169         * tui/tui-win.c (tui_set_var_cmd): Constify.
1170         * mi/mi-main.c (set_mi_async_command): Constify.
1171         * cli/cli-logging.c (set_logging_overwrite)
1172         (set_logging_redirect): Constify.
1173         * value.c (set_max_value_size): Constify.
1174         * valprint.c (set_input_radix, set_output_radix): Constify.
1175         * utils.c (set_width_command, set_height_command): Constify.
1176         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1177         * tracepoint.c (set_disconnected_tracing)
1178         (set_circular_trace_buffer, set_trace_buffer_size)
1179         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1180         * top.c (set_history_size_command, set_verbose, set_editing)
1181         (set_gdb_datadir, set_history_filename): Constify.
1182         * target.c (set_targetdebug, maint_set_target_async_command)
1183         (maint_set_target_non_stop_command, set_target_permissions)
1184         (set_write_memory_permission): Constify.
1185         (open_target): Constify.
1186         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1187         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1188         * symtab.c (set_symbol_cache_size_handler): Constify.
1189         * symfile.c (set_ext_lang_command): Constify.
1190         * symfile-debug.c (set_debug_symfile): Constify.
1191         * source.c (set_directories_command): Constify.
1192         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1193         * serial.c (set_parity): Constify.
1194         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1195         * remote.c (set_remote_exec_file, set_remotebreak)
1196         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1197         * record.c (set_record_insn_history_size)
1198         (set_record_call_history_size): Constify.
1199         * record-full.c (set_record_full_insn_max_num): Constify.
1200         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1201         * osabi.c (set_osabi): Constify.
1202         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1203         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1204         * maint.c (maintenance_set_profile_cmd): Constify.
1205         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1206         * language.c (set_language_command, set_range_command)
1207         (set_case_command): Constify.
1208         * infrun.c (set_non_stop, set_observer_mode)
1209         (set_stop_on_solib_events, set_schedlock_func)
1210         (set_exec_direction_func): Constify.
1211         * infcmd.c (set_inferior_tty_command): Constify.
1212         * disasm.c (set_disassembler_options_sfunc): Constify.
1213         * demangle.c (set_demangling_command): Constify.
1214         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1215         * cris-tdep.c (set_cris_version, set_cris_mode)
1216         (set_cris_dwarf2_cfi): Constify.
1217         * corefile.c (set_gnutarget_command): Constify.
1218         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1219         (set_target_wide_charset_sfunc): Constify.
1220         * breakpoint.c (update_dprintf_commands): Constify.
1221         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1222         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1223         (set_disassembly_style_sfunc): Constify.
1224         * arch-utils.c (set_endian, set_architecture): Constify.
1225         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1226         * agent.c (set_can_use_agent): Constify.
1227
1228 2017-11-07  Tom Tromey  <tom@tromey.com>
1229
1230         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1231         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1232         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1233         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1234         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1235         (parse_int_arg, show_thread_default_detach_sc_cmd)
1236         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1237         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1238         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1239         (show_task_pause_cmd, set_task_detach_sc_cmd)
1240         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1241         (set_noninvasive_cmd, set_thread_pause_cmd)
1242         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1243         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1244         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1245         * windows-nat.c (display_selectors): Constify.
1246         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1247         non-const "cfunc".
1248         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1249         (cmd_cfunc_eq): Likewise.
1250         (struct cmd_list_element): Likewise.
1251         (do_cfunc): Remove.
1252         (cli_user_command_p): Update.
1253         * command.h (add_cmd): Remove non-const overload.
1254         (cmd_cfunc_ftype): Remove typedef.
1255         (cmd_cfunc_eq): Remove non-const overload.
1256         * value.c (show_values): Constify.
1257         * thread.c (thread_apply_all_command): Constify.
1258         * symfile.c (load_command): Constify.
1259         * source.c (directory_command): Constify.
1260         * maint.c (maintenance_internal_error)
1261         (maintenance_demangler_warning, maintenance_space_display)
1262         (maintenance_print_architecture, maintenance_translate_address)
1263         (maintenance_info_selftests, maintenance_internal_warning):
1264         Constify.
1265         * breakpoint.c (disable_trace_command, enable_trace_command):
1266         Constify.
1267         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1268         Constify.
1269         (add_auto_load_safe_path): Constify.
1270         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1271         * top.h (show_commands): Constify.
1272         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1273         * sparc64-tdep.c (adi_examine_command): Constify.
1274         (adi_assign_command): Constify.
1275
1276 2017-11-07  Tom Tromey  <tom@tromey.com>
1277
1278         * frame.h (info_locals_command, info_args_command): Constify.
1279         * auto-load.h (auto_load_info_scripts): Constify.
1280         * inferior.h (registers_info): Constify.
1281         * copying.c: Rebuild.
1282         * copying.awk: Constify generated commands.
1283         * auto-load.c (auto_load_info_scripts)
1284         (info_auto_load_gdb_scripts): Constify.
1285         * cli/cli-decode.c (struct cmd_list_element): Take a
1286         cmd_const_cfunc_ftype.
1287         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1288         * tui/tui-win.c (tui_all_windows_info): Constify.
1289         * python/py-auto-load.c (info_auto_load_python_scripts):
1290         Constify.
1291         * cli/cli-cmds.c (show_command): Remove non-const overload.
1292         * tracepoint.c (info_tvariables_command, info_scope_command):
1293         Constify.
1294         (info_static_tracepoint_markers_command): Constify.
1295         * thread.c (info_threads_command): Constify.
1296         (print_thread_info_1): Constify.
1297         * target.c (info_target_command): Constify.
1298         * symtab.c (info_sources_command, info_functions_command)
1299         (info_types_command): Constify.
1300         (info_variables_command): Remove non-const overload.
1301         * symfile.c (info_ext_lang_command): Constify.
1302         * stack.c (info_frame_command, info_locals_command)
1303         (info_args_command): Constify.
1304         (backtrace_command): Remove non-const overload.
1305         * source.c (info_source_command, info_line_command): Constify.
1306         * solib.c (info_sharedlibrary_command): Constify.
1307         * skip.c (info_skip_command): Constify.
1308         * ser-go32.c (info_serial_command): Constify.
1309         * reverse.c (info_bookmarks_command): Constify.
1310         * printcmd.c (info_symbol_command, info_address_command)
1311         (info_display_command): Constify.
1312         * osdata.c (info_osdata_command): Constify.
1313         * objc-lang.c (info_selectors_command, info_classes_command):
1314         Constify.
1315         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1316         * memattr.c (info_mem_command): Constify.
1317         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1318         * linux-fork.c (info_checkpoints_command): Constify.
1319         * infrun.c (info_signals_command): Constify.
1320         * inflow.c (info_terminal_command): Constify.
1321         * inferior.c (info_inferiors_command): Constify.
1322         (print_inferior): Constify.
1323         * infcmd.c (info_program_command, info_all_registers_command)
1324         (info_registers_command, info_vector_command)
1325         (info_float_command): Constify.
1326         (registers_info): Constify.
1327         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1328         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1329         Constify.
1330         * f-valprint.c (info_common_command): Constify.
1331         * dcache.c (info_dcache_command): Constify.
1332         (dcache_info_1): Constify.
1333         * darwin-nat-info.c (info_mach_tasks_command)
1334         (info_mach_task_command, info_mach_ports_command)
1335         (info_mach_port_command, info_mach_threads_command)
1336         (info_mach_thread_command, info_mach_regions_command)
1337         (info_mach_regions_recurse_command, info_mach_region_command)
1338         (info_mach_exceptions_command): Constify.
1339         (get_task_from_args): Constify.
1340         * cp-support.c (info_vtbl_command): Constify.
1341         * breakpoint.c (info_watchpoints_command)
1342         (info_tracepoints_command): Constify.
1343         (info_breakpoints_command): Remove non-const overload.
1344         * avr-tdep.c (avr_io_reg_read_command): Constify.
1345         * auxv.c (info_auxv_command): Constify.
1346         * ada-tasks.c (info_tasks_command): Constify.
1347         (info_task): Constify.
1348         * ada-lang.c (info_exceptions_command): Constify.
1349
1350 2017-11-07  Tom Tromey  <tom@tromey.com>
1351
1352         * solib.h (no_shared_libraries): Constify.
1353         * frame.h (return_command): Constify.
1354         * cli/cli-cmds.h (quit_command): Constify.
1355         * top.h (quit_command, execute_command): Constify.
1356         * target.h (flash_erase_command): Constify.
1357         * inferior.h (set_inferior_args, attach_command): Constify.
1358         * tracepoint.h (start_tracing, stop_tracing): Constify.
1359         * breakpoint.h (break_command, tbreak_command)
1360         (hbreak_command_wrapper, thbreak_command_wrapper)
1361         (rbreak_command_wrapper, watch_command_wrapper)
1362         (awatch_command_wrapper, rwatch_command_wrapper)
1363         (get_tracepoint_by_number): Constify.
1364         * symtab.c (info_variables_command, rbreak_command)
1365         (symtab_symbol_info): Constify.
1366         (info_variables_command): Add non-const overload.
1367         * top.c (dont_repeat_command): Constify.
1368         * breakpoint.c (ignore_command, commands_command)
1369         (condition_command, tbreak_command, hbreak_command)
1370         (thbreak_command, clear_command, break_command)
1371         (info_breakpoints_command, watch_command, rwatch_command)
1372         (awatch_command, trace_command, ftrace_command, strace_command)
1373         (trace_pass_command, break_range_command, dprintf_command)
1374         (agent_printf_command, get_tracepoint_by_number)
1375         (watch_maybe_just_location, trace_pass_command): Constify.
1376         (info_breakpoints_command): Add non-const overload.
1377         * tracefile.c (tsave_command): Constify.
1378         * infcmd.c (attach_command, disconnect_command, signal_command)
1379         (queue_signal_command, stepi_command, nexti_command)
1380         (finish_command, next_command, step_command, until_command)
1381         (advance_command, jump_command, continue_command, run_command)
1382         (start_command, starti_command, interrupt_command)
1383         (run_command_1, set_inferior_args, step_1): Constify.
1384         * inferior.c (add_inferior_command, remove_inferior_command)
1385         (clone_inferior_command): Constify.
1386         * linux-fork.c (checkpoint_command, restart_command): Constify.
1387         * windows-nat.c (signal_event_command): Constify.
1388         * guile/guile.c (guile_repl_command, guile_command): Constify.
1389         * printcmd.c (x_command, display_command, printf_command)
1390         (output_command, set_command, call_command, print_command)
1391         (eval_command): Constify.
1392         (non_const_set_command): Remove.
1393         (_initialize_printcmd): Update.
1394         * source.c (forward_search_command, reverse_search_command):
1395         Constify.
1396         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1397         Constify.
1398         * infrun.c (handle_command): Constify.
1399         * memattr.c (mem_command): Constify.
1400         * stack.c (return_command, up_command, up_silently_command)
1401         (down_command, down_silently_command, frame_command)
1402         (backtrace_command, func_command, backtrace_command_1): Constify.
1403         (backtrace_command): Add non-const overload.
1404         * remote-sim.c (simulator_command): Constify.
1405         * exec.c (set_section_command): Constify.
1406         * tracepoint.c (tdump_command, trace_variable_command)
1407         (tstatus_command, tstop_command, tstart_command)
1408         (end_actions_pseudocommand, while_stepping_pseudocommand)
1409         (collect_pseudocommand, teval_pseudocommand, actions_command)
1410         (start_tracing, stop_tracing): Constify.
1411         * value.c (init_if_undefined_command): Constify.
1412         * tui/tui-stack.c (tui_update_command): Constify.
1413         * tui/tui-win.c (tui_refresh_all_command)
1414         (tui_set_tab_width_command, tui_set_win_height_command)
1415         (tui_set_focus_command, tui_scroll_forward_command)
1416         (tui_scroll_backward_command, tui_scroll_left_command)
1417         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1418         (tui_set_win_height): Constify.
1419         * tui/tui-layout.c (tui_layout_command): Constify.
1420         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1421         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1422         (proc_untrace_sysexit_cmd): Constify.
1423         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1424         (threadset_test_cmd, threadlist_update_test_cmd)
1425         (threadalive_test): Constify.
1426         * objc-lang.c (print_object_command): Constify.
1427         * command.h (add_com): Constify.
1428         * cli/cli-dump.c (restore_command): Constify.
1429         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1430         (help_command, complete_command, shell_command, edit_command)
1431         (list_command, disassemble_command, make_command)
1432         (apropos_command, alias_command): Constify.
1433         * cli/cli-script.c (document_command, define_command)
1434         (while_command, if_command, validate_comname): Constify.
1435         * cli/cli-decode.c (struct cmd_list_element): Change type of
1436         "fun".
1437         * target.c (do_monitor_command, flash_erase_command): Constify.
1438         * regcache.c (reg_flush_command): Constify.
1439         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1440         (reverse_nexti, reverse_continue, reverse_finish)
1441         (save_bookmark_command, goto_bookmark_command)
1442         (exec_reverse_once): Constify.
1443         * python/python.c (python_interactive_command, python_command):
1444         Constify.
1445         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1446         Constify.
1447         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1448         * gcore.c (gcore_command): Constify.
1449
1450 2017-11-07  Tom Tromey  <tom@tromey.com>
1451
1452         * printcmd.c (x_command): Call set_repeat_arguments.
1453         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1454         * top.c (repeat_arguments): New global.
1455         (set_repeat_arguments): New function.
1456         (execute_command): Handle repeat_arguments.
1457         (show_commands): Calls set_repeat_arguments.
1458         * command.h (set_repeat_arguments): Declare.
1459
1460 2017-11-07  Tom Tromey  <tom@tromey.com>
1461
1462         * stack.c (backtrace_command): Use std::string.
1463         (backtrace_command_1): Make "count_exp" const.
1464
1465 2017-11-07  Tom Tromey  <tom@tromey.com>
1466
1467         * source.c (directory_switch, mod_path, add_path): Constify.
1468         * defs.h (add_path, mod_path, directory_switch): Constify.
1469         * mi/mi-cmd-env.c (env_mod_path): Constify.
1470
1471 2017-11-07  Tom Tromey  <tom@tromey.com>
1472
1473         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1474         (run_command_1, continue_command, step_1, jump_command)
1475         (signal_command, until_command, advance_command, finish_command)
1476         (attach_command): Update.
1477
1478 2017-11-07  Tom Tromey  <tom@tromey.com>
1479
1480         * command.h (set_cmd_cfunc): Don't declare.
1481         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1482
1483 2017-11-07  Tom Tromey  <tom@tromey.com>
1484
1485         * stack.c (select_frame_command): Constify.
1486         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1487         * command.h (add_com_suppress_notification): Constify.
1488
1489 2017-11-07  Tom Tromey  <tom@tromey.com>
1490
1491         * breakpoint.c (stop_command): Constify.
1492         * cli/cli-decode.c (struct cmd_list_element): Constify.
1493         * command.h (add_abbrev_prefix_cmd): Constify.
1494
1495 2017-11-07  Pedro Alves  <palves@redhat.com>
1496
1497         * breakpoint.c (extract_bp_kind): New enum.
1498         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1499         factored out from ...
1500         (extract_bp_number_and_location): ... here.
1501         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1502
1503 2017-11-07  Pedro Alves  <palves@redhat.com>
1504
1505         * breakpoint.c (extract_bp_number_and_location): Change return
1506         type to void.  Throw error instead of warning.
1507         (enable_disable_command): Adjust.
1508
1509 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1510             Pedro Alves  <palves@redhat.com>
1511
1512         * breakpoint.c (map_breakpoint_number_range): New, factored out
1513         from ...
1514         (map_breakpoint_numbers): ... here.
1515         (find_location_by_number): Change parameters from string to
1516         breakpoint number and location.
1517         (extract_bp_number_and_location): New function.
1518         (enable_disable_bp_num_loc)
1519         (enable_disable_breakpoint_location_range)
1520         (enable_disable_command): New functions, factored out ...
1521         (enable_command, disable_command): ... these functions, and
1522         adjusted to support ranges.
1523         * NEWS: Document enable/disable breakpoint location range feature.
1524
1525 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1526
1527         * MAINTAINERS (Write After Approval): Update my e-mail address.
1528
1529 2017-11-06  Pedro Alves  <palves@redhat.com>
1530
1531         * gnu-nat.c (gnu_terminal_init): Delete.
1532         (gnu_target): Don't install gnu_terminal_init.
1533         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1534         (child_terminal_init): ... this function.
1535
1536 2017-11-06  Pedro Alves  <palves@redhat.com>
1537
1538         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1539         sgtty.h.
1540         * config.in, configure: Regenerate.
1541
1542 2017-11-06  Pedro Alves  <palves@redhat.com>
1543
1544         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1545         (async_init_signals): Adjust.
1546         (handle_stop_sig): Rename to ...
1547         (handle_sigtstp): ... this.
1548         (async_stop_sig): Rename to ...
1549         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1550         SIGTSTP path.
1551         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1552         instead of STOP_SIGNAL thoughout.
1553         (handle_stop_sig): Rename to ...
1554         (handle_sigtstp): ... this.
1555         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1556
1557 2017-11-06  Pedro Alves  <palves@redhat.com>
1558
1559         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1560         longer set flags twice in row.
1561
1562 2017-11-06  Pedro Alves  <palves@redhat.com>
1563
1564         * Makefile.in (SER_HARDWIRE): Update comment.
1565         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1566         * common/gdb_termios.h: Delete file.
1567         * common/job-control.c: Include termios.h and unistd.h instead of
1568         gdb_termios.h.
1569         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1570         check.
1571         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1572         Remove sgtty code.
1573         * configure.ac: No longer check for termio.h and sgtty.h.
1574         * configure: Regenerate.
1575         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1576         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1577         Replace PROCESS_GROUP_TYPE references with pid_t references
1578         throughout.
1579         (gdb_getpgrp): Delete.
1580         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1581         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1582         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1583         gdb_getpgrp.  Use serial_set_tty_state instead aof
1584         serial_noflush_set_tty_state.  Remove sgtty code.
1585         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1586         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1587         (inferior_process_group): Now returns pid_t.
1588         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1589         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1590         * ser-event.c (serial_event_ops): Update.
1591         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1592         (dos_ops): Update.
1593         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1594         * ser-pipe.c (pipe_ops): Update.
1595         * ser-tcp.c (tcp_ops): Update.
1596         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1597         HAVE_TERMIOS checks.
1598         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1599         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1600         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1601         assume termios.
1602         (hardwire_noflush_set_tty_state): Delete.
1603         (hardwire_print_tty_state, hardwire_drain_output)
1604         (hardwire_flush_output, hardwire_flush_input)
1605         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1606         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1607         code, and assume termios.
1608         (hardwire_ops): Update.
1609         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1610         * serial.c (serial_noflush_set_tty_state): Delete.
1611         * serial.h (serial_noflush_set_tty_state): Delete.
1612         (serial_ops::noflush_set_tty_state): Delete.
1613
1614 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1615
1616         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1617         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1618         (COMMON_OBS): Remove doublest.o and dfp.o.
1619         Do not build target-float.c (instead of doublest.c)
1620         with -Wformat-nonliteral.
1621
1622         * doublest.c: Remove file.
1623         * doublest.h: Remove file.
1624         * dfp.c: Remove file.
1625         * dfp.h: Remove file.
1626
1627         * target-float.c: Do not include "doublest.h" and "dfp.h".
1628         (DOUBLEST): Move here from doublest.h.
1629         (enum float_kind): Likewise.
1630         (FLOATFORMAT_CHAR_BIT): Likewise.
1631         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1632         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1633         (floatformat_precision): Likewise.
1634         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1635         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1636         Likewise.
1637         (host_float_format, host_double_format, host_long_double_format):
1638         Likewise.
1639         (floatformat_to_string, floatformat_from_string): Likewise.
1640         (floatformat_to_doublest): Likewise.  Also, inline the original
1641         convert_floatformat_to_doublest.
1642         (floatformat_from_doublest): Likewise.  Also, inline the original
1643         convert_floatformat_from_doublest.
1644
1645         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1646         (MAX_DECIMAL_STRING): Move here from dfp.c.
1647         (match_endianness): Likewise.
1648         (set_decnumber_context, decimal_check_errors): Likewise.
1649         (decimal_from_number, decimal_to_number): Likewise.
1650         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1651         (decimal_from_longest, decimal_from_ulongest): Likewise.
1652         (decimal_to_longest): Likewise.
1653         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1654         (decimal_convert): Likewise.
1655
1656 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1657
1658         * doublest.c: Do not include "gdbtypes.h".
1659         (extract_typed_floating): Remove.
1660         (store_typed_floating): Remove.
1661         (convert_typed_floating): Remove.
1662         * doublest.h (struct type): Remove.
1663         (DOUBLEST_PRINT_FORMAT): Remove.
1664         (DOUBLEST_SCAN_FORMAT): Remove.
1665         (extract_typed_floating): Remove.
1666         (store_typed_floating): Remove.
1667         (convert_typed_floating): Remove.
1668
1669         * dfp.c (decimal_from_doublest): Remove.
1670         (decimal_to_doublest): Remove.
1671         * dfp.h: Do not include "doublest.h".
1672         (decimal_from_doublest): Remove.
1673         (decimal_to_doublest): Remove.
1674
1675         * value.c: Do not include "doublest.h" and "dfp.h".
1676         (value_as_double): Remove.
1677         (unpack_double): Remove.
1678         (value_from_double): Remove.
1679         (value_from_decfloat): Remove.
1680         * value.h: Do not include "doublest.h".
1681         (value_as_double): Remove.
1682         (unpack_double): Remove.
1683         (value_from_double): Remove.
1684         (value_from_decfloat): Remove.
1685
1686 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1687
1688         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1689         (i386_extract_return_value): Use target_float_convert.
1690         (i386_store_return_value): Likewise.
1691         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1692         (i387_value_to_register): Likewise.
1693         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1694         (ia64_register_to_value): Use target_float_convert.
1695         (ia64_value_to_register): Likewise.
1696         (ia64_extract_return_value): Likewise.
1697         (ia64_store_return_value): Likewise.
1698         (ia64_push_dummy_call): Likewise.
1699         * m68k-tdep.c: Include "target-float.h".
1700         (m68k_register_to_value): Use target_float_convert.
1701         (m68k_value_to_register): Likewise.
1702         (m68k_svr4_extract_return_value): Likewise.
1703         (m68k_svr4_store_return_value): Likewise.
1704         * ppc-sysv-tdep.c: Include "target-float.h".
1705         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1706         (do_ppc_sysv_return_value): Likewise.
1707         (ppc64_sysv_abi_push_freg): Likewise.
1708         (ppc64_sysv_abi_return_value_base): Likewise.
1709         * rs6000-aix-tdep.c: Include "target-float.h".
1710         (rs6000_push_dummy_call): Use target_float_convert.
1711         (rs6000_return_value): Likewise.
1712         * rs6000-lynx178-tdep.c: Include "target-float.h".
1713         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1714         (rs6000_lynx178_return_value): Likewise.
1715         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1716         (rs6000_register_to_value): Use target_float_convert.
1717         (rs6000_value_to_register): Likewise.
1718         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1719         (arm_extract_return_value): Use target_float_convert.
1720         (arm_store_return_value): Likewise.
1721         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1722         (sh_register_convert_to_virtual): Use target_float_convert.
1723         (sh_register_convert_to_raw): Likewise.
1724         * sh64-tdep.c: Include "target-float.h".
1725         (sh64_extract_return_value): Use target_float_convert.
1726         (sh64_register_convert_to_virtual): Likewise.
1727         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1728
1729 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1730
1731         * target-float.c (floatformat_to_host_double): New function.
1732         (floatformat_from_host_double): Likewise.
1733         (target_float_to_host_double): Likewise.
1734         (target_float_from_host_double): Likewise.
1735         * target-float.h (target_float_to_host_double): Add prototype.
1736         (target_float_from_host_double): Likewise.
1737
1738         * guile/scm-value.c: Include "target-float.h".
1739         (gdbscm_value_to_real): Use target_float_to_host_double.
1740         Handle integer source values via value_as_long.
1741         * guile/scm-math.c: Include "target-float.h".  Do not include
1742         "doublest.h", "dfp.h", and "expression.h".
1743         (vlscm_convert_typed_number): Use target_float_from_host_double.
1744         (vlscm_convert_number): Likewise.
1745
1746         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1747         (convert_value_from_python): Use target_float_from_host_double.
1748
1749 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1750
1751         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1752         (cast_from_fixed): Likewise.
1753         (ada_scaling_type): New function.
1754         (ada_delta): Return value instead of DOUBLEST.  Perform target
1755         arithmetic instead of host arithmetic.
1756         (scaling_factor): Rename to ...
1757         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1758         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1759         (ada_fixed_to_float): Remove.
1760         (ada_float_to_fixed): Remove.
1761         * ada-lang.h (ada_fixed_to_float): Remove.
1762         (ada_float_to_fixed): Remove.
1763         (ada_delta): Return value instead of DOUBLEST.
1764         (ada_scaling_factor): Add prototype.
1765
1766         * ada-typeprint.c: Include "target-float.h".
1767         (print_fixed_point_type): Perform target arithmetic instead of
1768         host arithmetic.
1769         * ada-valprint.c: Include "target-float.h".
1770         (ada_val_print_num): Perform target arithmetic instead of
1771         host arithmetic for fixed-point types.
1772
1773 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1774
1775         * target-float.c: Include <math.h>.
1776         (floatformat_binop): New function.
1777         (floatformat_compare): Likewise.
1778         (target_float_binop): Likewise.
1779         (target_float_compare): Likewise.
1780         * target-float.h: Include "expression.h".
1781         (target_float_binop): Add prototype.
1782         (target_float_compare): Likewise.
1783
1784         * valarith.c: Do not include "doublest.h" and "dfp.h".
1785         Include "common/byte-vector.h".
1786         (value_args_as_decimal): Remove, replace by ...
1787         (value_args_as_target_float): ... this function.  Handle both
1788         binary and decimal target floating-point formats.
1789         (scalar_binop): Handle both binary and decimal FP using
1790         value_args_as_target_float and target_float_binop.
1791         (value_equal): Handle both binary and decimal FP using
1792         value_args_as_target_float and target_float_compare.
1793         (value_less): Likewise.
1794         (value_pos): Handle all scalar types as simple copy.
1795         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1796         * dfp.c (decimal_binop): Throw error instead of internal_error
1797         when called with an unsupported operation code.
1798
1799 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1800
1801         * target-float.c (target_float_to_string): New function.
1802         (target_float_from_string): New function.
1803         * target-float.h (target_float_to_string): Add prototype.
1804         (target_float_from_string): Add prototype.
1805
1806         * valprint.c: Include "target-float.h".  Do not include
1807         "doublest.h" and "dfp.h".
1808         (print_floating): Use target_float_to_string.
1809         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1810         (printf_floating): Use target_float_to_string.
1811         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1812         (print_i387_value): Use target_float_to_string.
1813         * mips-tdep.c: Include "target-float.h".
1814         (mips_print_fp_register): Use target_float_to_string.
1815         * sh64-tdep.c: Include "target-float.h".
1816         (sh64_do_fp_register): Use target_float_to_string.
1817
1818         * parse.c: Include "target-float.h".  Do not include
1819         "doublest.h" and "dfp.h".
1820         (parse_float): Use target_float_from_string.
1821         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1822         (define_symbol): Use target_float_from_string.
1823         * gdbarch-selftests.c: Include "target-float.h".
1824         (register_to_value_test): Use target_float_from_string.
1825
1826 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1827
1828         * Makefile.c (SFILES): Add target-float.c.
1829         (HFILES_NO_SRCDIR): Add target-float.h.
1830         (COMMON_OBS): Add target-float.o.
1831         * target-float.h: New file.
1832         * target-float.c: New file.
1833
1834         * doublest.c (floatformat_classify): Fix detection of float_zero.
1835
1836         * gdbtypes.c (is_floating_type): New function.
1837         * gdbtypes.h (is_floating_type): Add prototype.
1838
1839         * value.c: Do not include "floatformat.h".
1840         (unpack_double): Use target_float_is_valid.
1841         (is_floating_value): New function.
1842         * value.h (is_floating_value): Add prototype-
1843
1844         * valarith.c: Include "target-float.h".
1845         (value_logical_not): Use target_float_is_zero.
1846
1847         * python/py-value.c: Include "target-float.h".
1848         (valpy_nonzero): Use target_float_is_zero.
1849
1850 2017-11-04  Tom Tromey  <tom@tromey.com>
1851
1852         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1853
1854 2017-11-04  Tom Tromey  <tom@tromey.com>
1855
1856         * breakpoint.c (set_momentary_breakpoint): Return
1857         breakpoint_up.
1858         (until_break_command): Update.
1859         (new_until_break_fsm): Change argument types to
1860         breakpoint_up.
1861         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1862         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1863         Remove.
1864         * infcmd.c (finish_forward): Update.
1865         * breakpoint.h (set_momentary_breakpoint)
1866         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1867         (make_cleanup_delete_breakpoint): Remove.
1868         (struct breakpoint_deleter): New.
1869         (breakpoint_up): New typedef.
1870         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1871         (insert_exception_resume_breakpoint): Update.
1872         (insert_exception_resume_from_probe): Update.
1873         (insert_longjmp_resume_breakpoint): Update.
1874         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1875         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1876         * infcall.c (call_function_by_hand_dummy): Update
1877
1878 2017-11-04  Tom Tromey  <tom@tromey.com>
1879
1880         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1881
1882 2017-11-04  Tom Tromey  <tom@tromey.com>
1883
1884         * linux-tdep.c (linux_core_info_proc_mappings): Use
1885         gdb::def_vector.
1886         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1887         "size" argument.
1888         (linux_corefile_thread): Update.
1889         (linux_make_corefile_notes): Remove unused variable.
1890
1891 2017-11-04  Tom Tromey  <tom@tromey.com>
1892
1893         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1894         gdb::byte_vector.
1895
1896 2017-11-04  Tom Tromey  <tom@tromey.com>
1897
1898         * objfiles.c (do_free_objfile_cleanup): Remove.
1899         * compile/compile-object-load.c (compile_object_load): Update.
1900         * objfiles.h (make_cleanup_free_objfile): Remove.
1901
1902 2017-11-04  Tom Tromey  <tom@tromey.com>
1903
1904         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1905         (adi_read_versions): Change "tags" to "gdb_byte *".
1906         (adi_print_versions): Likewise.
1907
1908 2017-11-04  Tom Tromey  <tom@tromey.com>
1909
1910         * breakpoint.c
1911         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1912         from start_rbreak_breakpoints.
1913         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1914         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1915         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1916         * symtab.c (do_end_rbreak_breakpoints): Remove.
1917         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1918
1919 2017-11-04  Tom Tromey  <tom@tromey.com>
1920
1921         * cp-namespace.c (reset_directive_searched): Remove.
1922         (cp_lookup_symbol_via_imports): Use scoped_restore.
1923         * cp-support.c (reset_directive_searched): Remove.
1924         (make_symbol_overload_list_using): Use scoped_restore.
1925         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1926         (reset_directive_searched): Remove.
1927
1928 2017-11-04  Tom Tromey  <tom@tromey.com>
1929
1930         * symfile.c (find_separate_debug_file_by_debuglink): Use
1931         unique_xmalloc_ptr.
1932
1933 2017-11-04  Tom Tromey  <tom@tromey.com>
1934
1935         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1936         type of "info".
1937         (compute_stack_depth): Likewise.
1938         (do_compile_dwarf_expr_to_c): Use std::vector.
1939
1940 2017-11-04  Tom Tromey  <tom@tromey.com>
1941
1942         * compile/compile-object-load.c (link_callbacks_einfo): Use
1943         std::string.
1944
1945 2017-11-04  Tom Tromey  <tom@tromey.com>
1946
1947         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1948         Use scoped_free_pendings.
1949         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1950         scoped_free_pendings.
1951         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1952         (xcoff_initial_scan): Likewise.
1953         * buildsym.c (reset_symtab_globals): Update comment.
1954         (scoped_free_pendings): Rename from really_free_pendings.
1955         (prepare_for_building): Update comment.
1956         (buildsym_init): Likewise.
1957         * buildsym.h (class scoped_free_pendings): New class.
1958         (really_free_pendings): Don't declare.
1959
1960 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1961
1962         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1963         output when converting a zero value to a special byteorder format.
1964
1965 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1966
1967         * frame.c (do_frame_register_read): Remove aspace.
1968         * jit.c (jit_frame_sniffer): Likwise.
1969         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1970         * regcache.c (regcache::regcache): Pass nullptr.
1971         (regcache_print): Caller updated.
1972         * regcache.h (regcache::regcache): Remove one constructor
1973         parameter aspace.
1974
1975 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1976
1977         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1978
1979 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1980
1981         * breakpoint.c (insert_single_step_breakpoints): Update.
1982         * frame.c (struct frame_info) <aspace>: Add const.
1983         (frame_save_as_regcache): Add const.
1984         (get_frame_address_space): Return const address_space *.
1985         * frame.h (get_frame_address_space): Update declaration.
1986         * infrun.c (struct step_over_info) <aspace>: Add const.
1987         (set_step_over_info): Make aspace const.
1988         (displaced_step_prepare_throw): Change variable const.
1989         (resume): Likewise.
1990         (proceed): Likewise.
1991         (adjust_pc_after_break): Likewise.
1992         (save_waitstatus): Likewise.
1993         (handle_signal_stop): Likewise.
1994         (keep_going_pass_signal): Likewise.
1995         * jit.c (jit_frame_sniffer): Add const.
1996         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1997         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1998         * record-full.c (record_full_wait_1): Likewise.
1999         * regcache.c (regcache::regcache): Change parameter to const.
2000         * regcache.h (regcache::regcache): Likewise.
2001         (regcache::aspace): Return const address_space *.
2002         (regcache) <m_aspace>: Add const.
2003
2004 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2005
2006         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2007         * frame.c (create_sentinel_frame): Likewise.
2008         * infrun.c (displaced_step_prepare_throw): Likewise.
2009         (resume): Likewise.
2010         (thread_still_needs_step_over_bp): Likewise.
2011         (proceed): Likewise.
2012         (do_target_wait): Likewise.
2013         (adjust_pc_after_break): Likewise.
2014         (handle_syscall_event): Likewise.
2015         (save_waitstatus): Likewise.
2016         (handle_inferior_event_1): Likewise.
2017         (handle_signal_stop): Likewise.
2018         (keep_going_pass_signal): Likewise.
2019         * linux-nat.c (status_callback): Likewise.
2020         (save_stop_reason): Likewise.
2021         (resume_stopped_resumed_lwps): Likewise.
2022         * record-full.c (record_full_exec_insn): Likewise.
2023         (record_full_wait_1): Likewise.
2024         * regcache.c (get_regcache_aspace): Remove.
2025         * regcache.h (get_regcache_aspace): Remove.
2026
2027 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2028
2029         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2030         (init_regcache_descr): Use gdbarch_num_regs.
2031         (regcache::regcache): Likewise.
2032         (regcache::get_register_status): Likewise.
2033         (regcache::assert_raw_regnum): Likewise.
2034         (regcache::cooked_read): Likewise.
2035         (regcache::cooked_read_value): Likewise.
2036         (regcache::cooked_write): Likewise.
2037         (regcache::dump): Likewise.
2038         (regcache::num_raw_registers): New method.
2039         * regcache.h (class regcache) <num_raw_registers>: New.
2040
2041 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2042
2043         * regcache.c (regcache::assert_regnum): New method.
2044         (regcache::invalidate): Call assert_regnum.
2045         (regcache::raw_update): Likewise.
2046         (regcache::raw_write): Likewise.
2047         (regcache::raw_read_part): Likewise.
2048         (regcache::raw_write_part): Likewise.
2049         (regcache::raw_supply): Likewise.
2050         (regcache::raw_supply_integer): Likewise.
2051         (regcache::raw_supply_zeroed): Likewise.
2052         (regcache::raw_collect): Likewise.
2053         (regcache::raw_collect_integer): Likewise.
2054         * regcache.h (regcache::assert_regnum): Declare.
2055
2056 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2057
2058         * regcache.c (regcache::dump): Remove code.
2059
2060 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2061
2062         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2063         Remove.
2064         <sizeof_cooked_register_status>: Remove.
2065         (init_regcache_descr): Update.
2066         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2067         (regcache::save): Likewise.
2068         (regcache::dump): Likewise.
2069
2070 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
2071
2072         * ft32-tdep.c (ft32_fetch_instruction): New function.
2073         (ft32_analyze_prologue): Use ft32_fetch_instruction().
2074
2075 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
2076
2077         * cli/cli-script.c (execute_control_command): Rename to ...
2078         (execute_control_command_1): ... this.
2079         (execute_control_command): New function.
2080
2081 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
2082
2083         * tracepoint.c (tfind_command): Remove const_cast.
2084
2085 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
2086
2087         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2088
2089 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
2090
2091         * common/common-utils.h (in_inclusive_range): New function.
2092         * arm-tdep.c (arm_record_extension_space): Use
2093         in_inclusive_range.
2094         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2095         * cris-tdep.c (cris_spec_reg_applicable): Use
2096         in_inclusive_range.
2097
2098 2017-10-30  Pedro Alves  <palves@redhat.com>
2099             Simon Marchi <simon.marchi@ericsson.com>
2100
2101         * remote.c (remote_set_syscall_catchpoint): Build a std::string
2102         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2103
2104 2017-10-30  Pedro Alves  <palves@redhat.com>
2105
2106         * common/common-utils.c (string_appendf, string_vappendf): New
2107         functions.
2108         * common/common-utils.h (string_appendf, string_vappendf): New
2109         declarations.
2110         * unittests/common-utils-selftests.c (string_appendf_func)
2111         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2112         (string_vappendf_tests): New functions.
2113         (_initialize_common_utils_selftests): Register "string_appendf" and
2114         "string_vappendf tests".
2115
2116 2017-10-30  Pedro Alves  <palves@redhat.com>
2117
2118         * unittests/common-utils-selftests.c (format_func): New typedef.
2119         (string_printf_tests, string_vprintf_tests): Tests factored out
2120         and merged to ...
2121         (test_format_func): ... this new function.
2122         (string_printf_tests, string_vprintf_tests): Reimplement on top of
2123         test_format_func.
2124
2125 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2126
2127         * darwin-nat.c: Remove include of gdb.h.
2128
2129 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2130
2131         * xtensa-xtregs.c: Fix formatting issues.
2132
2133 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2134
2135         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2136
2137 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
2138
2139         PR python/21213
2140         * python/py-infthread.c (thpy_get_inferior): Increment reference
2141         of inferior before returning it.
2142
2143 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2144
2145         * unittests/common-utils-selftests.c (format): Add
2146         ATTRIBUTE_PRINTF.
2147
2148 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2149
2150         * xml-syscall.c (struct syscall_desc): Add constructor.
2151         <name>: Change type to std::string.
2152         (syscall_desc_up): New typedef.
2153         (syscall_desc_p): Remove typeder.
2154         (DEF_VEC_P(syscall_desc_p)): Remove.
2155         (struct syscall_group_desc): Add constructor.
2156         <name>: Change type to std::string.
2157         <syscalls>: Change type to std::vector.
2158         (syscall_group_desc_up): New typedef.
2159         (syscall_group_desc_p): Remove typedef.
2160         (DEF_VEC_P(syscall_group_desc_p)): Remove.
2161         (struct syscalls_info) <syscalls>: Change type to std::vector of
2162         unique_ptr.
2163         <groups>: Likewise.
2164         <my_gdb_datadir>: Change type to std::string.
2165         (syscalls_info_up): New typedef.
2166         (allocate_syscalls_info): Remove.
2167         (syscalls_info_free_syscalls_desc): Remove.
2168         (syscalls_info_free_syscall_group_desc): Remove.
2169         (free_syscalls_info): Remove.
2170         (make_cleanup_free_syscalls_info): Remove.
2171         (syscall_group_create_syscall_group_desc): Adjust.
2172         (syscall_group_add_syscall): Adjust.
2173         (syscall_create_syscall_desc): Adjust.
2174         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2175         (init_syscalls_info): Adjust.
2176         (syscall_group_get_group_by_name): Adjust.
2177         (xml_get_syscall_number): Adjust.
2178         (xml_get_syscall_name): Adjust.
2179         (xml_list_of_syscalls): Adjust.
2180         (xml_list_syscalls_by_group): Adjust.
2181         (xml_list_of_groups): Adjust.
2182
2183 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2184
2185         * probe.h: Don't include gdb_vecs.h.
2186         (DEF_VEC_P (probe_p)): Remove.
2187         (find_probes_in_objfile): Return an std::vector.
2188         * probe.c (find_probes_in_objfile): Likewise.
2189         * breakpoint.c (breakpoint_objfile_data)
2190         <longjmp_probes>: Change type to std::vector.
2191         <exception_probes>: Likewise.
2192         (free_breakpoint_probes): Don't manually free vectors.
2193         (create_longjmp_master_breakpoint): Adjust.
2194         (create_exception_master_breakpoint): Adjust.
2195         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2196         parameter type, adjust.
2197         (svr4_create_solib_event_breakpoints): Adjust.
2198
2199 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2200
2201         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2202         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2203         with new.
2204         (free_breakpoint_probes): Rename to ...
2205         (free_breakpoint_objfile_data): ... this, and call delete on
2206         bp_objfile_data..
2207
2208 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2209
2210         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2211         (loaded_script_ptr): Remove typedef.
2212         (DEF_VEC_P (loaded_script_ptr)): Remove.
2213         (struct collect_matching_scripts_data): Add constructor.
2214         <scripts_p>: Change type to (pointer to) std::vector.
2215         (collect_matching_scripts_data): Adjust.
2216         (sort_scripts_by_name): Make suitable for std::sort.
2217         (print_scripts): Don't sort vector, adjust to std::vector.
2218         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2219
2220 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2221
2222         * symfile.c (filename_language): Make struct, not typedef.  Add
2223         constructor.
2224         <ext>: Change type to std::string.
2225         (DEF_VEC_O (filename_language)): Remove.
2226         (filename_language_table): Change type to std::vector.
2227         (add_filename_language): Adjust.
2228         (set_ext_lang_command): Adjust.
2229         (info_ext_lang_command): Adjust.
2230         (deduce_language_from_filename): Adjust.
2231         (class scoped_restore_filename_language_table): Remove.
2232         (test_filename_language): Use scoped_restore.
2233         (test_set_ext_lang_command): Use scoped_restore, adjust to
2234         std::vector change.
2235
2236 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2237
2238         * symfile.c: Include selftest.h.
2239         (class scoped_restore_filename_language_table): New.
2240         (test_filename_language): New test.
2241         (test_set_ext_lang_command): New test.
2242         (_initialize_symfile): Register tests.
2243
2244 2017-10-27  Keith Seitz  <keiths@redhat.com>
2245
2246         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2247         in the bp_location, falling back to find_pc_sect_function when
2248         needed.
2249         (add_location_to_breakpoint): Save sal->symbol.
2250         * breakpoint.h (struct bp_location) <symbol>: New field.
2251         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2252         * symtab.h (struct symtab_and_line) <symbol>: New field.
2253
2254 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2255
2256         PR gdb/13669
2257         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2258         to rewind obstack.
2259
2260 2017-10-26  Pedro Alves  <palves@redhat.com>
2261
2262         * remote.c (remote_async_terminal_ours_p): Delete.
2263         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2264         Remove references to 'remote_async_terminal_ours_p'.
2265
2266 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2267
2268         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2269
2270 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2271
2272         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2273         aspace const.
2274         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2275         Likewise.
2276         * breakpoint.c (bpstat_check_location): Remove cast.
2277         (breakpoint_hit_catch_fork): Make aspce const.
2278         (breakpoint_hit_catch_solib): Likewise.
2279         (breakpoint_hit_catch_exec): Likewise.
2280         (breakpoint_hit_ranged_breakpoint): Likewise.
2281         (breakpoint_hit_watchpoint): Likewise.
2282         (base_breakpoint_breakpoint_hit): Likewise.
2283         (bkpt_breakpoint_hit): Likewise.
2284         (dprintf_breakpoint_hit): Likewise.
2285         (tracepoint_breakpoint_hit): Likewise.
2286         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2287
2288 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2289
2290         * breakpoint.c (breakpoint_location_address_match): Change
2291         "struct address_space *" to "const address_space".
2292         (breakpoint_location_address_range_overlap): Likewise.
2293         (breakpoint_here_p): Likewise.
2294         (breakpoint_in_range_p): Likewise.
2295         (moribund_breakpoint_here_p): Likewise.
2296         (bp_location_inserted_here_p): Likewise.
2297         (software_breakpoint_inserted_here_p): Likewise.
2298         (hardware_breakpoint_inserted_here_p): Likewise.
2299         (hardware_watchpoint_inserted_in_range): Likewise.
2300         (bpstat_check_location): Likewise.
2301         (bpstat_stop_status): Likewise.
2302         (breakpoint_address_match): Likewise.
2303         (breakpoint_address_match_range): Likewise.
2304         (breakpoint_location_address_match): Likewise.
2305         (breakpoint_location_address_range_overlap): Likewise.
2306         (insert_single_step_breakpoint): Likewise.
2307         (breakpoint_has_location_inserted_here): Likewise.
2308         (single_step_breakpoint_inserted_here_p): Likewise.
2309         (pc_at_non_inline_function): Likewise.
2310         * breakpoint.h (bpstat_stop_status): Update declaration.
2311         (breakpoint_here_p): Likewise.
2312         (breakpoint_in_range_p): Likewise.
2313         (moribund_breakpoint_here_p): Likewise.
2314         (breakpoint_inserted_here_p): Likewise.
2315         (software_breakpoint_inserted_here_p): Likewise.
2316         (hardware_breakpoint_inserted_here_p): Likewise.
2317         (breakpoint_has_location_inserted_here): Likewise.
2318         (single_step_breakpoint_inserted_here_p): Likewise.
2319         (hardware_watchpoint_inserted_in_range): Likewise.
2320         (breakpoint_address_match): Likewise.
2321         (insert_single_step_breakpoint): Likewise.
2322         (pc_at_non_inline_function): Likewise.
2323         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2324         * record.c (record_check_stopped_by_breakpoint): Likewise.
2325         * record.h (record_check_stopped_by_breakpoint): Likewise.
2326         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2327
2328 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2329
2330         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2331         regcache->arch () instead get_regcache_arch.
2332         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2333         Likewise.
2334         (aarch64_fbsd_store_inferior_registers): Likewise.
2335         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2336         (store_gregs_to_thread): Likewise.
2337         (fetch_fpregs_from_thread): Likewise.
2338         (store_fpregs_to_thread): Likewise.
2339         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2340         (aarch64_store_return_value): Likewise.
2341         (aarch64_software_single_step): Likewise.
2342         * aix-thread.c (aix_thread_wait): Likewise.
2343         (supply_reg32): Likewise.
2344         (supply_sprs64): Likewise.
2345         (supply_sprs32): Likewise.
2346         (fill_gprs64): Likewise.
2347         (fill_gprs32): Likewise.
2348         (fill_sprs64): Likewise.
2349         (fill_sprs32): Likewise.
2350         (store_regs_user_thread): Likewise.
2351         (store_regs_kernel_thread): Likewise.
2352         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2353         (alphabsd_store_inferior_registers): Likewise.
2354         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2355         (alpha_store_return_value): Likewise.
2356         (alpha_deal_with_atomic_sequence): Likewise.
2357         (alpha_next_pc): Likewise.
2358         (alpha_software_single_step): Likewise.
2359         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2360         (amd64bsd_store_inferior_registers): Likewise.
2361         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2362         Likewise.
2363         (amd64_linux_store_inferior_registers): Likewise.
2364         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2365         (amd64_collect_native_gregset): Likewise.
2366         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2367         (amd64obsd_collect_uthread): Likewise.
2368         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2369         (amd64_collect_fpregset): Likewise.
2370         (amd64_supply_fxsave): Likewise.
2371         (amd64_supply_xsave): Likewise.
2372         (amd64_collect_fxsave): Likewise.
2373         (amd64_collect_xsave): Likewise.
2374         * arc-tdep.c (arc_write_pc): Likewise.
2375         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2376         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2377         (arm_fbsd_store_inferior_registers): Likewise.
2378         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2379         (store_vfp_regs): Likewise.
2380         (arm_linux_fetch_inferior_registers): Likewise.
2381         (arm_linux_store_inferior_registers): Likewise.
2382         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2383         (arm_linux_sigreturn_next_pc): Likewise.
2384         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2385         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2386         (fetch_register): Likewise.
2387         (store_register): Likewise.
2388         * arm-tdep.c (arm_is_thumb): Likewise.
2389         (displaced_in_arm_mode): Likewise.
2390         (bx_write_pc): Likewise.
2391         (arm_get_next_pcs_addr_bits_remove): Likewise.
2392         (arm_software_single_step): Likewise.
2393         (arm_extract_return_value): Likewise.
2394         (arm_store_return_value): Likewise.
2395         (arm_write_pc): Likewise.
2396         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2397         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2398         (bsd_uthread_store_registers): Likewise.
2399         * core-regset.c (fetch_core_registers): Likewise.
2400         * corelow.c (get_core_registers): Likewise.
2401         * cris-tdep.c (cris_store_return_value): Likewise.
2402         (cris_extract_return_value): Likewise.
2403         (find_step_target): Likewise.
2404         (find_step_target): Likewise.
2405         (cris_software_single_step): Likewise.
2406         * ctf.c (ctf_fetch_registers): Likewise.
2407         * darwin-nat.c (cancel_breakpoint): Likewise.
2408         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2409         * frv-tdep.c (frv_extract_return_value): Likewise.
2410         * ft32-tdep.c (ft32_store_return_value): Likewise.
2411         (ft32_extract_return_value): Likewise.
2412         * go32-nat.c (fetch_register): Likewise.
2413         (go32_fetch_registers): Likewise.
2414         (go32_store_registers): Likewise.
2415         (store_register): Likewise.
2416         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2417         (h8300_store_return_value): Likewise.
2418         * hppa-linux-nat.c (fetch_register): Likewise.
2419         (store_register): Likewise.
2420         (hppa_linux_fetch_inferior_registers): Likewise.
2421         (hppa_linux_store_inferior_registers): Likewise.
2422         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2423         (i386_darwin_store_inferior_registers): Likewise.
2424         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2425         (gnu_store_registers): Likewise.
2426         * i386-linux-nat.c (fetch_register): Likewise.
2427         (store_register): Likewise.
2428         (supply_gregset): Likewise.
2429         (fill_gregset): Likewise.
2430         (i386_linux_fetch_inferior_registers): Likewise.
2431         (i386_linux_store_inferior_registers): Likewise.
2432         (i386_linux_resume): Likewise.
2433         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2434         Likewise.
2435         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2436         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2437         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2438         (i386obsd_collect_uthread): Likewise.
2439         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2440         (i386_supply_gregset): Likewise.
2441         (i386_collect_gregset): Likewise.
2442         (i386_supply_fpregset): Likewise.
2443         (i386_collect_fpregset): Likewise.
2444         (i386_mpx_bd_base): Likewise.
2445         * i386-v4-nat.c (supply_fpregset): Likewise.
2446         (fill_fpregset): Likewise.
2447         * i387-tdep.c (i387_supply_fsave): Likewise.
2448         (i387_collect_fsave): Likewise.
2449         (i387_supply_fxsave): Likewise.
2450         (i387_collect_fxsave): Likewise.
2451         (i387_supply_xsave): Likewise.
2452         (i387_collect_xsave): Likewise.
2453         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2454         (ia64_linux_store_registers): Likewise.
2455         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2456         (ia64_extract_return_value): Likewise.
2457         (ia64_store_return_value): Likewise.
2458         (find_func_descr): Likewise.
2459         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2460         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2461         (inf_ptrace_store_registers): Likewise.
2462         * infrun.c (use_displaced_stepping): Likewise.
2463         (displaced_step_prepare_throw): Likewise.
2464         (resume): Likewise.
2465         (proceed): Likewise.
2466         (do_target_wait): Likewise.
2467         (adjust_pc_after_break): Likewise.
2468         (handle_inferior_event_1): Likewise.
2469         (handle_signal_stop): Likewise.
2470         (save_infcall_suspend_state): Likewise.
2471         (restore_infcall_suspend_state): Likewise.
2472         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2473         * jit.c (jit_frame_prev_register): Likewise.
2474         * linux-nat.c (save_stop_reason): Likewise.
2475         (linux_nat_wait_1): Likewise.
2476         (resume_stopped_resumed_lwps): Likewise.
2477         * linux-record.c (record_linux_sockaddr): Likewise.
2478         (record_linux_msghdr): Likewise.
2479         (record_linux_system_call): Likewise.
2480         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2481         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2482         (lm32_store_return_value): Likewise.
2483         * m32c-tdep.c (m32c_read_flg): Likewise.
2484         (m32c_pseudo_register_read): Likewise.
2485         (m32c_pseudo_register_write): Likewise.
2486         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2487         (m32r_linux_collect_gregset): Likewise.
2488         * m32r-tdep.c (m32r_store_return_value): Likewise.
2489         (m32r_extract_return_value): Likewise.
2490         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2491         (m68kbsd_collect_fpregset): Likewise.
2492         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2493         * m68k-linux-nat.c (fetch_register): Likewise.
2494         (old_fetch_inferior_registers): Likewise.
2495         (old_store_inferior_registers): Likewise.
2496         (store_regs): Likewise.
2497         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2498         (m68k_svr4_store_return_value): Likewise.
2499         * m88k-tdep.c (m88k_store_arguments): Likewise.
2500         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2501         (mi_cmd_data_write_register_values): Likewise.
2502         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2503         (mips_fbsd_store_inferior_registers): Likewise.
2504         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2505         (mips_fbsd_supply_gregs): Likewise.
2506         (mips_fbsd_collect_fpregs): Likewise.
2507         (mips_fbsd_collect_gregs): Likewise.
2508         (mips_fbsd_supply_fpregset): Likewise.
2509         (mips_fbsd_collect_fpregset): Likewise.
2510         (mips_fbsd_supply_gregset): Likewise.
2511         (mips_fbsd_collect_gregset): Likewise.
2512         * mips-linux-nat.c (supply_gregset): Likewise.
2513         (fill_gregset): Likewise.
2514         (supply_fpregset): Likewise.
2515         (fill_fpregset): Likewise.
2516         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2517         (mips_fill_gregset): Likewise.
2518         (mips_supply_fpregset): Likewise.
2519         (mips_fill_fpregset): Likewise.
2520         (mips64_supply_gregset): Likewise.
2521         (micromips_linux_sigframe_validate): Likewise.
2522         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2523         (mipsnbsd_fetch_inferior_registers): Likewise.
2524         (mipsnbsd_store_inferior_registers): Likewise.
2525         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2526         (mipsnbsd_supply_gregset): Likewise.
2527         (mipsnbsd_iterate_over_regset_sections): Likewise.
2528         (mipsnbsd_supply_reg): Likewise.
2529         (mipsnbsd_supply_fpreg): Likewise.
2530         * mips-tdep.c (mips_in_frame_stub): Likewise.
2531         (mips_dummy_id): Likewise.
2532         (is_octeon_bbit_op): Likewise.
2533         (micromips_bc1_pc): Likewise.
2534         (extended_mips16_next_pc): Likewise.
2535         (mips16_next_pc): Likewise.
2536         (deal_with_atomic_sequence): Likewise.
2537         * moxie-tdep.c (moxie_process_readu): Likewise.
2538         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2539         * nto-procfs.c (procfs_store_registers): Likewise.
2540         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2541         (ppcfbsd_store_inferior_registers): Likewise.
2542         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2543         (fetch_altivec_register): Likewise.
2544         (get_spe_registers): Likewise.
2545         (fetch_spe_register): Likewise.
2546         (fetch_altivec_registers): Likewise.
2547         (fetch_all_gp_regs): Likewise.
2548         (fetch_all_fp_regs): Likewise.
2549         (store_vsx_register): Likewise.
2550         (store_altivec_register): Likewise.
2551         (set_spe_registers): Likewise.
2552         (store_spe_register): Likewise.
2553         (store_altivec_registers): Likewise.
2554         (store_all_gp_regs): Likewise.
2555         (store_all_fp_regs): Likewise.
2556         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2557         (ppc_linux_collect_gregset): Likewise.
2558         (ppc_canonicalize_syscall): Likewise.
2559         (ppc_linux_record_signal): Likewise.
2560         (ppu2spu_prev_register): Likewise.
2561         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2562         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2563         (ppcobsd_store_registers): Likewise.
2564         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2565         Likewise.
2566         (ppc_ravenscar_generic_store_registers): Likewise.
2567         * procfs.c (procfs_fetch_registers): Likewise.
2568         (procfs_store_registers): Likewise.
2569         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2570         (ravenscar_store_registers): Likewise.
2571         (ravenscar_prepare_to_store): Likewise.
2572         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2573         * record-full.c (record_full_wait_1): Likewise.
2574         (record_full_registers_change): Likewise.
2575         (record_full_store_registers): Likewise.
2576         (record_full_core_fetch_registers): Likewise.
2577         (record_full_save): Likewise.
2578         (record_full_goto_insn): Likewise.
2579         * regcache.c (regcache_register_size): Likewise.
2580         (get_regcache_arch): Remove.
2581         (regcache_read_pc): Likewise.
2582         * regcache.h (get_regcache_arch): Remove.
2583         * remote-sim.c (gdbsim_fetch_register): Likewise.
2584         (gdbsim_store_register): Likewise.
2585         * remote.c (fetch_register_using_p): Likewise.
2586         (send_g_packet): Likewise.
2587         (remote_prepare_to_store): Likewise.
2588         (store_registers_using_G): Likewise.
2589         * reverse.c (save_bookmark_command): Likewise.
2590         (goto_bookmark_command): Likewise.
2591         * rs6000-aix-tdep.c (branch_dest): Likewise.
2592         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2593         (fetch_register): Likewise.
2594         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2595         (ppc_collect_reg): Likewise.
2596         (ppc_collect_gregset): Likewise.
2597         (ppc_collect_fpregset): Likewise.
2598         (ppc_collect_vsxregset): Likewise.
2599         (ppc_collect_vrregset): Likewise.
2600         (ppc_displaced_step_hw_singlestep): Likewise.
2601         (rs6000_pseudo_register_read): Likewise.
2602         (rs6000_pseudo_register_write): Likewise.
2603         * s390-linux-nat.c (supply_gregset): Likewise.
2604         (fill_gregset): Likewise.
2605         (s390_linux_fetch_inferior_registers): Likewise.
2606         * s390-linux-tdep.c (s390_write_pc): Likewise.
2607         (s390_software_single_step): Likewise.
2608         (s390_all_but_pc_registers_record): Likewise.
2609         (s390_linux_syscall_record): Likewise.
2610         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2611         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2612         (shnbsd_store_inferior_registers): Likewise.
2613         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2614         (sh_extract_return_value_fpu): Likewise.
2615         (sh_store_return_value_nofpu): Likewise.
2616         (sh_corefile_supply_regset): Likewise.
2617         (sh_corefile_collect_regset): Likewise.
2618         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2619         (sh64_store_return_value): Likewise.
2620         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2621         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2622         (sparc_store_inferior_registers): Likewise.
2623         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2624         (sparc_ravenscar_prepare_to_store): Likewise.
2625         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2626         (sparc_analyze_control_transfer): Likewise.
2627         (sparc_step_trap): Likewise.
2628         (sparc_software_single_step): Likewise.
2629         (sparc32_gdbarch_init): Likewise.
2630         (sparc_supply_rwindow): Likewise.
2631         (sparc_collect_rwindow): Likewise.
2632         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2633         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2634         (sparc64nbsd_collect_gregset): Likewise.
2635         (sparc64nbsd_supply_fpregset): Likewise.
2636         (sparc64nbsd_collect_fpregset): Likewise.
2637         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2638         (sparc64_supply_gregset): Likewise.
2639         (sparc64_collect_gregset): Likewise.
2640         (sparc64_supply_fpregset): Likewise.
2641         (sparc64_collect_fpregset): Likewise.
2642         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2643         * spu-tdep.c (spu_unwind_sp): Likewise.
2644         (spu2ppu_prev_register): Likewise.
2645         (spu_memory_remove_breakpoint): Likewise.
2646         * stack.c (return_command): Likewise.
2647         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2648         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2649         * tracefile.c (trace_save_ctf): Likewise.
2650         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2651         (do_windows_store_inferior_registers): Likewise.
2652         (windows_resume): Likewise.
2653         * xtensa-linux-nat.c (fill_gregset): Likewise.
2654         (supply_gregset_reg): Likewise.
2655         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2656         (xtensa_register_read_masked): Likewise.
2657         (xtensa_supply_gregset): Likewise.
2658         (xtensa_extract_return_value): Likewise.
2659         (xtensa_store_return_value): Likewise.
2660
2661 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2662
2663         * doublest.c (floatformat_from_string): New function.
2664         * doublest.h (floatformat_from_string): Add prototype.
2665
2666         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2667         (OP_FLOAT): ... this.
2668         * expression.h: Do not include "doublest.h".
2669         (union exp_element): Replace doubleconst and decfloatconst by
2670         new element floatconst.
2671         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2672         (ada_evaluate_subexp): Likewise.
2673         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2674         OP_DOUBLE and OP_DECFLOAT.
2675         * expprint.c (print_subexp_standard): Likewise.
2676         (dump_subexp_body_standard): Likewise.
2677         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2678
2679         * parse.c: Include "dfp.h".
2680         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2681         (write_exp_elt_floatcst): New function.
2682         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2683         and OP_DECFLOAT.
2684         (operator_check_standard): Likewise.
2685         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2686         Return target format buffer instead of host DOUBLEST.
2687         Use floatformat_from_string and decimal_from_string to parse
2688         either binary or decimal floating-point types.
2689         (parse_c_float): Remove.
2690         * parser-defs.h: Do not include "doublest.h".
2691         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2692         (write_exp_elt_floatcst): Add prototype.
2693         (parse_float): Update prototype.
2694         (parse_c_float): Remove.
2695
2696         * c-exp.y: Do not include "dfp.h".
2697         (typed_val_float): Use byte buffer instead of DOUBLEST.
2698         (typed_val_decfloat): Remove.
2699         (DECFLOAT): Remove.
2700         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2701         (parse_number): Update to new parse_float interface.
2702         Parse suffixes and determine type before calling parse_float.
2703         Handle decimal and binary FP types the same way.
2704
2705         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2706         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2707         (parse_number): Update to new parse_float interface.
2708         Parse suffixes and determine type before calling parse_float.
2709
2710         * f-exp.y: Replace dval by typed_val_float.
2711         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2712         (parse_number): Use parse_float instead of atof.
2713
2714         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2715         (parse_go_float): Remove.
2716         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2717         (parse_number): Call parse_float instead of parse_go_float.
2718         Parse suffixes and determine type before calling parse_float.
2719
2720         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2721         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2722         (parse_number): Update to new parse_float interface.
2723         Parse suffixes and determine type before calling parse_float.
2724
2725         * m2-exp.y: Replace dval by byte buffer val.
2726         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2727         (parse_number): Call parse_float instead of atof.
2728
2729         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2730         (lex_number): Call parse_float instead of strtod.
2731         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2732         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2733         Use write_exp_elt_floatcst.
2734         (unit_testing): Remove static variable.
2735         (rust_type): Do not check unit_testing.
2736         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2737
2738         * ada-exp.y (type_float, type_double): Remove.
2739         (typed_val_float): Use byte buffer instead of DOUBLEST.
2740         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2741         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2742
2743 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2744
2745         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2746         * arch/aarch64.h: New file.
2747
2748 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2749
2750         * dfp.h (decimal_from_string): Use const reference for argument.
2751         * dfp.c (decimal_from_string): Likewise.
2752
2753 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2754
2755         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2756         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2757         * mips-tdep.c (mips_print_fp_register): Likewise.
2758
2759 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2760
2761         * common/format.h (enum argclass): Replace decfloat_arg by
2762         dec32float_arg, dec64float_arg, and dec128float_arg.
2763         * common/format.c (parse_format_string): Update to return
2764         new decimal float argument classes.
2765
2766         * printcmd.c (printf_decfloat): Rename to ...
2767         (printf_floating): ... this.  Add argclass argument, and use it
2768         instead of parsing the format string again.  Add support for
2769         binary floating-point values, using floatformat_to_string.
2770         Convert value to the target format if it doesn't already match.
2771         (ui_printf): Call printf_floating instead of printf_decfloat,
2772         also for double_arg / long_double_arg.  Pass argclass.
2773
2774         * dfp.c (decimal_to_string): Add format string argument.
2775         * dfp.h (decimal_to_string): Likewise.
2776
2777         * doublest.c (floatformat_to_string): Add format string argument.
2778         * doublest.h (floatformat_to_string): Likewise.
2779
2780 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2781
2782         * doublest.c (floatformat_precision): New routine.
2783         (floatformat_to_string): Likewise.
2784         * doublest.c (floatformat_to_string): Add prototype.
2785
2786         * printcmd.c (print_scalar_formatted): Only call print_floating
2787         on floating-point types.
2788         * valprint.c: Do not include "floatformat.h".
2789         (generic_val_print_decfloat): Remove.
2790         (generic_val_print): Call generic_val_print_float for both
2791         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2792         (print_floating): Use floatformat_to_string.  Handle decimal float.
2793         (print_decimal_floating): Remove, merge into floatformat_to_string.
2794         * value.h (print_decimal_floating): Remove.
2795
2796         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2797
2798 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2799
2800         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2801
2802 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2803
2804         * memattr.h: Don't include vec.h.
2805         (struct mem_attrib): Initialize fields.
2806         <unknown>: New static method.
2807         (struct mem_region): Add constructors, operator<, initialize
2808         fields.
2809         * memattr.c: Include algorithm.
2810         (default_mem_attrib, unknown_mem_attrib): Remove.
2811         (user_mem_region_list): New global.
2812         (target_mem_region_list, mem_region_list): Change type to
2813         std::vector<mem_region>.
2814         (mem_use_target): Now a function.
2815         (target_mem_regions_valid): Change type to bool.
2816         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2817         (require_user_regions): Adjust.
2818         (require_target_regions): Adjust.
2819         (create_mem_region): Adjust.
2820         (lookup_mem_region): Adjust.
2821         (invalidate_target_mem_regions): Adjust.
2822         (mem_clear): Rename to...
2823         (user_mem_clear): ... this, and adjust.
2824         (mem_command): Adjust.
2825         (info_mem_command): Adjust.
2826         (mem_enable, enable_mem_command, mem_disable,
2827         disable_mem_command): Adjust.
2828         (mem_delete): Adjust.
2829         (delete_mem_command): Adjust.
2830         * memory-map.h (parse_memory_map): Return an std::vector.
2831         * memory-map.c (parse_memory_map): Likewise.
2832         (struct memory_map_parsing_data): Add constructor.
2833         <memory_map>: Point to std::vector.
2834         (memory_map_start_memory): Adjust.
2835         (memory_map_end_memory): Adjust.
2836         (memory_map_end_property): Adjust.
2837         (clear_result): Remove.
2838         * remote.c (remote_memory_map): Return an std::vector.
2839         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2840         Remove.
2841         (target_debug_print_mem_region_vector): New.
2842         * target-delegates.c: Regenerate.
2843         * target.h (mem_region_vector): New typedef.
2844         (to_memory_map): Return mem_region_vector.
2845         (target_memory_map): Return an std::vector.
2846         * target.c (target_memory_map): Return an std::vector.
2847         (flash_erase_command): Adjust.
2848
2849 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2850
2851         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2852         Change type to std::string.
2853         (memory_map_start_property): Adjust.
2854         (memory_map_end_property): Adjust.
2855
2856 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2857
2858         * infrun.h: Include common/byte-vector.h.
2859         (struct displaced_step_closure): New struct.
2860         (struct buf_displaced_step_closure): New struct.
2861         * infrun.c (displaced_step_closure::~displaced_step_closure):
2862         Provide default implementation.
2863         (displaced_step_clear): Deallocate step closure with delete.
2864         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2865         (aarch64_displaced_step_closure): ... this, extend
2866         displaced_step_closure.
2867         (aarch64_displaced_step_data) <dsc>: Change type to
2868         aarch64_displaced_step_closure.
2869         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2870         unique_ptr.
2871         (aarch64_displaced_step_fixup): Add cast for displaced step
2872         closure.
2873         * amd64-tdep.c (displaced_step_closure): Rename to ...
2874         (amd64_displaced_step_closure): ... this, extend
2875         displaced_step_closure.
2876         <insn_buf>: Change type to std::vector<gdb_byte>.
2877         <max_len>: Remove.
2878         (fixup_riprel): Change type of DSC parameter, adjust to type
2879         change of insn_buf.
2880         (fixup_displaced_copy): Change type of DSC parameter.
2881         (amd64_displaced_step_copy_insn): Instantiate
2882         amd64_displaced_step_closure.
2883         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2884         to type change of insn_buf.
2885         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2886         parameter DSC.
2887         (arm_linux_copy_svc): Likewise.
2888         (cleanup_kernel_helper_return): Likewise.
2889         (arm_catch_kernel_helper_return): Likewise.
2890         (arm_linux_displaced_step_copy_insn): Instantiate
2891         arm_displaced_step_closure.
2892         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2893         (displaced_read_reg): Change type of parameter DSC.
2894         (branch_write_pc): Likewise.
2895         (load_write_pc): Likewise.
2896         (alu_write_pc): Likewise.
2897         (displaced_write_reg): Likewise.
2898         (arm_copy_unmodified): Likewise.
2899         (thumb_copy_unmodified_32bit): Likewise.
2900         (thumb_copy_unmodified_16bit): Likewise.
2901         (cleanup_preload): Likewise.
2902         (install_preload): Likewise.
2903         (arm_copy_preload): Likewise.
2904         (thumb2_copy_preload): Likewise.
2905         (install_preload_reg): Likewise.
2906         (arm_copy_preload_reg): Likewise.
2907         (cleanup_copro_load_store): Likewise.
2908         (install_copro_load_store): Likewise.
2909         (arm_copy_copro_load_store) Likewise.
2910         (thumb2_copy_copro_load_store): Likewise.
2911         (cleanup_branch): Likewise.
2912         (install_b_bl_blx): Likewise.
2913         (arm_copy_b_bl_blx): Likewise.
2914         (thumb2_copy_b_bl_blx): Likewise.
2915         (thumb_copy_b): Likewise.
2916         (install_bx_blx_reg): Likewise.
2917         (arm_copy_bx_blx_reg): Likewise.
2918         (thumb_copy_bx_blx_reg): Likewise.
2919         (cleanup_alu_imm): Likewise.
2920         (arm_copy_alu_imm): Likewise.
2921         (thumb2_copy_alu_imm): Likewise.
2922         (cleanup_alu_reg): Likewise.
2923         (install_alu_reg): Likewise.
2924         (arm_copy_alu_reg): Likewise.
2925         (thumb_copy_alu_reg): Likewise.
2926         (cleanup_alu_shifted_reg): Likewise.
2927         (install_alu_shifted_reg): Likewise.
2928         (arm_copy_alu_shifted_reg): Likewise.
2929         (cleanup_load): Likewise.
2930         (cleanup_store): Likewise.
2931         (arm_copy_extra_ld_st): Likewise.
2932         (install_load_store): Likewise.
2933         (thumb2_copy_load_literal): Likewise.
2934         (thumb2_copy_load_reg_imm): Likewise.
2935         (arm_copy_ldr_str_ldrb_strb): Likewise.
2936         (cleanup_block_load_all): Likewise.
2937         (cleanup_block_store_pc): Likewise.
2938         (cleanup_block_load_pc): Likewise.
2939         (arm_copy_block_xfer): Likewise.
2940         (thumb2_copy_block_xfer): Likewise.
2941         (cleanup_svc): Likewise.
2942         (install_svc): Likewise.
2943         (arm_copy_svc): Likewise.
2944         (thumb_copy_svc): Likewise.
2945         (arm_copy_undef): Likewise.
2946         (thumb_32bit_copy_undef): Likewise.
2947         (arm_copy_unpred): Likewise.
2948         (arm_decode_misc_memhint_neon): Likewise.
2949         (arm_decode_unconditional): Likewise.
2950         (arm_decode_miscellaneous): Likewise.
2951         (arm_decode_dp_misc): Likewise.
2952         (arm_decode_ld_st_word_ubyte): Likewise.
2953         (arm_decode_media): Likewise.
2954         (arm_decode_b_bl_ldmstm): Likewise.
2955         (arm_decode_ext_reg_ld_st): Likewise.
2956         (thumb2_decode_dp_shift_reg): Likewise.
2957         (thumb2_decode_ext_reg_ld_st): Likewise.
2958         (arm_decode_svc_copro): Likewise.
2959         (thumb2_decode_svc_copro): Likewise.
2960         (install_pc_relative): Likewise.
2961         (thumb_copy_pc_relative_16bit): Likewise.
2962         (thumb_decode_pc_relative_16bit): Likewise.
2963         (thumb_copy_pc_relative_32bit): Likewise.
2964         (thumb_copy_16bit_ldr_literal): Likewise.
2965         (thumb_copy_cbnz_cbz): Likewise.
2966         (thumb2_copy_table_branch): Likewise.
2967         (cleanup_pop_pc_16bit_all): Likewise.
2968         (thumb_copy_pop_pc_16bit): Likewise.
2969         (thumb_process_displaced_16bit_insn): Likewise.
2970         (decode_thumb_32bit_ld_mem_hints): Likewise.
2971         (thumb_process_displaced_32bit_insn): Likewise.
2972         (thumb_process_displaced_insn): Likewise.
2973         (arm_process_displaced_insn): Likewise.
2974         (arm_displaced_init_closure): Likewise.
2975         (arm_displaced_step_fixup): Add cast for closure.
2976         * arm-tdep.h: Include infrun.h.
2977         (displaced_step_closure): Rename to ...
2978         (arm_displaced_step_closure): ... this, extend
2979         displaced_step_closure.
2980         <u::svc::copy_svc_os>: Change type of parameter DSC.
2981         <cleanup>: Likewise.
2982         (arm_process_displaced_insn): Likewise.
2983         (arm_displaced_init_closure): Likewise.
2984         (displaced_read_reg): Likewise.
2985         (displaced_write_reg): Likewise.
2986         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2987         Adjust.
2988         * i386-tdep.h: Include infrun.h.
2989         (i386_displaced_step_closure): New typedef.
2990         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2991         i386_displaced_step_closure.
2992         (i386_displaced_step_fixup): Adjust.
2993         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2994         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2995         and unique_ptr.
2996         (ppc_displaced_step_fixup): Adjust.
2997         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2998         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2999         and unique_ptr.
3000         (s390_displaced_step_fixup): Adjust.
3001
3002 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3003
3004         * interps.h (interp_resume, interp_suspend, interp_set_temp):
3005         Remove declarations.
3006
3007 2017-10-20  Tom Tromey  <tom@tromey.com>
3008
3009         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3010         std::vector.
3011         (gdb_bfd_record_inclusion): Update.
3012         (bfdp): Remove typedef.
3013
3014 2017-10-20  Tom Tromey  <tom@tromey.com>
3015
3016         * gdb_bfd.c (gdb_bfd_ref): Use new.
3017         (struct gdb_bfd_data): Add constructor, destructor, and member
3018         initializers.
3019         (gdb_bfd_unref): Use delete.
3020
3021 2017-10-20  Tom Tromey  <tom@tromey.com>
3022
3023         * exec.c (exec_file_attach): Use new_bfd_ref.
3024         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3025         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3026         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3027         new_bfd_ref.
3028         * gdb_bfd.h (new_bfd_ref): New function.
3029
3030 2017-10-20  Pedro Alves  <palves@redhat.com>
3031
3032         * main.c (captured_command_loop): Add attribute noinline.
3033
3034 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
3035
3036         * interps.c (struct interp_factory): Add constructor.
3037         (interp_factory_p): Remove typedef.
3038         (DEF_VEC_P(interp_factory_p)): Remove.
3039         (interpreter_factories): Change type to std::vector.
3040         (interp_factory_register): Adjust.
3041         (interp_lookup): Adjust.
3042         (interpreter_completer): Adjust.
3043
3044 2017-10-19  Tom Tromey  <tom@tromey.com>
3045
3046         * break-catch-syscall.c (catch_syscall_completer): Use
3047         std::string, gdb::unique_xmalloc_ptr.
3048
3049 2017-10-19  Tom Tromey  <tom@tromey.com>
3050
3051         * infcall.c (call_function_by_hand_dummy): Use std::string.
3052
3053 2017-10-19  Tom Tromey  <tom@tromey.com>
3054
3055         * mi/mi-main.c (mi_cmd_execute): Update.
3056         * top.h (prepare_execute_command): Return scoped_value_mark.
3057         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3058         Add move constructor.
3059         * top.c (prepare_execute_command): Return scoped_value_mark.
3060         (execute_command): Update.
3061
3062 2017-10-19  Pedro Alves  <palves@redhat.com>
3063
3064         * xml-support.c (xml_fetch_content_from_file): Check fread's
3065         return.
3066
3067 2017-10-19  Pedro Alves  <palves@redhat.com>
3068
3069         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3070         async.
3071         (handle_error_fd): New function.
3072         (ser_base_async): Add/delete an event loop file handler for
3073         error_fd.
3074
3075 2017-10-19  Pedro Alves  <palves@redhat.com>
3076
3077         * xml-support.c (xml_fetch_content_from_file): Don't read in
3078         chunks.  Instead use fseek to determine the file's size, and read
3079         it in one go.
3080
3081 2017-11-18  Keith Seitz  <keiths@redhat.com>
3082
3083         * c-exp.y (oper): Canonicalize conversion operators of user-defined
3084         types.
3085         Add whitespace to front of type name.
3086
3087 2017-10-18  Keith Seitz  <keiths@redhat.com>
3088
3089         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3090         DW_AT_accessibility.
3091
3092 2017-10-18  Yao Qi  <yao.qi@linaro.org>
3093
3094         * features/tic6x-c62x-linux.c: Remove.
3095
3096 2017-10-17  Tom Tromey  <tom@tromey.com>
3097
3098         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3099         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3100         (do_mixed_source_and_assembly): Likewise.
3101
3102 2017-10-17  Tom Tromey  <tom@tromey.com>
3103
3104         * regcache.c (regcache::xfer_part): Remove assertion.
3105
3106 2017-10-17  Pedro Alves  <palves@redhat.com>
3107
3108         * xml-support.c (xml_fetch_content_from_file): Call
3109         unique_ptr::release() instead unique_ptr::get() when passing
3110         through xrealloc.
3111
3112 2017-10-17  Yao Qi  <yao.qi@linaro.org>
3113
3114         * regcache.c (regcache::xfer_part): Remove parameters read and
3115         write, add parameter is_raw.  All callers are updated.
3116
3117 2017-10-16  Keith Seitz  <keiths@redhat.com>
3118
3119         * c-typeprint.c (enum access_specifier): Moved here from
3120         c_type_print_base.
3121         (output_access_specifier): New function.
3122         (c_type_print_base): Consider typedefs when assessing
3123         whether access labels are needed.
3124         Use output_access_specifier as needed.
3125         Output access specifier for typedefs, if needed.
3126         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3127         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3128         fields.
3129         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3130         accessor macros.
3131
3132 2017-10-16  Tom Tromey  <tom@tromey.com>
3133
3134         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3135         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3136         * target.c (target_fileio_read_stralloc): Update.
3137         * sparc64-tdep.c (adi_is_addr_mapped): Update.
3138         * target.h (target_fileio_read_stralloc): Return
3139         unique_xmalloc_ptr.
3140
3141 2017-10-16  Tom Tromey  <tom@tromey.com>
3142
3143         * xml-syscall.c (xml_init_syscalls_info): Update.
3144         * xml-support.c (xinclude_start_include): Update.
3145         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3146         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3147         (xml_fetch_content_from_file): Likewise.
3148         * osdata.c (get_osdata): Update.
3149         * target.h (target_read_stralloc, target_get_osdata): Return
3150         unique_xmalloc_ptr.
3151         * solib-aix.c (solib_aix_get_library_list): Update.
3152         * solib-target.c (solib_target_current_sos): Update.
3153         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3154         * xml-tdesc.c (fetch_available_features_from_target): Update.
3155         (target_fetch_description_xml): Update.
3156         (file_read_description_xml): Update.
3157         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3158         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3159         (remote_pid_to_exec_file): Update.
3160         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3161         (target_get_osdata): Likewise.
3162
3163 2017-10-16  Tom Tromey  <tom@tromey.com>
3164
3165         * remote.c (remote_register_number_and_offset): Use std::vector.
3166         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3167         (putpkt_binary): Use gdb::def_vector.
3168         (compare_sections_command): Use gdb::byte_vector.
3169
3170 2017-10-16  Tom Tromey  <tom@tromey.com>
3171
3172         * ppc-linux-nat.c (hwdebug_insert_point): Use
3173         gdb::unique_xmalloc_ptr, XDUP.
3174
3175 2017-10-16  Tom Tromey  <tom@tromey.com>
3176
3177         * probe.c (parse_probes): Use std::string.
3178         (info_probes_for_ops, enable_probes_command)
3179         (disable_probes_command): Remove cleanups.
3180
3181 2017-10-16  Tom Tromey  <tom@tromey.com>
3182
3183         * buildsym.c (block_compar): Remove.
3184         (end_symtab_get_static_block): Use std::vector.
3185
3186 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3187
3188         * memrange.h (struct mem_range): Define operator< and operator==.
3189         (mem_range_s): Remove.
3190         (DEF_VEC_O (mem_range_s)): Remove.
3191         (normalize_mem_ranges): Change parameter type to std::vector.
3192         * memrange.c (compare_mem_ranges): Remove.
3193         (normalize_mem_ranges): Change parameter type to std::vector,
3194         adjust to vector change.
3195         * exec.c (section_table_available_memory): Return vector, remove
3196         parameter.
3197         (section_table_read_available_memory): Adjust to std::vector
3198         change.
3199         * remote.c (remote_read_bytes): Adjust to std::vector
3200         change.
3201         * tracepoint.h (traceframe_available_memory): Change parameter
3202         type to std::vector.
3203         * tracepoint.c (traceframe_available_memory): Change parameter
3204         type to std::vector, adjust.
3205         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3206         std::vector change.
3207         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3208         unittests/memrange-selftests.c.
3209         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3210         * gdb/unittests/memrange-selftests.c: New file.
3211
3212 2017-10-16  Pedro Alves  <palves@redhat.com>
3213
3214         * elfread.c (probe_key_free): Rename range-for variable.
3215         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3216         (find_probe_by_pc, collect_probes): Rename range-for variable.
3217
3218 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3219
3220         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3221         * features/tic6x-c62x.c: Remove.
3222         * features/tic6x-c64x-linux.c: Remove.
3223         * features/tic6x-c64x.c: Remove.
3224         * features/tic6x-c64xp-linux.c: Remove.
3225         * features/tic6x-c64xp.c: Remove.
3226         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3227         initialize_tdesc_tic6x_*_linux functions.
3228         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3229         initialize_tdesc_tic6x_* functions.
3230
3231 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3232
3233         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3234         tic6x-c62x.
3235         * regformats/tic6x-c62x.dat: Remove.
3236         * regformats/tic6x-c64x.dat: Remove.
3237         * regformats/tic6x-c64xp.dat: Remove.
3238
3239 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3240
3241         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3242         (the !HAVE_LIBEXPAT version).
3243
3244 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3245
3246         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3247         const.
3248
3249 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3250
3251         * target.h: Include tracepoint.h.
3252         (enum trace_find_type): Move to tracepoint.h.
3253         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3254         * tracepoint.h: Don't include target.h
3255         (enum trace_find_type): Move from target.h.
3256         (parse_traceframe_info): Return a unique ptr.
3257         * tracepoint.c (current_traceframe_info): Change type to unique
3258         ptr.
3259         (free_traceframe_info): Remove.
3260         (clear_traceframe_info): Don't manually free
3261         current_traceframe_info.
3262         (free_result): Remove.
3263         (parse_traceframe_info): Return a unique ptr.
3264         (get_traceframe_info): Adjust to unique ptr.
3265         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3266         * remote.c (remote_traceframe_info): Return a unique ptr.
3267         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3268         ptr.
3269         * target-debug.h (target_debug_print_traceframe_info_up): New
3270         macro.
3271         * target-delegates.c: Regenerate.
3272
3273 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3274
3275         * memrange.h (struct mem_range): Add constructors.
3276         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3277         std::vector<mem_range>.
3278         * tracepoint.c (free_traceframe_info): Don't manually free
3279         vector.
3280         (traceframe_info_start_memory): Adjust to vector change.
3281         (traceframe_available_memory): Likewise.
3282         * tracefile-tfile.c (build_traceframe_info): Likewise.
3283         * ctf.c (ctf_traceframe_info): Likewise.
3284
3285 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3286
3287         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3288         std::vector<int>.
3289         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3290         (traceframe_info_start_tvar): Adjust to vector change.
3291         (parse_traceframe_info): Allocate with new.
3292         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3293         vector change.
3294         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3295         change.
3296         tfile_traceframe_info): Allocate with new.
3297         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3298         change.
3299
3300 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3301
3302         * tracepoint.c (traceframe_info): Rename to...
3303         (current_traceframe_info): ...this.
3304         (clear_traceframe_info): Adjust.
3305         (get_traceframe_info): Adjust.
3306
3307 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3308
3309         * nat/linux-osdata.c: Include algorithm.
3310         (compare_processes): Remove.
3311         (struct pid_pgid_entry): New struct.
3312         (linux_xfer_osdata_processgroups): Use std::vector instead of
3313         XNEWVEC.
3314
3315 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3316
3317         * objfiles.h: Don't include symfile.h.
3318         (struct partial_symbol): Remove forward-declaration.
3319         (struct objfile) <global_psymbols, static_psymbols>: Change type
3320         to std::vector<partial_symbol *>.
3321         * objfiles.c (objfile::objfile): Don't memset those fields.
3322         (objfile::~objfile): Don't free those fields.
3323         * psympriv.h (struct psymbol_allocation_list): Remove
3324         forward-declaration.
3325         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3326         to std::vector.
3327         (start_psymtab_common): Change parameters to std::vector.
3328         * psymtab.c: Include algorithm.
3329         (require_partial_symbols): Call shrink_to_fit.
3330         (find_pc_sect_psymbol): Adjust to vector change.
3331         (match_partial_symbol): Likewise.
3332         (lookup_partial_symbol): Likewise.
3333         (psym_relocate): Likewise.
3334         (dump_psymtab): Likewise.
3335         (recursively_search_psymtabs): Likewise.
3336         (compare_psymbols): Remove.
3337         (sort_pst_symbols): Adjust to vector change.
3338         (start_psymtab_common): Likewise.
3339         (end_psymtab_common): Likewise.
3340         (psymbol_bcache_full): De-constify return value.
3341         (add_psymbol_to_bcache): Likewise.
3342         (extend_psymbol_list): Remove.
3343         (append_psymbol_to_list): Adjust to vector change.
3344         (add_psymbol_to_list): Likewise.
3345         (init_psymbol_list): Likewise.
3346         (maintenance_info_psymtabs): Likewise.
3347         (maintenance_check_psymtabs): Likewise.
3348         * symfile.h (struct psymbol_allocation_list): Remove.
3349         * symfile.c (reread_symbols): Adjust to vector change.
3350         * dbxread.c (start_psymtab): Change type of parameters.
3351         (dbx_symfile_read): Adjust to vector change.
3352         (read_dbx_symtab): Likewise.
3353         (start_psymtab): Change type of parameters.
3354         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3355         (create_partial_symtab): Likewise.
3356         (add_partial_symbol): Likewise.
3357         (write_one_signatured_type): Likewise.
3358         (recursively_write_psymbols): Likewise.
3359         * mdebugread.c (parse_partial_symbols): Likewise.
3360         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3361         (scan_xcoff_symtab): Adjust to vector change.
3362         (xcoff_initial_scan): Likewise.
3363
3364 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3365
3366         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3367
3368 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3369
3370         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3371         Remove s390x-*-expedite, add s390x-expedite.
3372
3373 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3374
3375         * features/s390-gs-linux64.c: Regenerated.
3376         * features/s390x-gs-linux64.c: Regenerated.
3377
3378 2017-10-13  Tom Tromey  <tom@tromey.com>
3379
3380         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3381         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3382         delete.
3383         * symfile.c (symbol_file_add_with_addrs): Use new.
3384         (symbol_file_add_separate): Update comment.
3385         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3386         * jit.c (jit_object_close_impl): Use new.
3387         (jit_unregister_code): Use delete.
3388         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3389         (~objfile): Rename from free_objfile.
3390         (free_objfile_separate_debug, do_free_objfile_cleanup)
3391         (free_all_objfiles, objfile_purge_solibs): Use delete.
3392         * objfiles.h (struct objfile): Add constructor and destructor.
3393         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3394         (allocate_objfile, free_objfile): Don't declare.
3395         (struct objstats): Add initializers.
3396
3397 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3398
3399         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3400         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3401         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3402         * gdbarch.h: Regenerate.
3403         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3404         Adjust comment.
3405         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3406         (i386_displaced_step_fixup): Adjust comment.
3407         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3408
3409 2017-10-12  Tom Tromey  <tom@tromey.com>
3410
3411         * prologue-value.h (pv_area::store_would_trash): Return bool.
3412         (pv_area::find_reg): Likewise.
3413         * prologue-value.c (pv_area::store_would_trash): Return bool.
3414         (pv_area::find_reg): Likewise.
3415
3416 2017-10-12  Tom Tromey  <tom@tromey.com>
3417
3418         * s390-linux-tdep.c (s390_store, s390_load)
3419         (s390_check_for_saved, s390_analyze_prologue): Update.
3420         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3421         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3422         * prologue-value.h (class pv_area): Move from prologue-value.c.
3423         Change names of members.  Add constructor, destructor, member
3424         functions.
3425         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3426         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3427         (pv_area_fetch, pv_area_scan): Don't declare.
3428         * prologue-value.c (struct pv_area::area_entry): Now member of
3429         pv_area.
3430         (struct pv_area): Move to prologue-value.h.
3431         (pv_area::pv_area): Rename from make_pv_area.
3432         (pv_area::~pv_area): Rename from free_pv_area.
3433         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3434         (clear_entries, find_entry, overlaps, store_would_trash, store)
3435         (fetch, find_reg, scan): Now member of pv_area.
3436         Remove "area" argument.  Update.
3437         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3438         Update.
3439         * mn10300-tdep.c (push_reg, check_for_saved)
3440         (mn10300_analyze_prologue): Update.
3441         * mep-tdep.c (is_arg_spill, check_for_saved)
3442         (mep_analyze_prologue): Update.
3443         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3444         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3445         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3446         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3447         Update.
3448         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3449         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3450
3451 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3452
3453         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3454         * linux-nat.c (linux_nat_delete_thread): New variable.
3455         (lwp_free): Invoke linux_nat_delete_thread if set.
3456         (linux_nat_set_delete_thread): New function.
3457         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3458         thread delete callback.
3459         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3460         (_initialize_arm_linux_nat): Assign thread delete callback.
3461         * s390-linux-nat.c (s390_delete_thread): New function.
3462         (_initialize_s390_nat): Assign thread delete callback.
3463         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3464         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3465         function.
3466         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3467         declaration.
3468         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3469         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3470
3471 2017-10-09  Tom Tromey  <tom@tromey.com>
3472
3473         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3474         std::string.
3475         * tui/tui-layout.c (enum tui_status): Use std::string.
3476
3477 2017-10-11  Tom Tromey  <tom@tromey.com>
3478
3479         * gdbthread.h (thread_command): Constify.
3480         * inferior.h (detach_command): Constify.
3481         * top.h (set_history, show_history): Constify.
3482         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3483         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3484         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3485         * printcmd.c (set_command): Constify.
3486         (non_const_set_command): New function.
3487         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3488         * breakpoint.c (enable_command, disable_command, delete_command)
3489         (catch_command, tcatch_command, set_breakpoint_cmd)
3490         (show_breakpoint_cmd): Constify.
3491         * macrocmd.c (macro_command): Constify.
3492         * infcmd.c (unset_command, kill_command, detach_command)
3493         (info_proc_cmd): Constify.
3494         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3495         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3496         (info_auto_load_cmd): Constify.
3497         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3498         (unset_tdesc_cmd): Constify.
3499         * ada-lang.c (set_ada_command, show_ada_command)
3500         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3501         * guile/guile.c (set_guile_command, show_guile_command)
3502         (info_guile_command): Constify.
3503         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3504         Constify.
3505         * skip.c (skip_command): Constify.
3506         * compile/compile.c (_initialize_compile): Constify.
3507         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3508         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3509         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3510         (maint_btrace_pt_show_cmd): Constify.
3511         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3512         Constify.
3513         * python/python.c (user_show_python, user_set_python): Constify.
3514         * mips-tdep.c (set_mips_command, show_mips_command)
3515         (set_mipsfpu_command): Constify.
3516         * record-btrace.c (cmd_record_btrace_start)
3517         (cmd_set_record_btrace, cmd_show_record_btrace)
3518         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3519         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3520         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3521         Constify.
3522         * symfile.c (overlay_command): Constify.
3523         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3524         * cli/cli-logging.c (set_logging_command, show_logging_command):
3525         Constify.
3526         * cli/cli-dump.c (dump_command, append_command)
3527         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3528         (tekhex_dump_command, binary_dump_command)
3529         (binary_append_command): Constify.
3530         * cli/cli-decode.c (struct cmd_list_element): Change type of
3531         "fun".
3532         * cli/cli-cmds.c (info_command, show_command, set_debug)
3533         (show_debug): Constify.
3534         (show_command): Add non-const overload.
3535         * top.c (set_history, show_history): Constify.
3536         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3537         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3538         * target.c (target_command): Constify.
3539         * sparc64-tdep.c (info_adi_command): Constify.
3540         * record-full.c (cmd_record_full_start): Constify.
3541         (set_record_full_command): Constify.  Fix typo.
3542         (show_record_full_command): Constify.
3543         * thread.c (thread_command, thread_apply_command): Constify.
3544         * memattr.c (dummy_cmd): Constify.
3545         * value.c (function_command): Constify.
3546         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3547         * probe.c (info_probes_command): Constify.
3548         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3549         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3550         (show_thread_cmd, set_thread_default_cmd)
3551         (show_thread_default_cmd): Constify.
3552         (check_empty): Constify.
3553         * tracepoint.c (tfind_command): Constify.
3554         * cp-support.c (maint_cplus_command): Constify.
3555         * windows-tdep.c (info_w32_command): Constify.
3556         * record.c (cmd_record_start, set_record_command)
3557         (show_record_command, info_record_command, cmd_record_goto):
3558         Constify.
3559         * ravenscar-thread.c (set_ravenscar_command)
3560         (show_ravenscar_command): Constify.
3561         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3562         Constify.
3563         (add_internal_problem_command): Remove casts.
3564         * arc-tdep.c (maintenance_print_arc_command): Constify.
3565         * valprint.c (set_print, show_print, set_print_raw)
3566         (show_print_raw): Constify.
3567         * maint.c (maintenance_command, maintenance_info_command)
3568         (maintenance_print_command, maintenance_set_cmd)
3569         (maintenance_show_cmd, set_per_command_cmd)
3570         (show_per_command_cmd, maintenance_check_command): Constify.
3571         * language.c (set_check, show_check): Constify.
3572         * typeprint.c (show_print_type, set_print_type): Constify.
3573         * go32-nat.c (go32_info_dos_command): Constify.
3574
3575 2017-10-11  Tom Tromey  <tom@tromey.com>
3576
3577         * breakpoint.c (prepare_re_set_context): Remove.
3578         (breakpoint_re_set_one): Update.  Don't use cleanups.
3579         (breakpoint_re_set): Use scoped_restore, std::string, and
3580         scoped_restore_current_language.
3581
3582 2017-10-11  Tom Tromey  <tom@tromey.com>
3583
3584         * breakpoint.c (commands_command_1): Use std::string.
3585         (cleanup_executing_breakpoints): Remove.
3586         (bpstat_do_actions_1): Use scoped_restore.
3587         (bpstat_check_watchpoint): Use std::string.
3588         (decode_static_tracepoint_spec): Likewise.
3589         (break_range_command): Likewise.
3590         (watch_command_1): Likewise.
3591         (compare_breakpoints): Change argument types.
3592         (clear_command): Use std::vector.
3593         (cleanup_executing_breakpoints): Remove.
3594         (update_global_location_list): Use unique_xmalloc_ptr.
3595         (strace_command): Remove unused declaration.
3596
3597 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3598
3599         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3600         * NEWS: Mention new FreeBSD/arm native configuration.
3601         * configure.host: Add arm*-*-freebsd*.
3602         * configure.nat: Likewise.
3603         * arm-fbsd-nat.c: New file.
3604
3605 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3606
3607         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3608         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3609         * NEWS: Mention new FreeBSD/arm target.
3610         * configure.tgt: Add arm*-*-freebsd*.
3611         * arm-fbsd-tdep.c: New file.
3612         * arm-fbsd-tdep.h: New file.
3613
3614 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3615
3616         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3617         `gdbarch_elfcore_write_linux_prpsinfo'.
3618         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3619         method.
3620         (elf_internal_linux_prpsinfo): Remove declaration.
3621         * gdbarch.h: Regenerate.
3622         * gdbarch.c: Regenerate.
3623
3624 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3625
3626         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3627         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3628
3629 2017-10-11  Pedro Alves  <palves@redhat.com>
3630
3631         * breakpoint.c (reattach_breakpoints): Delete.
3632         * breakpoint.h (reattach_breakpoints): Delete.
3633
3634 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3635
3636         * symfile.c (registered_sym_fns): Make struct, not typedef.
3637         (DEF_VEC_O (registered_sym_fns)): Remove.
3638         (symtab_fns): Change type to std::vector.
3639         (add_symtab_fns): Adjust.
3640         (find_sym_fns): Adjust.
3641
3642 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3643
3644         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3645         * arc-tdep.h (arc_arch_is_em): New function.
3646         (arc_arch_is_hs): Likewise.
3647
3648 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3649
3650         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3651         parentheses in the declaration.
3652         (macro_lookup_inclusion): Likewise.
3653         (macro_lookup_definition): Likewise.
3654         * p-lang.h (pascal_builtin_types): Likewise.
3655         * tui/tui-data.c (tui_win_list): Likewise.
3656         * tui/tui-data.h (tui_win_list): Likewise.
3657         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3658
3659 2017-10-11  Mark Rages  <markrages@gmail.com>
3660
3661         * target-memory.c (block_boundaries): Fix for block address not
3662         aligned on block size.
3663
3664 2017-10-10  Pedro Alves <palves@redhat.com>
3665             Tom Tromey  <tom@tromey.com>
3666
3667         * breakpoint.c (struct captured_breakpoint_query_args)
3668         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3669         (print_breakpoint): New.
3670         * breakpoint.h (print_breakpoint): Declare.
3671         * common/common-exceptions.h (enum return_reason): Remove
3672         references to catch_exceptions.
3673         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3674         Delete.
3675         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3676         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3677         * gdb.h: Delete.
3678         * gdbthread.h (thread_select): Declare.
3679         * mi/mi-cmd-break.c: Don't include gdb.h.
3680         (breakpoint_notify): Use print_breakpoint.
3681         * mi/mi-cmd-catch.c: Don't include gdb.h.
3682         * mi/mi-interp.c: Don't include gdb.h.
3683         (mi_print_breakpoint_for_event): New.
3684         (mi_breakpoint_created, mi_breakpoint_modified): Use
3685         mi_print_breakpoint_for_event.
3686         * mi/mi-main.c: Don't include gdb.h.
3687         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3688         thread_select instead of gdb_thread_select.
3689         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3690         of using gdb_list_thread_ids.
3691         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3692         FILEIO_ENOSYS here.
3693         (remote_fileio_request): Use TRY/CATCH instead of
3694         catch_exceptions.
3695         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3696         (symbol_file_add_from_memory_wrapper): Delete.
3697         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3698         * thread.c: Don't include gdb.h.
3699         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3700         (thread_alive): Use thread_select.
3701         (do_captured_thread_select): Delete, parts salvaged as ...
3702         (thread_select): ... this new function.
3703         (gdb_thread_select): Delete.
3704
3705 2017-10-10  Pedro Alves  <palves@redhat.com>
3706             Tom Tromey  <tom@tromey.com>
3707
3708         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3709         and reverse logic.
3710         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3711         No longer macros.  Instead ...
3712         (enum wp_check_result): They're now values of this new
3713         enumeration.
3714         (watchpoint_check): Change return type to wp_check_result and
3715         parameter type to bpstat.
3716         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3717         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3718         catch_errors.  Reverse logic of watchpoint_check call.
3719         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3720         pointer as parameter.
3721         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3722         * common/common-exceptions.c (throw_exception_sjlj): Update
3723         comments to avoid mentioning catch_errors.
3724         * exceptions.c (catch_errors): Delete.
3725         * exceptions.h: Update comments to avoid mentioning catch_errors.
3726         (catch_errors_ftype, catch_errors): Delete.
3727         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3728         (hook_stop_stub): Delete.
3729         (restore_selected_frame): Change return type to void, and
3730         parameter type to const frame_id &.
3731         (restore_infcall_control_state): Use TRY/CATCH instead of
3732         catch_errors.
3733         * main.c (captured_command_loop): Return void and remove
3734         parameter.  Remove references to catch_errors.
3735         (captured_main): Use TRY/CATCH instead of catch_errors.
3736         * objc-lang.c (objc_submethod_helper_data)
3737         (find_objc_msgcall_submethod_helper): Delete.
3738         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3739         catch_errors.
3740         * record-full.c (record_full_message): Return void.
3741         (record_full_message_args, record_full_message_wrapper): Delete.
3742         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3743         instead of catch_errors.
3744         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3745         parameter type to int.
3746         * solib-darwin.c (open_symbol_file_object): Ditto.
3747         * solib-dsbt.c (open_symbol_file_object): Ditto.
3748         * solib-frv.c (open_symbol_file_object): Ditto.
3749         * solib-svr4.c (open_symbol_file_object): Ditto.
3750         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3751         * solib.c (update_solib_list): Use TRY/CATCH instead of
3752         catch_errors.
3753         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3754         Change type.
3755         * symmisc.c (struct print_symbol_args): Remove.
3756         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3757         (print_symbol): Change type.
3758         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3759         and remove parameters.
3760         (catch_errors): New.
3761         (get_windows_debug_event): Adjust.
3762
3763 2017-10-09  Tom Tromey  <tom@tromey.com>
3764
3765         * mi/mi-main.c (free_splay_tree): Remove.
3766         (list_available_thread_groups): Use splay_tree_up.
3767         * common/gdb_splay_tree.h: New file.
3768
3769 2017-10-09  Tom Tromey  <tom@tromey.com>
3770
3771         * mi/mi-main.c (do_nothing): Remove.
3772         (list_available_thread_groups): Update.
3773
3774 2017-10-09  Pedro Alves  <palves@redhat.com>
3775
3776         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3777         reading registers when switching context.
3778
3779 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3780
3781         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3782         (fbsd_convert_siginfo): Likewise.
3783         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3784
3785 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3786
3787         * configure.ac (try_guile_versions): Remove guile-2.2.
3788         * configure: Regenerate.
3789
3790 2017-10-09  Tom Tromey  <tom@tromey.com>
3791
3792         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3793         (COMPILE.pre): Use $(CXX).
3794
3795 2017-10-09  Pedro Alves  <palves@redhat.com>
3796
3797         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3798         Use bool.
3799         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3800         * cp-support.h (cp_remove_params): Now returns a
3801         gdb::unique_xmalloc_ptr.
3802         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3803         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3804         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3805         returning a gdb::unique_xmalloc_ptr.
3806         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3807         * stack.c (find_frame_funname): Adjust to cp_remove_params
3808         returning a gdb::unique_xmalloc_ptr.
3809
3810 2017-10-08  Tom Tromey  <tom@tromey.com>
3811
3812         * dwarf2read.c (dwarf2_get_dwz_file): Use
3813         gdb::unique_xmalloc_ptr.
3814         (find_slot_in_mapped_hash): Likewise.
3815         (dwarf2_physname): Likewise.
3816         (create_dwo_unit_in_dwp_v1): Use std::string.
3817         (create_dwo_unit_in_dwp_v2): Likewise.
3818         (lookup_dwo_cutu): Likewise.
3819         (inherit_abstract_dies): Use std::vector.
3820         (read_array_type): Likewise.
3821         (dwarf_decode_macros): Remove unused declaration.
3822         (unsigned_int_compar): Remove.
3823         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3824         (psymtabs_addrmap_cleanup): Remove.
3825
3826 2017-10-08  Tom Tromey  <tom@tromey.com>
3827
3828         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3829         * frame.h (frame_cleanup_after_sniffer): Declare.
3830         (frame_prepare_for_sniffer): Return void.
3831         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3832         type of argument.
3833         (frame_prepare_for_sniffer): Return void.
3834
3835 2017-10-08  Tom Tromey  <tom@tromey.com>
3836
3837         * utils.h (make_cleanup_value_free): Remove.
3838         * utils.c (do_value_free, struct cleanup): Remove.
3839         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3840         Use gdb_value_up.
3841         * value.h (struct value_deleter): New.
3842         (gdb_value_up): New typedef.
3843
3844 2017-10-08  Tom Tromey  <tom@tromey.com>
3845
3846         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3847         (make_cleanup_free_search_symbols): Remove.
3848         (search_symbols): Return std::vector.
3849         (symbol_search::compare_search_syms): Now member of
3850         symbol_search.  Change arguments.
3851         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3852         (symtab_symbol_info, rbreak_command): Update.
3853         * symtab.h (struct symbol_search) <next>: Remove.
3854         Add constructors.
3855         (symbol_search::operator<): New function.
3856         (symbol_search::operator==): New function.
3857         (search_symbols): Remove std::vector.
3858         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3859         (symbol_search::compare_search_syms): Declare.
3860
3861 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3862
3863         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3864         arch/aarch64-insn.o.
3865         Remove one rule.
3866         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3867
3868 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3869
3870         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3871         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3872         arch/arm-linux.o respectively.
3873         * configure.tgt: Likewise.
3874
3875 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3876
3877         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3878         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3879
3880 2017-10-06  Pedro Alves  <palves@redhat.com>
3881
3882         * windows-nat.c: Include <algorithm>.
3883
3884 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3885
3886         * configure.tgt (i386_tobjs): New variable.
3887         (amd64_tobjs): New variable.
3888         Set $cpu_obs and $os_obs.
3889
3890 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3891
3892         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3893         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3894         (clean): Remove object files and dependency files.
3895         (distclean): Remove the directory.
3896         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3897         * configure: Re-generated.
3898         * configure.tgt: Replace amd64.o with arch/amd64.o.
3899
3900 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3901
3902         PR build/22188
3903         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3904         and SETEND.
3905
3906 2017-10-05  Pedro Alves  <palves@redhat.com>
3907
3908         * linux-nat.c (linux_child_follow_fork): When following the parent
3909         and detaching the child, consult the parent thread's architecture
3910         instead of the child's.
3911
3912 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3913
3914         * ax.h: Do not include "doublest.h".
3915         (union agent_val): Remove.
3916
3917 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3918
3919         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3920         (decimal_to_string): Return std::string object.
3921         (decimal_from_string): Accept std::string object.  Return bool.
3922         (decimal_from_integral, decimal_from_doublest): Remove.
3923         (decimal_from_longest): Add prototype.
3924         (decimal_from_ulongest): Likewise.
3925         (decimal_to_longest): Likewise.
3926         (decimal_from_doublest): Likewise.
3927         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3928         (MAX_DECIMAL_STRING): Move here.
3929         (decimal_to_string): Return std::string object.
3930         (decimal_from_string): Accept std::string object.  Return bool.
3931         (decimal_from_integral): Remove, replace by ...
3932         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3933         (decimal_to_longest): New function.
3934         (decimal_from_floating): Remove, replace by ...
3935         (decimal_from_doublest): ... this new function.
3936         (decimal_to_doublest): Update to new decimal_to_string interface.
3937
3938         * value.c (unpack_long): Use decimal_to_longest.
3939         * valops.c (value_cast): Use decimal_from_doublest instead of
3940         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3941         decimal_from_integral.
3942         * valarith.c (value_args_as_decimal): Likewise.
3943         * valprint.c (print_decimal_floating): Update to new
3944         decimal_to_string interface.
3945         * printcmd.c (printf_decfloat): Likewise.
3946         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3947
3948 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3949
3950         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3951         * gdbtypes.c: Include "floatformat.h".
3952         * value.c: Likewise.
3953         * m68k-tdep.c: Likewise.
3954
3955         * findvar.c: Do not include "floatformat.h".
3956         * amd64-darwin-tdep.c: Likewise.
3957         * arm-linux-tdep.c: Likewise.
3958         * i386-darwin-tdep.c: Likewise.
3959         * i387-tdep.c: Likewise.
3960         * m68k-linux-tdep.c: Likewise.
3961         * mep-tdep.c: Likewise.
3962         * mips-tdep.c: Likewise.
3963         * nios2-tdep.c: Likewise.
3964         * s390-linux-tdep.c: Likewise.
3965         * sparc-obsd-tdep.c: Likewise.
3966         * sparc-tdep.c: Likewise.
3967         * sparc64-tdep.c: Likewise.
3968         * spu-tdep.c: Likewise.
3969         * tic6x-tdep.c: Likewise.
3970         * tilegx-tdep.c: Likewise.
3971         * vax-tdep.c: Likewise.
3972         * xstormy16-tdep.c: Likewise.
3973         * xtensa-tdep.c: Likewise.
3974
3975         * top.c: Do not include "doublest.h".
3976         * aarch64-tdep.c: Likewise.
3977         * alpha-tdep.c: Likewise.
3978         * arm-linux-tdep.c: Likewise.
3979         * m68k-linux-tdep.c: Likewise.
3980         * tilegx-tdep.c: Likewise.
3981         * xstormy16-tdep.c: Likewise.
3982
3983 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3984
3985         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3986         (mipsn32_fbsd_sigframe): Define.
3987         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3988         for FreeBSD/mipsn32.
3989
3990 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3991
3992         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3993         AT_HWCAP.
3994
3995 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3996
3997         * MAINTAINERS (Misc): Update my email address.
3998
3999 2017-10-04  Pedro Alves  <palves@redhat.com>
4000
4001         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
4002         it instead of target_gdbarch.
4003         (get_remote_state, get_remote_packet_size): Adjust
4004         get_remote_arch_state calls, passing down target_gdbarch
4005         explicitly.
4006         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4007         'gdbarch' and use it instead of target_gdbarch.
4008         (get_memory_packet_size): Adjust get_remote_arch_state calls,
4009         passing down target_gdbarch explicitly.
4010         (struct stop_reply) <arch>: New field.
4011         (remote_parse_stop_reply): Use the stopped thread's architecture,
4012         not the current inferior's.  Save the architecture in the
4013         stop_reply.
4014         (process_stop_reply): Use the stop reply's architecture.
4015         (process_g_packet, remote_fetch_registers)
4016         (remote_prepare_to_store, store_registers_using_G)
4017         (remote_store_registers): Adjust get_remote_arch_state calls,
4018         using the regcache's architecture.
4019         (remote_get_trace_status): Adjust get_remote_arch_state calls,
4020         passing down target_gdbarch explicitly.
4021         * spu-multiarch.c (spu_thread_architecture): Defer to the target
4022         beneath instead of calling target_gdbarch.
4023         * target.c (default_thread_architecture): Use the specified
4024         inferior's architecture, instead of the current inferior's
4025         architecture (via target_gdbarch).
4026
4027 2017-10-04  Pedro Alves  <palves@redhat.com>
4028
4029         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4030         case.
4031         (regcache_print): Handle !target_has_registers here instead.
4032
4033 2017-10-04  Pedro Alves  <palves@redhat.com>
4034
4035         * frame.c (create_test_frame): Delete.
4036         * frame.h (create_test_frame): Delete.
4037         * gdbarch-selftests.c: Include gdbthread.h and target.h.
4038         (class regcache_test): Delete.
4039         (test_target_has_registers, test_target_has_stack)
4040         (test_target_has_memory, test_target_prepare_to_store)
4041         (test_target_store_registers): New functions.
4042         (test_target_ops): New class.
4043         (register_to_value_test): Error out if there's already a
4044         process_stratum (or higher) target pushed.  Create a fuller mock
4045         environment, with mock target_ops, inferior, address space, thread
4046         and inferior_ptid.
4047         * progspace.c (struct address_space): Move to ...
4048         * progspace.h (struct address_space): ... here.
4049         * regcache.h (regcache::~regcache, regcache::raw_write)
4050         [GDB_SELF_TEST]: No longer virtual.
4051
4052 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
4053
4054         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4055
4056 2017-10-04  Pedro Alves  <palves@redhat.com>
4057
4058         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4059         out of 'between TRY and CATCH'.
4060
4061 2017-10-04  Pedro Alves  <palves@redhat.com>
4062
4063         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4064         * common/common-exceptions.h (TRY): Open an outermost scope.
4065         Expand intro comment.
4066         (CATCH): Reindent.
4067         (END_CATCH): Close the outermost scope.
4068         * completer.c (complete_line_internal): Add missing END_CATCH.
4069
4070 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4071
4072         * NEWS (Changes since GDB 8.0): Add entry about new
4073         'set-cwd-on-gdbserver' feature.
4074         (New remote packets): Add entry for QSetWorkingDir.
4075         * common/common-inferior.h (set_inferior_cwd): New prototype.
4076         * infcmd.c (set_inferior_cwd): Remove "static".
4077         (show_cwd_command): Expand text to include remote debugging.
4078         * remote.c: Add PACKET_QSetWorkingDir.
4079         (remote_protocol_features) <QSetWorkingDir>: New entry for
4080         PACKET_QSetWorkingDir.
4081         (extended_remote_set_inferior_cwd): New function.
4082         (extended_remote_create_inferior): Call
4083         "extended_remote_set_inferior_cwd".
4084         (_initialize_remote): Call "add_packet_config_cmd" for
4085         QSetWorkingDir.
4086
4087 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4088
4089         * NEWS (New commands): Mention "set/show cwd".
4090         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4091         "cd" command's help text.
4092         * common/common-inferior.h (get_inferior_cwd): New prototype.
4093         * infcmd.c (inferior_cwd_scratch): New global variable.
4094         (set_inferior_cwd): New function.
4095         (get_inferior_cwd): Likewise.
4096         (set_cwd_command): Likewise.
4097         (show_cwd_command): Likewise.
4098         (_initialize_infcmd): Add "set/show cwd" commands.
4099         * inferior.h (class inferior) <cwd>: New field.
4100         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4101         (fork_inferior): Change inferior's cwd before its execution.
4102         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4103         to CreateProcess.
4104
4105 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4106
4107         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4108         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4109         (COMMON_OBS): Add gdb_tilde_expand.o.
4110         * common/gdb_tilde_expand.c: New file.
4111         * common/gdb_tilde_expand.h: Likewise.
4112
4113 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
4114
4115         * gdbarch.sh (objfile): Remove duplicate declaration.
4116         * gdbarch.h: Regenerate.
4117
4118 2017-10-03  Tom Tromey  <tom@tromey.com>
4119
4120         * utils.c (internal_vproblem): Use string_vprintf.
4121
4122 2017-10-03  Tom Tromey  <tom@tromey.com>
4123
4124         * printcmd.c (info_symbol_command): Use std::string.
4125
4126 2017-10-03  Tom Tromey  <tom@tromey.com>
4127
4128         * top.c (gdb_safe_append_history): Use std::string.
4129
4130 2017-10-03  Tom Tromey  <tom@tromey.com>
4131
4132         * event-top.c (stdin_event_handler): Update.
4133         * main.c (captured_main_1): Update.
4134         * top.h (make_delete_ui_cleanup): Remove.
4135         (struct ui): Add constructor and destructor.
4136         (new_ui, delete_ui): Remove.
4137         * top.c (make_delete_ui_cleanup): Remove.
4138         (new_ui_command): Use std::unique_ptr.
4139         (delete_ui_cleanup): Remove.
4140         (ui::ui): Rename from new_ui.  Update.
4141         (free_ui): Remove.
4142         (ui::~ui): Rename from delete_ui.  Update.
4143
4144 2017-10-03  Tom Tromey  <tom@tromey.com>
4145
4146         * symfile.c (load_progress): Use gdb::byte_vector.
4147
4148 2017-10-03  Tom Tromey  <tom@tromey.com>
4149
4150         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4151         declaration.
4152         * printcmd.c (x_command): Remove unused declaration.
4153         * symfile.c (symbol_file_command): Remove unused declaration.
4154
4155 2017-10-03  Tom Tromey  <tom@tromey.com>
4156
4157         * utils.c (internal_vproblem): Use std::string.
4158         (defaulted_query): Likewise.
4159
4160 2017-10-03  Tom Tromey  <tom@tromey.com>
4161
4162         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4163         * top.c (execute_command_to_string): Update.
4164         * utils.c (make_cleanup_restore_page_info): Remove.
4165         (do_restore_page_info_cleanup): Remove.
4166         (set_batch_flag_and_restore_page_info):
4167         New.
4168         (make_cleanup_restore_page_info): Remove.
4169         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4170         (~set_batch_flag_and_restore_page_info): New
4171         (make_cleanup_restore_uinteger): Remove.
4172         (make_cleanup_restore_integer): Remove.
4173         (struct restore_integer_closure): Remove.
4174         (restore_integer): Remove.
4175         * utils.h (struct set_batch_flag_and_restore_page_info): New
4176         class.
4177         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4178         (make_cleanup_restore_page_info): Remove.
4179         (make_cleanup_restore_uinteger) Remove.
4180         (make_cleanup_restore_integer) Remove.
4181
4182 2017-10-03  Tom Tromey  <tom@tromey.com>
4183
4184         * record-full.h (record_full_gdb_operation_disable_set): Return
4185         scoped_restore_tmpl<int>.
4186         * infrun.c (adjust_pc_after_break): Update.
4187         (handle_signal_stop): Update.
4188         * record-full.c (record_full_gdb_operation_disable_set): Return
4189         scoped_restore_tmpl<int>.
4190         (record_full_wait_1, record_full_insert_breakpoint)
4191         (record_full_remove_breakpoint, record_full_save)
4192         (record_full_goto_insn): Update.
4193
4194 2017-10-02  Tom Tromey  <tom@tromey.com>
4195
4196         PR rust/22236:
4197         * rust-lang.c (rust_val_print_str): New function.
4198         (val_print_struct): Call it.
4199         (rust_subscript): Preserve name of slice type.
4200
4201 2017-10-02  Tom Tromey  <tom@tromey.com>
4202
4203         * rust-lang.c (rust_subscript): Handle slices in
4204         EVAL_AVOID_SIDE_EFFECTS case.
4205
4206 2017-10-02  Tom Tromey  <tom@tromey.com>
4207
4208         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4209
4210 2017-10-02  Tom Tromey  <tom@tromey.com>
4211
4212         * rust-lang.h (rust_slice_type): Add "extern".
4213
4214 2017-10-02  Tom Tromey  <tom@tromey.com>
4215             Pedro Alves  <palves@redhat.com>
4216
4217         * ada-lang.h (ada_exc_info::operator<): Make const.
4218         (ada_exc_info::operator==): Make const.
4219         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4220         Make const.
4221
4222 2017-09-29  Tom Tromey  <tom@tromey.com>
4223
4224         * target.c (read_whatever_is_readable): Change type of "result".
4225         Update.
4226         (free_memory_read_result_vector): Remove.
4227         (read_memory_robust): Change return type.  Update.
4228         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4229         bin2hex, std::string.
4230         * target.h (memory_read_result_s): Remove typedef.
4231         (free_memory_read_result_vector): Remove.
4232         (read_memory_robust): Return std::vector.
4233
4234 2017-09-29  Tom Tromey  <tom@tromey.com>
4235
4236         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4237
4238 2017-09-29  Tom Tromey  <tom@tromey.com>
4239
4240         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4241         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4242         operator< and operator==.
4243         (ada_exceptions_list): Return a std::vector.
4244         * ada-lang.c (ada_exc_info::operator<): Rename from
4245         compare_ada_exception_info.
4246         (ada_exc_info::operator==): New.
4247         (sort_remove_dups_ada_exceptions_list): Change type of
4248         "exceptions".
4249         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4250         (ada_add_global_exceptions): Likewise.
4251         (ada_exceptions_list_1): Return a std::vector.
4252         (ada_exceptions_list): Likewise.
4253
4254 2017-09-29  Tom Tromey  <tom@tromey.com>
4255
4256         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4257         'std::set *'.
4258         (print_one_inferior): Update.
4259         (free_vector_of_ints): Remove.
4260         (list_available_thread_groups): Change "ids" to std::set.
4261         (mi_cmd_list_thread_groups): Update.
4262         (struct collect_cores_data) <core>: Now a std::set.
4263         (collect_cores): Update.
4264         (unique): Remove.
4265         (print_one_inferior): Update.
4266
4267 2017-09-29  Tom Tromey  <tom@tromey.com>
4268
4269         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4270         (mi_execute_async_cli_command): Likewise.
4271         (mi_cmd_trace_frame_collected): Use field_fmt.
4272
4273 2017-09-29  Tom Tromey  <tom@tromey.com>
4274
4275         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4276         gdb::byte_vector.
4277
4278 2017-09-29  Tom Tromey  <tom@tromey.com>
4279
4280         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4281
4282 2017-09-29  Tom Tromey  <tom@tromey.com>
4283
4284         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4285
4286 2017-09-29  Tom Tromey  <tom@tromey.com>
4287
4288         * varobj.h (varobj_gen_name): Return std::string.
4289         * varobj.c (varobj_gen_name): Return std::string.
4290         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4291         (mi_cmd_var_delete): Don't copy "name".
4292
4293 2017-09-29  Tom Tromey  <tom@tromey.com>
4294
4295         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4296         (mi_cmd_break_insert_1): Update.
4297
4298 2017-09-29  Tom Tromey  <tom@tromey.com>
4299
4300         * target.h (make_scoped_defer_target_commit_resume): Update.
4301         * target.c (make_scoped_defer_target_commit_resume): Rename from
4302         make_cleanup_defer_target_commit_resume.  Return a
4303         scoped_restore.
4304         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4305
4306 2017-09-29  Tom Tromey  <tom@tromey.com>
4307
4308         * main.c (captured_main_1): Remove unused declaration.
4309         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4310
4311 2017-09-29  Tom Tromey  <tom@tromey.com>
4312
4313         * symtab.c (search_symbols): Remove unused outer cleanup.
4314         (make_source_files_completion_list): Remove unused declaration.
4315
4316 2017-09-29  Tom Tromey  <tom@tromey.com>
4317
4318         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4319
4320 2017-09-29  Tom Tromey  <tom@tromey.com>
4321
4322         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4323         gdb::byte_vector.
4324
4325 2017-09-29  Tom Tromey  <tom@tromey.com>
4326
4327         * complaints.c (vcomplaint): Use std::string.
4328
4329 2017-09-29  Tom Tromey  <tom@tromey.com>
4330
4331         * tracepoint.c (trace_variable_command): Use std::string.
4332         (encode_actions_1): Remove unused declarations.
4333         (create_tsv_from_upload): Use std::string.
4334
4335 2017-09-29  Tom Tromey  <tom@tromey.com>
4336
4337         * cp-support.c (gdb_demangle): Use std::string.
4338
4339 2017-09-29  Tom Tromey  <tom@tromey.com>
4340
4341         * stack.c (parse_frame_specification): Use std::string
4342         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4343
4344 2017-09-29  Tom Tromey  <tom@tromey.com>
4345
4346         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4347
4348 2017-09-29  Tom Tromey  <tom@tromey.com>
4349
4350         * utils.c (vfprintf_maybe_filtered): Use std::string.
4351         (vfprintf_unfiltered): Likewise.
4352
4353 2017-09-29  Tom Tromey  <tom@tromey.com>
4354
4355         * event-top.c (top_level_prompt): Return std::string.
4356         (display_gdb_prompt): Update.
4357
4358 2017-09-29  Tom Tromey  <tom@tromey.com>
4359
4360         * unittests/common-utils-selftests.c (format): New function.
4361         (string_vprintf_tests): New function.
4362         (_initialize_common_utils_selftests): Register new tests.
4363         * common/common-utils.c (string_vprintf): New function.
4364         * common/common-utils.h (string_vprintf): Declare.
4365
4366 2017-09-29  Pedro Alves  <palves@redhat.com>
4367
4368         * common/rsp-low.c (unpack_varlen_hex): Constify.
4369         * common/rsp-low.h (unpack_varlen_hex): Constify.
4370         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4371         Constify.
4372         * remote.c (remote_set_permissions, read_ptid)
4373         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4374         (remote_static_tracepoint_marker_at)
4375         (remote_static_tracepoint_markers_by_strid)
4376         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4377         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4378         (parse_tracepoint_definition, parse_tsv_definition)
4379         (parse_static_tracepoint_marker_definition): Constify.
4380         * tracepoint.h (parse_static_tracepoint_marker_definition)
4381         (parse_trace_status, parse_tracepoint_status)
4382         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4383
4384 2017-09-29  Pedro Alves  <palves@redhat.com>
4385
4386         * remote.c (target_buf, target_buf_size): Delete.
4387         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4388         Use the connection's packet buffer instead.
4389         All callers adjusted.
4390         (_initialize_remote): Remove references to target_buf and
4391         target_buf_size.
4392
4393 2017-09-28  Pedro Alves  <palves@redhat.com>
4394
4395         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4396         unittests/common-utils-selftests.c.
4397         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4398         (COMMON_OBS): Remove utils-selftests.o.
4399         * utils-selftests.c: Move to ...
4400         * unittests/common-utils-selftests.c: ... here and rename self
4401         test to "string_printf".
4402
4403 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4404
4405         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4406         having NULL cus or tus.
4407
4408 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4409
4410         * arm-tdep.c: (convert_from_extended): Remove.
4411         (convert_to_extended): Likewise.
4412         (arm_extract_return_value): Use convert_typed_floating.
4413         (arm_store_return_value): Likewise.
4414
4415         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4416         * sh-tdep.c: Do not include "floatformat.h".
4417         (sh_littlebyte_bigword_type): New function.
4418         (sh_register_convert_to_virtual): Use convert_typed_floating.
4419         (sh_register_convert_to_raw): Likewise.
4420         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4421         (sh64_littlebyte_bigword_type): New function.
4422         (sh64_extract_return_value): Use convert_typed_floating.
4423         (sh64_register_convert_to_virtual): Likewise.
4424         (sh64_register_convert_to_raw): Likewise.
4425
4426 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4427
4428         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4429         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4430
4431         * gdbtypes.h (union type_specific): Make field floatformat hold
4432         just a single struct floatformat, not an array.
4433         (floatformat_from_type): Move here.
4434         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4435         changed TYPE_FLOATFORMAT definition.
4436         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4437         (recursive_dump_type): Likewise.
4438         (init_float_type): Install correct floatformat for byte order.
4439         (arch_float_type): Likewise.
4440
4441 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4442
4443         * gdbtypes.c (init_type): Change incoming argument from
4444         length-in-bytes to length-in-bits.  Assert length is a
4445         multiple of TARGET_CHAR_BITS.
4446         (arch_type, arch_flags_type): Likewise.
4447         (init_integer_type): Update call to init_type.
4448         (init_character_type): Likewise.
4449         (init_boolean_type): Likewise.
4450         (init_float_type): Likewise.
4451         (init_decfloat_type): Likewise.
4452         (init_complex_type): Likewise.
4453         (init_pointer_type): Likewise.
4454         (objfile_type): Likewise.
4455         (arch_integer_type): Update call to arch_type.
4456         (arch_character_type): Likewise.
4457         (arch_boolean_type): Likewise.
4458         (arch_float_type): Likewise.
4459         (arch_decfloat_type): Likewise.
4460         (arch_complex_type): Likewise.
4461         (arch_pointer_type): Likewise.
4462         (gdbtypes_post_init): Likewise.
4463
4464         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4465         (read_base_type): Likewise.
4466         * mdebugread.c (basic_type): Likewise.
4467         * stabsread.c (dbx_init_float_type): Likewise.
4468         (rs6000_builtin_type): Likewise.
4469         (read_range_type): Likewise.  Also, fix call to init_integer_type
4470         with erroneous length argument.
4471
4472         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4473         * d-lang.c (build_d_types): Likewise.
4474         * f-lang.c (build_fortran_types): Likewise.
4475         * go-lang.c (build_go_types): Likewise.
4476         * opencl-lang.c (build_opencl_types): Likewise.
4477         * jit.c (finalize_symtab): Likewise.
4478         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4479         (build_std_type_info_type): Likewise.
4480         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4481         update call to arch_flags_type.
4482
4483         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4484         arch_type.
4485         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4486         * windows-tdep.c (windows_get_tlb_type): Likewise.
4487
4488         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4489         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4490         * m32c-tdep.c (make_types): Likewise.
4491         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4492         (rl78_psw_type): Update call to arch_flags_type.
4493         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4494         * rx-tdep.c (rx_psw_type): Likewise.
4495         (rx_fpsw_type): Likewise.
4496         * sparc-tdep.c (sparc_psr_type): Likewise.
4497         (sparc_fsr_type): Likewise.
4498         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4499         (sparc64_ccr_type): Likewise.
4500         (sparc64_fsr_type): Likewise.
4501         (sparc64_fprs_type): Likewise.
4502
4503 2017-09-27  Tom Tromey  <tom@tromey.com>
4504
4505         * findcmd.c (find_command): Constify.
4506
4507 2017-09-27  Tom Tromey  <tom@tromey.com>
4508
4509         * ada-tasks.c (task_command_1, task_command): Constify.
4510
4511 2017-09-27  Tom Tromey  <tom@tromey.com>
4512
4513         * symtab.c (maintenance_print_symbol_cache)
4514         (maintenance_flush_symbol_cache)
4515         (maintenance_print_symbol_cache_statistics): Constify.
4516
4517 2017-09-27  Tom Tromey  <tom@tromey.com>
4518
4519         * inferior.c (detach_inferior_command, kill_inferior_command)
4520         (inferior_command): Constify.
4521
4522 2017-09-27  Tom Tromey  <tom@tromey.com>
4523
4524         * regcache.c (regcache_print, maintenance_print_registers)
4525         (maintenance_print_raw_registers)
4526         (maintenance_print_cooked_registers)
4527         (maintenance_print_register_groups)
4528         (maintenance_print_remote_registers): Constify.
4529
4530 2017-09-27  Tom Tromey  <tom@tromey.com>
4531
4532         * printcmd.c (map_display_numbers, undisplay_command)
4533         (enable_disable_display_command, enable_display_command)
4534         (disable_display_command): Constify.
4535
4536 2017-09-27  Tom Tromey  <tom@tromey.com>
4537
4538         * breakpoint.h (delete_command): Don't declare.
4539         * breakpoint.c (delete_command, enable_once_command)
4540         (enable_count_command, enable_delete_command, breakpoint_1)
4541         (maintenance_info_breakpoints, stopin_command, stopat_command)
4542         (delete_command, delete_trace_command, save_breakpoints)
4543         (save_breakpoints_command, save_tracepoints_command): Constify.
4544
4545 2017-09-27  Tom Tromey  <tom@tromey.com>
4546
4547         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4548         (skip_ws, extract_identifier, macro_define_command)
4549         (macro_undef_command, macro_list_command): Constify.
4550
4551 2017-09-27  Tom Tromey  <tom@tromey.com>
4552
4553         * infcmd.c (environment_info, set_environment_command)
4554         (unset_environment_command, path_info, info_proc_cmd_1)
4555         (info_proc_cmd_mappings, info_proc_cmd_stat)
4556         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4557         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4558
4559 2017-09-27  Tom Tromey  <tom@tromey.com>
4560
4561         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4562         Constify.
4563
4564 2017-09-27  Tom Tromey  <tom@tromey.com>
4565
4566         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4567
4568 2017-09-27  Tom Tromey  <tom@tromey.com>
4569
4570         * demangle.c (demangle_command): Constify.
4571
4572 2017-09-27  Tom Tromey  <tom@tromey.com>
4573
4574         * progspace.c (maintenance_info_program_spaces_command):
4575         Constify.
4576
4577 2017-09-27  Tom Tromey  <tom@tromey.com>
4578
4579         * compile/compile.c (check_raw_argument, compile_file_command)
4580         (compile_code_command, compile_print_command): Constify.
4581
4582 2017-09-27  Tom Tromey  <tom@tromey.com>
4583
4584         * reggroups.c (maintenance_print_reggroups): Constify.
4585
4586 2017-09-27  Tom Tromey  <tom@tromey.com>
4587
4588         * dwarf2read.c (save_gdb_index_command): Constify.
4589
4590 2017-09-27  Tom Tromey  <tom@tromey.com>
4591
4592         * stap-probe.c (info_probes_stap_command): Constify.
4593
4594 2017-09-27  Tom Tromey  <tom@tromey.com>
4595
4596         * fork-child.c (unset_exec_wrapper_command): Constify.
4597
4598 2017-09-27  Tom Tromey  <tom@tromey.com>
4599
4600         * btrace.c (get_uint, get_context_size, no_chunk)
4601         (maint_btrace_packet_history_cmd)
4602         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4603         (maint_info_btrace_cmd): Constify.
4604
4605 2017-09-27  Tom Tromey  <tom@tromey.com>
4606
4607         * reverse.c (delete_bookmark_command): Constify.
4608
4609 2017-09-27  Tom Tromey  <tom@tromey.com>
4610
4611         * remote.c (set_memory_packet_size)
4612         (set_memory_write_packet_size, show_memory_write_packet_size)
4613         (set_memory_read_packet_size, show_memory_read_packet_size)
4614         (compare_sections_command, packet_command, remote_put_command)
4615         (remote_get_command, remote_delete_command): Constify.
4616
4617 2017-09-27  Tom Tromey  <tom@tromey.com>
4618
4619         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4620         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4621         (set_mipsfpu_auto_command): Constify.
4622
4623 2017-09-27  Tom Tromey  <tom@tromey.com>
4624
4625         * cli/cli-cmds.h (cd_command): Constify.
4626         * cli/cli-cmds.c (cd_command): Constify.
4627
4628 2017-09-27  Tom Tromey  <tom@tromey.com>
4629
4630         * thread.c (thread_name_command, thread_find_command): Constify.
4631
4632 2017-09-27  Tom Tromey  <tom@tromey.com>
4633
4634         * probe.c (enable_probes_command, disable_probes_command):
4635         Constify.
4636
4637 2017-09-27  Tom Tromey  <tom@tromey.com>
4638
4639         * symfile.c (symbol_file_command): Constify.
4640         * gdbcore.h (deprecated_file_changed_hook): Constify.
4641         * exec.c (deprecated_file_changed_hook, exec_file_command)
4642         (file_command): Constify.
4643         * defs.h (symbol_file_command): Constify.
4644
4645 2017-09-27  Tom Tromey  <tom@tromey.com>
4646
4647         * remote-fileio.c (set_system_call_allowed)
4648         (show_system_call_allowed): Constify.
4649
4650 2017-09-27  Tom Tromey  <tom@tromey.com>
4651
4652         * tracepoint.c (delete_trace_variable_command)
4653         (tfind_end_command, tfind_start_command, tfind_pc_command)
4654         (tfind_tracepoint_command, tfind_line_command)
4655         (tfind_range_command, tfind_outside_command): Constify.
4656
4657 2017-09-27  Tom Tromey  <tom@tromey.com>
4658
4659         * ax-gdb.c (maint_agent_printf_command, agent_command)
4660         (agent_eval_command): Constify.
4661
4662 2017-09-27  Tom Tromey  <tom@tromey.com>
4663
4664         * tracepoint.c (info_scope_command): Constify.
4665         * python/python.c (gdbpy_decode_line): Constify.
4666         * python/py-breakpoint.c (bppy_init): Constify.
4667         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4668         * location.h: (new_linespec_location)
4669         (string_to_event_location_basic, string_to_event_location):
4670         Constify.
4671         * location.c (new_linespec_location)
4672         (string_to_event_location_basic, string_to_event_location):
4673         Constify.
4674         * linespec.h (decode_line_with_current_source)
4675         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4676         * linespec.c (linespec_lex_to_end)
4677         (decode_line_with_current_source)
4678         (decode_line_with_last_displayed): Constify.
4679         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4680         Constify.
4681         * cli/cli-cmds.c (edit_command, list_command): Constify.
4682         * breakpoint.h (until_break_command, watch_command_wrapper)
4683         (awatch_command_wrapper, rwatch_command_wrapper)
4684         (init_ada_exception_breakpoint): Constify.
4685         * breakpoint.c (break_command_1, dprintf_command)
4686         (break_range_command, watch_command_wrapper)
4687         (rwatch_command_wrapper, awatch_command_wrapper)
4688         (until_break_command, init_ada_exception_breakpoint)
4689         (strace_marker_create_sals_from_location, trace_command)
4690         (ftrace_command, strace_command, struct tracepoint): Constify.
4691         * ax-gdb.c (agent_command_1): Constify.
4692         * ada-lang.c (ada_exception_sal): Constify.
4693
4694 2017-09-27  Tom Tromey  <tom@tromey.com>
4695
4696         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4697         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4698         (get_context_size, no_chunk, get_insn_history_modifiers)
4699         (cmd_record_insn_history, get_call_history_modifiers)
4700         (cmd_record_call_history): Constify.
4701
4702 2017-09-27  Tom Tromey  <tom@tromey.com>
4703
4704         * source.c (show_substitute_path_command)
4705         (unset_substitute_path_command, set_substitute_path_command):
4706         Constify.
4707
4708 2017-09-27  Tom Tromey  <tom@tromey.com>
4709
4710         * typeprint.c (maintenance_print_type): Constify.
4711         * maint.c (maintenance_dump_me, maintenance_demangle)
4712         (maintenance_time_display, maintenance_info_sections)
4713         (maintenance_print_statistics, maintenance_deprecate)
4714         (maintenance_undeprecate): Constify.
4715         (maintenance_do_deprecate): Constify.  Use std::string.
4716         (maintenance_selftest): Constify.
4717         * gdbtypes.h (maintenance_print_type): Constify.
4718
4719 2017-09-27  Tom Tromey  <tom@tromey.com>
4720
4721         * hppa-tdep.c (unwind_command): Constify.
4722
4723 2017-09-27  Tom Tromey  <tom@tromey.com>
4724
4725         * target-descriptions.c (unset_tdesc_filename_cmd)
4726         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4727         Constify.
4728
4729 2017-09-27  Tom Tromey  <tom@tromey.com>
4730
4731         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4732
4733 2017-09-27  Tom Tromey  <tom@tromey.com>
4734
4735         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4736
4737 2017-09-27  Tom Tromey  <tom@tromey.com>
4738
4739         * tui/tui-regs.c (tui_reg_command): Constify.
4740
4741 2017-09-27  Tom Tromey  <tom@tromey.com>
4742
4743         * skip.c (skip_file_command, skip_function_command)
4744         (skip_enable_command, skip_disable_command, skip_delete_command):
4745         Constify.
4746
4747 2017-09-27  Tom Tromey  <tom@tromey.com>
4748
4749         * record-btrace.c (cmd_record_btrace_bts_start)
4750         (cmd_record_btrace_pt_start): Constify.
4751
4752 2017-09-27  Tom Tromey  <tom@tromey.com>
4753
4754         * symmisc.c (maintenance_print_symbols)
4755         (maintenance_print_msymbols, maintenance_print_objfiles)
4756         (maintenance_info_symtabs, maintenance_check_symtabs)
4757         (maintenance_expand_symtabs, maintenance_info_line_tables):
4758         Constify.
4759
4760 2017-09-27  Tom Tromey  <tom@tromey.com>
4761
4762         * top.c (new_ui_command): Constify.
4763
4764 2017-09-27  Tom Tromey  <tom@tromey.com>
4765
4766         * symfile.c (add_symbol_file_command)
4767         (remove_symbol_file_command, list_overlays_command)
4768         (map_overlay_command, unmap_overlay_command)
4769         (overlay_auto_command, overlay_manual_command)
4770         (overlay_off_command, overlay_load_command): Constify.
4771
4772 2017-09-27  Tom Tromey  <tom@tromey.com>
4773
4774         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4775         (info_spu_mailbox_command, info_spu_dma_command)
4776         (info_spu_proxydma_command): Constify.
4777
4778 2017-09-27  Tom Tromey  <tom@tromey.com>
4779
4780         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4781
4782 2017-09-27  Tom Tromey  <tom@tromey.com>
4783
4784         * cli/cli-script.c (user_defined_command): Constify.
4785
4786 2017-09-27  Tom Tromey  <tom@tromey.com>
4787
4788         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4789         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4790         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4791         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4792         (dump_binary_value, append_binary_memory, append_binary_value):
4793         Constify.
4794         (struct dump_context) <func>: Constify.
4795         (add_dump_command): Update.
4796
4797 2017-09-27  Tom Tromey  <tom@tromey.com>
4798
4799         * cli/cli-cmds.c (show_version, show_configuration)
4800         (source_command, show_user): Constify.
4801
4802 2017-09-27  Tom Tromey  <tom@tromey.com>
4803
4804         * target.c (maintenance_print_target_stack): Constify.
4805
4806 2017-09-27  Tom Tromey  <tom@tromey.com>
4807
4808         * interps.c (interpreter_exec_cmd): Constify.
4809
4810 2017-09-27  Tom Tromey  <tom@tromey.com>
4811
4812         * record-full.c (cmd_record_full_restore): Constify.
4813
4814 2017-09-27  Tom Tromey  <tom@tromey.com>
4815
4816         * memattr.c (enable_mem_command, disable_mem_command)
4817         (delete_mem_command): Constify.
4818
4819 2017-09-27  Tom Tromey  <tom@tromey.com>
4820
4821         * value.c (show_convenience): Constify.
4822
4823 2017-09-27  Tom Tromey  <tom@tromey.com>
4824
4825         * gdbcore.h (core_file_command): Update.
4826         * corefile.c (core_file_command): Constify.
4827
4828 2017-09-27  Tom Tromey  <tom@tromey.com>
4829
4830         * user-regs.c (maintenance_print_user_registers): Constify.
4831
4832 2017-09-27  Tom Tromey  <tom@tromey.com>
4833
4834         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4835
4836 2017-09-27  Tom Tromey  <tom@tromey.com>
4837
4838         * cp-support.c (first_component_command): Constify.
4839
4840 2017-09-27  Tom Tromey  <tom@tromey.com>
4841
4842         * psymtab.c (maintenance_print_psymbols)
4843         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4844         Constify.
4845
4846 2017-09-27  Tom Tromey  <tom@tromey.com>
4847
4848         * windows-tdep.c (display_tib): Constify.
4849
4850 2017-09-27  Tom Tromey  <tom@tromey.com>
4851
4852         * linux-fork.c (delete_checkpoint_command)
4853         (detach_checkpoint_command): Constify.
4854
4855 2017-09-27  Tom Tromey  <tom@tromey.com>
4856
4857         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4858
4859 2017-09-27  Tom Tromey  <tom@tromey.com>
4860
4861         * arc-tdep.c (dump_arc_instruction_command): Constify.
4862
4863 2017-09-27  Tom Tromey  <tom@tromey.com>
4864
4865         * valprint.c (set_radix, show_radix): Constify.
4866
4867 2017-09-27  Tom Tromey  <tom@tromey.com>
4868
4869         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4870
4871 2017-09-27  Tom Tromey  <tom@tromey.com>
4872
4873         * command.h (not_just_help_class_command): Update.
4874         * cli/cli-decode.h (not_just_help_class_command): Update.
4875         * cli/cli-decode.c (not_just_help_class_command): Constify.
4876
4877 2017-09-27  Tom Tromey  <tom@tromey.com>
4878
4879         * gdb_bfd.c (maintenance_info_bfds): Constify.
4880
4881 2017-09-27  Tom Tromey  <tom@tromey.com>
4882
4883         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4884         overloads.
4885         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4886         (do_const_cfunc): New function.
4887         (cmd_cfunc_eq): New overload.
4888         (cli_user_command_p): Check do_const_cfunc.
4889         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4890         const_cfunc.
4891         * command.h (add_cmd): Add const overload and no-function
4892         overload.
4893         (set_cmd_cfunc): Add const overload.
4894         (cmd_const_cfunc_ftype): Declare.
4895         (cmd_cfunc_eq): Add const overload.
4896         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4897         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4898         overload.
4899
4900 2017-09-27  Tom Tromey  <tom@tromey.com>
4901
4902         * macroexp.c (get_next_token_for_substitution): New function.
4903         (substitute_args): Call it.  Check for __VA_OPT__.
4904
4905 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4906             Pedro Alves <palves@redhat.com>
4907
4908         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4909         producer_is_icc_lt_14.
4910         (producer_is_icc_lt_14): New function.
4911         (check_producer): Add code for checking version of ICC.
4912         (producer_is_icc): Move to producer.c.
4913         (read_structure_type): Restrict ICC workaround to ICC<14.
4914         * producer.c: Include selftest.h.
4915         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4916         New functions.
4917         * producer.h (producer_is_icc): New declaration.
4918
4919 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4920
4921         * Makefile.in (SFILES): Add producer.c.
4922         (COMMON_OBS): Add producer.o
4923         * amd64-tdep.c (producer.h): Add new include.
4924         * dwarf2read.c (producer.h): Add new include.
4925         * producer.c: New file.
4926         * producer.h: New file.
4927         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4928         producer.c.
4929         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4930         producer.h.
4931
4932 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4933
4934         * configure.ac: Search ncursesw before ncurses.
4935         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4936         * gdb_curses.h: Include <ncursesw/ncurses.h>
4937         * config.in, configure: Regenerate.
4938
4939 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4940
4941         PR gdb/22185
4942         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4943         obsolete.
4944         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4945         Remove i386sol2 support.
4946         * configure.nat <i386sol2>: Remove.
4947         <sol2-64>: Fold into ...
4948         <sol2>: ... this.
4949         Move common settings to default section.
4950         Add sol-thread.o.
4951         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4952         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4953         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4954         <i[34567]86-*-solaris*>: Remove.
4955         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4956
4957         * configure.ac: Remove wctype in libw check.
4958         (_MSE_INT_H): Don't define on Solaris 7-9.
4959         <solaris*>: Remove libthread_db.so.1 check.
4960         * configure: Regenerate.
4961         * config.in: Regenerate.
4962
4963         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4964         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4965         (gdb_ps_size_t): Remove.
4966         Use base types in users.
4967         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4968
4969         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4970
4971 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4972
4973         PR build/22206
4974         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4975         (adi_is_addr_mapped): Likewise.
4976         (PSR_ICC): Don't redefine.
4977         (PSR_IMPL): Likewise.
4978
4979 2017-09-25  Tom Tromey  <tom@tromey.com>
4980
4981         * regcache.c (regcache::dump): Use string_printf.
4982
4983 2017-09-25  Tom Tromey  <tom@tromey.com>
4984
4985         * regcache.c (class regcache_invalidator): New.
4986         (struct register_to_invalidate): Remove.
4987         (make_cleanup_regcache_invalidate): Remove.
4988         (regcache::raw_write): Use regcache_invalidator.
4989
4990 2017-09-25  Tom Tromey  <tom@tromey.com>
4991
4992         * spu-tdep.c (spu2ppu_sniffer): Update.
4993         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4994         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4995         Remove.
4996         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4997         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4998         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4999         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5000         (frame_pop): Update.
5001
5002 2017-09-25  Tom Tromey  <tom@tromey.com>
5003
5004         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5005         * regcache.h (regcache_xfree): Don't declare.
5006         * regcache.c (regcache_xfree): Remove.
5007         (do_regcache_xfree): Use delete.
5008         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5009         * linux-fork.c (free_fork): Use delete.
5010         (fork_save_infrun_state): Likewise.
5011         * jit.c (jit_dealloc_cache): Use delete.
5012         * infrun.c (discard_infcall_suspend_state): Use delete.
5013
5014 2017-09-25  Tom Tromey  <tom@tromey.com>
5015
5016         * regcache.h (regcache_xmalloc): Don't declare.
5017         (regcache_raw_set_cached_value): Update comment.
5018         * regcache.c (regcache_xmalloc): Remove.
5019         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5020         * jit.c (jit_frame_sniffer): Use new.
5021         * frame.c (frame_save_as_regcache): Use new.
5022
5023 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5024
5025         * NEWS: Advertise support for guarded-storage registers on IBM z.
5026
5027 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5028
5029         * s390-linux-nat.c (have_regset_gs): New static variable.
5030         (s390_linux_fetch_inferior_registers): Handle guarded-storage
5031         control block and guarded-storage broadcast control regsets.
5032         (s390_read_description): Detect whether the target has
5033         guarded-storage support, return appropriate tdesc.
5034         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5035         (features/s390x-gs-linux64.c): Likewise.
5036         (struct gdbarch_tdep) <have_gs>: New field.
5037         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5038         (s390_gsbc_regset): New variables.
5039         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5040         and s390_gsbc_regset, if applicable.
5041         (s390_core_read_description): Check whether core file was from a
5042         target with guarded-storage support; include appropriate regsets.
5043         (s390_gdbarch_init): Add registers for guarded-storage support.
5044         (_initialize_s390_tdep): Initialize new target descriptions that
5045         include registers for guarded-storage support.
5046         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5047         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5048         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5049         (S390_NUM_REGS): Adjust macro definition.
5050         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5051         (tdesc_s390x_gs_linux64): New declarations.
5052
5053 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5054
5055         * features/s390-gs-linux64.xml: New file.
5056         * features/s390-gs.xml: New file.
5057         * features/s390-gsbc.xml: New file.
5058         * features/s390x-gs-linux64.xml: New file.
5059         * features/Makefile (WHICH): Add s390-gs-linux64 and
5060         s390x-gs-linux64.
5061         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5062         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5063         * features/s390-gs-linux64.c: New generated file.
5064         * features/s390x-gs-linux64.c: New file.
5065         * regformats/s390-gs-linux64.dat: New file.
5066         * regformats/s390x-gs-linux64.dat: New file.
5067
5068 2017-09-23  Tom Tromey  <tom@tromey.com>
5069
5070         * defs.h (make_cleanup_override_quit_handler): Don't declare.
5071
5072 2017-09-22  Tom Tromey  <tom@tromey.com>
5073
5074         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5075         type to scoped_restore_tmpl.
5076         <scoped_input_handler>: Initialize m_quit_handler directly.
5077
5078 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5079
5080         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5081         (cd_command): Likewise.  Free "current_directory" before
5082         assigning to it.
5083         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5084         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5085         * top.c (gdb_dirbuf): Remove global declaration.
5086         * top.h (gdb_dirbuf): Likewise.
5087
5088 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5089
5090         * gnulib/aclocal.m4: Regenerate.
5091         * gnulib/config.in: Regenerate.
5092         * gnulib/configure: Regenerate.
5093         * gnulib/import/Makefile.am: Regenerate.
5094         * gnulib/import/Makefile.in: Regenerate.
5095         * gnulib/import/assure.h: New file.
5096         * gnulib/import/at-func.c: Likewise
5097         * gnulib/import/chdir-long.c: New file.
5098         * gnulib/import/chdir-long.h: New file.
5099         * gnulib/import/cloexec.c: New file.
5100         * gnulib/import/cloexec.h: New file.
5101         * gnulib/import/close.c: New file.
5102         * gnulib/import/closedir.c: New file.
5103         * gnulib/import/dirent-private.h: New file.
5104         * gnulib/import/dup-safer.c: New file.
5105         * gnulib/import/dup.c: New file.
5106         * gnulib/import/dup2.c: New file.
5107         * gnulib/import/error.c: New file.
5108         * gnulib/import/error.h: New file.
5109         * gnulib/import/exitfail.c: New file.
5110         * gnulib/import/exitfail.h: New file.
5111         * gnulib/import/fchdir.c: New file.
5112         * gnulib/import/fcntl.c: New file.
5113         * gnulib/import/fcntl.in.h: New file.
5114         * gnulib/import/fd-hook.c: New file.
5115         * gnulib/import/fd-hook.h: New file.
5116         * gnulib/import/fd-safer.c: New file.
5117         * gnulib/import/fdopendir.c: New file.
5118         * gnulib/import/filename.h: New file.
5119         * gnulib/import/filenamecat-lgpl.c: New file.
5120         * gnulib/import/filenamecat.h: New file.
5121         * gnulib/import/fstat.c: New file.
5122         * gnulib/import/fstatat.c: New file.
5123         * gnulib/import/getcwd-lgpl.c: New file.
5124         * gnulib/import/getcwd.c: New file.
5125         * gnulib/import/getdtablesize.c: New file.
5126         * gnulib/import/getlogin_r.c: New file.
5127         * gnulib/import/getprogname.c: New file.
5128         * gnulib/import/getprogname.h: New file.
5129         * gnulib/import/gettext.h: New file.
5130         * gnulib/import/glob-libc.h: New file.
5131         * gnulib/import/glob.c: New file.
5132         * gnulib/import/glob.in.h: New file.
5133         * gnulib/import/intprops.h: New file.
5134         * gnulib/import/m4/chdir-long.m4: New file.
5135         * gnulib/import/m4/close.m4: New file.
5136         * gnulib/import/m4/closedir.m4: New file.
5137         * gnulib/import/m4/d-ino.m4: New file.
5138         * gnulib/import/m4/d-type.m4: New file.
5139         * gnulib/import/m4/dup.m4: New file.
5140         * gnulib/import/m4/dup2.m4: New file.
5141         * gnulib/import/m4/error.m4: New file.
5142         * gnulib/import/m4/fchdir.m4: New file.
5143         * gnulib/import/m4/fcntl.m4: New file.
5144         * gnulib/import/m4/fcntl_h.m4: New file.
5145         * gnulib/import/m4/fdopendir.m4: New file.
5146         * gnulib/import/m4/filenamecat.m4: New file.
5147         * gnulib/import/m4/fstat.m4: New file.
5148         * gnulib/import/m4/fstatat.m4: New file.
5149         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5150         * gnulib/import/m4/getcwd-path-max.m4: New file.
5151         * gnulib/import/m4/getcwd.m4: New file.
5152         * gnulib/import/m4/getdtablesize.m4: New file.
5153         * gnulib/import/m4/getlogin_r.m4: New file.
5154         * gnulib/import/m4/getprogname.m4: New file.
5155         * gnulib/import/m4/glob.m4: New file.
5156         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5157         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5158         * gnulib/import/m4/mempcpy.m4: New file.
5159         * gnulib/import/m4/memrchr.m4: New file.
5160         * gnulib/import/m4/mode_t.m4: New file.
5161         * gnulib/import/m4/msvc-inval.m4: New file.
5162         * gnulib/import/m4/msvc-nothrow.m4: New file.
5163         * gnulib/import/m4/open.m4: New file.
5164         * gnulib/import/m4/openat.m4: New file.
5165         * gnulib/import/m4/opendir.m4: New file.
5166         * gnulib/import/m4/readdir.m4: New file.
5167         * gnulib/import/m4/realloc.m4: New file.
5168         * gnulib/import/m4/rewinddir.m4: New file.
5169         * gnulib/import/m4/save-cwd.m4: New file.
5170         * gnulib/import/m4/strdup.m4: New file.
5171         * gnulib/import/m4/strerror.m4: New file.
5172         * gnulib/import/m4/unistd-safer.m4: New file.
5173         * gnulib/import/mempcpy.c: New file.
5174         * gnulib/import/memrchr.c: New file.
5175         * gnulib/import/msvc-inval.c: New file.
5176         * gnulib/import/msvc-inval.h: New file.
5177         * gnulib/import/msvc-nothrow.c: New file.
5178         * gnulib/import/msvc-nothrow.h: New file.
5179         * gnulib/import/open.c: New file.
5180         * gnulib/import/openat-die.c: New file.
5181         * gnulib/import/openat-priv.h: New file.
5182         * gnulib/import/openat-proc.c: New file.
5183         * gnulib/import/openat.c: New file.
5184         * gnulib/import/openat.h: New file.
5185         * gnulib/import/opendir.c: New file.
5186         * gnulib/import/pipe-safer.c: New file.
5187         * gnulib/import/readdir.c: New file.
5188         * gnulib/import/realloc.c: New file.
5189         * gnulib/import/rewinddir.c: New file.
5190         * gnulib/import/save-cwd.c: New file.
5191         * gnulib/import/save-cwd.h: New file.
5192         * gnulib/import/strdup.c: New file.
5193         * gnulib/import/strerror-override.c: New file.
5194         * gnulib/import/strerror-override.h: New file.
5195         * gnulib/import/strerror.c: New file.
5196         * gnulib/import/unistd--.h: New file.
5197         * gnulib/import/unistd-safer.h: New file.
5198         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5199         "getcwd" and "glob".
5200         * ser-tcp.c: Undefine "close" before redefining it.
5201
5202 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5203
5204         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5205         get rid of res_val.
5206
5207 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5208
5209         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5210         <sol2,sparc>: Likewise.
5211         <sol2-64,i386>: Likewise.
5212
5213         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5214         -Wdeprecated-declarations on *-*-solaris*.
5215         * configure: Regenerate.
5216
5217         * procfs.c: Include "nat/inferior.h".
5218         (procfs_info_proc): Fix typo.
5219
5220 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5221
5222         * remote.c (vector): Include.
5223         (struct private_thread_info): Add field, thread_handle.
5224         (free_private_thread_info): Deallocate storage associated with
5225         thread handle.
5226         (get_private_info_thread): Initialize `thread_handle' field.
5227         (struct thread_item): Add field, thread_handle.
5228         (clear_threads_listing_context): Deallocate storage associated
5229         with thread handle.
5230         (start_thread): Add support for "handle" attribute.
5231         (thread_attributes): Add "handle".
5232         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5233         field.
5234         (remote_update_thread_list): Update thread_handle.
5235         (remote_thread_handle_to_thread_info): New function.
5236         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5237
5238 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5239
5240         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5241         function.
5242         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5243         * python/python-internal.h (thread_object_type): Declare.
5244
5245 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5246
5247         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5248         (target_thread_handle_to_thread_info): Declare.
5249         * target.c (target_thread_handle_to_thread_info): New function.
5250         * target-delegates.c: Regenerate.
5251         * gdbthread.h (find_thread_by_handle): Declare.
5252         * thread.c (find_thread_by_handle): New function.
5253         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5254         function.
5255         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5256
5257 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5258
5259         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5260
5261 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5262
5263         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5264
5265 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5266
5267         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5268         to gdb_target_obs.
5269
5270 2017-09-20  Tom Tromey  <tom@tromey.com>
5271
5272         * breakpoint.c (struct counted_command_line): Remove.
5273         (breakpoint_commands): Update.
5274         (alloc_counted_command_line, incref_counted_command_line)
5275         (decref_counted_command_line, do_cleanup_counted_command_line)
5276         (make_cleanup_decref_counted_command_line): Remove.
5277         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5278         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5279         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5280         (save_breakpoints): Update.
5281         * breakpoint.h (counted_command_line): Now a typedef to
5282         shared_ptr.
5283         (struct breakpoint) <commands>: Now a counted_command_line.
5284         (struct bpstats) <command>: Likewise.
5285
5286 2017-09-20  Tom Tromey  <tom@tromey.com>
5287
5288         * breakpoint.c (struct commands_info, do_map_commands_command):
5289         Remove.
5290         (commands_command_1): Update.
5291         (iterate_over_related_breakpoints): Take a function_view.
5292         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5293         (delete_command): Update.
5294         (map_breakpoint_numbers): Take a function_view.
5295         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5296         (disable_command): Update.
5297         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5298         (enable_command): Update.
5299         (struct disp_data, do_enable_breakpoint_disp)
5300         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5301         (do_map_enable_delete_breakpoint): Remove.
5302         (enable_once_command, enable_count_command, enable_delete_command)
5303         (delete_trace_variable_command): Update.
5304
5305 2017-09-20  Tom Tromey  <tom@tromey.com>
5306
5307         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5308         (bpstat_clear): Use delete.
5309         (bpstats): New constructors.
5310         (bpstat_copy, bpstat_stop_status): Use new.
5311         (dprintf_after_condition_true): Update.
5312         * breakpoint.h (bpstats::bpstats): Add constructors.
5313         (bpstats::~bpstats): Add destructor.
5314
5315 2017-09-20  Pedro Alves  <palves@redhat.com>
5316
5317         * eval.c (make_params): Delete, refactored as ...
5318         (class fake_method): ... this new type's ctor.
5319         (fake_method::~fake_method): New.
5320         (evaluate_subexp_standard): Use 'fake_method'.
5321
5322 2017-09-20  Tom Tromey  <tom@tromey.com>
5323
5324         * windows-nat.c (get_windows_debug_event, windows_wait)
5325         (do_initial_windows_stuff, windows_attach): Update.
5326         * utils.c (vwarning, internal_vproblem): Update.
5327         (ui_unregister_input_event_handler_cleanup)
5328         (prepare_to_handle_input): Remove.
5329         (class scoped_input_handler): New.
5330         (defaulted_query, prompt_for_continue): Update.
5331         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5332         Update.
5333         * top.c (undo_terminal_modifications_before_exit): Update.
5334         * target/target.h (target_terminal_init, target_terminal_inferior)
5335         (target_terminal_ours): Don't declare.
5336         (class target_terminal): New.
5337         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5338         (target_terminal_ours_for_output)
5339         (make_cleanup_restore_target_terminal): Don't declare.
5340         (target_terminal_info): Remove.
5341         * target.c (enum terminal_state, terminal_state): Remove.
5342         (target_terminal::terminal_state): Define.
5343         (target_terminal::init): Rename from target_terminal_init.
5344         (target_terminal::inferior): Rename from
5345         target_terminal_inferior.
5346         (target_terminal::ours): Rename from target_terminal_ours.
5347         (target_terminal::ours_for_output): Rename from
5348         target_terminal_ours_for_output.
5349         (target_terminal::info): New method.
5350         (cleanup_restore_target_terminal)
5351         (make_cleanup_restore_target_terminal): Remove.
5352         * solib.c (handle_solib_event): Update.
5353         * remote.c (remote_serial_quit_handler): Update.
5354         (remote_terminal_inferior, remote_wait_as): Update.
5355         * record-full.c (record_full_wait_1): Update.
5356         * nto-procfs.c (procfs_create_inferior): Update.
5357         * nat/fork-inferior.c (startup_inferior): Update.
5358         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5359         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5360         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5361         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5362         (mi_breakpoint_created, mi_breakpoint_deleted)
5363         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5364         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5365         (mi_user_selected_context_changed, report_initial_inferior):
5366         Update.
5367         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5368         (linux_nat_terminal_inferior): Update.
5369         * infrun.c (follow_fork_inferior)
5370         (handle_vfork_child_exec_or_exit, do_target_resume)
5371         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5372         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5373         Update.
5374         * inflow.c (child_terminal_init, info_terminal_command): Update.
5375         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5376         (attach_command): Update.
5377         * infcall.c (call_thread_fsm_should_stop): Update.
5378         * gnu-nat.c (gnu_attach): Update.
5379         * extension.c (struct active_ext_lang_state)
5380         (restore_active_ext_lang): Update.
5381         * exceptions.c (print_flush): Update.
5382         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5383         (struct quit_handler_cleanup_data, restore_quit_handler)
5384         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5385         Remove.
5386         * cp-support.c (gdb_demangle): Update.
5387         * breakpoint.c (update_inserted_breakpoint_locations)
5388         (insert_breakpoint_locations, handle_jit_event)
5389         (disable_breakpoints_in_unloaded_shlib): Update.
5390         * annotate.c (annotate_breakpoints_invalid)
5391         (annotate_frames_invalid): Update.
5392
5393 2017-09-20  Tom Tromey  <tom@tromey.com>
5394
5395         * main.c (catch_command_errors): Rename from
5396         catch_command_errors_const.
5397         (captured_main_1): Update.
5398
5399 2017-09-20  Pedro Alves  <palves@redhat.com>
5400
5401         * cli/cli-cmds.c (list_command): Use print_sal_location.
5402         (print_sal_location): New function.
5403         (ambiguous_line_spec): Use print_sal_location.
5404         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5405         * symtab.c (find_function_start_sal): Likewise.
5406         * symtab.h (symtab_and_line::symbol): New field.
5407
5408 2017-09-20  Pedro Alves  <palves@redhat.com>
5409
5410         * linespec.c (minsym_found): Handle non-text minsyms.
5411         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5412
5413 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5414
5415         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5416         backslash.
5417
5418 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5419
5420         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5421         vmovups instead vmovaps.
5422         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5423
5424 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5425
5426         * NEWS (Changes since GDB 8.0): Add starti.
5427         * infcmd.c (enum run_break): New.
5428         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5429         case.
5430         (run_command): Use enum run_how.
5431         (start_command): Likewise.
5432         (starti_command): New function.
5433         (RUN_ARGS_HELP): New macro.
5434         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5435         commands.  Add starti command.
5436
5437 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5438
5439         * Makefile.in (monitor.o): Remove the rule.
5440
5441 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5442
5443         * annotate.h (struct annotate_arg_emitter): Use
5444         DISABLE_COPY_AND_ASSIGN.
5445         * common/refcounted-object.h (refcounted_object): Likewise.
5446         * completer.h (struct completion_result): Likewise.
5447         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5448         * filename-seen-cache.h (filename_seen_cache): Likewise.
5449         * gdbcore.h (thread_section_name): Likewise.
5450         * gdb_regex.h (compiled_regex): Likewise.
5451         * gdbthread.h (scoped_restore_current_thread): Likewise.
5452         * inferior.h (scoped_restore_current_inferior): Likewise.
5453         * jit.c (jit_reader): Likewise.
5454         * linespec.h (struct linespec_result): Likewise.
5455         * mi/mi-parse.h (struct mi_parse): Likewise.
5456         * nat/fork-inferior.c (execv_argv): Likewise.
5457         * progspace.h (scoped_restore_current_program_space): Likewise.
5458         * python/python-internal.h (class gdbpy_enter): Likewise.
5459         * regcache.h (regcache): Likewise.
5460         * target-descriptions.c (struct tdesc_reg): Likewise.
5461         (struct tdesc_type): Likewise.
5462         (struct tdesc_feature): Likewise.
5463         * ui-out.h (ui_out_emit_type): Likewise.
5464
5465 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5466
5467         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5468         label abort_expression.
5469
5470 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5471
5472         * common/buffer.c (buffer_xml_printf): Adjust.
5473         * common/xml-utils.c (xml_escape_text): Change return type to
5474         std::string, update code accordingly.
5475         * common/xml-utils.h (xml_escape_text): Change return type to
5476         std::string.
5477         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5478         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5479         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5480         Adjust.
5481
5482 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5483
5484         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5485         (SUBDIR_UNITTESTS_OBS): Add new object file.
5486         * unittests/xml-utils-selftests.c: New file.
5487
5488 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5489
5490         * common/selftest.h (selftest): New struct/interface.
5491         (register_test): Add name parameter, add new overload.
5492         (run_tests): Add filter parameter.
5493         (for_each_selftest_ftype): New typedef.
5494         (for_each_selftest): New declaration.
5495         * common/selftest.c (tests): Change type to
5496         map<string, unique_ptr<selftest>>.
5497         (simple_selftest): New struct.
5498         (register_test): New function.
5499         (register_test): Add name parameter and use it.
5500         (run_tests): Add filter parameter and use it.  Add prints.
5501         Adjust to vector -> map change.
5502         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5503         registering selftests.
5504         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5505         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5506         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5507         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5508         * findvar.c (_initialize_findvar): Likewise.
5509         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5510         * maint.c (maintenance_selftest): Update call to run_tests.
5511         (maintenance_info_selftests): New function.
5512         (_initialize_maint_cmds): Register "maintenance info selftests"
5513         command.  Update "maintenance selftest" doc.
5514         * regcache.c (_initialize_regcache): Add names when registering
5515         selftests.
5516         * rust-exp.y (_initialize_rust_exp): Likewise.
5517         * selftest-arch.c (gdbarch_selftest): New struct.
5518         (gdbarch_tests): Remove.
5519         (register_test_foreach_arch): Add name parameter.  Call
5520         register_test.
5521         (tests_with_arch): Remove, move most content to
5522         gdbarch_selftest::operator().
5523         (_initialize_selftests_foreach_arch): Remove.
5524         * selftest-arch.h (register_test_foreach_arch): Add name
5525         parameter.
5526         (run_tests_with_arch): New declaration.
5527         * utils-selftests.c (_initialize_utils_selftests): Add names
5528         when registering selftests.
5529         * utils.c (_initialize_utils): Likewise.
5530         * unittests/array-view-selftests.c
5531         (_initialize_array_view_selftests): Likewise.
5532         * unittests/environ-selftests.c (_initialize_environ_selftests):
5533         Likewise.
5534         * unittests/function-view-selftests.c
5535         (_initialize_function_view_selftests): Likewise.
5536         * unittests/offset-type-selftests.c
5537         (_initialize_offset_type_selftests): Likewise.
5538         * unittests/optional-selftests.c
5539         (_initialize_optional_selftests): Likewise.
5540         * unittests/scoped_restore-selftests.c
5541         (_initialize_scoped_restore_selftests): Likewise.
5542         * NEWS: Document "maintenance selftest" and "maint info
5543         selftests".
5544
5545 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5546
5547         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5548         scoped_restore.
5549
5550 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5551
5552         * mi/mi-main.c (mi_load_progress): Make uiout variable
5553         a unique_ptr.
5554
5555 2017-09-15  Pedro Alves  <palves@redhat.com>
5556
5557         * compile/compile-c-types.c (convert_enum, convert_int)
5558         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5559
5560 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5561
5562         * dwarf2read.c (copy_string): Remove.
5563         (parse_macro_definition): Replace copy_string with savestring.
5564
5565 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5566
5567         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5568         gdb_target_obs.
5569         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5570         Likewise.
5571         (i[34567]86-*-linux*): Likewise.
5572
5573 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5574
5575         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5576         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5577         <stack>: Change type to std::vector.
5578         <stack_len, stack_allocated>: Remove.
5579         <grow_stack>: Remove.
5580         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5581         (dwarf_expr_context::~dwarf_expr_context): Remove.
5582         (dwarf_expr_context::grow_stack): Remove.
5583         (dwarf_expr_context::push): Adjust.
5584         (dwarf_expr_context::pop): Adjust.
5585         (dwarf_expr_context::fetch): Adjust.
5586         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5587         (dwarf_expr_context::stack_empty_p): Adjust.
5588         (dwarf_expr_context::execute_stack_op): Adjust.
5589
5590 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5591
5592         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5593         return type to bool.
5594         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5595
5596 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5597
5598         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5599         Change type to bool.
5600         (dwarf_stack_value) <in_stack_memory>: Likewise.
5601         (dwarf_expr_context) <push_address>: Change parameter type to
5602         bool.
5603         <fetch_in_stack_memory>: Change return type to bool.
5604         <push>: Change parameter type to bool.
5605         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5606         to bool.
5607         (dwarf_expr_context::push_address): Likewise.
5608         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5609         to bool.
5610         (dwarf_expr_context::execute_stack_op): Adjust.
5611         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5612
5613 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5614
5615         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5616         (struct dwarf_expr_context) <n_pieces>: Remove.
5617         <pieces>: Change type to std::vector.
5618         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5619         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5620         pieces.
5621         (dwarf_expr_context::add_piece): Adjust.
5622         * dwarf2loc.c (struct piece_closure): Initialize fields.
5623         <n_pieces>: Remove.
5624         <pieces>: Change type to std::vector.
5625         (allocate_piece_closure): Adjust, change parameter to
5626         std::vector rvalue and std::move it to piece_closure.
5627         (rw_pieced_value): Adjust.
5628         (check_pieced_synthetic_pointer): Adjust.
5629         (indirect_synthetic_pointer): Adjust.
5630         (coerce_pieced_ref): Adjust.
5631         (free_pieced_value_closure):  Adjust.  Use delete to free
5632         piece_closure.
5633         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5634         to allocate_piece_closure.
5635         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5636
5637 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5638
5639         * probe.h (probe_ops_cp): Remove typedef.
5640         (DEF_VEC_P (probe_ops_cp)): Remove.
5641         (all_probe_ops): Change type to std::vector.
5642         * probe.c (info_probes_for_ops): Adjust to vector change.
5643         (probe_linespec_to_ops): Likewise.
5644         (all_probe_ops): Change type to std::vector.
5645         (_initialize_probe): Adjust to vector change.
5646         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5647         * elfread.c (elf_get_probes): Likewise.
5648         * stap-probe.c (_initialize_stap_probe): Likewise.
5649
5650 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5651
5652         * probe.h (struct bound_probe): Define constructors.
5653         * probe.c (bound_probe_s): Remove typedef.
5654         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5655         (collect_probes): Change return type to std::vector, remove
5656         cleanup.
5657         (compare_probes): Return bool, change parameter type.  Change
5658         semantic to "less than".
5659         (gen_ui_out_table_header_info): Change parameter to std::vector
5660         and update.
5661         (exists_probe_with_pops): Likewise.
5662         (info_probes_for_ops): Update to std::vector change.
5663         (enable_probes_command): Likewise.
5664         (disable_probes_command): Likewise.
5665
5666 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5667
5668         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5669         vec to std::vector.
5670         * probe.c (parse_probes_in_pspace): Update.
5671         (find_probes_in_objfile): Update.
5672         (find_probe_by_pc): Update.
5673         (collect_probes): Update.
5674         (probe_any_get_probes): Update.
5675         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5676         return type to reference to std::vector.
5677         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5678         std::vector and update.
5679         (dtrace_process_dof): Likewise.
5680         (dtrace_get_probes): Likewise.
5681         * elfread.c (elf_get_probes): Change return type to std::vector,
5682         store an std::vector in bfd_data.
5683         (probe_key_free): Update to std::vector.
5684         * stap-probe.c (handle_stap_probe): Change parameter to
5685         std::vector and update.
5686         (stap_get_probes): Likewise.
5687         * symfile-debug.c (debug_sym_get_probes): Change return type to
5688         std::vector and update.
5689
5690 2017-09-11  Tom Tromey  <tom@tromey.com>
5691
5692         * breakpoint.c (program_breakpoint_here_p): Update.
5693         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5694         from make_show_memory_breakpoints_cleanup.  Return a
5695         scoped_restore_tmpl<int>.
5696         (restore_show_memory_breakpoints): Remove.
5697         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5698         * mem-break.c (memory_validate_breakpoint): Update.
5699         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5700         (ia64_memory_remove_breakpoint): Update.
5701         (ia64_breakpoint_from_pc): Update.
5702         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5703         from make_show_memory_breakpoints_cleanup.
5704
5705 2017-09-11  Tom Tromey  <tom@tromey.com>
5706
5707         * d-namespace.c (d_lookup_symbol): Use std::string.
5708         (find_symbol_in_baseclass): Likewise.
5709
5710 2017-09-11  Tom Tromey  <tom@tromey.com>
5711
5712         * ctf.c (ctf_start): Use std::string.
5713
5714 2017-09-11  Tom Tromey  <tom@tromey.com>
5715
5716         * ada-lang.c (is_known_support_routine): Update.
5717         (ada_unhandled_exception_name_addr_from_raise): Update.
5718         * guile/scm-frame.c (gdbscm_frame_name): Update.
5719         * python/py-frame.c (frapy_name): Update.
5720         (frapy_function): Update.
5721         * stack.h (find_frame_funname): Update.
5722         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5723         (print_frame): Update.
5724
5725 2017-09-11  Tom Tromey  <tom@tromey.com>
5726
5727         * findcmd.c (put_bits): Take a gdb::byte_vector.
5728         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5729         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5730         cleanups.
5731         (find_command): Update.
5732
5733 2017-09-11  Tom Tromey  <tom@tromey.com>
5734
5735         * cli/cli-script.c (class scoped_restore_hook_in): New.
5736         (clear_hook_in_cleanup): Remove.
5737         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5738         scoped_restore_hook_in.
5739
5740 2017-09-11  Tom Tromey  <tom@tromey.com>
5741
5742         * cli/cli-script.c (restore_interp): Remove.
5743         (read_command_lines): Use scoped_restore_interp.
5744         * interps.c (scoped_restore_interp::set_temp): Rename from
5745         interp_set_temp.
5746         * interps.h (class scoped_restore_interp): New.
5747         (interp_set_temp): Remove.
5748
5749 2017-09-11  Tom Tromey  <tom@tromey.com>
5750
5751         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5752         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5753         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5754         scoped_restore.
5755         (mi_cmd_break_insert_1): Update.
5756         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5757         scoped_restore.
5758
5759 2017-09-11  Tom Tromey  <tom@tromey.com>
5760
5761         * demangle.c (demangle_command): Update.
5762         * breakpoint.c (disable_command): Update.
5763         (enable_command): Update.
5764         (find_location_by_number): Make "number" const.  Use
5765         get_number_trailer.
5766         * cli/cli-utils.c (extract_arg): Return std::string.
5767         * probe.c (parse_probe_linespec): Update.  Change types.
5768         (collect_probes): Take string arguments.
5769         (parse_probe_linespec): Likewise.
5770         (info_probes_for_ops): Update.
5771         (enable_probes_command): Update.
5772         (disable_probes_command): Update.
5773         * break-catch-sig.c (catch_signal_split_args): Update.
5774         * mi/mi-parse.c (mi_parse): Update.
5775
5776 2017-09-11  Tom Tromey  <tom@tromey.com>
5777
5778         * language.h (language_enum): Make argument const.
5779         * language.c (language_enum): Make argument const.
5780
5781 2017-09-11  Tom Tromey  <tom@tromey.com>
5782
5783         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5784         as function.
5785         (skip_to_space): Rename from skip_to_space_const.
5786         * common/common-utils.c (skip_to_space): New function.
5787         (skip_to_space): Rename from skip_to_space_const.
5788         * cli/cli-utils.h (get_number): Rename from get_number_const.
5789         (extract_arg): Rename from extract_arg_const.
5790         * cli/cli-utils.c (get_number): Rename from get_number_const.
5791         (extract_arg): Rename from extract_arg_const.
5792         (number_or_range_parser::get_number): Use ::get_number.
5793         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5794         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5795         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5796         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5797         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5798         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5799         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5800         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5801
5802 2017-09-11  Tom Tromey  <tom@tromey.com>
5803
5804         * python/python.c (do_start_initialization): Use
5805         py-event-types.def to initialize types.
5806         Define all object type structures.
5807         * python/python-internal.h: Don't declare event initialization
5808         functions.
5809         * python/py-threadevent.c (thread_event_object_type): Don't
5810         define.
5811         * python/py-stopevent.c (stop_event_object_type): Don't define.
5812         * python/py-signalevent.c (signal_event_object_type): Don't
5813         declare or define.
5814         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5815         (clear_objfiles_event_object_type): Don't declare or define.
5816         * python/py-infevents.c (inferior_call_pre_event_object_type)
5817         (inferior_call_post_event_object_type)
5818         (register_changed_event_object_type)
5819         (memory_changed_event_object_type): Don't declare or define.
5820         * python/py-inferior.c (new_thread_event_object_type)
5821         (new_inferior_event_object_type)
5822         (inferior_deleted_event_object_type): Don't declare or define.
5823         * python/py-exitedevent.c (exited_event_object_type): Don't
5824         declare or define.
5825         * python/py-evts.c (gdbpy_initialize_py_events): Use
5826         py-all-events.def.
5827         * python/py-events.h (thread_event_object_type): Don't declare.
5828         (events_object): Use py-all-events.def.
5829         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5830         py-event-types.def.
5831         * python/py-event-types.def: New file.
5832         * python/py-continueevent.c (create_continue_event_object): Don't
5833         declare or define.
5834         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5835         declare or define.
5836         * python/py-all-events.def: New file.
5837
5838 2017-09-11  Tom Tromey  <tom@tromey.com>
5839
5840         * python/py-threadevent.c (create_thread_event_object): Return
5841         gdbpy_ref.
5842         * python/py-stopevent.h (create_stop_event_object)
5843         (create_breakpoint_event_object, create_signal_event_object):
5844         Update.
5845         * python/py-stopevent.c (create_stop_event_object): Return
5846         gdbpy_ref.
5847         (emit_stop_event): Update.
5848         * python/py-signalevent.c (create_signal_event_object): Return
5849         gdbpy_ref.
5850         * python/py-infevents.c (create_inferior_call_event_object):
5851         Update.
5852         * python/py-event.h (create_event_object)
5853         (create_thread_event_object): Update.
5854         * python/py-event.c (create_event_object): Return gdbpy_ref.
5855         * python/py-continueevent.c: Return gdbpy_ref.
5856         * python/py-bpevent.c (create_breakpoint_event_object): Return
5857         gdbpy_ref.
5858
5859 2017-09-11  Tom Tromey  <tom@tromey.com>
5860
5861         PR python/15622:
5862         * NEWS: Add entry.
5863         * python/python.c (do_start_initialization): Initialize new event
5864         types.
5865         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5866         (gdbpy_initialize_inferior_deleted_event)
5867         (gdbpy_initialize_new_thread_event): Declare.
5868         * python/py-threadevent.c (create_thread_event_object): Add option
5869         "thread" parameter.
5870         * python/py-inferior.c (new_thread_event_object_type)
5871         (new_inferior_event_object_type)
5872         (inferior_deleted_event_object_type): Declare.
5873         (python_new_inferior, python_inferior_deleted): New functions.
5874         (add_thread_object): Emit new_thread event.
5875         (gdbpy_initialize_inferior): Attach new functions to corresponding
5876         observers.
5877         (new_thread, new_inferior, inferior_deleted): Define new event
5878         types.
5879         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5880         registries.
5881         * python/py-events.h (events_object) <new_inferior,
5882         inferior_deleted, new_thread>: New fields.
5883         * python/py-event.h (create_thread_event_breakpoint): Add optional
5884         "thread" parameter.
5885
5886 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5887
5888         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5889         check current_ui instead.
5890         (internal_vproblem): Likewise.
5891
5892 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5893
5894         * thread.c (print_thread_info_1): Remove unnecessary calls to
5895         uiout->is_mi_like_p.
5896
5897 2017-09-09  Tom Tromey  <tom@tromey.com>
5898
5899         * namespace.h (add_using_directive): Update.
5900         * namespace.c (add_using_directive): Change type of excludes to
5901         std::vector.
5902         * dwarf2read.c (read_import_statement): Use std::vector.
5903         (read_namespace): Update.
5904         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5905
5906 2017-09-09  Tom Tromey  <tom@tromey.com>
5907
5908         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5909
5910 2017-09-09  Tom Tromey  <tom@tromey.com>
5911
5912         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5913
5914 2017-09-09  Tom Tromey  <tom@tromey.com>
5915
5916         * stack.c (func_command): Use gdb::def_vector.
5917
5918 2017-09-09  Tom Tromey  <tom@tromey.com>
5919
5920         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5921         ui_out_emit_list, ui_out_emit_tuple.
5922         (mi_cmd_var_update): Likewise.
5923
5924 2017-09-09  Tom Tromey  <tom@tromey.com>
5925
5926         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5927         ui_out_redirect_pop.
5928         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5929         ui_out_redirect_pop.
5930         * utils.c (do_ui_out_redirect_pop)
5931         (make_cleanup_ui_out_redirect_pop): Remove.
5932         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5933         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5934         * ui-out.h (ui_out_redirect_pop): New class.
5935
5936 2017-09-09  Tom Tromey  <tom@tromey.com>
5937
5938         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5939         (list_available_thread_groups, mi_cmd_list_thread_groups)
5940         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5941         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5942         Likewise.
5943
5944 2017-09-09  Tom Tromey  <tom@tromey.com>
5945
5946         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5947         ui_out_emit_tuple.
5948
5949 2017-09-09  Tom Tromey  <tom@tromey.com>
5950
5951         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5952         * stack.c (print_frame): Use ui_out_emit_tuple.
5953         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5954         (info_spu_mailbox_command, info_spu_dma_command)
5955         (info_spu_proxydma_command): Likewise.
5956         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5957         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5958         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5959         ui_out_emit_tuple.
5960         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5961
5962 2017-09-09  Tom Tromey  <tom@tromey.com>
5963
5964         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5965         (class ui_out_emit_table): Update comment.
5966         * ui-out.c (do_cleanup_table_end)
5967         (make_cleanup_ui_out_table_begin_end): Remove.
5968         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5969         (info_spu_dma_cmdlist): Likewise.
5970         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5971         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5972         ui_out_emit_table.
5973
5974 2017-09-09  Tom Tromey  <tom@tromey.com>
5975
5976         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5977         ui_out_emit_list, gdb::optional.
5978
5979 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5980
5981         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5982         prototype.
5983         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5984         prototype.
5985         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5986         prototype.
5987         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5988         * ada-exp.y: Remove _initialize_ada_exp prototype.
5989         * ada-lang.c: Remove _initialize_ada_language prototype.
5990         * ada-tasks.c: Remove _initialize_tasks prototype.
5991         * addrmap.c: Remove _initialize_addrmap prototype.
5992         * agent.c: Remove _initialize_agent prototype.
5993         * aix-thread.c: Remove _initialize_aix_thread prototype.
5994         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5995         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5996         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5997         prototype.
5998         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5999         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6000         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6001         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6002         prototype.
6003         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6004         prototype.
6005         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6006         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6007         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6008         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6009         prototype.
6010         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6011         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6012         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6013         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6014         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6015         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6016         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6017         prototype.
6018         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6019         prototype.
6020         * annotate.c: Remove _initialize_annotate prototype.
6021         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6022         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6023         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6024         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6025         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6026         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6027         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6028         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6029         prototype.
6030         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6031         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6032         * auto-load.c: Remove _initialize_auto_load prototype.
6033         * auxv.c: Remove _initialize_auxv prototype.
6034         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6035         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6036         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6037         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6038         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6039         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6040         prototype.
6041         * break-catch-throw.c: Remove _initialize_break_catch_throw
6042         prototype.
6043         * breakpoint.c: Remove _initialize_breakpoint prototype.
6044         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6045         * btrace.c: Remove _initialize_btrace prototype.
6046         * charset.c: Remove _initialize_charset prototype.
6047         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6048         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6049         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6050         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6051         * cli/cli-script.c: Remove _initialize_cli_script prototype.
6052         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6053         * coffread.c: Remove _initialize_coffread prototype.
6054         * compile/compile.c: Remove _initialize_compile prototype.
6055         * complaints.c: Remove _initialize_complaints prototype.
6056         * completer.c: Remove _initialize_completer prototype.
6057         * copying.awk: Remove _initialize_copying prototype.
6058         * copying.c: Regenerate.
6059         * core-regset.c: Remove _initialize_core_regset prototype.
6060         * corefile.c: Remove _initialize_core prototype.
6061         * corelow.c: Remove _initialize_corelow prototype.
6062         * cp-abi.c: Remove _initialize_cp_abi prototype.
6063         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6064         * cp-support.c: Remove _initialize_cp_support prototype.
6065         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6066         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6067         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6068         * ctf.c: Remove _initialize_ctf prototype.
6069         * d-lang.c: Remove _initialize_d_language prototype.
6070         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6071         prototype.
6072         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6073         * dbxread.c: Remove _initialize_dbxread prototype.
6074         * dcache.c: Remove _initialize_dcache prototype.
6075         * demangle.c: Remove _initialize_demangler prototype.
6076         * disasm-selftests.c: Remove _initialize_disasm_selftests
6077         prototype.
6078         * disasm.c: Remove _initialize_disasm prototype.
6079         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6080         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6081         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6082         prototype.
6083         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6084         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6085         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6086         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6087         * elfread.c: Remove _initialize_elfread prototype.
6088         * exec.c: Remove _initialize_exec prototype.
6089         * extension.c: Remove _initialize_extension prototype.
6090         * f-lang.c: Remove _initialize_f_language prototype.
6091         * f-valprint.c: Remove _initialize_f_valprint prototype.
6092         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6093         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6094         * filesystem.c: Remove _initialize_filesystem prototype.
6095         * findcmd.c: Remove _initialize_mem_search prototype.
6096         * fork-child.c: Remove _initialize_fork_child prototype.
6097         * frame-base.c: Remove _initialize_frame_base prototype.
6098         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6099         * frame.c: Remove _initialize_frame prototype.
6100         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6101         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6102         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6103         * gcore.c: Remove _initialize_gcore prototype.
6104         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6105         * gdbarch.c: Regenerate.
6106         * gdbarch.sh: Remove _initialize_gdbarch prototype.
6107         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6108         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6109         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6110         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6111         * go-lang.c: Remove _initialize_go_language prototype.
6112         * go32-nat.c: Remove _initialize_go32_nat prototype.
6113         * guile/guile.c: Remove _initialize_guile prototype.
6114         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6115         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6116         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6117         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6118         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6119         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6120         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6121         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6122         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6123         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6124         prototype.
6125         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6126         prototype.
6127         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6128         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6129         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6130         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6131         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6132         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6133         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6134         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6135         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6136         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6137         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6138         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6139         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6140         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6141         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6142         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6143         prototype.
6144         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6145         prototype.
6146         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6147         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6148         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6149         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6150         * infcall.c: Remove _initialize_infcall prototype.
6151         * infcmd.c: Remove _initialize_infcmd prototype.
6152         * inferior.c: Remove _initialize_inferiors prototype.
6153         * inflow.c: Remove _initialize_inflow prototype.
6154         * infrun.c: Remove _initialize_infrun prototype.
6155         * interps.c: Remove _initialize_interpreter prototype.
6156         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6157         * jit.c: Remove _initialize_jit prototype.
6158         * language.c: Remove _initialize_language prototype.
6159         * linux-fork.c: Remove _initialize_linux_fork prototype.
6160         * linux-nat.c: Remove _initialize_linux_nat prototype.
6161         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6162         * linux-thread-db.c: Remove _initialize_thread_db prototype.
6163         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6164         * m2-lang.c: Remove _initialize_m2_language prototype.
6165         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6166         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6167         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6168         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6169         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6170         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6171         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6172         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6173         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6174         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6175         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6176         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6177         * machoread.c: Remove _initialize_machoread prototype.
6178         * macrocmd.c: Remove _initialize_macrocmd prototype.
6179         * macroscope.c: Remove _initialize_macroscope prototype.
6180         * maint.c: Remove _initialize_maint_cmds prototype.
6181         * mdebugread.c: Remove _initialize_mdebugread prototype.
6182         * memattr.c: Remove _initialize_mem prototype.
6183         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6184         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6185         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6186         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6187         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6188         * microblaze-linux-tdep.c: Remove
6189         _initialize_microblaze_linux_tdep prototype.
6190         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6191         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6192         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6193         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6194         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6195         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6196         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6197         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6198         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6199         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6200         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6201         prototype.
6202         * mipsread.c: Remove _initialize_mipsread prototype.
6203         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6204         prototype.
6205         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6206         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6207         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6208         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6209         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6210         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6211         prototype.
6212         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6213         * nto-procfs.c: Remove _initialize_procfs prototype.
6214         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6215         * objc-lang.c: Remove _initialize_objc_language prototype.
6216         * objfiles.c: Remove _initialize_objfiles prototype.
6217         * observer.c: Remove observer_test_first_notification_function,
6218         observer_test_second_notification_function,
6219         observer_test_third_notification_function, and
6220         _initialize_observer prototypes.
6221         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6222         * osabi.c: Remove _initialize_gdb_osabi prototype.
6223         * osdata.c: Remove _initialize_osdata prototype.
6224         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6225         * parse.c: Remove _initialize_parse prototype.
6226         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6227         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6228         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6229         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6230         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6231         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6232         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6233         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6234         * printcmd.c: Remove _initialize_printcmd prototype.
6235         * probe.c: Remove _initialize_probe prototype.
6236         * proc-api.c: Remove _initialize_proc_api prototype.
6237         * proc-events.c: Remove _initialize_proc_events prototype.
6238         * proc-service.c: Remove _initialize_proc_service prototype.
6239         * procfs.c: Remove _initialize_procfs prototype.
6240         * psymtab.c: Remove _initialize_psymtab prototype.
6241         * python/python.c: Remove _initialize_python prototype.
6242         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6243         * record-btrace.c: Remove _initialize_record_btrace prototype.
6244         * record-full.c: Remove _initialize_record_full prototype.
6245         * record.c: Remove _initialize_record prototype.
6246         * regcache.c: Remove _initialize_regcache prototype.
6247         * reggroups.c: Remove _initialize_reggroup prototype.
6248         * remote-notif.c: Remove _initialize_notif prototype.
6249         * remote-sim.c: Remove _initialize_remote_sim prototype.
6250         * remote.c: Remove _initialize_remote prototype.
6251         * reverse.c: Remove _initialize_reverse prototype.
6252         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6253         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6254         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6255         prototype.
6256         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6257         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6258         * rust-exp.y: Remove _initialize_rust_exp prototype.
6259         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6260         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6261         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6262         * score-tdep.c: Remove _initialize_score_tdep prototype.
6263         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6264         prototype.
6265         * ser-go32.c: Remove _initialize_ser_dos prototype.
6266         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6267         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6268         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6269         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6270         * serial.c: Remove _initialize_serial prototype.
6271         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6272         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6273         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6274         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6275         * skip.c: Remove _initialize_step_skip prototype.
6276         * sol-thread.c: Remove _initialize_sol_thread prototype.
6277         * solib-aix.c: Remove _initialize_solib_aix prototype.
6278         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6279         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6280         * solib-frv.c: Remove _initialize_frv_solib prototype.
6281         * solib-spu.c: Remove _initialize_spu_solib prototype.
6282         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6283         * solib-target.c: Remove _initialize_solib_target prototype.
6284         * solib.c: Remove _initialize_solib prototype.
6285         * source.c: Remove _initialize_source prototype.
6286         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6287         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6288         prototype.
6289         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6290         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6291         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6292         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6293         prototype.
6294         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6295         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6296         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6297         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6298         prototype.
6299         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6300         prototype.
6301         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6302         prototype.
6303         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6304         prototype.
6305         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6306         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6307         prototype.
6308         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6309         prototype.
6310         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6311         prototype.
6312         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6313         prototype.
6314         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6315         prototype.
6316         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6317         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6318         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6319         * stabsread.c: Remove _initialize_stabsread prototype.
6320         * stack.c: Remove _initialize_stack prototype.
6321         * stap-probe.c: Remove _initialize_stap_probe prototype.
6322         * std-regs.c: Remove _initialize_frame_reg prototype.
6323         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6324         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6325         * symfile.c: Remove _initialize_symfile prototype.
6326         * symmisc.c: Remove _initialize_symmisc prototype.
6327         * symtab.c: Remove _initialize_symtab prototype.
6328         * target-dcache.c: Remove _initialize_target_dcache prototype.
6329         * target-descriptions.c: Remove _initialize_target_descriptions
6330         prototype.
6331         * thread.c: Remove _initialize_thread prototype.
6332         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6333         prototype.
6334         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6335         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6336         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6337         prototype.
6338         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6339         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6340         * tracefile.c: Remove _initialize_tracefile prototype.
6341         * tracepoint.c: Remove _initialize_tracepoint prototype.
6342         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6343         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6344         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6345         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6346         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6347         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6348         * tui/tui.c: Remove _initialize_tui prototype.
6349         * typeprint.c: Remove _initialize_typeprint prototype.
6350         * user-regs.c: Remove _initialize_user_regs prototype.
6351         * utils.c: Remove _initialize_utils prototype.
6352         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6353         * valarith.c: Remove _initialize_valarith prototype.
6354         * valops.c: Remove _initialize_valops prototype.
6355         * valprint.c: Remove _initialize_valprint prototype.
6356         * value.c: Remove _initialize_values prototype.
6357         * varobj.c: Remove _initialize_varobj prototype.
6358         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6359         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6360         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6361         * windows-nat.c: Remove _initialize_windows_nat,
6362         _initialize_check_for_gdb_ini, and _initialize_loadable
6363         prototypes.
6364         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6365         * xcoffread.c: Remove _initialize_xcoffread prototype.
6366         * xml-support.c: Remove _initialize_xml_support prototype.
6367         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6368         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6369         prototype.
6370         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6371         prototype.
6372         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6373
6374 2017-09-08  Keith Seitz  <keiths@redhat.com>
6375
6376         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6377         field.
6378
6379 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6380
6381         * f-valprint.c (f_val_print): Remove check for one byte
6382         sized integers. Remove printing of character type.
6383
6384 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6385             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6386             Bernhard Heckel  <bernhard.heckel@intel.com>
6387
6388         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6389         to maintain proper indentation when printing pointers/refs.
6390
6391 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6392
6393         GDB 8.0.1 released.
6394
6395 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6396
6397         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6398
6399 2017-09-05  Tom Tromey  <tom@tromey.com>
6400
6401         * parse.c (funcall_chain): Now a std::vector.
6402         (start_arglist, end_arglist): Simplify.
6403         (free_funcalls): Remove.
6404         (parse_exp_in_context_1): Remove cleanup.
6405
6406 2017-09-05  Tom Tromey  <tom@tromey.com>
6407
6408         * go-exp.y (go_parse): Don't create a cleanup.
6409
6410 2017-09-05  Tom Tromey  <tom@tromey.com>
6411
6412         * d-exp.y (PrimaryExpression): Use std::string.
6413         (d_parse): Don't create a cleanup.
6414
6415 2017-09-05  Tom Tromey  <tom@tromey.com>
6416
6417         * utils.c (do_clear_parser_state): Remove.
6418         (make_cleanup_clear_parser_state): Remove.
6419         * p-exp.y (pascal_parse): Use scoped_restore.
6420         * m2-exp.y (m2_parse): Use scoped_restore.
6421         * f-exp.y (f_parse): Use scoped_restore.
6422         * d-exp.y (d_parse): Use scoped_restore.
6423         * c-exp.y (c_parse): Use scoped_restore.
6424         * ada-exp.y (ada_parse): Use scoped_restore.
6425         * utils.h (make_cleanup_clear_parser_state): Remove.
6426
6427 2017-09-06  Keith Seitz  <keiths@redhat.com>
6428
6429         * dwarf2read.c (dw2_linkage_name_attr): New function.
6430         (dw2_linkage_name): New function.
6431         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6432         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6433         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6434
6435 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6436
6437         * config/djgpp/djconfig.sh: Correct shell portability issue.
6438
6439 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6440
6441         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6442
6443 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6444
6445         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6446         * NEWS: Mention new FreeBSD/mips native configuration.
6447         * configure.host: Add aarch64*-*-freebsd*.
6448         * configure.nat: Likewise.
6449         * aarch64-fbsd-nat.c: New file.
6450
6451 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6452
6453         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6454         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6455         * NEWS: Mention new FreeBSD/aarch64 target.
6456         * configure.tgt: Add aarch64*-*-freebsd*.
6457         * aarch64-fbsd-tdep.c: New file.
6458         * aarch64-fbsd-tdep.h: New file.
6459
6460 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6461
6462         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6463
6464 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6465
6466         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6467         of TLS symbols.
6468
6469 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6470
6471         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6472         call.
6473
6474 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6475
6476         * infrun.c (follow_exec): Call add_thread after
6477         target_find_description.
6478
6479 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6480
6481         * infrun.c (handle_inferior_event_1): When exec'ing, read
6482         stop_pc after follow_exec.
6483
6484 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6485
6486         * remote.c (process_g_packet): Update error message.
6487
6488 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6489
6490         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6491         targets.
6492
6493 2017-09-05  Pedro Alves  <palves@redhat.com>
6494
6495         * eval.c (eval_call, evaluate_funcall): New functions, factored
6496         out from ...
6497         (evaluate_subexp_standard): ... this.
6498
6499 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6500
6501         * amd64-tdep.c (amd64_target_description): Create target
6502         descriptions.
6503         (_initialize_amd64_tdep): Don't call functions
6504         initialize_tdesc_amd64_*.  Add self tests.
6505         * arch/amd64.c (amd64_create_target_description): Add parameter
6506         is_linux.  Call set_tdesc_osabi if is_linux is true.
6507         * arch/amd64.h (amd64_create_target_description): Update the
6508         declaration.
6509         * arch/i386.c (i386_create_target_description): Add parameter
6510         is_linux.  Call set_tdesc_osabi if is_linux is true.
6511         * arch/i386.h (i386_create_target_description): Update
6512         declaration.
6513         * configure.tgt: Add i386.o to gdb_target_obs.
6514         * features/Makefile (XMLTOC): Remove i386/*.xml.
6515         * features/i386/amd64-avx-avx512.c: Remove.
6516         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6517         * features/i386/amd64-avx-mpx.c: Remove.
6518         * features/i386/amd64-avx.c: Remove.
6519         * features/i386/amd64-mpx.c: Remove.
6520         * features/i386/amd64.c: Remove.
6521         * features/i386/i386-avx-avx512.c: Remove.
6522         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6523         * features/i386/i386-avx-mpx.c: Remove.
6524         * features/i386/i386-avx.c: Remove.
6525         * features/i386/i386-mmx.c: Remove.
6526         * features/i386/i386-mpx.c: Remove.
6527         * features/i386/i386.c: Remove.
6528         * i386-tdep.c: Don't include features/i386/i386*.c., include
6529         target-descriptions.h and arch/i386.h.
6530         (i386_target_description): Create target descriptions.
6531         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6532         functions.  Do self tests.
6533
6534 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6535
6536         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6537         * features/i386/amd64-avx-avx512-linux.c: Removed.
6538         * features/i386/amd64-avx-linux.c: Removed.
6539         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6540         * features/i386/amd64-avx-mpx-linux.c: Removed.
6541         * features/i386/amd64-linux.c: Removed.
6542         * features/i386/amd64-mpx-linux.c: Removed.
6543         * features/i386/x32-avx-avx512-linux.c: Removed.
6544         * features/i386/x32-avx-linux.c: Removed.
6545         * features/i386/x32-linux.c: Removed.
6546
6547 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6548
6549         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6550         features/i386/*.c.
6551         (amd64_linux_read_description): Call
6552         amd64_create_target_description.
6553         * arch/amd64.c: New file.
6554         * arch/amd64.h: New file.
6555         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6556         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6557
6558 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6559
6560         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6561         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6562         (amd64_linux_read_description): Create target descriptions.
6563         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6564         functions.  Add unit tests.
6565         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6566         x32-core.xml.
6567         * features/i386/64bit-avx.c: Generated.
6568         * features/i386/64bit-avx512.c: Generated.
6569         * features/i386/64bit-core.c: Generated.
6570         * features/i386/64bit-linux.c: Generated.
6571         * features/i386/64bit-mpx.c: Generated.
6572         * features/i386/64bit-pkeys.c: Generated.
6573         * features/i386/64bit-segments.c: Generated.
6574         * features/i386/64bit-sse.c: Generated.
6575         * features/i386/x32-core.c: Generated.
6576         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6577         c files for amd64-linux and x32-linux.
6578
6579 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6580
6581         * amd64-linux-tdep.c (amd64_linux_read_description): New
6582         function.
6583         (amd64_linux_core_read_description): Call
6584         amd64_linux_read_description.
6585         (amd64_linux_init_abi): Likewise.
6586         (amd64_x32_linux_init_abi): Likewise.
6587         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6588         * x86-linux-nat.c (x86_linux_read_description): Call
6589         amd64_linux_read_description.
6590
6591 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6592
6593         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6594         comments.
6595
6596 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6597
6598         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6599         * features/i386/i386-avx-avx512-linux.c: Remove.
6600         * features/i386/i386-avx-linux.c: Remove.
6601         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6602         * features/i386/i386-avx-mpx-linux.c: Remove.
6603         * features/i386/i386-linux.c: Remove.
6604         * features/i386/i386-mmx-linux.c: Remove.
6605         * features/i386/i386-mpx-linux.c: Remove.
6606
6607 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6608
6609         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6610         (SFILES): Add arch/i386.c.
6611         (HFILES_NO_SRCDIR): Add arch/i386.h.
6612         * arch/i386.c: New file.
6613         * arch/i386.h: New file.
6614         * arch/tdesc.h (allocate_target_description): Declare.
6615         (set_tdesc_architecture): Declare.
6616         (set_tdesc_osabi): Declare.
6617         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6618         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6619         include arch/i386.h.
6620         (i386_linux_read_description): Remove code and call
6621         i386_create_target_description.
6622         (set_tdesc_architecture): New function.
6623         (set_tdesc_osabi): New function.
6624         * target-descriptions.h (allocate_target_description): Remove.
6625
6626 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6627
6628         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6629         * target-descriptions.c (tdesc_create_feature): Likewise, and
6630         adjust code.
6631         * features/i386/32bit-avx.c: Re-generated.
6632         * features/i386/32bit-avx512.c: Re-generated.
6633         * features/i386/32bit-core.c: Re-generated.
6634         * features/i386/32bit-linux.c: Re-generated.
6635         * features/i386/32bit-mpx.c: Re-generated.
6636         * features/i386/32bit-pkeys.c: Re-generated.
6637         * features/i386/32bit-sse.c: Re-generated.
6638
6639 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6640
6641         * regformats/regdef.h (struct reg): Override operator == and !=.
6642
6643 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6644
6645         * arch/tdesc.h: New file.
6646         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6647         * target-descriptions.c: Update comments.
6648         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6649         declarations.
6650         * features/i386/32bit-avx.c: Re-generated.
6651         * features/i386/32bit-avx512.c: Re-generated.
6652         * features/i386/32bit-core.c: Re-generated.
6653         * features/i386/32bit-linux.c: Re-generated.
6654         * features/i386/32bit-mpx.c: Re-generated.
6655         * features/i386/32bit-pkeys.c: Re-generated.
6656         * features/i386/32bit-sse.c: Re-generated.
6657
6658 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6659
6660         * regformats/regdat.sh: Update generated code.
6661
6662 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6663
6664         * regformats/regdat.sh: Adjust code order.
6665
6666 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6667
6668         * expprint.c (dump_subexp_body_standard): Use constant format
6669         string in fprintf_filtered call.
6670
6671 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6672
6673         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6674         NetBSD/i386.
6675         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6676
6677 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6678
6679         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6680
6681 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6682
6683         * bsd-kvm.o: Define _KMEMUSER.
6684         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6685         * configure: Regenerate.
6686
6687 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6688
6689         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6690         * i386-fbsd-nat.c: Likewise.
6691
6692 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6693
6694         * unittests/array-view-selftests.c: Add include of <array>.
6695
6696 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6697
6698         * spu-tdep.c (flush_ea_cache): Add missing argument to
6699         call_function_by_hand.
6700
6701 2017-09-04  Pedro Alves  <palves@redhat.com>
6702
6703         * NEWS (Safer support for debugging with no debug info): New.
6704
6705 2017-09-04  Pedro Alves  <palves@redhat.com>
6706
6707         * c-exp.y (function_method, function_method_void): Add current
6708         instance flags to TYPE_INSTANCE.
6709         * dwarf2read.c (check_modifier): New.
6710         (compute_delayed_physnames): Assert that only C++ adds delayed
6711         physnames.  Mark fn_fields as const/volatile depending on
6712         physname.
6713         * eval.c (make_params): New type_instance_flags parameter.  Use
6714         it as the new type's instance flags.
6715         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6716         flags element and pass it to make_params.
6717         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6718         instance flags element.
6719         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6720         * gdbtypes.h: Include "enum-flags.h".
6721         (type_instance_flags): New enum-flags type.
6722         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6723         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6724         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6725         (follow_type_instance_flags): New function.
6726         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6727         * parser-defs.h (follow_type_instance_flags): Declare.
6728         * valops.c (value_struct_elt_for_reference): const/volatile must
6729         match too.
6730
6731 2017-09-04  Pedro Alves  <palves@redhat.com>
6732
6733         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6734         function/method scopes; lookup the nested name as a function local
6735         static variable.
6736
6737 2017-09-04  Pedro Alves  <palves@redhat.com>
6738
6739         (%type <voidval>): Add function_method.
6740         * c-exp.y (exp): New production for calls with no arguments.
6741         (function_method, function_method_void_or_typelist): New
6742         productions.
6743         (exp): New production for "method()::static_var".
6744         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6745         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6746         Handle OP_FUNC_STATIC_VAR.
6747         * parse.c (operator_length_standard):
6748         Handle OP_FUNC_STATIC_VAR.
6749
6750 2017-09-04  Pedro Alves  <palves@redhat.com>
6751
6752         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6753         handling.
6754         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6755         Ditto.
6756         * parse.c (operator_length_standard, operator_check_standard):
6757         Ditto.
6758         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6759
6760 2017-09-04  Pedro Alves  <palves@redhat.com>
6761
6762         * ax-gdb.c: Include "typeprint.h".
6763         (gen_expr_for_cast): New function.
6764         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6765         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6766         type is unknown.
6767         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6768         nodebug_data_symbol.
6769         * eval.c: Include "typeprint.h".
6770         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6771         Error out if symbol has unknown type.
6772         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6773         evaluate_subexp_for_cast.
6774         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6775         OP_VAR_MSYM_VALUE.
6776         (evaluate_subexp_for_cast): New function.
6777         * gdbtypes.c (init_nodebug_var_type): New function.
6778         (objfile_type): Use it to initialize types of variables with no
6779         debug info.
6780         * typeprint.c (error_unknown_type): New.
6781         * typeprint.h (error_unknown_type): New declaration.
6782         * compile/compile-c-types.c (convert_type_basic): Handle
6783         TYPE_CODE_ERROR; warn and fallback to int for variables with
6784         unknown type.
6785
6786 2017-09-04  Pedro Alves  <palves@redhat.com>
6787
6788         * eval.c (evaluate_var_value): New function, factored out from ...
6789         (evaluate_subexp_standard): ... here.
6790
6791 2017-09-04  Pedro Alves  <palves@redhat.com>
6792
6793         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6794         Remove useless assignments to 'op'.
6795
6796 2017-09-04  Pedro Alves  <palves@redhat.com>
6797
6798         * eval.c (eval_skip_value): New function.
6799         (evaluate_subexp_standard): Use it.
6800
6801 2017-09-04  Pedro Alves  <palves@redhat.com>
6802
6803         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6804         function name from symbol/minsym and pass it to
6805         error_call_unknown_return_type.
6806
6807 2017-09-04  Pedro Alves  <palves@redhat.com>
6808
6809         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6810         * ax-gdb.c (gen_msym_var_ref): New function.
6811         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6812         * eval.c (evaluate_var_msym_value): New function.
6813         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6814         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6815         to call_function_by_hand.
6816         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6817         Handle OP_VAR_MSYM_VALUE.
6818         (union exp_element) <msymbol>: New field.
6819         * minsyms.h (struct type): Forward declare.
6820         (find_minsym_type_and_address): Declare.
6821         * parse.c (write_exp_elt_msym): New function.
6822         (write_exp_msymbol): Delete, refactored as ...
6823         (find_minsym_type_and_address): ... this new function.
6824         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6825         (operator_length_standard, operator_check_standard): Handle
6826         OP_VAR_MSYM_VALUE.
6827         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6828
6829 2017-09-04  Pedro Alves  <palves@redhat.com>
6830
6831         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6832         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6833         unknown.
6834         * ada-typeprint.c (print_func_type): Handle functions with unknown
6835         return type.
6836         * c-typeprint.c (c_type_print_base): Handle functions and methods
6837         with unknown return type.
6838         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6839         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6840         * compile/compile-c-types.c: Include "objfiles.h".
6841         (convert_func): For functions with unknown return type, warn and
6842         default to int.
6843         * compile/compile-object-run.c (compile_object_run): Adjust call
6844         to call_function_by_hand_dummy.
6845         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6846         call_function_by_hand.
6847         * eval.c (evaluate_subexp_standard): Adjust calls to
6848         call_function_by_hand.  Handle functions and methods with unknown
6849         return type.  Pass expect_type to call_function_by_hand.
6850         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6851         return type.
6852         * gcore.c (call_target_sbrk): Adjust call to
6853         call_function_by_hand.
6854         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6855         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6856         an integer address type instead of nodebug.
6857         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6858         call_function_by_hand.
6859         * infcall.c (error_call_unknown_return_type): New function.
6860         (call_function_by_hand): New "default_return_type" parameter.
6861         Pass it down.
6862         (call_function_by_hand_dummy): New "default_return_type"
6863         parameter.  Use it instead of defaulting to int.  If there's no
6864         default and the return type is unknown, throw an error.  If
6865         there's a default return type, and the called function has no
6866         debug info, then assume the function is prototyped.
6867         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6868         New "default_return_type" parameter.
6869         (error_call_unknown_return_type): New declaration.
6870         * linux-fork.c (call_lseek): Cast return type of lseek.
6871         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6872         call_function_by_hand.
6873         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6874         calls to call_function_by_hand.
6875         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6876         return type.
6877         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6878         (value_nsstring, print_object_command): Adjust calls to
6879         call_function_by_hand.
6880         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6881         functions with unknown return type.
6882         (pascal_type_print_func_varspec_suffix): New function.
6883         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6884         TYPE_CODE_METHOD>: Use it.
6885         * python/py-value.c (valpy_call): Adjust call to
6886         call_function_by_hand.
6887         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6888         call_function_by_hand.
6889         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6890         call_function_by_hand.
6891         * valops.c (value_allocate_space_in_inferior): Adjust call to
6892         call_function_by_hand.
6893         * typeprint.c (type_print_unknown_return_type): New function.
6894         * typeprint.h (type_print_unknown_return_type): New declaration.
6895
6896 2017-09-04  Pedro Alves  <palves@redhat.com>
6897
6898         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6899         types with more than one parameter as prototyped.
6900
6901 2017-09-04  Pedro Alves  <palves@redhat.com>
6902
6903         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6904         (disassemble_command): Use gdb_disassembly_flags instead of bare
6905         int.
6906         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6907         (dump_insns, do_mixed_source_and_assembly_deprecated)
6908         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6909         Use gdb_disassembly_flags instead of bare int.
6910         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6911         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6912         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6913         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6914         (enum gdb_disassembly_flag): ... values of this new enumeration.
6915         (gdb_disassembly_flags): Define.
6916         (gdb_disassembly)
6917         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6918         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6919         gdb_disassembly_flags instead of bare int.
6920         * record-btrace.c (btrace_insn_history)
6921         (record_btrace_insn_history, record_btrace_insn_history_range)
6922         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6923         instead of bare int.
6924         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6925         Use gdb_disassembly_flags instead of bare int.
6926         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6927         Define.
6928         * target-delegates.c: Regenerate.
6929         * target.c (target_insn_history, target_insn_history_from)
6930         (target_insn_history_range): Use gdb_disassembly_flags instead of
6931         bare int.
6932         * target.h: Include "disasm.h".
6933         (struct target_ops) <to_insn_history, to_insn_history_from,
6934         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6935         int.
6936         (target_insn_history, target_insn_history_from)
6937         (target_insn_history_range): Use gdb_disassembly_flags instead of
6938         bare int.
6939
6940 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6941
6942         * cli/cli-script.c (build_command_line): For if/while commands,
6943         check whether args is empty.
6944
6945 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6946
6947         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6948         (enum command_control_type): Likewise.
6949         (struct command_line): Likewise.
6950         (free_command_lines): Likewise.
6951         (struct command_lines_deleter): Likewise.
6952         (command_line_up): Likewise.
6953         (read_command_lines): Likewise.
6954         (read_command_lines_1): Likewise.
6955         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6956         (enum command_control_type): Likewise.
6957         (struct command_line): Likewise.
6958         (free_command_lines): Likewise.
6959         (struct command_lines_deleter): Likewise.
6960         (command_line_up): Likewise.
6961         (read_command_lines): Likewise.
6962         (read_command_lines_1): Likewise.
6963         * breakpoint.h: Include cli/cli-script.h.
6964         * extension-priv.h: Likewise.
6965         * gdbcmd.h: Likewise.
6966
6967 2017-09-04  Pedro Alves  <palves@redhat.com>
6968
6969         * ada-lang.c (is_known_support_routine): Move sal declaration to
6970         where it is initialized.
6971         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6972         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6973         (clear_command, update_static_tracepoint): Remove init_sal
6974         references.  Move declarations closer to initializations.
6975         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6976         initializations.
6977         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6978         references.  Move sal declarations closer to initializations.
6979         * frame.c (find_frame_sal): Return a symtab_and_line via function
6980         return instead of output parameter.  Remove init_sal references.
6981         * frame.h (find_frame_sal): Return a symtab_and_line via function
6982         return instead of output parameter.
6983         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6984         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6985         instead of memset.
6986         (gdbscm_find_pc_line): Remove init_sal reference.
6987         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6988         references.  Move declarations closer to initializations.
6989         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6990         initializations.
6991         (finish_backward): Remove init_sal references.  Move declarations
6992         closer to initializations.
6993         * infrun.c (process_event_stop_test, handle_step_into_function)
6994         (insert_hp_step_resume_breakpoint_at_frame)
6995         (insert_step_resume_breakpoint_at_caller): Likewise.
6996         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6997         (symbol_to_sal): Likewise.
6998         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6999         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7000         to its initialization.
7001         * reverse.c (save_bookmark_command): Use new/delete.  Remove
7002         init_sal references.  Move declarations closer to initializations.
7003         * source.c (get_current_source_symtab_and_line): Remove brace
7004         initialization.
7005         (set_current_source_symtab_and_line): Now takes the sal by const
7006         reference.  Remove brace initialization.
7007         (line_info): Remove init_sal reference.
7008         * source.h (set_current_source_symtab_and_line): Now takes a
7009         symtab_and_line via const reference.
7010         * stack.c (set_current_sal_from_frame): Adjust.
7011         (print_frame_info): Adjust.
7012         (get_last_displayed_sal): Return the sal via function return
7013         instead of via output parameter.  Simplify.
7014         (frame_info): Adjust.
7015         * stack.h (get_last_displayed_sal): Return the sal via function
7016         return instead of via output parameter.
7017         * symtab.c (init_sal): Delete.
7018         (find_pc_sect_line): Remove init_sal references.  Move
7019         declarations closer to initializations.
7020         (find_function_start_sal): Remove init_sal references.  Move
7021         declarations closer to initializations.
7022         * symtab.h (struct symtab_and_line): In-class initialize all
7023         fields.
7024         * tracepoint.c (set_traceframe_context)
7025         (print_one_static_tracepoint_marker): Remove init_sal references.
7026         Move declarations closer to initializations.
7027         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7028         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
7029         declarations closer to initializations.
7030         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7031         init_sal references.  Adjust.
7032
7033 2017-09-04  Pedro Alves  <palves@redhat.com>
7034
7035         * ax-gdb.c (agent_command_1): Use range-for.
7036         * break-catch-throw.c (re_set_exception_catchpoint): Update.
7037         * breakpoint.c: Include "common/array-view.h".
7038         (init_breakpoint_sal, create_breakpoint_sal): Change sals
7039         parameter from struct symtabs_and_lines to
7040         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
7041         (breakpoint_sals_to_pc): Change sals parameter from struct
7042         symtabs_and_lines to std::vector reference.
7043         (check_fast_tracepoint_sals): Change sals parameter from struct
7044         symtabs_and_lines to std::array_view.  Use range-for.
7045         (decode_static_tracepoint_spec): Return a std::vector instead of
7046         symtabs_and_lines.  Update.
7047         (create_breakpoint): Update.
7048         (break_range_command, until_break_command, clear_command): Update.
7049         (base_breakpoint_decode_location, bkpt_decode_location)
7050         (bkpt_probe_create_sals_from_location)
7051         (bkpt_probe_decode_location, tracepoint_decode_location)
7052         (tracepoint_probe_decode_location)
7053         (strace_marker_create_sals_from_location): Return a std::vector
7054         instead of symtabs_and_lines.
7055         (strace_marker_create_breakpoints_sal): Update.
7056         (strace_marker_decode_location): Return a std::vector instead of
7057         symtabs_and_lines.  Update.
7058         (update_breakpoint_locations): Change struct symtabs_and_lines
7059         parameters to gdb::array_view.  Adjust.
7060         (location_to_sals): Return a std::vector instead of
7061         symtabs_and_lines.  Update.
7062         (breakpoint_re_set_default): Use std::vector instead of struct
7063         symtabs_and_lines.
7064         (decode_location_default): Return a std::vector instead of
7065         symtabs_and_lines.  Update.
7066         * breakpoint.h: Include "common/array-view.h".
7067         (struct breakpoint_ops) <decode_location>: Now returns a
7068         std::vector instead of returning a symtabs_and_lines via output
7069         parameter.
7070         (update_breakpoint_locations): Change sals parameters to use
7071         gdb::array_view.
7072         * cli/cli-cmds.c (edit_command, list_command): Update to use
7073         std::vector and gdb::array_view.
7074         (ambiguous_line_spec): Adjust to use gdb::array_view and
7075         range-for.
7076         (compare_symtabs): Rename to ...
7077         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
7078         const reference and adjust.
7079         (filter_sals): Rewrite using std::vector and standard algorithms.
7080         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7081         (jump_command): Update to use std::vector.
7082         * linespec.c (struct linespec_state) <canonical_names>: Update
7083         comment.
7084         (add_sal_to_sals_basic): Delete.
7085         (add_sal_to_sals, filter_results, convert_results_to_lsals)
7086         (decode_line_2, create_sals_line_offset)
7087         (convert_address_location_to_sals, convert_linespec_to_sals)
7088         (convert_explicit_location_to_sals, parse_linespec)
7089         (event_location_to_sals, decode_line_full, decode_line_1)
7090         (decode_line_with_current_source)
7091         (decode_line_with_last_displayed, decode_objc)
7092         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7093         (linespec_result::~linespec_result): Adjust to use std::vector
7094         instead of symtabs_and_lines.
7095         * linespec.h (linespec_sals::sals): Now a std::vector.
7096         (struct linespec_result): Use std::vector, bool, and in-class
7097         initialization.
7098         (decode_line_1, decode_line_with_current_source)
7099         (decode_line_with_last_displayed): Return std::vector.
7100         * macrocmd.c (info_macros_command): Use std::vector.
7101         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7102         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7103         std::vector.
7104         * probe.h (parse_probes): Return a std::vector.
7105         * python/python.c (gdbpy_decode_line): Use std::vector and
7106         gdb::array_view.
7107         * source.c (select_source_symtab, line_info): Use std::vector.
7108         * stack.c (func_command): Use std::vector.
7109         * symtab.h (struct symtabs_and_lines): Delete.
7110         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7111
7112 2017-09-04  Pedro Alves  <palves@redhat.com>
7113
7114         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7115         unittests/array-view-selftests.c.
7116         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7117         * common/array-view.h: New file.
7118         * unittests/array-view-selftests.c: New file.
7119
7120 2017-09-04  Pedro Alves  <palves@redhat.com>
7121
7122         * cli/cli-cmds.c (edit_command): Pass message to
7123         ambiguous_line_spec.
7124         (list_command): Pass message to ambiguous_line_spec.  Say
7125         "first"/"last" instead of "start" and "end" to be consistent with
7126         the manual.
7127         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
7128         them to print formatted message.
7129
7130 2017-09-04  Pedro Alves  <palves@redhat.com>
7131
7132         * btrace.c (ftrace_add_pt): Pass btrace_insn to
7133         ftrace_update_insns by reference instead of pointer.
7134
7135 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7136
7137         * i386-go32-tdep.c: Include x86-xstate.h.
7138         (i386_go32_init_abi): Call i386_target_description.
7139         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7140         if xcr0 is X86_XSTATE_X87_MASK.
7141         * i386-tdep.h (tdesc_i386): Remove the declaration.
7142         (tdesc_i386_mmx): Likewise.
7143
7144 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7145
7146         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7147         X86_XSTATE_SSE_MASK instead of 0.
7148
7149 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7150
7151         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7152         i386_target_description.
7153         * i386-fbsd-nat.c (i386fbsd_read_description): Call
7154         i386_target_description.
7155         * i386-tdep.c (i386_gdbarch_init): Likewise.
7156
7157 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7158
7159         * amd64-darwin-tdep.c: Include "x86-xstate.h".
7160         (x86_darwin_init_abi_64): Call amd64_target_description.
7161         * amd64-dicos-tdep.c: Likewise.
7162         * amd64-fbsd-nat.c: Likewise.
7163         * amd64-fbsd-tdep.c: Likewise.
7164         * amd64-nbsd-tdep.c: Likewise.
7165         * amd64-obsd-tdep.c: Likewise.
7166         * amd64-sol2-tdep.c: Likewise.
7167         * amd64-windows-tdep.c: Likewise.
7168         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7169
7170 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7171
7172         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7173         (btrace_function) <insn>: Change type to use std::vector.
7174         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7175         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7176         ftrace_update_insns, ftrace_compute_global_level_offset,
7177         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7178         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7179         change to std::vector.
7180         (ftrace_update_insns): Adjust to change to std::vector, change
7181         type of INSN parameter.
7182         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7183         * record-btrace.c (btrace_call_history_insn_range,
7184         btrace_compute_src_line_range,
7185         record_btrace_frame_prev_register): Adjust to change to
7186         std::vector.
7187         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7188         to change to std::vector.
7189
7190 2017-09-03  Tom Tromey  <tom@tromey.com>
7191
7192         * corefile.c (reopen_exec_file): Use std::string.
7193
7194 2017-09-03  Tom Tromey  <tom@tromey.com>
7195
7196         * compile/compile.c (compile_register_name_mangled): Return
7197         std::string.
7198         * compile/compile-loc2c.c (pushf_register_address): Update.
7199         (pushf_register): Update.
7200         * compile/compile-c-types.c (convert_array): Update.
7201         * compile/compile-c-symbols.c (generate_vla_size): Update.
7202         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7203         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7204         (convert_one_symbol): Update.
7205         (generate_c_for_for_one_variable): Update.
7206         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7207         std::string.
7208         (generate_register_struct): Update.
7209         * compile/compile-internal.h (c_get_range_decl_name): Return a
7210         std::string.
7211         (compile_register_name_mangled): Return std::string.
7212
7213 2017-09-03  Tom Tromey  <tom@tromey.com>
7214
7215         * utils.c (perror_string): Return a std::string.
7216         (throw_perror_with_name, perror_warning_with_name): Update.
7217
7218 2017-09-03  Tom Tromey  <tom@tromey.com>
7219
7220         * demangle.c (demangle_command): Use std::string,
7221         unique_xmalloc_ptr.
7222
7223 2017-09-03  Tom Tromey  <tom@tromey.com>
7224
7225         * cli/cli-setshow.c (do_set_command): Use std::string.
7226
7227 2017-09-03  Tom Tromey  <tom@tromey.com>
7228
7229         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7230
7231 2017-09-03  Tom Tromey  <tom@tromey.com>
7232
7233         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7234
7235 2017-09-03  Tom Tromey  <tom@tromey.com>
7236
7237         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7238         gdb::unique_xmalloc_ptr.
7239
7240 2017-09-03  Tom Tromey  <tom@tromey.com>
7241
7242         * thread.c (print_thread_info_1): Use string_printf.
7243         (thread_apply_command, thread_apply_all_command): Use
7244         std::string.
7245
7246 2017-09-03  Tom Tromey  <tom@tromey.com>
7247
7248         * valprint.c (val_print_string): Update.
7249         * gdbcore.h (memory_error_message): Return std::string.
7250         * corefile.c (memory_error_message): Return std::string.
7251         (memory_error): Update.
7252         * breakpoint.c (insert_bp_location): Update.
7253
7254 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7255
7256         * target/waitstatus.h (target_waitstatus_to_string): Change
7257         return type to std::string.
7258         * target/waitstatus.c (target_waitstatus_to_string): Return
7259         std::string.
7260         * target.h (target_waitstatus_to_string): Remove declaration.
7261         * infrun.c (resume, clear_proceed_status_thread,
7262         print_target_wait_results, do_target_wait, save_waitstatus,
7263         stop_all_threads): Adjust.
7264         * record-btrace.c (record_btrace_wait): Adjust.
7265         * target-debug.h
7266         (target_debug_print_struct_target_waitstatus_p): Adjust.
7267
7268 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7269
7270         PR gdb/22046
7271         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7272         detection.
7273
7274 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7275
7276         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7277         for setting/unsetting environment variables on the remote target.
7278         (New remote packets): Add entries for QEnvironmentHexEncoded,
7279         QEnvironmentUnset and QEnvironmentReset.
7280         * common/environ.c (gdb_environ::operator=): Extend method to
7281         handle m_user_set_env_list and m_user_unset_env_list.
7282         (gdb_environ::clear): Likewise.
7283         (match_var_in_string): Change type of first parameter from 'char
7284         *' to 'const char *'.
7285         (gdb_environ::set): Extend method to handle
7286         m_user_set_env_list and m_user_unset_env_list.
7287         (gdb_environ::unset): Likewise.
7288         (gdb_environ::clear_user_set_env): New method.
7289         (gdb_environ::user_set_envp): Likewise.
7290         (gdb_environ::user_unset_envp): Likewise.
7291         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7292         m_user_unset_env_list on move constructor/assignment.
7293         (unset): Add new default parameter 'update_unset_list = true'.
7294         (clear_user_set_env): New method.
7295         (user_set_envp): Likewise.
7296         (user_unset_envp): Likewise.
7297         (m_user_set_env_list): New std::set.
7298         (m_user_unset_env_list): Likewise.
7299         * common/rsp-low.c (hex2str): New function.
7300         (bin2hex): New overload for bin2hex function.
7301         * common/rsp-low.c (hex2str): New prototype.
7302         (str2hex): New overload prototype.
7303         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7304         QEnvironmentUnset and QEnvironmentReset.
7305         (remote_protocol_features): Add QEnvironmentHexEncoded,
7306         QEnvironmentUnset and QEnvironmentReset packets.
7307         (send_environment_packet): New function.
7308         (extended_remote_environment_support): Likewise.
7309         (extended_remote_create_inferior): Call
7310         extended_remote_environment_support.
7311         (_initialize_remote): Add QEnvironmentHexEncoded,
7312         QEnvironmentUnset and QEnvironmentReset packet configs.
7313         * unittests/environ-selftests.c (gdb_selftest_env_var):
7314         New variable.
7315         (test_vector_initialization): New function.
7316         (test_init_from_host_environ): Likewise.
7317         (test_reinit_from_host_environ): Likewise.
7318         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7319         Likewise.
7320         (test_unset_set_empty_vector): Likewise.
7321         (test_vector_clear): Likewise.
7322         (test_std_move): Likewise.
7323         (test_move_constructor):
7324         (test_self_move): Likewise.
7325         (test_set_unset_reset): Likewise.
7326         (run_tests): Rewrite in terms of the functions above.
7327
7328 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7329
7330         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7331         (adi_available): Use a temp variable of type CORE_ADDR as argument
7332         3 when calling target_auxv_search.
7333         (adi_normalize_address): Use masks and xor operators to calculate
7334         normalized address.
7335         (adi_read_versions, adi_write_versions, adi_print_versions)
7336         (do_examine, do_assign): Use paddress.
7337
7338 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7339
7340         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7341         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7342         out of loop and add supply of FIR.
7343         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7344         add collect of FIR.
7345
7346 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7347
7348         PR gdb/21827
7349         * cli/cli-script.c (define_command): Don't convert command name
7350         to lower case.
7351
7352 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7353
7354         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7355         Update all callers accordingly. Remove all code blocks handling
7356         the case where DISPP is not NULL.
7357
7358 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7359
7360         PR symtab/22003
7361         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7362         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7363         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7364
7365 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7366
7367         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7368         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7369         (read_comp_units_from_section): New parameter abbrev_section, use
7370         read_and_check_comp_unit_head, allocate signatured_type if needed.
7371         (create_all_comp_units): Update read_comp_units_from_section caller.
7372
7373 2017-08-23  Pedro Alves  <palves@redhat.com>
7374
7375         PR remote/21852
7376         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7377         to null_ptid and switch to thread without reading the registers
7378         after adding the inferior.
7379
7380 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7381
7382         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7383         compile-gcc.
7384         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7385         (compile_to_object): Implement compile_gcc.
7386         (_initialize_compile): Install "set compile-gcc".  Initialize
7387         compile_gcc.
7388
7389 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7390
7391         * compile/compile.c (compile_to_object): Conditionally call
7392         set_verbose.  Conditionally call compile or compile_v0.
7393
7394 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7395
7396         * sparc64-tdep.h: (adi_normalize_address): New export.
7397         * sparc-nat.h: (open_adi_tag_fd): New export.
7398         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7399         * sparc64-linux-tdep.c:
7400         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7401         (sparc64_linux_handle_segmentation_fault): New function.
7402         (sparc64_linux_init_abi): Register
7403         sparc64_linux_handle_segmentation_fault
7404         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7405         (sparc64_addr_bits_remove): New function.
7406         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7407         (MAX_PROC_NAME_SIZE): New macro.
7408         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7409         (sparc64adilist): New variable.
7410         (adi_proc_list): New variable.
7411         (find_adi_info): New function.
7412         (add_adi_info): New function.
7413         (get_adi_info_proc): New function.
7414         (get_adi_info): New function.
7415         (info_adi_command): New function.
7416         (read_maps_entry): New function.
7417         (adi_available): New function.
7418         (adi_normalize_address): New function.
7419         (adi_align_address): New function.
7420         (adi_convert_byte_count): New function.
7421         (adi_tag_fd): New function.
7422         (adi_is_addr_mapped): New function.
7423         (adi_read_versions): New function.
7424         (adi_write_versions): New function.
7425         (adi_print_versions): New function.
7426         (do_examine): New function.
7427         (do_assign): New function.
7428         (adi_examine_command): New function.
7429         (adi_assign_command): New function.
7430         (_initialize_sparc64_adi_tdep): New function.
7431
7432 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7433
7434         * breakpoint.c (breakpoints_info): Rename to ...
7435         (info_breakpoints_command): ... this.
7436         (watchpoints_info): Rename to ...
7437         (info_watchpoints_command): ... this.
7438         (tracepoints_info): Rename to ...
7439         (info_tracepoints_command): ... this.
7440         (_initialize_breakpoint): Adjust.
7441         * dcache.c (dcache_info): Rename to ...
7442         (info_display_command): ... this.
7443         (_initialize_dcache): Adjust.
7444         * frame.h (args_info): Rename to ...
7445         (info_args_command): ... this.
7446         (locals_info): Rename to ...
7447         (info_locals_command): ... this.
7448         * infcmd.c (nofp_registers_info): Rename to ...
7449         (info_registers_command): ... this.
7450         (float_info): Rename to ...
7451         (info_float_command): ... this.
7452         (program_info): Rename to ...
7453         (info_program_command): ... this.
7454         (all_registers_info): Rename to ...
7455         (info_all_registers_command): ... this.
7456         (vector_info): Rename to ...
7457         (info_vector_command): ... this.
7458         (float_info): Rename to ...
7459         (info_float_command): ... this.
7460         (_initialize_infcmd): Adjust.
7461         * inferior.h (term_info): Rename to ...
7462         (info_terminal_command): ... this.
7463         * inflow.c (term_info): Rename to ...
7464         (info_terminal_command): ... this.
7465         (_initialize_inflow): Adjust.
7466         * infrun.c (signals_info): Rename to ...
7467         (info_signals_command): ... this.
7468         (_initialize_infrun): Adjust.
7469         * objc-lang.c (classes_info): Rename to ...
7470         (info_classes_command): ... this.
7471         (selectors_info): Rename to ...
7472         (info_selectors_command): ... this.
7473         (_initialize_objc_language): Adjust.
7474         * printcmd.c (sym_info): Rename to ...
7475         (info_symbol_command): ... this.
7476         (address_info): Rename to ...
7477         (info_address_command): ... this.
7478         (display_info): Rename to ...
7479         (info_display_command): ... this.
7480         (_initialize_printcmd): Adjust.
7481         * reverse.c (bookmarks_info): Rename to ...
7482         (info_breakpoints_command): ... this.
7483         (_initialize_reverse): Adjust.
7484         * ser-go32.c (dos_info): Rename to ...
7485         (info_serial_command): ... this.
7486         (_initialize_ser_dos): Adjust.
7487         * skip.c (skip_info): Rename to ...
7488         (info_skip_command): ... this.
7489         (_initialize_step_skip): Adjust.
7490         * source.c (line_info): Rename to ...
7491         (info_line_command): ... this.
7492         (source_info): Rename to ...
7493         (info_source_command)
7494         * stack.c (frame_info): Rename to ...
7495         (info_frame_command): ... this.
7496         (locals_info): Rename to ...
7497         (info_locals_command): ... this.
7498         (args_info): Rename to ...
7499         (info_args_command): ... this.
7500         (_initialize_stack): Adjust.
7501         * symtab.c (sources_info): Rename to ...
7502         (info_sources_command): ... this.
7503         (variables_info): Rename to ...
7504         (info_variables_command): ... this.
7505         (functions_info): Rename to ...
7506         (info_functions_command): ... this.
7507         (types_info): Rename to ...
7508         (info_types_command): ... this.
7509         (_initialize_symtab): Adjust.
7510         * target.c (target_info): Rename to ...
7511         (info_target_command): ... this.
7512         (initialize_targets): Adjust.
7513         * tracepoint.c (tvariables_info): Rename to ...
7514         (info_tvariables_command): ... this.
7515         (scope_info): Rename to ...
7516         (info_scope_command): ... this.
7517         (trace_dump_actions): Adjust.
7518         (_initialize_tracepoint): Adjust.
7519
7520 2017-08-22  Tom Tromey  <tom@tromey.com>
7521
7522         * breakpoint.h (install_breakpoint): Update.
7523         * breakpoint.c (add_solib_catchpoint): Update.
7524         (install_breakpoint): Change argument to a std::unique_ptr.
7525         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7526         (create_breakpoint_sal, create_breakpoint): Update.
7527         (watch_command_1, catch_exec_command_1)
7528         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7529         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7530         Return the breakpoint.
7531         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7532         (new_single_step_breakpoint): Update.
7533         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7534         std::unique_ptr.
7535         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7536         std::unique_ptr.
7537         * break-catch-sig.c (create_signal_catchpoint): Use
7538         std::unique_ptr.
7539         * ada-lang.c (create_ada_exception_catchpoint): Use
7540         std::unique_ptr.
7541
7542 2017-08-22  Tom Tromey  <tom@tromey.com>
7543
7544         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7545
7546 2017-08-22  Tom Tromey  <tom@tromey.com>
7547
7548         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7549         (lookup_partial_symbol): Update.
7550
7551 2017-08-22  Tom Tromey  <tom@tromey.com>
7552
7553         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7554         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7555         (find_and_open_source, symtab_to_fullname): Update.
7556         * psymtab.c (psymtab_to_fullname): Update.
7557
7558 2017-08-22  Tom Tromey  <tom@tromey.com>
7559
7560         * exec.c (exec_file_attach): Update.
7561         * linux-thread-db.c (try_thread_db_load): Update.
7562         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7563         * utils.c (gdb_realpath): Change return type.
7564         (gdb_realpath_keepfile): Update.
7565         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7566         (_initialize_utils): Register the new self test.
7567         * source.c (openp): Update.
7568         (find_and_open_source): Update.
7569         * nto-tdep.c (nto_find_and_open_solib): Update.
7570         * main.c (set_gdb_data_directory): Update.
7571         (captured_main_1): Update.
7572         * dwarf2read.c (dwarf2_get_dwz_file): Update
7573         (dw2_map_symbol_filenames): Update.
7574         * auto-load.c (auto_load_safe_path_vec_update): Update.
7575         (filename_is_in_auto_load_safe_path_vec): Change type of
7576         "filename_realp".
7577         (auto_load_objfile_script): Update.
7578         (file_is_auto_load_safe): Update.  Use std::string.
7579         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7580
7581 2017-08-22  Tom Tromey  <tom@tromey.com>
7582
7583         * utils.c (gdb_realpath_keepfile): Return a
7584         gdb::unique_xmalloc_ptr.
7585         * exec.c (exec_file_attach): Update.
7586         * utils.h (gdb_realpath_keepfile): Return a
7587         gdb::unique_xmalloc_ptr.
7588
7589 2017-08-22  Tom Tromey  <tom@tromey.com>
7590
7591         * compile/compile.c (compile_file_command): Use
7592         gdb::unique_xmalloc_ptr, std::string.
7593         * utils.c (gdb_abspath): Change return type.
7594         * source.c (openp): Update.
7595         * objfiles.c (allocate_objfile): Update.
7596         * main.c (set_gdb_data_directory): Update.
7597         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7598
7599 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7600
7601         * cli-cmds.c (list_commands): List actual code around more than
7602         one location.
7603
7604 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7605
7606         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7607
7608 2017-08-21  Pedro Alves  <palves@redhat.com>
7609
7610         PR gdb/19487
7611         * c-exp.y (variable production): Handle function aliases.
7612         * minsyms.c (msymbol_is_text): New function.
7613         * minsyms.h (msymbol_is_text): Declare.
7614         * symtab.c (find_function_alias_target): New function.
7615         * symtab.h (find_function_alias_target): Declare.
7616
7617 2017-08-21  Pedro Alves  <palves@redhat.com>
7618
7619         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7620         typedefs.
7621         * typeprint.c (whatis_exp): If handling "whatis", and expression
7622         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7623         typedefs here.
7624         * valops.c (value_cast): Save "to" type before resolving
7625         stubs/typedefs.  Use that type as resulting value's type.
7626
7627 2017-08-18  Tom Tromey  <tom@tromey.com>
7628             Pedro Alves  <palves@redhat.com>
7629
7630         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7631         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7632         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7633         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7634         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7635         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7636         (linux_get_siginfo_data): Add "thread" argument.  Use
7637         scoped_restore.
7638         * linux-nat.c (linux_child_follow_fork)
7639         (check_stopped_by_watchpoint): Use scoped_restore.
7640         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7641         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7642         (restore_inferior_ptid, save_inferior_ptid): Remove.
7643         * btrace.c (btrace_fetch): Use scoped_restore.
7644         * bsd-uthread.c (bsd_uthread_fetch_registers)
7645         (bsd_uthread_store_registers): Use scoped_restore.
7646         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7647         scoped_restore.
7648         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7649         (aix_thread_xfer_partial): Use scoped_restore.
7650         * inferior.h (save_inferior_ptid): Remove.
7651
7652 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7653
7654         PR tdep/21818
7655         * arm-tdep.c (gdb_print_insn_arm): Mark
7656         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7657
7658 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7659
7660         * NEWS: Mention GDBserver's new option "--selftest".
7661         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7662         * selftest.c: Move it to common/selftest.c.
7663         * selftest.h: Move it to common/selftest.h.
7664         * selftest-arch.c (reset): New function.
7665         (tests_with_arch): Call reset.
7666
7667 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7668
7669         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7670         instead of exception_fprintf and printf_filtered.
7671
7672 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7673
7674         * selftest.c (register_self_test): Rename it to
7675         selftests::register_test.
7676         (run_self_tests): selftest::run_tests.
7677         * selftest.h: Update declarations.
7678         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7679         selftests::register_test_foreach_arch.
7680         * selftest-arch.h: Update declaration.
7681         * aarch64-tdep.c: Update.
7682         * arm-tdep.c: Likewise.
7683         * disasm-selftests.c: Likewise.
7684         * dwarf2loc.c: Likewise.
7685         * dwarf2-frame.c: Likewise.
7686         * findvar.c: Likewise.
7687         * gdbarch-selftests.c: Likewise.
7688         * maint.c (maintenance_selftest): Likewise.
7689         * regcache.c: Likewise.
7690         * rust-exp.y: Likewise.
7691         * selftest-arch.c: Likewise.
7692         * unittests/environ-selftests.c: Likewise.
7693         * unittests/function-view-selftests.c: Likewise.
7694         * unittests/offset-type-selftests.c: Likewise.
7695         * unittests/optional-selftests.c: Likewise.
7696         * unittests/scoped_restore-selftests.c: Likewise.
7697         * utils-selftests.c: Likewise.
7698
7699 2017-08-17  Pedro Alves  <palves@redhat.com>
7700
7701         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7702         local.
7703
7704 2017-08-17  Pedro Alves  <palves@redhat.com>
7705
7706         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7707         field.
7708         (reset_die_in_process): Delete, replaced by ...
7709         (process_die_scope): ... this new class.  Make it responsible for
7710         freeing cu->line_header too.
7711         (process_die): Use process_die_scope.
7712         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7713         cu->line_header_die_owner.  Don't release the line header if it's
7714         owned by the CU.
7715         (setup_type_unit_groups): Make the CU/DIE own the line header.
7716         Don't release the line header here.
7717
7718 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7719
7720         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7721
7722 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7723
7724         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7725         Single-Key mode
7726
7727 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7728
7729         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7730         mode command list.
7731
7732 2017-08-15  Stafford Horne  <shorne@gmail.com>
7733
7734         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7735
7736 2017-08-15  Stafford Horne  <shorne@gmail.com>
7737
7738         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7739
7740 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7741
7742         PR gdb/21954
7743         * infcmd.c (unset_environment_command): Use the 'clear' method on
7744         the environment instead of resetting it.
7745
7746 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7747
7748         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7749         platforms.
7750
7751 2017-08-14  Tom Tromey  <tom@tromey.com>
7752
7753         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7754         (print_binary_chars): Likewise.
7755         (BITS_IN_BYTES): Remove.
7756
7757 2017-08-14  Tom Tromey  <tom@tromey.com>
7758
7759         PR gdb/21675
7760         * valprint.c (LOW_ZERO): Change value to 034.
7761         (print_octal_chars): Add static_asserts for octal constants.
7762         * printcmd.c (print_scalar_formatted): Add 'd' case.
7763
7764 2017-08-11  Tom Tromey  <tom@tromey.com>
7765
7766         * symfile.c (add_symbol_file_command): Use std::vector.
7767
7768 2017-08-14  Tom Tromey  <tom@tromey.com>
7769
7770         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7771         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7772         std::move.
7773         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7774
7775 2017-08-11  Pedro Alves  <palves@redhat.com>
7776
7777         * infrun.c (process_event_stop_test): Adjust
7778         function_name_is_marked_for_skip call.
7779         * skip.c: Include <list>.
7780         (skiplist_entry): Make it a class with private fields, and
7781         getters/setters.
7782         (skiplist_entry_chain): Delete.
7783         (skiplist_entries): New.
7784         (skiplist_entry_count): Delete.
7785         (highest_skiplist_entry_num): New.
7786         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7787         (add_skiplist_entry): Delete.
7788         (skiplist_entry::skiplist_entry): New.
7789         (skiplist_entry::add_entry): New.
7790         (skip_file_command, skip_function): Adjust.
7791         (compile_skip_regexp): Delete.
7792         (skip_command): Don't compile regexp here.  Adjust to use
7793         skiplist_entry::add_entry.
7794         (skip_info): Adjust to use range-for and getters.
7795         (skip_enable_command, skip_disable_command): Adjust to use
7796         range-for and setters.
7797         (skip_delete_command): Adjust to use std::list.
7798         (add_skiplist_entry): Delete.
7799         (skip_file_p): Delete, refactored as ...
7800         (skiplist_entry::do_skip_file_p): ... this new method.
7801         (skip_gfile_p): Delete, refactored as ...
7802         (skiplist_entry::do_gskip_file_p): ... this new method.
7803         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7804         (skiplist_entry::skip_function_p): ... this new method.
7805         (function_name_is_marked_for_skip): Now returns bool, and takes
7806         the function sal by const reference.  Adjust to use range-for and
7807         skiplist_entry methods.
7808         (_initialize_step_skip): Remove references to
7809         skiplist_entry_chain, skiplist_entry_count.
7810         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7811         takes the function sal by const reference.
7812
7813 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7814
7815         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7816         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7817         (dwarf2_frame_cache):
7818         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7819         RETURN_MASK_ALL and set *this_case to NULL.
7820         * frame-unwind.h: Update comments.
7821
7822 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7823
7824         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7825         (dwarf2_frame_state_copy_regs): Remove.
7826         (dwarf2_frame_state_free_regs): Remove.
7827         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7828         (dwarf2_restore_rule): Call method .alloc_regs instead of
7829         dwarf2_frame_state_alloc_regs.
7830         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7831         constructor.  Call std::move.
7832         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7833         (dwarf2_frame_cache): Likewise.
7834
7835         [GDB_SELF_TEST]: Include selftest.h and
7836         selftest-arch.h.
7837         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7838         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7839         execute_cfa_program_test.
7840
7841         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7842         copy ctor, assignment operator, move assignment.
7843         <alloc_regs>: New method.
7844         <swap>: New method.
7845         (struct dwarf2_frame_state): Delete dtor.
7846         (dwarf2_frame_state_alloc_regs): Remove declaration.
7847         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7848         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7849
7850 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7851
7852         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7853         (dwarf2_frame_state::dwarf2_frame_state): New.
7854         (dwarf2_frame_state::~dwarf2_frame_state): New.
7855         (dwarf2_fetch_cfa_info): Update.
7856         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7857         rather than a pointer.  Update code.
7858         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7859         dtor.
7860         <data_align, code_align, retaddr_column>: Change them to const.
7861         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7862         to bool.
7863
7864 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7865
7866         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7867         <loc.exp>: New field.
7868         * dwarf2-frame.c (execute_cfa_program): Update.
7869         (dwarf2_frame_prev_register): Update.
7870
7871 2017-08-10  Pedro Alves  <palves@redhat.com>
7872
7873         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7874
7875 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7876
7877         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7878         (fbsd_pending_children): Use std::list.
7879         (fbsd_remember_child): Likewise.
7880         (fbsd_is_child_pending): Likewise.
7881         (fbsd_pending_vfork_done): Use std::forward_list.
7882         (fbsd_add_vfork_done): Likewise.
7883         (fbsd_is_vfork_done_pending): Likewise.
7884         (fbsd_next_vfork_done): Likewise.
7885
7886 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7887
7888         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7889         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7890         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7891         for `mapfilename'.
7892         (fbsd_xfer_partial): Use gdb::byte_vector.
7893         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7894
7895 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7896
7897         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7898         "filestuff.h".
7899         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7900
7901 2017-08-09  Tom Tromey  <tom@tromey.com>
7902
7903         * skip.c (skiplist_entry): New constructor.
7904         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7905         (skiplist_entry::file_is_glob): Now bool.
7906         (skiplist_entry::file, skiplist_entry::function): Now
7907         std::string.
7908         (make_skip_entry): Return a unique_ptr.  Use new.
7909         (free_skiplist_entry, free_skiplist_entry_cleanup)
7910         (make_free_skiplist_entry_cleanup): Remove.
7911         (skip_command, skip_disable_command, add_skiplist_entry)
7912         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7913         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7914         (function_name_is_marked_for_skip): Update.
7915         (skip_delete_command): Update.  Use delete.
7916
7917 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7918
7919         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7920         (aarch64_linux_core_read_description): New function.
7921         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7922
7923 2017-08-09  Pedro Alves  <palves@redhat.com>
7924
7925         * cp-name-parser.y (cp_comp_to_string): Return a
7926         gdb::unique_xmalloc_ptr<char>.
7927         * cp-support.c (replace_typedefs_qualified_name)
7928         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7929         (cp_canonicalize_string_full): Use op= instead of explicit
7930         convertion.
7931         (cp_class_name_from_physname, method_name_from_physname)
7932         (cp_func_name, cp_remove_params): Adjust to use
7933         gdb::unique_xmalloc_ptr<char>.
7934         * cp-support.h (cp_comp_to_string): Return a
7935         gdb::unique_xmalloc_ptr<char>.
7936         * python/py-type.c (typy_lookup_type): Adjust to use
7937         gdb::unique_xmalloc_ptr<char>.
7938
7939 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7940
7941         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7942
7943 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7944             Yao Qi  <yao.qi@linaro.org>
7945
7946         * cp-support.c (cp_canonicalize_string_full): Use
7947         gdb::unique_xmalloc_ptr<char>.
7948         (cp_canonicalize_string): Likewise.
7949
7950 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7951
7952         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7953         * regformats/i386/amd64-avx-avx512.dat: Remove.
7954         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7955         * regformats/i386/amd64-avx-mpx.dat:Remove.
7956         * regformats/i386/amd64-avx.dat: Remove.
7957         * regformats/i386/amd64-mpx.dat: Remove.
7958         * regformats/i386/i386-avx-avx512.dat: Remove.
7959         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7960         * regformats/i386/i386-avx-mpx.dat: Remove.
7961         * regformats/i386/i386-mmx.dat: Remove.
7962         * regformats/i386/i386-mpx.dat: Remove.
7963
7964 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7965
7966         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7967         * amd64-tdep.c: Don't include features/i386/x32*.c.
7968         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7969         functions.
7970         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7971         and i386/x32-avx-avx512.
7972         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7973         and i386/x32.xml.
7974         * features/i386/x32-avx-avx512.c: Removed.
7975         * features/i386/x32-avx-avx512.xml: Removed.
7976         * features/i386/x32-avx.c: Removed.
7977         * features/i386/x32-avx.xml: Removed.
7978         * features/i386/x32.c: Removed.
7979         * features/i386/x32.xml: Removed.
7980         * regformats/i386/x32-avx-avx512.dat: Removed.
7981         * regformats/i386/x32-avx.dat: Removed.
7982         * regformats/i386/x32.dat: Removed.
7983
7984 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7985
7986         PR breakpoints/21886
7987         * mem-break.c (default_memory_insert_breakpoint): Use
7988         `->placed_address' rather than `->reqstd_address' for the
7989         breakpoint location.
7990
7991 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7992
7993         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7994         assertions.
7995
7996 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7997
7998         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7999         a union of `tdep_info', `tdesc_data' and `id'.
8000         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8001         rather than `info.tdep_info'.
8002         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8003         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8004         * i386-tdep.c (i386_gdbarch_init): Likewise.
8005         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8006         * mips-tdep.c (mips_gdbarch_init): Likewise.
8007         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8008         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8009         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8010         `info.tdep_info'.
8011         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8012         `info.tdep_info'.
8013         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8014         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8015         `info.tdep_info'.
8016         * spu-tdep.c (spu_gdbarch_init): Likewise.
8017         * gdbarch.h: Regenerate.
8018
8019 2017-08-07  Leszek Swirski  <leszeks@google.com>
8020
8021         PR symtab/20899
8022         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8023
8024 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
8025
8026         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8027         (gdbsim_open): Rename gdb_argv args object to argv.
8028
8029 2017-08-05  Tom Tromey  <tom@tromey.com>
8030
8031         * compile/compile-object-load.c (compile_object_load): Use
8032         gdb::unique_xmalloc_ptr.
8033         * cli/cli-dump.c (scan_filename): Rename from
8034         scan_filename_with_cleanup.  Change return type.
8035         (scan_expression): Rename from scan_expression_with_cleanup.
8036         Change return type.
8037         (dump_memory_to_file, dump_value_to_file, restore_command):
8038         Use gdb::unique_xmalloc_ptr.  Update.
8039         * cli/cli-cmds.c (find_and_open_script): Use
8040         gdb::unique_xmalloc_ptr.
8041         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8042         * symmisc.c (maintenance_print_symbols)
8043         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8044         * symfile.c (symfile_bfd_open, generic_load)
8045         (add_symbol_file_command, remove_symbol_file_command): Use
8046         gdb::unique_xmalloc_ptr.
8047         * source.c (openp): Use gdb::unique_xmalloc_ptr.
8048         * psymtab.c (maintenance_print_psymbols): Use
8049         gdb::unique_xmalloc_ptr.
8050         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8051         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8052         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8053         (reload_shared_libraries_1): Likewise.
8054
8055 2017-08-05  Tom Tromey  <tom@tromey.com>
8056
8057         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8058         (rust_op_vector, rust_set_vector): New typedefs.
8059         (current_parser): New global.
8060         (work_obstack): Change to pointer type.  Update all users.
8061         (rust_ast, pstate): Remove globals.
8062         (struct rust_parser): New.
8063         (%union) <params, field_inits>: Change type.
8064         (start, tuple_expr, unit_expr, struct_expr_list, literal)
8065         (field_expr, expr_list, maybe_expr_list, type_list): Update.
8066         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8067         (convert_params_to_types, convert_params_to_expression): Change
8068         type of "params".
8069         (ast_string): Change type of "fields".
8070         (rust_parse): Make a rust_parser.  Remove cleanups.
8071         (rust_lex_tests): Make and install an auto_obstack.
8072
8073 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8074
8075         * configure.srv (ipa_x32_linux_regobj): New.
8076         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8077         instead of X86_TDESC_AVX512.
8078         (initialize_low_tracepoint): Call
8079         init_registers_x32_avx_avx512_linux.
8080
8081 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8082
8083         * utils.h (gdb_argv): Add namespace std for nullptr_t.
8084
8085 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8086
8087         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8088
8089 2017-08-03  Tom Tromey  <tom@tromey.com>
8090
8091         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8092         Remove.
8093         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8094
8095 2017-08-03  Tom Tromey  <tom@tromey.com>
8096
8097         * python/py-param.c (compute_enum_values): Use gdb_argv.
8098
8099 2017-08-03  Tom Tromey  <tom@tromey.com>
8100
8101         * utils.h (struct gdb_argv_deleter): New.
8102         (gdb_argv): New class.
8103         * utils.c (gdb_argv::reset): New method.
8104         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8105         * tracefile.c (tsave_command): Use gdb_argv.
8106         * top.c (new_ui_command): Use gdb_argv.
8107         * symmisc.c (maintenance_print_symbols)
8108         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8109         * symfile.c (symbol_file_command, generic_load)
8110         (remove_symbol_file_command): Use gdb_argv.
8111         * stack.c (backtrace_command): Use gdb_argv.
8112         * source.c (add_path, show_substitute_path_command)
8113         (unset_substitute_path_command, set_substitute_path_command):
8114         Use gdb_argv.
8115         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
8116         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8117         * remote.c (extended_remote_run, remote_put_command)
8118         (remote_get_command, remote_delete_command): Use gdb_argv.
8119         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8120         (gdbsim_open): Use gdb_argv.
8121         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8122         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8123         * procfs.c (procfs_info_proc): Use gdb_argv.
8124         * interps.c (interpreter_exec_cmd): Use gdb_argv.
8125         * infrun.c (handle_command): Use gdb_argv.
8126         * inferior.c (add_inferior_command, clone_inferior_command):
8127         Use gdb_argv.
8128         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8129         * exec.c (exec_file_command): Use gdb_argv.
8130         * cli/cli-cmds.c (alias_command): Use gdb_argv.
8131         * compile/compile.c (build_argc_argv): Use gdb_argv.
8132
8133 2017-08-03  Tom Tromey  <tom@tromey.com>
8134
8135         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8136
8137 2017-08-03  Tom Tromey  <tom@tromey.com>
8138
8139         * python/python.c (compute_python_string): Return std::string.
8140         (gdbpy_eval_from_control_command): Update.
8141         (do_start_initialization): Use std::string.
8142         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8143         xstrprintf.
8144         * python/py-breakpoint.c (local_setattro): Use string_printf, not
8145         xstrprintf.
8146
8147 2017-08-03  Tom Tromey  <tom@tromey.com>
8148
8149         * top.h (do_restore_instream_cleanup): Remove.
8150         * top.c (do_restore_instream_cleanup): Remove.
8151         (read_command_file): Use scoped_restore.
8152         * cli/cli-script.c (execute_user_command): Use scoped_restore.
8153
8154 2017-08-03  Tom Tromey  <tom@tromey.com>
8155
8156         * cli/cli-script.c (execute_user_command)
8157         (execute_control_command): Use scoped_restore.
8158
8159 2017-08-03  Tom Tromey  <tom@tromey.com>
8160
8161         * cli/cli-script.c (do_restore_user_call_depth): Remove.
8162         (execute_user_command): Remove user_call_depth; use
8163         user_args_stack's size instead.
8164
8165 2017-08-03  Tom Tromey  <tom@tromey.com>
8166
8167         * top.h (in_user_command): Remove.
8168         * top.c (in_user_command): Remove.
8169         * cli/cli-script.c (do_restore_user_call_depth)
8170         (execute_user_command): Update.
8171
8172 2017-08-03  Tom Tromey  <tom@tromey.com>
8173
8174         * valops.c (search_struct_method): Use gdb::byte_vector.
8175         * valarith.c (value_concat): Use std::vector.
8176         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8177         (simple_search_memory): Likewise.
8178         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8179         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8180         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8181         * elfread.c (elf_rel_plt_read): Use std::string.
8182         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8183         * cli/cli-dump.c (restore_section_callback): Use
8184         gdb::byte_vector.
8185
8186 2017-08-03  Tom Tromey  <tom@tromey.com>
8187
8188         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8189
8190 2017-08-03  Tom Tromey  <tom@tromey.com>
8191
8192         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8193         (tui_register_format): Use scoped_restore.
8194
8195 2017-08-03  Tom Tromey  <tom@tromey.com>
8196
8197         * reverse.c (exec_direction_default): Remove.
8198         (exec_reverse_once): Use scoped_restore.
8199         * remote.c (restore_remote_timeout): Remove.
8200         (remote_flash_erase, remote_flash_write, remote_flash_done)
8201         (readchar, remote_serial_write): Use scoped_restore.
8202         * cli/cli-script.c (struct source_cleanup_lines_args)
8203         (source_cleanup_lines): Remove.
8204         (script_from_file): Use scoped_restore.
8205         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8206         (source_command): Use scoped_restore.
8207
8208 2017-08-03  Tom Tromey  <tom@tromey.com>
8209
8210         * utils.h (make_cleanup_free_so): Remove.
8211         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8212         * solist.h (struct so_deleter): New.
8213         (so_list_up): New typedef.
8214         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8215
8216 2017-08-03  Tom Tromey  <tom@tromey.com>
8217
8218         * utils.h (make_cleanup_restore_current_language): Remove.
8219         * utils.c (do_restore_current_language)
8220         (make_cleanup_restore_current_language): Remove.
8221         * parse.c (parse_exp_in_context_1)
8222         (parse_expression_with_language): Use
8223         scoped_restore_current_language.
8224         * mi/mi-main.c (mi_cmd_execute): Use
8225         scoped_restore_current_language.
8226         * language.h (scoped_restore_current_language): New class.
8227
8228 2017-08-03  Tom Tromey  <tom@tromey.com>
8229
8230         * compile/compile.c (cleanup_unlink_file): Remove.
8231         (compile_to_object): Use gdb::unlinker.
8232         (eval_compile_command): Likewise.
8233
8234 2017-08-03  Tom Tromey  <tom@tromey.com>
8235
8236         * utils.h (make_cleanup_fclose): Remove.
8237         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8238
8239 2017-08-03  Tom Tromey  <tom@tromey.com>
8240
8241         * top.c (open_terminal_stream): Return gdb_file_up.
8242         (new_ui_command): Update.
8243
8244 2017-08-03  Tom Tromey  <tom@tromey.com>
8245
8246         * source.c (print_source_lines_base, forward_search_command)
8247         (reverse_search_command): Use gdb_file_up.
8248
8249 2017-08-03  Tom Tromey  <tom@tromey.com>
8250
8251         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8252
8253 2017-08-03  Tom Tromey  <tom@tromey.com>
8254
8255         * cli/cli-cmds.c (find_and_open_script): Change return type.
8256         Remove "streamp" and "full_path" parameters.
8257         (source_script_with_search): Update.
8258         * auto-load.c (source_script_file): Update.
8259         * cli/cli-cmds.h (find_and_open_script): Change type.
8260         (open_script): New struct.
8261
8262 2017-08-03  Tom Tromey  <tom@tromey.com>
8263
8264         * xml-support.c (xml_fetch_content_from_file): Update.
8265         * ui-file.c (stdio_file::open): Update.
8266         * tracefile-tfile.c (tfile_start): Update.
8267         * remote.c (remote_file_put, remote_file_get): Update.
8268         * nat/linux-procfs.c (linux_proc_get_int)
8269         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8270         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8271         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8272         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8273         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8274         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8275         * linux-nat.c (linux_proc_pending_signals): Update.
8276         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8277         (file_closer): Remove.
8278         * compile/compile.c (compile_to_object): Update.
8279         * common/filestuff.h (struct gdb_file_deleter): New.
8280         (gdb_file_up): New typedef.
8281         (gdb_fopen_cloexec): Change return type.
8282         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8283         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8284         (dump_binary_file, restore_binary_file): Update.
8285         * auto-load.c (auto_load_objfile_script_1): Update.
8286
8287 2017-08-03  Tom Tromey  <tom@tromey.com>
8288
8289         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8290         (info_static_tracepoint_markers_command): Likewise.
8291         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8292         * skip.c (skip_info): Use ui_out_emit_table.
8293         * progspace.c (print_program_space): Use ui_out_emit_table.
8294         * osdata.c (info_osdata): Use ui_out_emit_table.
8295         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8296         ui_out_emit_table.
8297         * linux-thread-db.c (info_auto_load_libthread_db): Use
8298         ui_out_emit_table.
8299         * inferior.c (print_inferior): Use ui_out_emit_table.
8300         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8301         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8302         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8303         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8304         * ui-out.h (class ui_out_emit_table): New.
8305
8306 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8307
8308         * mips-tdep.c (mips_fpu_type_str): New function.
8309         (mips_dump_tdep): Call it.
8310
8311 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8312
8313         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8314         `->mips_fpu_type'.
8315
8316 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8317
8318         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8319
8320 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8321
8322         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8323
8324 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8325
8326         * cli/cli-cmds.c (maintenancechecklist): New variable.
8327         * gdbcmd.h (maintenancechecklist): Declare it.
8328         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8329         Call i386_linux_read_description with different masks.
8330         * maint.c (maintenance_check_command): New function.
8331         (_initialize_maint_cmds): Call add_prefix_cmd.
8332         * target-descriptions.c (tdesc_reg): override operator != and ==.
8333         (tdesc_type): Likewise.
8334         (tdesc_feature): Likewise.
8335         (target_desc): Likewise.
8336         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8337         (maintenance_check_xml_descriptions): New function.
8338         (_initialize_target_descriptions) Add command "xml-descriptions".
8339         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8340
8341 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8342
8343         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8344         Include features/i386/32bit-*.c.
8345         (i386_linux_read_description): Generate target description if it
8346         doesn't exist.
8347         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8348         functions.
8349         * features/i386/32bit-linux.c: Re-generated.
8350         * features/i386/32bit-sse.c: Likewise.
8351         * target-descriptions.c (print_c_feature::visit): Print code to
8352         set register number if needed.
8353         (print_c_feature) <m_next_regnum>: New field.
8354
8355 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8356
8357         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8358         (FEATURE_XMLFILES): New.
8359         (FEATURE_CFILES): New.
8360         New rules.
8361         (clean-cfiles): Remove generated c files.
8362         * features/i386/32bit-avx.c: Generated.
8363         * features/i386/32bit-avx512.c: Generated.
8364         * features/i386/32bit-core.c: Generated.
8365         * features/i386/32bit-linux.c: Generated.
8366         * features/i386/32bit-mpx.c: Generated.
8367         * features/i386/32bit-pkeys.c: Generated.
8368         * features/i386/32bit-sse.c: Generated.
8369         * target-descriptions.c: Include algorithm.
8370         (tdesc_element_visitor): Add method visit_end.
8371         (print_c_tdesc): Implement visit_end.
8372         (print_c_tdesc:: m_filename_after_features): Move it to
8373         protected.
8374         (print_c_feature): New class.
8375         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8376         name starts with "i386/32bit-".
8377
8378 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8379
8380         * target-descriptions.c (tdesc_element_visitor): New class.
8381         (tdesc_element): New class.
8382         (tdesc_reg): Inherit from tdesc_element.
8383         (tdesc_reg::accept): New function.
8384         (tdesc_type): Inherit from tdesc_element.
8385         (tdesc_type::accept): New function.
8386         (tdesc_feature): Inherit from tdesc_element.
8387         (tdesc_feature::accept): New function.
8388         (target_desc): Inherit from tdesc_element.
8389         (target_desc::target_desc): New.
8390         (target_desc::~target_desc): New.
8391         (target_desc::accept): New.
8392         (allocate_target_description): Use new.
8393         (free_target_description): Use delete.
8394         (print_c_tdesc): New class.
8395         (maint_print_c_tdesc_cmd): Adjust.
8396
8397         * features/aarch64.c: Re-generated.
8398         * features/arc-arcompact.c: Re-generated.
8399         * features/arc-v2.c: Re-generated.
8400         * features/arm/arm-with-iwmmxt.c: Re-generated.
8401         * features/arm/arm-with-m.c: Re-generated.
8402         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8403         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8404         * features/arm/arm-with-neon.c: Re-generated.
8405         * features/arm/arm-with-vfpv2.c: Re-generated.
8406         * features/arm/arm-with-vfpv3.c: Re-generated.
8407         * features/i386/amd64-avx-avx512.c: Re-generated.
8408         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8409         * features/i386/amd64-avx.c: Re-generated.
8410         * features/i386/amd64-avx-linux.c: Re-generated.
8411         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8412         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8413         * features/i386/amd64-avx-mpx.c: Re-generated.
8414         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8415         * features/i386/amd64.c: Re-generated.
8416         * features/i386/amd64-linux.c: Re-generated.
8417         * features/i386/amd64-mpx.c: Re-generated.
8418         * features/i386/amd64-mpx-linux.c: Re-generated.
8419         * features/i386/i386-avx-avx512.c: Re-generated.
8420         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8421         * features/i386/i386-avx.c: Re-generated.
8422         * features/i386/i386-avx-linux.c: Re-generated.
8423         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8424         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8425         * features/i386/i386-avx-mpx.c: Re-generated.
8426         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8427         * features/i386/i386.c: Re-generated.
8428         * features/i386/i386-linux.c: Re-generated.
8429         * features/i386/i386-mmx.c: Re-generated.
8430         * features/i386/i386-mmx-linux.c: Re-generated.
8431         * features/i386/i386-mpx.c: Re-generated.
8432         * features/i386/i386-mpx-linux.c: Re-generated.
8433         * features/i386/x32-avx-avx512.c: Re-generated.
8434         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8435         * features/i386/x32-avx.c: Re-generated.
8436         * features/i386/x32-avx-linux.c: Re-generated.
8437         * features/i386/x32.c: Re-generated.
8438         * features/i386/x32-linux.c: Re-generated.
8439         * features/microblaze.c: Re-generated.
8440         * features/microblaze-with-stack-protect.c: Re-generated.
8441         * features/mips64-dsp-linux.c: Re-generated.
8442         * features/mips64-linux.c: Re-generated.
8443         * features/mips-dsp-linux.c: Re-generated.
8444         * features/mips-linux.c: Re-generated.
8445         * features/nds32.c: Re-generated.
8446         * features/nios2.c: Re-generated.
8447         * features/nios2-linux.c: Re-generated.
8448         * features/rs6000/powerpc-32.c: Re-generated.
8449         * features/rs6000/powerpc-32l.c: Re-generated.
8450         * features/rs6000/powerpc-403.c: Re-generated.
8451         * features/rs6000/powerpc-403gc.c : Re-generated.
8452         * features/rs6000/powerpc-405.c: Re-generated.
8453         * features/rs6000/powerpc-505.c: Re-generated.
8454         * features/rs6000/powerpc-601.c: Re-generated.
8455         * features/rs6000/powerpc-602.c: Re-generated.
8456         * features/rs6000/powerpc-603.c: Re-generated.
8457         * features/rs6000/powerpc-604.c: Re-generated.
8458         * features/rs6000/powerpc-64.c: Re-generated.
8459         * features/rs6000/powerpc-64l.c: Re-generated.
8460         * features/rs6000/powerpc-7400.c: Re-generated.
8461         * features/rs6000/powerpc-750.c: Re-generated.
8462         * features/rs6000/powerpc-860.c: Re-generated.
8463         * features/rs6000/powerpc-altivec32.c: Re-generated.
8464         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8465         * features/rs6000/powerpc-altivec64.c: Re-generated.
8466         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8467         * features/rs6000/powerpc-cell32l.c: Re-generated.
8468         * features/rs6000/powerpc-cell64l.c: Re-generated.
8469         * features/rs6000/powerpc-e500.c: Re-generated.
8470         * features/rs6000/powerpc-e500l.c: Re-generated.
8471         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8472         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8473         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8474         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8475         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8476         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8477         * features/rs6000/powerpc-vsx32.c: Re-generated.
8478         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8479         * features/rs6000/powerpc-vsx64.c: Re-generated.
8480         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8481         * features/rs6000/rs6000.c: Re-generated.
8482         * features/s390-linux32.c: Re-generated.
8483         * features/s390-linux32v1.c: Re-generated.
8484         * features/s390-linux32v2.c: Re-generated.
8485         * features/s390-linux64.c: Re-generated.
8486         * features/s390-linux64v1.c: Re-generated.
8487         * features/s390-linux64v2.c: Re-generated.
8488         * features/s390-te-linux64.c: Re-generated.
8489         * features/s390-tevx-linux64.c: Re-generated.
8490         * features/s390-vx-linux64.c: Re-generated.
8491         * features/s390x-linux64.c: Re-generated.
8492         * features/s390x-linux64v1.c: Re-generated.
8493         * features/s390x-linux64v2.c: Re-generated.
8494         * features/s390x-te-linux64.c: Re-generated.
8495         * features/s390x-tevx-linux64.c: Re-generated.
8496         * features/s390x-vx-linux64.c: Re-generated.
8497         * features/sparc/sparc32-solaris.c: Re-generated.
8498         * features/sparc/sparc64-solaris.c: Re-generated.
8499         * features/tic6x-c62x.c: Re-generated.
8500         * features/tic6x-c62x-linux.c: Re-generated.
8501         * features/tic6x-c64x.c: Re-generated.
8502         * features/tic6x-c64x-linux.c: Re-generated.
8503         * features/tic6x-c64xp.c: Re-generated.
8504         * features/tic6x-c64xp-linux.c: Re-generated.
8505
8506 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8507
8508         * i386-linux-tdep.c (i386_linux_read_description): New function.
8509         (i386_linux_core_read_description): Call
8510         i386_linux_read_description.
8511         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8512         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8513         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8514         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8515         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8516         * x86-linux-nat.c (x86_linux_read_description): Call
8517         i386_linux_read_description.
8518
8519 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8520
8521         * NEWS: Mention it.
8522         * features/Makefile (%.c: %.xml): Pass the xml file name to
8523         command "maint print c-tdesc".
8524         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8525         name from 'arg'.
8526
8527 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8528
8529         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8530         in-class initialization.
8531         (tdesc_create_feature): Call new instead of XCNEW.
8532         (free_target_description): Ue delete.
8533
8534 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8535
8536         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8537
8538 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8539
8540         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8541         constant.
8542         (amd64_x32_init_abi): Likewise.
8543         * amd64-tdep.h (amd64_init_abi): Update declaration.
8544         (amd64_x32_init_abi): Likewise.
8545
8546 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8547
8548         PR tdep/21717
8549         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8550         condition for FPSCR.
8551         (arm_linux_store_inferior_registers): Likewise.
8552
8553 2017-07-22  Tom Tromey  <tom@tromey.com>
8554
8555         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8556         <syscalls_counts>: Now a std::vector.
8557         (get_catch_syscall_inferior_data): Use "new".
8558         (catch_syscall_inferior_data_cleanup): Use "delete".
8559         (insert_catch_syscall, remove_catch_syscall)
8560         (clear_syscall_counts): Update.
8561
8562 2017-07-22  Tom Tromey  <tom@tromey.com>
8563
8564         * break-catch-syscall.c (syscall_catchpoint)
8565         <syscalls_to_be_caught>: Now a std::vector<int>
8566         (~syscall_catchpoint): Remove.
8567         (insert_catch_syscall, remove_catch_syscall)
8568         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8569         (print_mention_catch_syscall, print_recreate_catch_syscall):
8570         Update.
8571         (create_syscall_event_catchpoint): Change type of "filter"
8572         parameter.
8573         (catch_syscall_split_args): Return a std::vector.
8574         (catch_syscall_command_1, catching_syscall_number_1): Update.
8575
8576 2017-07-22  Tom Tromey  <tom@tromey.com>
8577
8578         * break-catch-throw.c (struct exception_catchpoint)
8579         <exception_rx>: Now a std::string.
8580         (~exception_catchpoint): Remove.
8581         (print_one_detail_exception_catchpoint): Update.
8582         (handle_gnu_v3_exceptions): Change type of except_rx.
8583         (extract_exception_regexp): Return a std::string.
8584         (catch_exception_command_1): Update.
8585
8586 2017-07-22  Tom Tromey  <tom@tromey.com>
8587
8588         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8589         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8590         std::vector.
8591         <catch_all>: Now a bool.
8592         (~signal_catchpoint): Remove.
8593         (signal_catchpoint_insert_location)
8594         (signal_catchpoint_remove_location)
8595         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8596         (signal_catchpoint_print_mention)
8597         (signal_catchpoint_print_recreate)
8598         (signal_catchpoint_explains_signal): Update.
8599         (create_signal_catchpoint): Change type of "filter" and
8600         "catch_all".
8601         (catch_signal_split_args): Return a std::vector.  Change type of
8602         "catch_all".
8603         (catch_signal_command): Update.
8604
8605 2017-07-20  Pedro Alves  <palves@redhat.com>
8606
8607         * ada-lang.c (ada_language_defn): Make extern.
8608         (_initialize_ada_language): Remove add_language call.
8609         * c-lang.c (c_language_defn, cplus_language_defn)
8610         (asm_language_defn, minimal_language_defn): Make extern.
8611         (_initialize_c_language): Delete.
8612         * completer.c (compare_cstrings): Delete, moved to utils.h.
8613         * d-lang.c (d_language_defn): Make extern.
8614         (_initialize_d_language): Remove add_language calls.
8615         * defs.h (enum language): Add comment.
8616         * f-lang.c (f_language_defn): Make extern.
8617         (_initialize_f_language): Remove add_language call.
8618         * go-lang.c (go_language_defn): Make extern.
8619         (_initialize_go_language): Remove add_language call.
8620         * language.c: Include <algorithm>.
8621         (languages): Redefine as const array.
8622         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8623         (set_language_command): Handle "local".  Use for-range loop.
8624         (set_language): Remove loop.
8625         (language_enum): Rewrite.
8626         (language_def, language_str): Remove loops.
8627         (add_language): Delete.
8628         (add_set_language_command): New, based on add_languages.
8629         (skip_language_trampoline): Adjust.
8630         (local_language_defn): Delete.
8631         (language_gdbarch_post_init): Adjust.
8632         (_initialize_language): Remove add_language calls.  Call
8633         add_set_language_command.
8634         * language.h (add_language): Delete.
8635         (auto_language_defn)
8636         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8637         (asm_language_defn, c_language_defn, cplus_language_defn)
8638         (d_language_defn, f_language_defn, go_language_defn)
8639         (m2_language_defn, objc_language_defn, opencl_language_defn)
8640         (pascal_language_defn, rust_language_defn): Declare.
8641         * m2-lang.c (m2_language_defn): Make extern.
8642         (_initialize_m2_language): Remove add_language call.
8643         * objc-lang.c (objc_language_defn): Make extern.
8644         (_initialize_objc_language): Remove add_language call.
8645         * opencl-lang.c (opencl_language_defn): Make extern.
8646         (_initialize_opencl_language): Remove add_language call.
8647         * p-lang.c (pascal_language_defn): Make extern.
8648         (_initialize_pascal_language): Delete.
8649         * rust-lang.c (rust_language_defn): Make extern.
8650         (_initialize_rust_language): Delete.
8651         * utils.h (compare_cstrings): New static inline function.
8652
8653 2017-07-20  Pedro Alves  <palves@redhat.com>
8654
8655         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8656         (get_var_value): Constify parameters.
8657         (get_int_var_value): Change prototype.
8658         (to_fixed_range_type): Adjust.
8659         * ada-lang.h (get_int_var_value): Change prototype.
8660
8661 2017-07-20  Pedro Alves  <palves@redhat.com>
8662
8663         * dwarf2read.c (dw2_lookup_symbol): Use
8664         SYMBOL_MATCHES_SEARCH_NAME.
8665         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8666
8667 2017-07-20  Pedro Alves  <palves@redhat.com>
8668
8669         * block.c (block_iter_name_step, block_iter_name_first)
8670         (block_iter_name_next): Delete.
8671         (block_lookup_symbol_primary): Adjust to use
8672         dict_iter_match_first/dict_iter_match_next.
8673         * block.h (block_iter_name_first, block_iter_name_next): Delete
8674         declarations.
8675         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8676         dict_iter_match_first/dict_iter_match_next.
8677
8678 2017-07-20  Pedro Alves  <palves@redhat.com>
8679
8680         * cp-support.c (cp_find_first_component_aux): Add missing case for
8681         end of string.
8682
8683 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8684
8685         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8686         of dwo_cu's dwo_file.
8687
8688 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8689
8690         * remote.c (store_registers_using_G): Remove one line comment.
8691
8692 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8693
8694         * regcache.c (regcache_cpy): Simplify it.
8695         (regcache::cpy_no_passthrough): Remove it.
8696         * regcache.h (cpy_no_passthrough): Remove it.
8697         (regcache_dup, regcache_cpy): Update comments.
8698
8699 2017-07-18  Pedro Alves  <palves@redhat.com>
8700
8701         * remote-sim.c (sim_command_completer): Adjust to work with a
8702         completion_tracker instead of a VEC.
8703
8704 2017-07-17  Pedro Alves  <palves@redhat.com>
8705
8706         * completer.c (complete_source_filenames): New function.
8707         (complete_address_and_linespec_locations): New function.
8708         (location_completer): Use complete_address_and_linespec_locations.
8709         (completion_tracker::build_completion_result): Honor the tracker's
8710         request to suppress append.
8711         * completer.h (completion_tracker::suppress_append_ws)
8712         (completion_tracker::set_suppress_append_ws): New methods.
8713         (completion_tracker::m_suppress_append_ws): New field.
8714         (complete_source_filenames): New declaration.
8715         * linespec.c (linespec_complete_what): New.
8716         (struct ls_parser) <complete_what, completion_word,
8717         completion_quote_char, completion_quote_end, completion_tracker>:
8718         New fields.
8719         (string_find_incomplete_keyword_at_end): New.
8720         (linespec_lexer_lex_string): Record quote char.  If in completion
8721         mode, don't throw.
8722         (linespec_lexer_consume_token): Advance the completion word point.
8723         (linespec_lexer_peek_token): Save/restore completion info.
8724         (save_stream_and_consume_token): New.
8725         (set_completion_after_number): New.
8726         (linespec_parse_basic): Set what to complete next depending on
8727         token.  Handle function and label completions specially.
8728         (parse_linespec): Disable objc shortcut in completion mode.  Set
8729         what to complete next depending on token type.  Skip keyword if in
8730         completion mode.
8731         (complete_linespec_component, linespec_complete): New.
8732         * linespec.h (linespec_complete): Declare.
8733
8734 2017-07-17  Pedro Alves  <palves@redhat.com>
8735
8736         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8737         Handle 'operator<' / 'operator<<'.
8738
8739 2017-07-17  Pedro Alves  <palves@redhat.com>
8740
8741         * completer.c (collect_explicit_location_matches): Handle
8742         MATCH_LABEL.
8743         (convert_explicit_location_to_linespec): New, factored out from
8744         ...
8745         (convert_explicit_location_to_sals): ... this.
8746         (complete_label): New.
8747         (linespec_complete_label, find_label_symbols_in_block): New.
8748         (find_label_symbols): Add completion_mode parameter and adjust to
8749         call find_label_symbols_in_block.
8750         * linespec.h (linespec_complete_label): Declare.
8751
8752 2017-07-17  Pedro Alves  <palves@redhat.com>
8753
8754         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8755         complete_symbol_mode parameter.
8756         * cli/cli-cmds.c (complete_command): Get the completion result out
8757         of the handle_brkchars tracker if used a custom word point.
8758         * completer.c: Include "linespec.h".
8759         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8760         (advance_to_expression_complete_word_point): New.
8761         (completion_tracker::completes_to_completion_word): New.
8762         (complete_files_symbols): Pass down
8763         complete_symbol_mode::EXPRESSION.
8764         (explicit_options, probe_options): New.
8765         (collect_explicit_location_matches): Complete on the
8766         explictit_loc->foo instead of word.  Use
8767         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8768         keyword and options completions.
8769         (backup_text_ptr): Delete.
8770         (skip_keyword): New.
8771         (complete_explicit_location): Remove 'word' parameter.  Add
8772         language, quoted_arg_start and quoted_arg_end parameters.
8773         Rewrite, parsing left to right.
8774         (location_completer): Rewrite.
8775         (location_completer_handle_brkchars): New function.
8776         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8777         (enum complete_line_internal_reason): Adjust comments.
8778         (completion_tracker::discard_completions): New.
8779         (completer_handle_brkchars_func_for_completer): Handle
8780         location_completer.
8781         (gdb_custom_word_point_brkchars)
8782         (gdb_org_rl_basic_quote_characters): New.
8783         (gdb_completion_word_break_characters_throw)
8784         (completion_find_completion_word): Handle trackers that use a
8785         custom word point.
8786         (completion_tracker::advance_custom_word_point_by): New.
8787         (completion_tracker::build_completion_result): Don't rely on
8788         readline appending the quote char.
8789         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8790         use a custom word point.
8791         (gdb_rl_attempted_completion_function): Restore
8792         rl_basic_quote_characters.
8793         * completer.h (class completion_tracker): Extend intro comment.
8794         (completion_tracker::set_quote_char)
8795         (completion_tracker::quote_char)
8796         (completion_tracker::set_use_custom_word_point)
8797         (completion_tracker::use_custom_word_point)
8798         (completion_tracker::custom_word_point)
8799         (completion_tracker::set_custom_word_point)
8800         (completion_tracker::advance_custom_word_point_by)
8801         (completion_tracker::completes_to_completion_word)
8802         (completion_tracker::discard_completions): New methods.
8803         (completion_tracker::m_quote_char)
8804         (completion_tracker::m_use_custom_word_point)
8805         (completion_tracker::m_custom_word_point): New fields.
8806         (advance_to_expression_complete_word_point): Declare.
8807         * f-lang.c (f_collect_symbol_completion_matches): Add
8808         complete_symbol_mode parameter.
8809         * language.h (struct language_defn)
8810         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8811         parameter.
8812         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8813         (linespec_complete_function): New function.
8814         (linespec_lexer_lex_keyword): Adjust.
8815         * linespec.h (linespec_keywords, linespec_complete_function): New
8816         declarations.
8817         * location.c (find_end_quote): New function.
8818         (explicit_location_lex_one): Add explicit_completion_info
8819         parameter.  Save quoting info.  Don't throw if being called for
8820         completion.  Don't handle Ada operators here.
8821         (is_cp_operator, skip_op_false_positives, first_of)
8822         (explicit_location_lex_one_function): New function.
8823         (string_to_explicit_location): Replace 'dont_throw' parameter with
8824         an explicit_completion_info pointer parameter.  Handle it.  Don't
8825         use explicit_location_lex_one to lex function names.  Use
8826         explicit_location_lex_one_function instead.
8827         * location.h (struct explicit_completion_info): New.
8828         (string_to_explicit_location): Replace 'dont_throw' parameter with
8829         an explicit_completion_info pointer parameter.
8830         * symtab.c (default_collect_symbol_completion_matches_break_on):
8831         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8832         (default_collect_symbol_completion_matches)
8833         (collect_symbol_completion_matches): Add complete_symbol_mode
8834         parameter.
8835         (collect_symbol_completion_matches_type): Pass down
8836         complete_symbol_mode::EXPRESSION.
8837         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8838         parameter.  Handle LINESPEC mode.
8839         * symtab.h (complete_symbol_mode): New.
8840         (default_collect_symbol_completion_matches_break_on)
8841         (default_collect_symbol_completion_matches)
8842         (collect_symbol_completion_matches)
8843         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8844         parameter.
8845
8846 2017-07-17  Pedro Alves  <palves@redhat.com>
8847
8848         * utils.c (enum class strncmp_iw_mode): New.
8849         (strcmp_iw): Rename to ...
8850         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8851         parameters.  Handle them.
8852         (strncmp_iw): New.
8853         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8854         * utils.h (strncmp_iw): Declare.
8855         (strcmp_iw): Move describing comments here.
8856
8857 2017-07-17  Pedro Alves  <palves@redhat.com>
8858
8859         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8860         CP_OPERATOR_STR.
8861         * c-typeprint.c (is_type_conversion_operator): Use
8862         CP_OPERATOR_STR.
8863         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8864         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8865         CP_OPERATOR_LEN.
8866         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8867         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8868         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8869         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8870         CP_OPERATOR_STR.
8871         * location.c: Include "cp-support.h".
8872         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8873         CP_OPERATOR_STR.
8874         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8875         CP_OPERATOR_LEN.
8876
8877 2017-07-17  Pedro Alves  <palves@redhat.com>
8878
8879         * cli/cli-cmds.c (complete_command): Use a completion tracker
8880         along with completion_find_completion_word for handle_brkchars
8881         phase.
8882         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8883         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8884         (struct gdb_rl_completion_word_info): New.
8885         (gdb_rl_find_completion_word): New.
8886         (completion_find_completion_word): New.
8887         * completer.h (completion_find_completion_word): Declare.
8888
8889 2017-07-17  Pedro Alves  <palves@redhat.com>
8890
8891         * ada-lang.c (symbol_completion_match): Adjust comments.
8892         (symbol_completion_add): Replace vector parameter with
8893         completion_tracker parameter.  Use it.
8894         (ada_make_symbol_completion_list): Rename to...
8895         (ada_collect_symbol_completion_matches): ... this.  Add
8896         completion_tracker parameter and use it.
8897         (ada_language_defn): Adjust.
8898         * break-catch-syscall.c (catch_syscall_completer): Adjust
8899         prototype and work with completion_tracker instead of VEC.
8900         * breakpoint.c (condition_completer): Adjust prototype and work
8901         with completion_tracker instead of VEC.
8902         * c-lang.c (c_language_defn, cplus_language_defn)
8903         (asm_language_defn, minimal_language_defn): Adjust to renames.
8904         * cli/cli-cmds.c (complete_command): Rework using
8905         completion_tracker.  Catch exceptions when completing.
8906         * cli/cli-decode.c (integer_unlimited_completer)
8907         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8908         with completion_tracker instead of VEC.
8909         * command.h (struct completion_tracker): Forward declare.
8910         (completer_ftype, completer_handle_brkchars_ftype): Change
8911         types.
8912         (complete_on_cmdlist, complete_on_enum): Adjust.
8913         * completer.c: Include <algorithm>.
8914         (struct gdb_completer_state): New.
8915         (current_completion): New global.
8916         (readline_line_completion_function): Delete.
8917         (noop_completer, filename_completer)
8918         (filename_completer_handle_brkchars, complete_files_symbols)
8919         (linespec_location_completer): Adjust to work with a
8920         completion_tracker instead of a VEC.
8921         (string_or_empty): New.
8922         (collect_explicit_location_matches): Adjust to work with a
8923         completion_tracker instead of a VEC.
8924         (explicit_location_completer): Rename to ...
8925         (complete_explicit_location): ... this and adjust to work with a
8926         completion_tracker instead of a VEC.
8927         (location_completer): Adjust to work with a completion_tracker
8928         instead of a VEC.
8929         (add_struct_fields): Adjust to work with a completion_list instead
8930         of VEC.
8931         (expression_completer): Rename to ...
8932         (complete_expression): ... this and adjust to work with a
8933         completion_tracker instead of a VEC.  Use complete_files_symbols.
8934         (expression_completer): Reimplement on top of complete_expression.
8935         (symbol_completer): Adjust to work with a completion_tracker
8936         instead of a VEC.
8937         (enum complete_line_internal_reason): Add describing comments.
8938         (complete_line_internal_normal_command): Adjust to work with a
8939         completion_tracker instead of a VEC.
8940         (complete_line_internal): Rename to ...
8941         (complete_line_internal_1): ... this and adjust to work with a
8942         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8943         handle_brkchars phase.
8944         (new_completion_tracker): Delete.
8945         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8946         complete_line_internal_1.
8947         (free_completion_tracker): Delete.
8948         (INITIAL_COMPLETION_HTAB_SIZE): New.
8949         (completion_tracker::completion_tracker)
8950         (completion_tracker::~completion_tracker): New.
8951         (maybe_add_completion): Delete.
8952         (completion_tracker::maybe_add_completion)
8953         (completion_tracker::add_completion)
8954         (completion_tracker::add_completions): New.
8955         (throw_max_completions_reached_error): Delete.
8956         (complete_line): Adjust to work with a completion_tracker instead
8957         of a VEC.  Don't create a completion_tracker_t or check for max
8958         completions here.
8959         (command_completer, command_completer_handle_brkchars)
8960         (signal_completer, reg_or_group_completer_1)
8961         (reg_or_group_completer, default_completer_handle_brkchars):
8962         Adjust to work with a completion_tracker.
8963         (gdb_completion_word_break_characters_throw): New.
8964         (gdb_completion_word_break_characters): Reimplement.
8965         (line_completion_function): Delete.
8966         (completion_tracker::recompute_lowest_common_denominator)
8967         (expand_preserving_ws)
8968         (completion_tracker::build_completion_result)
8969         (completion_result::completion_result)
8970         (completion_result::completion_result)
8971         (completion_result::~completion_result)
8972         (completion_result::completion_result)
8973         (completion_result::release_match_list, compare_cstrings)
8974         (completion_result::sort_match_list)
8975         (completion_result::reset_match_list)
8976         (gdb_rl_attempted_completion_function_throw)
8977         (gdb_rl_attempted_completion_function): New.
8978         * completer.h (completion_list, struct completion_result)
8979         (class completion_tracker): New.
8980         (complete_line): Add completion_tracker parameter.
8981         (readline_line_completion_function): Delete.
8982         (gdb_rl_attempted_completion_function): New.
8983         (noop_completer, filename_completer, expression_completer)
8984         (location_completer, symbol_completer, command_completer)
8985         (signal_completer, reg_or_group_completer): Update prototypes.
8986         (completion_tracker_t, new_completion_tracker)
8987         (make_cleanup_free_completion_tracker): Delete.
8988         (enum maybe_add_completion_enum): Delete.
8989         (maybe_add_completion): Delete.
8990         (throw_max_completions_reached_error): Delete.
8991         * corefile.c (complete_set_gnutarget): Adjust to work with a
8992         completion_tracker instead of a VEC.
8993         * cp-abi.c (cp_abi_completer): Adjust to work with a
8994         completion_tracker instead of a VEC.
8995         * d-lang.c (d_language_defn): Adjust.
8996         * disasm.c (disassembler_options_completer): Adjust to work with a
8997         completion_tracker instead of a VEC.
8998         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8999         (f_collect_symbol_completion_matches): ... this.  Adjust to work
9000         with a completion_tracker instead of a VEC.
9001         (f_language_defn): Adjust.
9002         * go-lang.c (go_language_defn): Adjust.
9003         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9004         Adjust to work with a completion_tracker instead of a VEC.
9005         * infrun.c (handle_completer): Likewise.
9006         * interps.c (interpreter_completer): Likewise.
9007         * interps.h (interpreter_completer): Likewise.
9008         * language.c (unknown_language_defn, auto_language_defn)
9009         (local_language_defn): Adjust.
9010         * language.h (language_defn::la_make_symbol_completion_list):
9011         Rename to ...
9012         (language_defn::la_collect_symbol_completion_matches): ... this
9013         and adjust to work with a completion_tracker instead of a VEC.
9014         * m2-lang.c (m2_language_defn): Adjust.
9015         * objc-lang.c (objc_language_defn): Adjust.
9016         * opencl-lang.c (opencl_language_defn): Adjust.
9017         * p-lang.c (pascal_language_defn): Adjust.
9018         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9019         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9020         with a completion_tracker.
9021         * rust-lang.c (rust_language_defn): Adjust.
9022         * symtab.c (free_completion_list, do_free_completion_list)
9023         (return_val, completion_tracker): Delete.
9024         (completion_list_add_name, completion_list_add_symbol)
9025         (completion_list_add_msymbol, completion_list_objc_symbol)
9026         (completion_list_add_fields, add_symtab_completions): Add
9027         completion_tracker parameter and use it.
9028         (default_make_symbol_completion_list_break_on_1): Rename to...
9029         (default_collect_symbol_completion_matches_break_on): ... this.
9030         Add completion_tracker parameter and use it instead of allocating
9031         a completion tracker here.
9032         (default_make_symbol_completion_list_break_on): Delete old
9033         implementation.
9034         (default_make_symbol_completion_list): Delete.
9035         (default_collect_symbol_completion_matches): New.
9036         (make_symbol_completion_list): Delete.
9037         (collect_symbol_completion_matches): New.
9038         (make_symbol_completion_type): Rename to ...
9039         (collect_symbol_completion_matches_type): ... this.  Add
9040         completion_tracker parameter and use it instead of VEC.
9041         (make_file_symbol_completion_list_1): Rename to...
9042         (collect_file_symbol_completion_matches): ... this.  Add
9043         completion_tracker parameter and use it instead of VEC.
9044         (make_file_symbol_completion_list): Delete.
9045         (add_filename_to_list): Use completion_list instead of a VEC.
9046         (add_partial_filename_data::list): Now a completion_list.
9047         (make_source_files_completion_list): Work with a completion_list
9048         instead of a VEC.
9049         * symtab.h: Include "completer.h".
9050         (default_make_symbol_completion_list_break_on)
9051         (default_make_symbol_completion_list, make_symbol_completion_list)
9052         (make_symbol_completion_type, make_file_symbol_completion_list)
9053         (make_source_files_completion_list): Delete.
9054         (default_collect_symbol_completion_matches_break_on)
9055         (default_collect_symbol_completion_matches)
9056         (collect_symbol_completion_matches)
9057         (collect_symbol_completion_matches_type)
9058         (collect_file_symbol_completion_matches)
9059         (make_source_files_completion_list): New.
9060         * top.c (init_main): Don't install a rl_completion_entry_function
9061         hook.  Install a rl_attempted_completion_function hook instead.
9062         * tui/tui-layout.c (layout_completer): Adjust to work with a
9063         completion_tracker.
9064         * tui/tui-regs.c (tui_reggroup_completer):
9065         * tui/tui-win.c (window_name_completer, focus_completer)
9066         (winheight_completer): Adjust to work with a completion_tracker.
9067         * value.c: Include "completer.h".
9068         (complete_internalvar): Adjust to work with a completion_tracker.
9069         * value.h (complete_internalvar): Likewise.
9070
9071 2017-07-17  Pedro Alves  <palves@redhat.com>
9072
9073         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9074         renames.
9075         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9076         comments to completer_ftype's declaration.
9077         <completer_handle_brkchars>: Change type to
9078         completer_handle_brkchars_ftype.
9079         * command.h (completer_ftype): Add describing comment and give
9080         names to parameters.
9081         (completer_ftype_void): Rename to ...
9082         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
9083         (set_cmd_completer_handle_brkchars): Adjust.
9084         * completer.c (filename_completer_handle_brkchars): New function.
9085         (complete_line_internal_normal_command): New function, factored
9086         out from ...
9087         (complete_line_internal): ... here.
9088         (command_completer_handle_brkchars)
9089         (default_completer_handle_brkchars)
9090         (completer_handle_brkchars_func_for_completer): New functions.
9091         * completer.h (set_gdb_completion_word_break_characters): Delete
9092         declaration.
9093         (completer_handle_brkchars_func_for_completer): New declaration.
9094         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9095         completer_handle_brkchars_func_for_completer.
9096
9097 2017-07-17  Pedro Alves  <palves@redhat.com>
9098
9099         * completer.c (symbol_completer): New function, based on
9100         make_symbol_completion_list_fn.
9101         * completer.h (symbol_completer): New declaration.
9102         * guile/scm-cmd.c (cmdscm_completers): Adjust.
9103         * python/py-cmd.c (completers): Adjust.
9104         * symtab.c (make_symbol_completion_list_fn): Delete.
9105         * symtab.h (make_symbol_completion_list_fn): Delete.
9106         * cli/cli-decode.c (add_cmd): Adjust.
9107
9108 2017-07-17  Pedro Alves  <palves@redhat.com>
9109
9110         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9111         * dwarf2read.c: Include "filename-seen-cache.h".
9112         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9113         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9114         * filename-seen-cache.c: New file.
9115         * filename-seen-cache.h: New file.
9116         * symtab.c: Include "filename-seen-cache.h".
9117         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9118         (create_filename_seen_cache, clear_filename_seen_cache)
9119         (delete_filename_seen_cache, filename_seen): Delete, parts moved
9120         to filename-seen-cache.h/filename-seen-cache.c.
9121         (output_source_filename, sources_info)
9122         (maybe_add_partial_symtab_filename)
9123         (make_source_files_completion_list): Adjust to use
9124         filename_seen_cache.
9125
9126 2017-07-17  Pedro Alves  <palves@redhat.com>
9127
9128         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9129         fields.
9130         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9131         dwarf2_debug_sections*)): New.
9132         (dwarf2_per_objfile::dwarf2_per_objfile(const
9133         dwarf2_per_objfile&)): Declare as deleted.
9134         (dwarf2_per_objfile::operator=): Declare as deleted.
9135         (dwarf2_per_objfile::dwarf2_per_objfile)
9136         (dwarf2_per_objfile::~dwarf2_per_objfile)
9137         (dwarf2_per_objfile::free_cached_comp_units): New.
9138         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9139         ctor.  Call dwarf2_per_objfile's ctor manually.
9140         (dwarf2_locate_sections): Deleted/refactored as ...
9141         (dwarf2_per_objfile::locate_sections): ... this new method.
9142         (free_cached_comp_units): Defer to
9143         dwarf2_per_objfile::free_cached_comp_units.
9144         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9145
9146 2017-07-14  Tom Tromey  <tom@tromey.com>
9147
9148         PR rust/21764:
9149         * rust-exp.y (convert_ast_to_expression): Add "want_type"
9150         parameter.
9151         <UNOP_SIZEOF>: Split into separate case.
9152         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
9153
9154 2017-07-14  Tom Tromey  <tom@tromey.com>
9155
9156         PR rust/21763:
9157         * symtab.c (symbol_matches_domain): Add language_rust to special
9158         case.
9159         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9160         treat LOC_TYPEDEF symbols as variables.
9161
9162 2017-07-14  Pedro Alves  <palves@redhat.com>
9163
9164         * symtab.c (make_file_symbol_completion_list_1): Iterate over
9165         symtabs matching all symtabs with SRCFILE as file name instead of
9166         only considering the first hit, with lookup_symtab.
9167
9168 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9169
9170         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9171         operator_name parameters.
9172         (gen_expr): Update function call.
9173
9174 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9175
9176         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9177         parameter.
9178         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9179         Likewise.
9180         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9181         parameter, use agent_expr::gdbarch instead, update function
9182         calls.
9183         (locexpr_tracepoint_var_ref): Likewise.
9184         (loclist_tracepoint_var_ref): Likewise.
9185         * ax-gdb.c (gen_trace_static_fields): Likewise.
9186         (gen_traced_pop): Likewise.
9187         (gen_frame_args_address): Likewise.
9188         (gen_frame_locals_address): Likewise.
9189         (gen_var_ref): Likewise.
9190         (gen_struct_ref_recursive): Likewise.
9191         (gen_static_field): Likewise.
9192         (gen_maybe_namespace_elt): Likewise.
9193         (gen_expr): Likewise.
9194         (gen_trace_for_var): Likewise.
9195         (gen_trace_for_expr): Likewise.
9196         (gen_trace_for_return_address): Likewise.
9197
9198 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9199
9200         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9201         parameter.
9202         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9203
9204 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9205
9206         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9207         from ax, update calls.
9208         (gen_usual_arithmetic): Likewise.
9209         (gen_integral_promotions): Likewise.
9210         (gen_bitfield_ref): Likewise.
9211         (gen_primitive_field): Likewise.
9212         (gen_struct_ref_recursive): Likewise.
9213         (gen_struct_ref): Likewise.
9214         (gen_maybe_namespace_elt): Likewise.
9215         (gen_struct_elt_for_reference): Likewise.
9216         (gen_namespace_elt): Likewise.
9217         (gen_aggregate_elt_ref): Likewise.
9218         (gen_expr): Get gdbarch from ax, update calls.
9219         (gen_expr_binop_rest): Likewise.
9220
9221 2017-07-13  Pedro Alves  <palves@redhat.com>
9222
9223         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9224         as default tdesc.
9225         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9226         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9227         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9228         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9229         tdep.
9230         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9231         Get final tdesc from the tdep.
9232         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9233         default tdesc.
9234         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9235         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9236         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9237         Use it as default tdesc.
9238         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9239         down to amd_init_abi.  No longer handle fallback tdesc here.
9240         * amd64-tdep.h (tdesc_x32): Declare.
9241         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9242         parameter.
9243         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9244         as default tdesc.
9245
9246 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9247
9248         * s390-linux-tdep.c (s390_process_record): Add support for
9249         instructions new in arch12.
9250
9251 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9252
9253         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9254         PT_GETFSBASE and PT_GETGSBASE.
9255         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9256         PT_SETGSBASE.
9257
9258 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9259
9260         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9261         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9262         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9263         those rules.
9264         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9265         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9266         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9267         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9268         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9269         * features/i386/amd64.xml: Add 64bit-segments.xml.
9270         * features/i386/amd64-avx-avx512.c: Regenerated.
9271         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9272         * features/i386/amd64-avx-mpx.c: Regenerated.
9273         * features/i386/amd64-avx.c: Regenerated.
9274         * features/i386/amd64-mpx.c: Regenerated.
9275         * features/i386/amd64.c: Regenerated.
9276         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9277         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9278         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9279         * regformats/i386/amd64-avx.dat: Regenerated.
9280         * regformats/i386/amd64-mpx.dat: Regenerated.
9281         * regformats/i386/amd64.dat: Regenerated.
9282
9283 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9284
9285         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9286         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9287
9288 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9289
9290         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9291         unsetenv.
9292         * gnulib/aclocal.m4: Regenerate.
9293         * gnulib/config.in: Regenerate.
9294         * gnulib/configure: Regenerate.
9295         * gnulib/import/Makefile.am: Regenerate.
9296         * gnulib/import/Makefile.in: Regenerate.
9297         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9298         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9299         * gnulib/import/m4/environ.m4: New file.
9300         * gnulib/import/m4/setenv.m4: New file.
9301         * gnulib/import/setenv.c: New file.
9302         * gnulib/import/unsetenv.c: New file.
9303
9304 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9305
9306         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9307         address when op is DW_OP_addr.
9308
9309 2017-07-09  Tom Tromey  <tom@tromey.com>
9310
9311         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9312         check and apply to outer type.
9313
9314 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9315
9316         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9317         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9318         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9319         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9320
9321 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9322
9323         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9324
9325 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9326
9327         * corelow.c (get_core_siginfo): Remove.
9328         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9329         instead of get_core_siginfo.
9330         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9331         * gdbarch.h: Re-generate.
9332         * gdbarch.c: Re-generate.
9333         * linux-tdep.c (linux_core_xfer_siginfo): New.
9334         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9335
9336 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9337
9338         * corelow.c (thread_section_name): Move to ...
9339         * gdbcore.h (thread_section_name): ... here.
9340
9341 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9342
9343         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9344         (struct siginfo32): New.
9345         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9346         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9347         via ptrace(PT_LWPINFO).
9348
9349 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9350
9351         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9352         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9353         (fbsd_get_siginfo_type): New.
9354         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9355         (_initialize_fbsd_tdep): New.
9356
9357 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9358
9359         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9360         a singular dwo_unit*) to support multiple CUs in the same way that
9361         multiple TUs are supported.
9362         (create_cus_hash_table): Replace create_dwo_cu with a function for
9363         parsing multiple CUs from a DWO file.
9364         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9365         create_dwo_cu.
9366         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9367         htab_find, rather than comparing the signature to a singleton CU in
9368         the dwo_file.
9369
9370 2017-07-06  Pedro Alves  <palves@redhat.com>
9371
9372         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9373
9374 2017-07-04  Pedro Alves  <palves@redhat.com>
9375
9376         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9377         * gdbtypes.h (TYPE_STATIC): Delete.
9378         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9379         is_synchronized, is_native>: Delete.
9380         <dummy>: Bump.
9381         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9382         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9383         (TYPE_FN_FIELD_ABSTRACT): Delete.
9384
9385 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9386
9387         * buffer.h (buffer_finish): Fix spelling mistakes.
9388
9389 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9390
9391         * .dir-locals.el: Automatically switch to C-style comments in
9392         versions of Emacs that support the feature.
9393
9394 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9395             Pedro Alves  <palves@redhat.com>
9396
9397         PR cli/21688
9398         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9399         (process_next_line): New variable 'inline_cmd'.
9400         Adjust 'if' clauses for "python", "compile" and "guile" to use
9401         'command_name_equals' and check for '!inline_cmd'.
9402
9403 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9404
9405         PR cli/21688
9406         * cli/cli-script.c (command_name_equals_not_inline): New function.
9407         (process_next_line): Adjust 'if' clauses for "python", "compile"
9408         and "guile" to use command_name_equals_not_inline.
9409
9410 2017-06-29  Pedro Alves  <palves@redhat.com>
9411
9412         * completer.c (expression_completer): Call
9413         linespec_location_completer instead of location_completer.
9414
9415 2017-06-29  Pedro Alves  <palves@redhat.com>
9416
9417         * completer.c (expression_completer): Remove code that recomputes
9418         'text' from 'word'.
9419
9420 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9421
9422         * regformats/regdat.sh: Generate code with
9423         "ifndef IN_PROCESS_AGENT".
9424
9425 2017-06-28  Pedro Alves  <palves@redhat.com>
9426
9427         * command.h: Include "common/scoped_restore.h".
9428
9429 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9430
9431         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9432         instead of obstack_grow.
9433
9434 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9435
9436         PR gdb/21337
9437         * symfile.c (reread_symbols): Call objfiles_changed just before
9438         read_symbols.
9439
9440 2017-06-27  Pedro Alves  <palves@redhat.com>
9441
9442         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9443         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9444         (completion_list_add_symbol, completion_list_add_msymbol):
9445         ... these new functions.
9446         (add_symtab_completions)
9447         (default_make_symbol_completion_list_break_on_1): Adjust.
9448
9449 2017-06-27  Pedro Alves  <palves@redhat.com>
9450
9451         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9452         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9453         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9454         dtor.
9455         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9456         'storage_obstack' field an auto_obstack.  In-class initialize all
9457         non-bitfield fields.  Make minsyms_read bool.
9458         * symfile.c (read_symbols): Adjust.
9459
9460 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9461
9462         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9463         (gdbsim_store_register): Likewise.
9464
9465 2017-06-27  Pedro Alves  <palves@redhat.com>
9466
9467         * c-exp.y (name_obstack): Now an auto_obstack.
9468         (yylex): Use auto_obstack::clear.
9469         (c_parse): Use auto_obstack::clear instead of reinitializing and
9470         freeing the obstack.
9471         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9472         * d-exp.y (name_obstack): Now an auto_obstack.
9473         (yylex): Use auto_obstack::clear.
9474         (d_parse): Use auto_obstack::clear instead of reinitializing and
9475         freeing the obstack.
9476         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9477         auto_obstack.
9478         * dwarf2read.c (create_addrmap_from_index)
9479         (dwarf2_build_psymtabs_hard)
9480         (update_enumeration_type_from_children): Likewise.
9481         * gdb_obstack.h (auto_obstack): New type.
9482         * go-exp.y (name_obstack): Now an auto_obstack.
9483         (build_packaged_name): Use auto_obstack::clear.
9484         (go_parse): Use auto_obstack::clear instead of reinitializing and
9485         freeing the obstack.
9486         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9487         auto_obstack.
9488         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9489         * rust-exp.y (work_obstack): Now an auto_obstack.
9490         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9491         reinitializing and freeing the obstack.
9492         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9493         (host_char_to_target): Use auto_obstack.
9494         * utils.h (make_cleanup_obstack_free): Delete declaration.
9495         * valprint.c (generic_emit_char, generic_printstr): Use
9496         auto_obstack.
9497
9498 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9499
9500         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9501         thread.
9502         (darwin_init_thread_list): Don't update dummy thread.
9503         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9504
9505 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9506
9507         * record-full.c (netorder16): Remove.
9508
9509 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9510
9511         * common/diagnostics.h: Define macros for GCC.
9512         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9513         * common/vec.h: Include diagnostics.h.
9514         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9515         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9516         warning.
9517
9518 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9519
9520         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9521         New macro.
9522         * ada-lex.l: Ignore deprecated register warnings.
9523
9524 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9525
9526         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9527         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9528
9529 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9530
9531         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9532         its own line.
9533
9534 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9535
9536         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9537
9538 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9539
9540         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9541         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9542         (xtensa_register_read_masked): Likewise.
9543
9544 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9545
9546         * common/environ.c (gdb_environ::unset): Update comment.
9547
9548 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9549
9550         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9551         registers.
9552
9553 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9554
9555         * record-full.c (record_full_exec_insn): Use byte_vector.
9556
9557 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9558
9559         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9560         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9561
9562 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9563
9564         * remote.c (cached_reg): Move from here...
9565         * regcache.h (cached_reg): ...to here.
9566         * python/py-unwind.c (struct reg_info): Remove.
9567         (cached_frame_info): Use cached_reg_t.
9568         (pyuw_prev_register): Likewise.
9569         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9570         (pyuw_dealloc_cache): Free all registers.
9571
9572 2017-06-22  Pedro Alves  <palves@redhat.com>
9573             Simon Marchi  <simon.marchi@ericsson.com>
9574
9575         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9576         warning.
9577         * common/diagnostics.h: New file.
9578
9579 2017-06-22  Pedro Alves  <palves@redhat.com>
9580
9581         * common/agent.h: Add include guards.
9582
9583 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9584
9585         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9586         talk about addressable units instead of bytes.
9587
9588 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9589
9590         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9591         of '::const_iterator'.
9592
9593 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9594
9595         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9596         'unittests/environ-selftests.c'.
9597         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9598         * charset.c (find_charset_names): Declare object 'iconv_env'.
9599         Update code to use 'iconv_env' object.  Remove call to
9600         'free_environ'.
9601         * common/environ.c: Include <utility>.
9602         (make_environ): Delete function.
9603         (free_environ): Delete function.
9604         (gdb_environ::clear): New function.
9605         (gdb_environ::operator=): New function.
9606         (gdb_environ::get): Likewise.
9607         (environ_vector): Delete function.
9608         (set_in_environ): Delete function.
9609         (gdb_environ::set): New function.
9610         (unset_in_environ): Delete function.
9611         (gdb_environ::unset): New function.
9612         (gdb_environ::envp): Likewise.
9613         * common/environ.h: Include <vector>.
9614         (struct gdb_environ): Delete; transform into...
9615         (class gdb_environ): ... this class.
9616         (free_environ): Delete prototype.
9617         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9618         environ_vector): Likewise.
9619         * infcmd.c (run_command_1): Update code to call
9620         'envp' from 'gdb_environ' class.
9621         (environment_info): Update code to call methods from 'gdb_environ'
9622         class.
9623         (unset_environment_command): Likewise.
9624         (path_info): Likewise.
9625         (path_command): Likewise.
9626         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9627         (inferior::inferior): Initialize 'environment' using the host's
9628         information.
9629         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9630         Include "environ.h".
9631         (class inferior) <environment>: Change type from 'struct
9632         gdb_environ' to 'gdb_environ'.
9633         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9634         methods from 'gdb_environ' class.
9635         * solib.c (solib_find_1): Likewise
9636         * unittests/environ-selftests.c: New file.
9637
9638 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9639
9640         * features/i386/i386-linux.xml: Exchange the order of including
9641         32bit-linux.xml and 32bit-sse.xml.
9642         * features/i386/i386-linux.c: Regenerated.
9643
9644 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9645
9646         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9647         Delete copy ctor and assignment operator.
9648         (tdesc_type): Likewise.
9649         (tdesc_feature): Likewise.
9650         (tdesc_free_reg): Remove.
9651         (tdesc_create_reg): Use new.
9652         (tdesc_free_type): Remove.
9653         (tdesc_create_vector): Use new.
9654         (tdesc_create_union): Likewise.
9655         (tdesc_create_flags): Likewise.
9656         (tdesc_create_enum): Likewise.
9657         (tdesc_free_feature): Delete.
9658         (free_target_description): Use delete.
9659
9660 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9661
9662         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9663         registers.
9664
9665 2017-06-19  Pedro Alves  <palves@redhat.com>
9666
9667         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9668         after gdb::unlinker.
9669
9670 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9671
9672         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9673         gdb_environ to access an environment variable.
9674
9675 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9676
9677         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9678         gdb_byte*.
9679
9680 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9681
9682         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9683
9684 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9685
9686         * configure: Re-generate.
9687         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9688
9689 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9690
9691         * configure: Re-generate.
9692         * warning.m4: Pass -Werror to compiler when checking for
9693         supported warning flags.
9694
9695 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9696
9697         * Makefile.in (COMPILE.pre): Add "-x c++".
9698
9699 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9700             Pedro Alves  <palves@redhat.com>
9701             Yao Qi  <yao.qi@linaro.org>
9702
9703         * defs.h (RequireLongest): New.
9704         (extract_integer): Declare function template.
9705         (extract_signed_integer): Remove the declaration, but define it
9706         static inline.
9707         (extract_unsigned_integer): Likewise.
9708         (store_integer): Declare function template.
9709         (store_signed_integer): Remove the declaration, but define it
9710         static inline.
9711         (store_unsigned_integer): Likewise.
9712         * findvar.c (extract_integer): New function template.
9713         (extract_signed_integer): Remove.
9714         (extract_unsigned_integer): Remove.
9715         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9716         instantiations.
9717         (store_integer): New function template.
9718         (store_signed_integer): Remove.
9719         (store_unsigned_integer): Remove.
9720         (store_integer): Explicit instantiations.
9721         * regcache.c (regcache_raw_read_signed): Update.
9722         (regcache::raw_read): New function.
9723         (regcache::raw_read_signed): Remove.
9724         (regcache::raw_read_unsigned): Remove.
9725         (regcache_raw_read_unsigned): Update.
9726         (regcache_raw_write_unsigned): Update.
9727         (regcache::raw_write_signed): Remove.
9728         (regcache::raw_write): New function.
9729         (regcache_cooked_read_signed): Update.
9730         (regcache::raw_write_unsigned): Remove.
9731         (regcache::cooked_read_signed): Remove.
9732         (regcache_cooked_read_unsigned): Update.
9733         (regcache::cooked_read_unsigned): Remove.
9734         (regcache_cooked_write_signed): Update.
9735         (regcache_cooked_write_unsigned): Update.
9736         * regcache.h (regcache) <raw_read_signed>: Remove.
9737         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9738         <raw_read, raw_write>: New.
9739         <cooked_read_signed, cooked_write_signed>: Remove.
9740         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9741         <cooked_read, cooked_write>: New.
9742         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9743         (sh64_pseudo_register_write): Update.
9744
9745 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9746
9747         * arc-tdep.c (arc_disassembler_options): New variable.
9748         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9749         of default_print_insn.
9750         (arc_delayed_print_insn): Set info->section when needed,
9751         use default_print_insn to retrieve a disassembler.
9752
9753 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9754
9755         PR gdb/21574
9756         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9757         to mention $SHELL and startup-with-shell.
9758
9759 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9760
9761         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9762
9763 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9764
9765         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9766         default_print_insn instead of print_insn_aarch64.
9767         * arm-tdep.c (gdb_print_insn_arm): Call
9768         default_print_insn instead of print_insn_big_arm
9769         and print_insn_little_arm.
9770         * i386-tdep.c (i386_print_insn): Call default_print_insn
9771         instead of print_insn_i386.
9772         * ia64-tdep.c (ia64_print_insn): Call
9773         default_print_insn instead of print_insn_ia64.
9774         * mips-tdep.c (gdb_print_insn_mips): Call
9775         default_print_insn instead of print_insn_big_mips
9776         and print_insn_little_mips.
9777         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9778         instead of print_insn_spu.
9779
9780 2017-06-14  Pedro Alves  <palves@redhat.com>
9781
9782         * ada-lang.c: Include "common/byte-vector.h".
9783         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9784         * charset.c (wchar_iterator::iterate): Resize the vector instead
9785         of reserving it.
9786         * common/byte-vector.h: Include "common/def-vector.h".
9787         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9788         * cli/cli-dump.c: Include "common/byte-vector.h".
9789         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9790         * common/byte-vector.h: New file.
9791         * common/def-vector.h: New file.
9792         * common/default-init-alloc.h: New file.
9793         * dwarf2loc.c: Include "common/byte-vector.h".
9794         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9795         instead of reserving it.
9796         * dwarf2read.c: Include "common/byte-vector.h".
9797         (data_buf::m_vec): Now a gdb::byte_vector.
9798         * gdb_regex.c: Include "common/def-vector.h".
9799         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9800         * mi/mi-main.c: Include "common/byte-vector.h".
9801         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9802         * printcmd.c: Include "common/byte-vector.h".
9803         (print_scalar_formatted): Use gdb::byte_vector.
9804         * valprint.c: Include "common/byte-vector.h".
9805         (maybe_negate_by_bytes, print_decimal_chars): Use
9806         gdb::byte_vector.
9807
9808 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9809
9810         * darwin-nat.c: Include "nat/fork-inferior.h".
9811
9812 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9813
9814         * configure.nat: Factor out Darwin bits that are not
9815         architecture-specific.  Add fork-inferior.o.
9816
9817 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9818
9819         * configure.nat: Factor out AIX bits that are not
9820         architecture-specific.  Add fork-inferior.o.
9821
9822 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9823
9824         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9825         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9826         wrappers that just call rw_pieced_value.
9827
9828 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9829
9830         * dwarf2loc.c (write_pieced_value): When writing the data for a
9831         memory piece, use write_memory_with_notification instead of
9832         write_memory.
9833
9834 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9835
9836         * valops.c (read_value_memory): Change embedded_offset to
9837         represent a bit offset instead of a byte offset.
9838         * value.h (read_value_memory): Adjust comment.
9839
9840 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9841
9842         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9843         dest_offset_bits and source_offset_bits.
9844         (write_pieced_value): Likewise.
9845
9846 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9847
9848         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9849         given by DW_OP_bit_piece.
9850         (write_pieced_value): Likewise.
9851
9852 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9853
9854         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9855         some other preparations to the places where sufficient information
9856         is available.
9857         (write_pieced_value): Likewise.
9858
9859 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9860
9861         * dwarf2loc.c (bits_to_bytes): New function.
9862         (read_pieced_value): Fix offset calculations for register pieces
9863         on big-endian targets.
9864         (write_pieced_value): Likewise.
9865
9866 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9867
9868         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9869         (write_pieced_value): Likewise.
9870
9871 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9872
9873         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9874         transfer the source value's least significant bits, instead of its
9875         lowest-addressed ones.  Rename type_len to max_offset.
9876         (read_pieced_value): Mirror above changes to write_pieced_value as
9877         applicable.
9878
9879 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9880
9881         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9882         truncate full bytes from dest_offset_bits before using it as an
9883         offset into the buffer.
9884
9885 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9886
9887         * dwarf2loc.c (write_pieced_value): Include transfer size in
9888         byte-wise check.
9889
9890 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9891
9892         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9893         calculation of this_size.
9894
9895 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9896
9897         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9898         when targeting a bit-field.
9899         (write_pieced_value): Likewise.
9900
9901 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9902
9903         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9904         (allocate_piece_closure): Drop addr_size parameter.
9905         (dwarf2_evaluate_loc_desc_full): Adjust call to
9906         allocate_piece_closure.
9907
9908 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9909
9910         PR gdb/21226
9911         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9912         the LSB end, independent of endianness.
9913
9914 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9915
9916         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9917         size capping.
9918
9919 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9920
9921         * mips-linux-nat.c: Move include features/mips*-linux.c to
9922         mips-linux-tdep.c.
9923         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9924         to mips-linux-tdep.c.
9925         * mips-linux-tdep.c: Include features/mips*-linux.c
9926         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9927         functions.
9928         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9929         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9930         (tdesc_mips64_dsp_linux): Declare.
9931
9932 2017-06-12  Tom Tromey  <tom@tromey.com>
9933
9934         * valprint.h (val_print_type_code_int): Remove.
9935         * valprint.c (generic_val_print_int): Always call
9936         val_print_scalar_formatted.
9937         (val_print_type_code_int): Remove.
9938         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9939         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9940         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9941         * ada-valprint.c (ada_val_print_num): Use
9942         val_print_scalar_formatted.
9943
9944 2017-06-12  Tom Tromey  <tom@tromey.com>
9945
9946         * printcmd.c (print_scalar_formatted): Unify the two switches.
9947         Don't convert scalars to LONGEST.
9948
9949 2017-06-12  Tom Tromey  <tom@tromey.com>
9950
9951         PR exp/16225:
9952         * valprint.h (print_decimal_chars): Update.
9953         * valprint.c (maybe_negate_by_bytes): New function.
9954         (print_decimal_chars): Add "is_signed" argument.
9955         * printcmd.c (print_scalar_formatted): Update.
9956
9957 2017-06-12  Tom Tromey  <tom@tromey.com>
9958
9959         PR exp/16225:
9960         * valprint.h (print_binary_chars, print_hex_chars): Update.
9961         * valprint.c (val_print_type_code_int): Update.
9962         (print_binary_chars): Add "zero_pad" argument.
9963         (emit_octal_digit): New function.
9964         (print_octal_chars): Don't zero-pad.
9965         (print_decimal_chars): Likewise.
9966         (print_hex_chars): Add "zero_pad" argument.
9967         * sh64-tdep.c (sh64_do_fp_register): Update.
9968         * regcache.c (regcache::dump): Update.
9969         * printcmd.c (print_scalar_formatted): Update.
9970         * infcmd.c (default_print_one_register_info): Update.
9971
9972 2017-06-12  Pedro Alves  <palves@redhat.com>
9973             Alan Hayward  <alan.hayward@arm.com>
9974
9975         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9976         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9977         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9978         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9979         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9980
9981 2017-06-12  Pedro Alves  <palves@redhat.com>
9982
9983         * dwarf2read.c (mapped_symtab::data): Now a vector of
9984         symtab_index_entry instead of vector of
9985         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9986         whether an element's name is NULL instead of checking whether the
9987         element itself is NULL.
9988         (find_slot): Change return type.  Adjust.
9989         (hash_expand, , add_index_entry, uniquify_cu_indices)
9990         (write_hash_table): Adjust.
9991
9992 2017-06-12  Pedro Alves  <palves@redhat.com>
9993
9994         * dwarf2read.c (recursively_count_psymbols): New function.
9995         (write_psymtabs_to_index): Call it to compute number of psyms and
9996         pass estimate size of psyms_seen to unordered_set's ctor.
9997
9998 2017-06-12  Pedro Alves  <palves@redhat.com>
9999
10000         * dwarf2read.c (write_hash_table): Check if key already exists
10001         before emplacing.
10002
10003 2017-06-12  Pedro Alves  <palves@redhat.com>
10004
10005         * dwarf2read.c (data_buf::append_space): Rename to...
10006         (data_buf::grow): ... this, and make private.  Adjust all callers.
10007         (data_buf::append_uint): New method.
10008         (add_address_entry, write_one_signatured_type)
10009         (write_psymtabs_to_index): Use it.
10010
10011 2017-06-12  Pedro Alves  <palves@redhat.com>
10012
10013         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10014         (file_write (FILE *, const std::vector<Elem>&)): Delete.
10015         (data_buf::file_write): Call ::fwrite directly.
10016
10017 2017-06-12  Pedro Alves  <palves@redhat.com>
10018
10019         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10020         std::vector::erase.
10021
10022 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10023
10024         Code cleanup: C++ify .gdb_index producer.
10025         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10026         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10027         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10028         (create_strtab, add_string): Remove.
10029         (file_write, data_buf): New.
10030         (struct symtab_index_entry): Use std::vector for cu_indices.
10031         (struct mapped_symtab): Use std::vector for data.
10032         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10033         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10034         Remove.
10035         (find_slot): Change return type.  Update it to the new data structures.
10036         (hash_expand, add_index_entry): Update it to the new data structures.
10037         (offset_type_compare): Remove.
10038         (uniquify_cu_indices): Update it to the new data structures.
10039         (c_str_view, c_str_view_hasher, vector_hasher): New.
10040         (add_indices_to_cpool): Remove.
10041         (write_hash_table): Update it to the new data structures.
10042         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10043         (eq_psymtab_cu_index): Remove.
10044         (psym_index_map): New typedef.
10045         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10046         reference and std::unordered_map for cu_index_htab.
10047         (add_address_entry, add_address_entry_worker, write_address_map)
10048         (write_psymbols): Update it to the new data structures.
10049         (write_obstack): Remove.
10050         (struct signatured_type_index_data): Change types_list to a data_buf
10051         reference and psyms_seen to a std::unordered_set reference.
10052         (write_one_signatured_type, recursively_write_psymbols)
10053         (write_psymtabs_to_index): Update it to the new data structures.
10054
10055 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
10056
10057         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10058         separate-debug-file commands.
10059         * symfile.h (separate_debug_file_debug): New global.
10060         * symfile.c (separate_debug_file_debug): New global.
10061         (separate_debug_file_exists, find_separate_debug_file): Add
10062         debug output.
10063         (_initialize_symfile): Add "set debug separate-debug-file"
10064         command.
10065         * build-id.c (build_id_to_debug_bfd,
10066         find_separate_debug_file_by_buildid): Add debug output.
10067
10068 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
10069
10070         * gdbarch.sh (displaced_step_free_closure): Remove.
10071         * gdbarch.h, gdbarch.c: Re-generate.
10072         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10073         displaced_step_free_closure.
10074         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10075         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10076         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10077         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10078         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10079         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10080         * arch-utils.h (simple_displaced_step_free_closure): Remove.
10081         * arch-utils.c (simple_displaced_step_free_closure): Remove.
10082         * infrun.c (displaced_step_clear): Call xfree instead of
10083         gdbarch_displaced_step_free_closure.
10084
10085 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
10086
10087         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10088         NULL".
10089
10090 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
10091
10092         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10093         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10094         (mn10300_push_dummy_call): Likewise.
10095
10096 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10097
10098         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10099
10100 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10101
10102         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10103
10104 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10105
10106         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10107         able to start inferiors using a shell.
10108         (New remote packets): Announce new packet "QStartupWithShell".
10109         * remote.c: Add PACKET_QStartupWithShell.
10110         (extended_remote_create_inferior): Handle new
10111         PACKET_QStartupWithShell.
10112         (remote_protocol_features) <QStartupWithShell>: New entry for
10113         PACKET_QStartupWithShell.
10114         (_initialize_remote): Call "add_packet_config_cmd" for
10115         QStartupShell.
10116
10117 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10118             Pedro Alves  <palves@redhat.com>
10119
10120         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10121         and "nat/fork-inferior.h".
10122         * common/common-inferior.h: New file, with contents from
10123         "gdb/inferior.h".
10124         * commom/common-utils.c: Include "common-utils.h".
10125         (stringify_argv): New function.
10126         * common/common-utils.h (stringify_argv): New prototype.
10127         * configure.nat: Add "fork-inferior.o" as a dependency for
10128         "*linux*", "fbsd*" and "nbsd*" hosts.
10129         * corefile.c (get_exec_file): Update comment.
10130         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10131         instead of "startup_inferior".
10132         (darwin_create_inferior): Call "add_thread_silent" after
10133         "fork_inferior".
10134         * fork-child.c: Cleanup unnecessary includes.
10135         (SHELL_FILE): Move to "common/common-fork-child.c".
10136         (environ): Likewise.
10137         (exec_wrapper): Initialize.
10138         (get_exec_wrapper): New function.
10139         (breakup_args): Move to "common/common-fork-child.c"; rename to
10140         "breakup_args_for_exec".
10141         (escape_bang_in_quoted_argument): Move to
10142         "common/common-fork-child.c".
10143         (saved_ui): New variable.
10144         (prefork_hook): New function.
10145         (postfork_hook): Likewise.
10146         (postfork_child_hook): Likewise.
10147         (gdb_startup_inferior): Likewise.
10148         (fork_inferior): Move to "common/common-fork-child.c".  Update
10149         function to support gdbserver.
10150         (startup_inferior): Likewise.
10151         * gdbcore.h (get_exec_file): Remove declaration.
10152         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10153         instead of "startup_inferior".  Call "add_thread_silent" after
10154         "fork_inferior".
10155         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10156         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10157         instead of "startup_inferior".  Call "add_thread_silent" after
10158         "fork_inferior".
10159         * inferior.h: Include "common-inferior.h".
10160         (trace_start_error): Move to "common/common-utils.h".
10161         (trace_start_error_with_name): Likewise.
10162         (fork_inferior): Move prototype to "nat/fork-inferior.h".
10163         (startup_inferior): Likewise.
10164         (gdb_startup_inferior): New prototype.
10165         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10166         * nat/fork-inferior.h: New file.
10167         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10168         instead of "startup_inferior".  Call "add_thread_silent" after
10169         "fork_inferior".
10170         * target.h (target_terminal_init): Move prototype to
10171         "target/target.h".
10172         (target_terminal_inferior): Likewise.
10173         (target_terminal_ours): Likewise.
10174         * target/target.h (target_terminal_init): New prototype, moved
10175         from "target.h".
10176         (target_terminal_inferior): Likewise.
10177         (target_terminal_ours): Likewise.
10178         * utils.c (gdb_flush_out_err): New function.
10179
10180 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10181
10182         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10183         * common/common-gdbthread.h: New file, with parts from
10184         "gdb/gdbthread.h".
10185         * gdbthread.h: Include "common-gdbthread.h".
10186         (switch_to_thread): Moved to "common/common-gdbthread.h".
10187
10188 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10189
10190         * Makefile.in (SFILES): Add "common/job-control.c".
10191         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10192         (COMMON_OBS): Add "job-control.o".
10193         * common/job-control.c: New file, with contents from
10194         "gdb/inflow.c".
10195         * common/job-control.h: New file, with contents from "terminal.h".
10196         * fork-child.c: Include "job-control.h".
10197         * inflow.c: Include "job-control.h".
10198         (gdb_setpgid): Move to "common/common-inflow.c".
10199         (_initialize_inflow): Move setting of "job_control" to
10200         "handle_job_control".
10201         * terminal.h (job_control): Moved to "common/common-terminal.h".
10202         (gdb_setpgid): Likewise.
10203         * top.c: Include "job_control.h".
10204         * utils.c: Likewise.
10205         (job_control): Moved to "job-control.c".
10206
10207 2017-06-07  Pedro Alves  <palves@redhat.com>
10208
10209         * Makefile.in (SFILES): Add gdb_regex.c.
10210         (COMMON_OBS): Add gdb_regex.o.
10211         * ada-lang.c (ada_add_standard_exceptions)
10212         (ada_add_exceptions_from_frame, name_matches_regex)
10213         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10214         parameter type to compiled_regex.  Adjust.
10215         (ada_exceptions_list): Use compiled_regex.
10216         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10217         std::unique_ptr<compiled_regex>.
10218         (exception_catchpoint::~exception_catchpoint): Remove regfree
10219         call.
10220         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10221         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10222         * breakpoint.c (solib_catchpoint::compiled): Now a
10223         std::unique_ptr<compiled_regex>.
10224         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10225         (check_status_catch_solib): Adjust to use compiled_regex.
10226         (add_solib_catchpoint): Adjust to use compiled_regex.
10227         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10228         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10229         compiled_regex reference.  Adjust to use it.
10230         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10231         declaration.  Include "gdb_regex.h".
10232         (apropos_cmd): Change regex parameter to compiled_regex reference.
10233         * gdb_regex.c: New file.
10234         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10235         declarations.
10236         (class compiled_regex): New.
10237         * linux-tdep.c: Include "common/gdb_optional.h".
10238         (struct mapping_regexes): New, factored out from
10239         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10240         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10241         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10242         * probe.c: Include "common/gdb_optional.h".
10243         (collect_probes): Use compiled_regex and gdb::optional and remove
10244         cleanups.
10245         * skip.c: Include "common/gdb_optional.h".
10246         (skiplist_entry::compiled_function_regexp): Now a
10247         gdb::optional<compiled_regex>.
10248         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10249         (free_skiplist_entry): Remove regfree call.
10250         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10251         compiled_regex and gdb::optional.
10252         * symtab.c: Include "common/gdb_optional.h".
10253         (search_symbols): Use compiled_regex and gdb::optional.
10254         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10255         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10256         to gdb_regex.c.
10257
10258 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10259
10260         * regcache.c (regcache::save): Avoid buffer use.
10261         (regcache::dump): Likewise.
10262
10263 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10264
10265         * sh-tdep.c (sh_pseudo_register_read): Remove
10266         MAX_REGISTER_SIZE.
10267         (sh_pseudo_register_write): Likewise.
10268         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10269         (sh64_pseudo_register_write): Likewise
10270
10271 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10272
10273         * aarch64-tdep.c (aarch64_store_return_value): Use
10274         V_REGISTER_SIZE.
10275         (aarch64_pseudo_read_value): Likewise.
10276         (aarch64_pseudo_write): Likewise.
10277
10278 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10279
10280         * regformats/regdef.h (set_register_cache): Remove the
10281         declaration.
10282
10283 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10284
10285         * frame.c (frame_unwind_register_signed): Use
10286         frame_unwind_register_value.
10287
10288 2017-06-06  Pedro Alves  <palves@redhat.com>
10289
10290         PR breakpoints/21553
10291         * breakpoint.c (create_breakpoints_sal_default)
10292         (init_breakpoint_sal, create_breakpoint_sal): Use
10293         gdb::unique_xmalloc_ptr for string parameters.
10294         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10295         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10296         (base_breakpoint_create_breakpoints_sal)
10297         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10298         (strace_marker_create_breakpoints_sal)
10299         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10300         string parameters.
10301         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10302         gdb::unique_xmalloc_ptr for string parameters.
10303         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10304         parameters.
10305
10306 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10307
10308         * alpha-tdep.c (alpha_register_to_value): Use
10309         get_frame_register_value.
10310         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10311
10312 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10313
10314         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10315         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10316         (ia64_value_to_register): Likewise.
10317         (ia64_extract_return_value): Likewise.
10318         (ia64_store_return_value): Likewise.
10319         (ia64_push_dummy_call): Likewise.
10320
10321 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10322
10323         GDB 8.0 released.
10324
10325 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10326
10327         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10328
10329 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10330
10331         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10332         parameter.
10333         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10334
10335 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10336
10337         * event-loop.c (poll_timers): Unallocate timer using delete
10338         instead of xfree.
10339
10340 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10341
10342         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10343         (struct breakpoint) <~breakpoint>: New.
10344         (struct watchpoint): Inherit from breakpoint.
10345         <~watchpoint>: New.
10346         <base>: Remove.
10347         (struct tracepoint): Inherit from breakpoint.
10348         <base>: Remove.
10349         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10350         (struct longjmp_breakpoint): Inherit from breakpoint.
10351         <~longjmp_breakpoint>: New.
10352         <base>: Remove.
10353         (new_breakpoint_from_type): Remove casts.
10354         (watchpoint_in_thread_scope): Remove reference to base field.
10355         (watchpoint_del_at_next_stop): Likewise.
10356         (update_watchpoint): Likewise.
10357         (watchpoint_check): Likewise.
10358         (bpstat_check_watchpoint): Likewise.
10359         (set_longjmp_breakpoint): Likewise.
10360         (struct fork_catchpoint): Inherit from breakpoint.
10361         <base>: Remove.
10362         (struct solib_catchpoint): Inherit from breakpoint.
10363         <~solib_catchpoint>: New.
10364         <base>: Remove.
10365         (dtor_catch_solib): Change to ...
10366         (solib_catchpoint::~solib_catchpoint): ... this.
10367         (breakpoint_hit_catch_solib): Remove reference to base field.
10368         (add_solib_catchpoint): Likewise.
10369         (create_fork_vfork_event_catchpoint): Likewise.
10370         (struct exec_catchpoint): Inherit from breakpoint.
10371         <~exec_catchpoint>: New.
10372         <base>: Remove.
10373         (dtor_catch_exec): Change to ...
10374         (exec_catchpoint::~exec_catchpoint): ... this.
10375         (dtor_watchpoint): Change to ...
10376         (watchpoint::~watchpoint): ... this.
10377         (watch_command_1): Remove reference to base field.
10378         (catch_exec_command_1): Likewise.
10379         (base_breakpoint_dtor): Change to ...
10380         (breakpoint::~breakpoint): ... this.
10381         (base_breakpoint_ops): Remove dtor field value.
10382         (longjmp_bkpt_dtor): Change to ...
10383         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10384         (strace_marker_create_breakpoints_sal): Remove reference to base
10385         field.
10386         (delete_breakpoint): Don't manually call breakpoint destructor.
10387         (create_tracepoint_from_upload): Remove reference to base field.
10388         (trace_pass_set_count): Likewise.
10389         (initialize_breakpoint_ops): Don't initialize
10390         momentary_breakpoint_ops, don't set dtors.
10391         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10392         <~ada_catchpoint>: New.
10393         <base>: Remove.
10394         (create_excep_cond_exprs): Remove reference to base field.
10395         (dtor_exception): Change to ...
10396         (ada_catchpoint::~ada_catchpoint): ... this.
10397         (dtor_catch_exception): Remove.
10398         (dtor_catch_exception_unhandled): Remove.
10399         (dtor_catch_assert): Remove.
10400         (create_ada_exception_catchpoint): Remove reference to base
10401         field.
10402         (initialize_ada_catchpoint_ops): Don't set dtors.
10403         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10404         breakpoint.
10405         <~signal_catchpoint>: New.
10406         <base>: Remove.
10407         (signal_catchpoint_dtor): Change to ...
10408         (signal_catchpoint::~signal_catchpoint): ... this.
10409         (create_signal_catchpoint): Remove reference to base field.
10410         (initialize_signal_catchpoint_ops): Don't set dtor.
10411         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10412         from breakpoint.
10413         <~syscall_catchpoint>: New.
10414         <base>: Remove.
10415         (dtor_catch_syscall): Change to ...
10416         (syscall_catchpoint::~syscall_catchpoint): ... this.
10417         (create_syscall_event_catchpoint): Remove reference to base
10418         field.
10419         (initialize_syscall_catchpoint_ops): Don't set dtor.
10420         * break-catch-throw.c (struct exception_catchpoint): Inherit
10421         from breakpoint.
10422         <~exception_catchpoint>: New.
10423         <base>: Remove.
10424         (dtor_exception_catchpoint): Change to ...
10425         (exception_catchpoint::~exception_catchpoint): ... this.
10426         (handle_gnu_v3_exceptions): Remove reference to base field.
10427         (initialize_throw_catchpoint_ops): Don't set dtor.
10428         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10429         field.
10430         * remote.c (remote_get_tracepoint_status): Likewise.
10431         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10432         * tracefile.c (tracefile_fetch_registers): Likewise.
10433         * tracepoint.c (actions_command): Likewise.
10434         (validate_actionline): Likewise.
10435         (tfind_1): Likewise.
10436         (get_traceframe_location): Likewise.
10437         (find_matching_tracepoint_location): Likewise.
10438         (parse_tracepoint_status): Likewise.
10439         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10440
10441 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10442
10443         * breakpoint.c (struct longjmp_breakpoint): New struct.
10444         (is_tracepoint_type): Change return type to bool.
10445         (is_longjmp_type): New function.
10446         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10447         (set_raw_breakpoint_without_location): Use
10448         new_breakpoint_from_type.
10449         (set_raw_breakpoint): Likewise.
10450
10451 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10452
10453         * breakpoint.c (new_breakpoint_from_type): New function.
10454         (create_breakpoint_sal): Use new_breakpoint_from_type and
10455         unique_ptr.
10456         (create_breakpoint): Likewise.
10457
10458 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10459
10460         * memattr.c (mem_info_command): Rename to ...
10461         (info_mem_command): ... this.
10462         (mem_enable_command): Rename to ...
10463         (enable_mem_command): ... this.
10464         (mem_disable_command): Rename to ...
10465         (disable_mem_command): ... this.
10466         (mem_delete_command): Rename to ...
10467         (delete_mem_command): ... this.
10468         (_initialize_mem): Adjust function names.
10469
10470 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10471
10472         * btrace.c (handle_pt_insn_events): New.
10473         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10474         STATUS.  Split into this and ...
10475         (handle_pt_insn_event_flags): ... this.
10476
10477 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10478
10479         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10480         and struct pt_insn.resynced.
10481         * configure: Regenerated.
10482         * config.in: Regenerated.
10483
10484 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10485
10486         * btrace.c (ftrace_find_call_by_number): New function.
10487         (ftrace_new_function): Store objects, not pointers.
10488         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10489         ftrace_new_gap, ftrace_update_function,
10490         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10491         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10492         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10493         btrace_ends_with_single_insn, btrace_call_get): Account for
10494         btrace_thread_info::functions now storing objects.
10495         * btrace.h (struct btrace_thread_info): Add constructor.
10496         (struct btrace_thread_info) <functions>: Make std::vector.
10497         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10498         Initialize with default values.
10499         * record-btrace.c (record_btrace_frame_sniffer): Account for
10500         btrace_thread_info::functions now storing objects.
10501
10502 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10503
10504         * btrace.c: Remove typedef bfun_s.
10505         (ftrace_new_gap): Directly add gaps to the list of gaps.
10506         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10507         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10508         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10509         instead of gdb VEC.
10510
10511 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10512
10513         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10514         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10515         with btrace_thread_info::next_segment and
10516         btrace_thread_info::prev_segment.
10517         * btrace.h: Remove struct btrace_func_link.
10518         (struct btrace_function): Replace pair of function segment pointers
10519         with pair of indices.
10520         * python/py-record-btrace.c (btpy_call_prev_sibling,
10521         btpy_call_next_sibling): Replace references to
10522         btrace_thread_info::segment with btrace_thread_info::next_segment and
10523         btrace_thread_info::prev_segment.
10524         * record-btrace.c (record_btrace_frame_this_id): Use
10525         btrace_find_call_by_number.
10526
10527 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10528
10529         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10530         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10531         btrace_insn_next, btrace_insn_prev): Remove references to
10532         btrace_thread_info::flow.
10533         * btrace.h (struct btrace_function): Remove FLOW.
10534
10535 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10536
10537         * btrace.c (ftrace_find_call_by_number): New function.
10538         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10539         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10540         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10541         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10542         index.
10543         * btrace.h (struct btrace_function): Turn UP into an index.
10544         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10545         as an index.
10546         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10547         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10548         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10549
10550 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10551
10552         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10553         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10554         ftrace_update_function, ftrace_compute_global_level_offset,
10555         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10556         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10557         btrace_insn_end, btrace_is_empty): Remove references to
10558         btrace_thread_info::begin and btrace_thread_info::end.
10559         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10560         (struct btrace_thread_info) <functions>: Adjust comment.
10561         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10562         btrace_thread_info::begin.
10563
10564 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10565
10566         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10567         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10568         ftrace_update_function): Remove arguments that implicitly were always
10569         BTINFO->END.
10570         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10571         Don't pass BTINFO->END.
10572
10573 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10574
10575         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10576         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10577         btrace_find_insn_by_number): Replace function segment pointer with
10578         index.
10579         (btrace_insn_cmp): Simplify.
10580         * btrace.h: (struct btrace_insn_iterator) Rename index to
10581         insn_index.  Replace function segment pointer with index into function
10582         segment vector.
10583         * record-btrace.c (record_btrace_call_history): Replace function
10584         segment pointer use with index.
10585         (record_btrace_frame_sniffer): Retrieve function call segment through
10586         vector.
10587         (record_btrace_set_replay): Remove defunc't safety check.
10588
10589 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10590
10591         * btrace.c (btrace_ends_with_single_insn): New function.
10592         (btrace_call_get, btrace_call_number, btrace_call_begin,
10593         btrace_call_end, btrace_call_next, btrace_call_prev,
10594         btrace_find_call_by_number): Use index into call segment vector
10595         instead of pointer.
10596         (btrace_call_cmp): Simplify.
10597         * btrace.h (struct btrace_call_iterator): Replace function call segment
10598         pointer with index into vector.
10599         * record-btrace.c (record_btrace_call_history): Use index instead of
10600         pointer.
10601
10602 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10603
10604         * btrace.c (btrace_insn_begin, btrace_insn_end,
10605         btrace_find_insn_by_number): Add btinfo to iterator.
10606         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10607
10608 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10609
10610         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10611         and save pointers directly.
10612         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10613         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10614         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10615         changed signature of functions.
10616         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10617         (btrace_fetch): Remove code that adds btrace_function pointers to
10618         vector of btrace_functions.
10619         (btrace_clear): Simplify freeing vector of btrace_functions.
10620
10621 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10622
10623         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10624         Replace VEC_* with std::vector functions.
10625         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10626         (struct btrace_thread_info)<functions>: Change type to std::vector.
10627
10628 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10629
10630         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10631         "Removed targets and native configurations" up.  Merge duplicate
10632         "New commands" sub-sections.  Add "New options" sub-sections.
10633
10634 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10635
10636         * defs.h (copy_integer_to_size): New declaration.
10637         * findvar.c (copy_integer_to_size): New function.
10638         (do_cint_test): New selftest function.
10639         (copy_integer_to_size_test): Likewise.
10640         (_initialize_findvar): Likewise.
10641         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10642         (mips_fbsd_collect_reg): Use raw_collect_integer.
10643         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10644         (mips64_fill_gregset): Use raw_collect_integer
10645         (mips64_fill_fpregset): Use raw_supply_integer.
10646         * regcache.c (regcache::raw_supply_integer): New function.
10647         (regcache::raw_collect_integer): Likewise.
10648         * regcache.h: (regcache::raw_supply_integer): New declaration.
10649         (regcache::raw_collect_integer): Likewise.
10650
10651 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10652
10653         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10654         (COMMON_OBS): Add gdbarch-selftests.o.
10655         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10656         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10657         * gdbarch-selftests.c: New file.
10658         * regcache.h (regcache) <~regcache>: Mark it virtual if
10659         GDB_SELF_TEST.
10660         <raw_write>: Likewise.
10661
10662 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10663
10664         * regcache.c (current_regcache): Change it to
10665         regcache::current_regcache.
10666         (regcache_observer_target_changed): Update.
10667         (regcache_thread_ptid_changed): Make it a regcache static
10668         method.
10669         (regcache_thread_ptid_changed): Update.
10670         (class regcache_access): New.
10671         (current_regcache_test): Update.
10672         (_initialize_regcache): Update.
10673         * regcache.h: Include forward_list.
10674         (regcache): Declare regcache_thread_ptid_changed and declare
10675         registers_changed_ptid as friend.
10676
10677 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10678
10679         * i387-tdep.c (i387_register_to_value): Use register_size
10680         instead of TYPE_LENGTH.
10681         * m68k-tdep.c (m68k_register_to_value): Likewise.
10682
10683 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10684
10685         * i387-tdep.c (i387_convert_register_p): Return false if type
10686         code isn't TYPE_CODE_FLT.
10687
10688 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10689
10690         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10691         length is 4.
10692         (alpha_register_to_value): Remove type length check.
10693         (alpha_value_to_register): Likewise.
10694
10695 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10696
10697         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10698         TYPE_CODE_FLT.
10699
10700 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10701
10702         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10703         TYPE_CODE_FLT or not.
10704
10705 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10706
10707         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10708         * avr-tdep.c (avr_gdbarch_init): Likewise.
10709         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10710         * cris-tdep.c (cris_gdbarch_init): Likewise.
10711         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10712         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10713         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10714         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10715         * mep-tdep.c (mep_gdbarch_init): Likewise.
10716         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10717         * mips-tdep.c (mips_gdbarch_init): Likewise.
10718         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10719         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10720         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10721         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10722         * v850-tdep.c (v850_gdbarch_init): Likewise.
10723
10724 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10725
10726         * selftest-arch.c (tests_with_arch): Call registers_changed
10727         and reinit_frame_cache.
10728         * selftest.c (run_self_tests): Likewise.
10729
10730 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10731
10732         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10733         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10734
10735 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10736
10737         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10738         set_gdbarch_print_insn.
10739
10740 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10741
10742         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10743         set_gdbarch_print_insn.
10744
10745 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10746
10747         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10748         set_gdbarch_print_insn.
10749         * arc-tdep.c (arc_gdbarch_init): Likewise.
10750         * arch-utils.c: include dis-asm.h.
10751         (default_print_insn): New function.
10752         * arch-utils.h (default_print_insn): Declare.
10753         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10754         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10755         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10756         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10757         * frv-tdep.c (frv_gdbarch_init): Likewise.
10758         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10759         * gdbarch.sh (print_insn): Use default_print_insn.
10760         * gdbarch.c: Regenerated.
10761         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10762         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10763         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10764         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10765         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10766         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10767         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10768         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10769         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10770         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10771         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10772         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10773         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10774         * mt-tdep.c (mt_gdbarch_init): Likewise.
10775         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10776         * nios2-tdep.c (nios2_print_insn): Remove.
10777         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10778         * rx-tdep.c (rx_gdbarch_init): Likewise.
10779         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10780         * score-tdep.c (score_print_insn): Remove.
10781         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10782         * sh-tdep.c (sh_gdbarch_init): Likewise.
10783         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10784         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10785         * tic6x-tdep.c (tic6x_print_insn): Remove.
10786         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10787         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10788         * v850-tdep.c (v850_gdbarch_init): Likewise.
10789         * vax-tdep.c (vax_gdbarch_init): Likewise.
10790         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10791         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10792
10793 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10794
10795         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10796         (MIPS_FP0_REGNUM): Remove.
10797         (MIPS_FSR_REGNUM): Remove.
10798         (mips_fbsd_supply_fpregs): Use mips_regnum.
10799         (mips_fbsd_supply_gregs): Likewise.
10800         (mips_fbsd_collect_fpregs): Likewise.
10801         (mips_fbsd_collect_gregs): Likewise.
10802
10803 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10804
10805         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10806         (getpfpregs_supplies): New function.
10807         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10808         getfpregs_supplies.
10809         (mips_fbsd_store_inferior_registers): Likewise.
10810
10811 2017-05-22  Pedro Alves <palves@redhat.com>
10812
10813         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10814         maintainer.
10815
10816 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10817
10818         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10819         (store_register): Likewise.
10820         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10821         (get_decimal_float_return_value): Likewise.
10822         (do_ppc_sysv_return_value): Likewise.
10823         (ppc64_sysv_abi_push_integer): Likewise.
10824         (ppc64_sysv_abi_push_freg): Likewise.
10825         (ppc64_sysv_abi_return_value_base): Likewise.
10826         (ppc64_sysv_abi_return_value): Likewise.
10827         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10828         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10829         * rs6000-nat.c: Likewise.
10830         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10831         (rs6000_value_to_register): Likewise.
10832         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10833
10834 2017-05-21  Tom Tromey  <tom@tromey.com>
10835
10836         PR rust/21466:
10837         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10838         arrays as "[T]", not "[T; ]".
10839
10840 2017-05-19  Tom Tromey  <tom@tromey.com>
10841
10842         PR rust/21484:
10843         * rust-lang.c (exp_descriptor_rust): New function.
10844         (rust_language_defn): Use it.
10845         * p-lang.c (pascal_language_defn): Update.
10846         * opencl-lang.c (opencl_language_defn): Update.
10847         * objc-lang.c (objc_language_defn): Update.
10848         * m2-lang.c (m2_language_defn): Update.
10849         * language.h (struct language_defn)
10850         <la_watch_location_expression>: New member.
10851         * language.c (unknown_language_defn, auto_language_defn)
10852         (local_language_defn): Update.
10853         * go-lang.c (go_language_defn): Update.
10854         * f-lang.c (f_language_defn): Update.
10855         * d-lang.c (d_language_defn): Update.
10856         * c-lang.h (c_watch_location_expression): Declare.
10857         * c-lang.c (c_watch_location_expression): New function.
10858         (c_language_defn, cplus_language_defn, asm_language_defn)
10859         (minimal_language_defn): Use it.
10860         * breakpoint.c (watch_command_1): Call
10861         la_watch_location_expression.
10862         * ada-lang.c (ada_language_defn): Update.
10863
10864 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10865
10866         PR tui/21482
10867         * gdb_curses.h (NOMACROS): Define.
10868         (NCURSES_NOMACROS): Define.
10869
10870 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10871
10872         PR tui/21482
10873         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10874         arg to char *.
10875         * tui/tui-wingeneral.c (box_win): Likewise.
10876         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10877         (tui_show_source_line): Likewise.
10878         (tui_show_exec_info_content): Likewise.
10879
10880 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10881
10882         * sparc-tdep.c (sparc_structure_return_p)
10883         (sparc_arg_on_registers_p): New functions.
10884         (sparc32_store_arguments): Use them.
10885         * sparc64-tdep.c (sparc64_16_byte_align_p)
10886         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10887         Handle TYPE_CODE_ARRAY.
10888
10889 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10890
10891         * cli/cli-decode.c (add_alias_cmd): New function.
10892         * command.h (add_alias_cmd): Declare.
10893         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10894         instead call add_alias_cmd.
10895
10896 2017-05-17  Pedro Alves  <palves@redhat.com>
10897
10898         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10899         (nat_makefile_frag): ... this.  All references updated.
10900         * configure.ac: Likewise.
10901         * configure.nat: Likewise.  Enhance comments.
10902         * configure: Regenerate.
10903
10904 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10905
10906         * procfs.c (procfs_create_inferior): Change prototype to match
10907         definition.
10908
10909 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10910
10911         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10912         C++ compiler warning.
10913
10914 2017-05-12  Tom Tromey  <tom@tromey.com>
10915
10916         PR rust/21483:
10917         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10918         recurse, just call value_struct_elt directly.
10919
10920 2017-05-12  Tom Tromey  <tom@tromey.com>
10921
10922         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10923         OP_RUST_ARRAY>: Fix.
10924
10925 2017-05-12  Tom Tromey  <tom@tromey.com>
10926
10927         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10928
10929 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10930
10931         * regcache.c: Include <forward_list>.
10932         (struct regcache_list): Remove.
10933         (current_regcache): Update.
10934         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10935         (regcache_thread_ptid_changed): Likewise.
10936         (registers_changed_ptid): Likewise.
10937         (current_regcache_size): Likewise.
10938
10939 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10940
10941         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10942         (current_regcache_size): New function.
10943         (current_regcache_test): New function.
10944         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10945
10946 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10947
10948         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10949         (print_gp_register_row): Use get_frame_register_value.
10950
10951 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10952
10953         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10954         (mips_supply_fpregset): Likewise.
10955         (mips64_supply_gregset): Likewise.
10956
10957 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10958
10959         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10960         regcache->raw_supply_zeroed.
10961
10962 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10963
10964         * configure.nat: Rearrange 'case' statements to match
10965         host before cpu.
10966
10967 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10968
10969         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10970         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10971         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10972         "@nat_extra_makefile_frag@".
10973         (Makefile): Remove dependency on "@frags@".
10974         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10975         (data-directory/Makefile): Likewise.
10976         * config/aarch64/linux.mh: Deleted; moved contents to
10977         "gdb/configure.nat".
10978         * config/alpha/alpha-linux.mh: Likewise.
10979         * config/alpha/nbsd.mh: Likewise.
10980         * config/arm/linux.mh: Likewise.
10981         * config/arm/nbsdelf.mh: Likewise.
10982         * config/i386/cygwin.mh: Likewise.
10983         * config/i386/cygwin64.mh: Likewise.
10984         * config/i386/darwin.mh: Likewise.
10985         * config/i386/fbsd.mh: Likewise.
10986         * config/i386/fbsd64.mh: Likewise.
10987         * config/i386/go32.mh: Likewise.
10988         * config/i386/i386gnu.mh: Likewise.
10989         * config/i386/i386sol2.mh: Likewise.
10990         * config/i386/linux.mh: Likewise.
10991         * config/i386/linux64.mh: Likewise.
10992         * config/i386/mingw.mh: Likewise.
10993         * config/i386/mingw64.mh: Likewise.
10994         * config/i386/nbsd64.mh: Likewise.
10995         * config/i386/nbsdelf.mh: Likewise.
10996         * config/i386/nto.mh: Likewise.
10997         * config/i386/obsd.mh: Likewise.
10998         * config/i386/obsd64.mh: Likewise.
10999         * config/i386/sol2-64.mh: Likewise.
11000         * config/ia64/linux.mh: Likewise.
11001         * config/m32r/linux.mh: Likewise.
11002         * config/m68k/linux.mh: Likewise.
11003         * config/m68k/nbsdelf.mh: Likewise.
11004         * config/m68k/obsd.mh: Likewise.
11005         * config/m88k/obsd.mh: Likewise.
11006         * config/mips/fbsd.mh: Likewise.
11007         * config/mips/linux.mh: Likewise.
11008         * config/mips/nbsd.mh: Likewise.
11009         * config/mips/obsd64.mh: Likewise.
11010         * config/pa/linux.mh: Likewise.
11011         * config/pa/nbsd.mh: Likewise.
11012         * config/pa/obsd.mh: Likewise.
11013         * config/powerpc/aix.mh: Likewise.
11014         * config/powerpc/fbsd.mh: Likewise.
11015         * config/powerpc/linux.mh: Likewise.
11016         * config/powerpc/nbsd.mh: Likewise.
11017         * config/powerpc/obsd.mh: Likewise.
11018         * config/powerpc/ppc64-linux.mh: Likewise.
11019         * config/powerpc/spu-linux.mh: Likewise.
11020         * config/s390/linux.mh: Likewise.
11021         * config/sh/nbsd.mh: Likewise.
11022         * config/sparc/fbsd.mh: Likewise.
11023         * config/sparc/linux.mh: Likewise.
11024         * config/sparc/linux64.mh: Likewise.
11025         * config/sparc/nbsd64.mh: Likewise.
11026         * config/sparc/nbsdelf.mh: Likewise.
11027         * config/sparc/obsd64.mh: Likewise.
11028         * config/sparc/sol2.mh: Likewise.
11029         * config/tilegx/linux.mh: Likewise.
11030         * config/vax/nbsdelf.mh: Likewise.
11031         * config/vax/obsd.mh: Likewise.
11032         * config/xtensa/linux.mh: Likewise.
11033         * config/i386/i386gnu.mn: New file, with excerpts from
11034         "config/i386/i386gnu.mh".
11035         * configure: Regenerate.
11036         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11037         *.mh files under "gdb/config".
11038         * configure.nat: New file, with contents from the
11039         "gdb/config/*/*.mh" files.
11040
11041 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
11042
11043         * btrace.c (btrace_clear): Free insn vector.
11044
11045 2017-05-05  Pedro Alves  <palves@redhat.com>
11046
11047         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11048         * configure: Regenerate.
11049
11050 2017-05-04  Pedro Alves  <palves@redhat.com>
11051
11052         * Makefile.in (SFILES): Add progspace-and-thread.c.
11053         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11054         (COMMON_OBS): Add progspace-and-thread.o.
11055         * breakpoint.c: Include "progspace-and-thread.h".
11056         (update_inserted_breakpoint_locations)
11057         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11058         Use scoped_restore_current_pspace_and_thread.
11059         (create_std_terminate_master_breakpoint): Use
11060         scoped_restore_current_program_space.
11061         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11062         (print_breakpoint_location): Use
11063         scoped_restore_current_program_space.
11064         (bp_loc_is_permanent): Use
11065         scoped_restore_current_pspace_and_thread.
11066         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11067         (download_tracepoint_locations): Use
11068         scoped_restore_current_pspace_and_thread.
11069         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11070         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11071         (enum step_over_calls_kind): Moved from inferior.h.
11072         (class scoped_restore_current_thread): New class.
11073         * gdbthread.h (make_cleanup_restore_current_thread): Delete
11074         declaration.
11075         (scoped_restore_current_thread): New class.
11076         * infcmd.c: Include "common/gdb_optional.h".
11077         (continue_1, proceed_after_attach): Use
11078         scoped_restore_current_thread.
11079         (notice_new_inferior): Use scoped_restore_current_thread.
11080         * inferior.c: Include "progspace-and-thread.h".
11081         (restore_inferior, save_current_inferior): Delete.
11082         (add_inferior_command, clone_inferior_command): Use
11083         scoped_restore_current_pspace_and_thread.
11084         * inferior.h (scoped_restore_current_inferior): New class.
11085         * infrun.c: Include "progspace-and-thread.h" and
11086         "common/gdb_optional.h".
11087         (follow_fork_inferior): Use
11088         scoped_restore_current_pspace_and_thread.
11089         (scoped_restore_exited_inferior): New class.
11090         (handle_vfork_child_exec_or_exit): Use
11091         scoped_restore_exited_inferior,
11092         scoped_restore_current_pspace_and_thread,
11093         scoped_restore_current_thread and scoped_restore.
11094         (fetch_inferior_event): Use scoped_restore_current_thread.
11095         * linespec.c (decode_line_full, decode_line_1): Use
11096         scoped_restore_current_program_space.
11097         * mi/mi-main.c: Include "progspace-and-thread.h".
11098         (exec_continue): Use scoped_restore_current_thread.
11099         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11100         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11101         * proc-service.c (ps_pglobal_lookup): Use
11102         scoped_restore_current_program_space.
11103         * progspace-and-thread.c: New file.
11104         * progspace-and-thread.h: New file.
11105         * progspace.c (release_program_space, clone_program_space): Use
11106         scoped_restore_current_program_space.
11107         (restore_program_space, save_current_program_space)
11108         (save_current_space_and_thread): Delete.
11109         (switch_to_program_space_and_thread): Moved to
11110         progspace-and-thread.c.
11111         * progspace.h (save_current_program_space)
11112         (save_current_space_and_thread): Delete declarations.
11113         (scoped_restore_current_program_space): New class.
11114         * remote.c (remote_btrace_maybe_reopen): Use
11115         scoped_restore_current_thread.
11116         * symtab.c: Include "progspace-and-thread.h".
11117         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11118         * thread.c (print_thread_info_1): Use
11119         scoped_restore_current_thread.
11120         (struct current_thread_cleanup): Delete.
11121         (do_restore_current_thread_cleanup)
11122         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11123         (scoped_restore_current_thread::~scoped_restore_current_thread):
11124         ... this new dtor.
11125         (make_cleanup_restore_current_thread): Rename/convert to ...
11126         (scoped_restore_current_thread::scoped_restore_current_thread):
11127         ... this new ctor.
11128         (thread_apply_all_command): Use scoped_restore_current_thread.
11129         (thread_apply_command): Use scoped_restore_current_thread.
11130         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11131         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11132
11133 2017-05-04  Pedro Alves  <palves@redhat.com>
11134
11135         * thread.c (make_cleanup_restore_current_thread): Move
11136         find_thread_ptid call before the is_stopped call.  Assert that the
11137         thread is found.  Replace is_stopped call by checking the thread's
11138         state directly.  Remove unnecessary NULL-thread check.
11139
11140 2017-05-04  Pedro Alves  <palves@redhat.com>
11141
11142         * corelow.c (thread_section_name): New class.
11143         (get_core_register_section, get_core_siginfo): Use it.
11144
11145 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11146
11147         * corelow.c (sniff_core_bfd): Remove extra semicolon.
11148         (get_core_register_section): Remove xfree of NULL pointer.
11149
11150 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
11151
11152         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11153         * regcache.c (regcache::raw_supply_zeroed): New function.
11154         * regcache.h (regcache::raw_supply_zeroed): New declaration.
11155
11156 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
11157
11158         * gdbarch.sh: Remove commented out definition of
11159         TARGET_CHAR_BIT.
11160         * gdbarch.h: Re-generate.
11161
11162 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
11163
11164         * configure: Regenerate.
11165
11166 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11167
11168         * solib-target.c (solib_target_relocate_section_addresses):
11169         Remove num_section_bases, num_bases, segment_bases variables.
11170
11171 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11172
11173         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11174
11175 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11176
11177         * solib-target.c: Include <vector>
11178         (struct lm_info_target) <~lm_info_target>: Remove.
11179         <segment_bases, section_bases>: Change type to
11180         std::vector<CORE_ADDR>.
11181         (library_list_start_segment, library_list_start_section,
11182         library_list_end_library,
11183         solib_target_relocate_section_addresses): Adjust.
11184
11185 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11186
11187         * gdbarch.sh (software_single_step): Change return type to
11188         std::vector<CORE_ADDR>.
11189         * gdbarch.c, gdbarch.h: Re-generate.
11190         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11191         Adjust.
11192         (arm_deal_with_atomic_sequence_raw): Adjust.
11193         (thumb_get_next_pcs_raw): Adjust.
11194         (arm_get_next_pcs_raw): Adjust.
11195         (arm_get_next_pcs): Adjust.
11196         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11197         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11198         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11199         (alpha_software_single_step): Adjust.
11200         * alpha-tdep.h (alpha_software_single_step): Adjust.
11201         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11202         * arm-tdep.c (arm_software_single_step): Adjust.
11203         (arm_breakpoint_kind_from_current_state): Adjust.
11204         * arm-tdep.h (arm_software_single_step): Adjust.
11205         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11206         * cris-tdep.c (cris_software_single_step): Adjust.
11207         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11208         (micromips_deal_with_atomic_sequence): Adjust.
11209         (deal_with_atomic_sequence): Adjust.
11210         (mips_software_single_step): Adjust.
11211         * mips-tdep.h (mips_software_single_step): Adjust.
11212         * moxie-tdep.c (moxie_software_single_step): Adjust.
11213         * nios2-tdep.c (nios2_software_single_step): Adjust.
11214         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11215         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11216         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11217         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11218         * sparc-tdep.c (sparc_software_single_step): Adjust.
11219         * spu-tdep.c (spu_software_single_step): Adjust.
11220         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11221
11222 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11223
11224         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11225         * gdbarch.h: Re-generate.
11226
11227 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11228
11229         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11230         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11231         * python/py-instruction.c, python/py-instruction.h: New file.
11232         * python/py-record.c: Add py-instruction.h include.
11233         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11234         gdb.RecordInstruction.
11235         * python/python-internal.h: Add gdbpy_initialize_instruction
11236         declaration.
11237         * python/python.c (do_start_initialization): Add
11238         gdbpy_initialize_instruction.
11239
11240 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11241
11242         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11243         Remove.
11244         (btrace_func_from_recpy_func): New function.
11245         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11246         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11247         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11248         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11249         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11250         Also, use new helper functions.
11251         (btpy_list_item): Use new helper functions.
11252         (recpy_bt_function_call_history): Use new type name.
11253         (btpy_call_getset): Remove.
11254         (gdbpy_initialize_btrace): Remove code to initialize
11255         gdb.BtraceFunctionCall.
11256         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11257         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11258         recpy_bt_func_prev, recpy_bt_func_next): New export.
11259         * python/py-record.c (recpy_func_type): New static object.
11260         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11261         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11262         recpy_func_next): New function.
11263         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11264         (recpy_func_getset): New static object.
11265         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11266         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11267
11268 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11269
11270         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11271         (btpy_object, btpy_insn_type, btpy_new): Remove.
11272         (btpy_list_object): Use gdb.RecordInstruction type instead of
11273         gdb.BtraceInstruction type.
11274         (btrace_insn_from_recpy_insn): New function.
11275         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11276         btpy_new.
11277         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11278         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11279         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11280         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11281         instead of btpy_object.
11282         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11283         btpy_insn_data, btpy_insn_decode): Rename to ...
11284         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11285         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11286         recpy_bt_insn_decode): This.  Also, use new helper functions.
11287         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11288         recpy_insn_type.
11289         (btpy_insn_getset): Remove.
11290         (gdbpy_initialize_btrace): Remove code to initialize
11291         gdb.BtraceInstruction.  Use recpy_element_object.
11292         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11293         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11294         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11295         * python/py-record.c (recpy_insn_type): New static object.
11296         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11297         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11298         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11299         New function.
11300         (recpy_insn_getset): New static object.
11301         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11302         * python/py-record.h (recpy_element_object): New typedef.
11303         (recpy_insn_type, recpy_insn_new): New export.
11304
11305 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11306
11307         * py-record-btrace.c (btpy_insn_new): Removed.
11308         (btpy_insn_or_gap_new): New function.
11309         (btpy_insn_error): Removed.
11310         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11311         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11312         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11313         btpy_insn_or_gap_new instead of btpy_insn_new.
11314         (btpy_insn_getset): Remove btpy_insn_error.
11315         * py-record.c (recpy_gap_type): New static object.
11316         (recpy_gap_object): New typedef.
11317         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11318         recpy_gap_reason_string): New function.
11319         (recpy_gap_getset): New static object.
11320         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11321         * py-record.h (recpy_gap_new): New export.
11322
11323 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11324
11325         * python/py-record.c (recpy_ptid): Remove.
11326         (recpy_record_getset): Remove recpy_ptid.
11327
11328 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11329
11330         * btrace.c (btrace_fetch): Set inferior_ptid.
11331         * python/py-record-btrace.c: Add "py-record.h" include.
11332         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11333         recpy_bt_end, recpy_bt_instruction_history,
11334         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11335         in gdb.Record object instead of current ptid.
11336         * python/py-record.c: Include new "py-record.h" file.
11337         (recpy_record_object): Moved to py-record.h.
11338         * python/py-record.h: New file.
11339
11340 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11341
11342         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11343         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11344         indentation.
11345
11346 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11347
11348         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11349         the past maintainers section.
11350
11351 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11352
11353         * infcmd.c (get_return_value): Use regcache ctor, and remove
11354         cleanup.
11355
11356 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11357             Pedro Alves  <palves@redhat.com>
11358
11359         * regcache.c (regcache::regcache): New tag dispatch ctor.
11360         (do_cooked_read): Moved above.
11361         (regcache_dup): Use the tag dispatch ctor..
11362         * regcache.h (regcache): Declare ctor, delete copy ctor and
11363         assignment operator, remove friend regcache_dup.
11364
11365 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11366
11367         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11368         call method save instead of regcache_cpy.
11369         * regcache.h (struct regcache): Make regcache_dup a friend.
11370
11371 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11372
11373         * regcache.c (struct regcache): Move to regcache.h
11374         (regcache::arch): New method.
11375         (regcache_get_ptid): Update.
11376         (get_regcache_arch): Call arch method.
11377         (get_regcache_aspace): Call method aspace.
11378         (register_buffer): Change it to method.
11379         (regcache_save): Change it to regcache::save.
11380         (regcache_restore): Likewise.
11381         (regcache_cpy_no_passthrough): Remove the declaration.
11382         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11383         (regcache_cpy_no_passthrough): Change it to method
11384         cpy_no_passthrough.
11385         (regcache_register_status): Change it to method
11386         get_register_status.
11387         (regcache_invalidate): Change it to method invalidate.
11388         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11389         (regcache_raw_update): Change it to method raw_update.
11390         (regcache_raw_read): Likewise.
11391         (regcache_raw_read_signed): Likewise.
11392         (regcache_raw_read_unsigned): Likewise.
11393         (regcache_raw_write_signed): Likewise.
11394         (regcache_raw_write_unsigned): Likewise.
11395         (regcache_cooked_read): Likewise.
11396         (regcache_cooked_read_value): Likewise.
11397         (regcache_cooked_read_signed): Likewise.
11398         (regcache_cooked_read_unsigned): Likewise.
11399         (regcache_cooked_write_signed): Likewise.
11400         (regcache_cooked_write_unsigned): Likewise.
11401         (regcache_raw_set_cached_value): Likewise.
11402         (regcache_raw_write): Likewise.
11403         (regcache_cooked_write): Likewise.
11404         (regcache_xfer_part): Likewise.
11405         (regcache_raw_read_part): Likewise.
11406         (regcache_raw_write_part): Likewise.
11407         (regcache_cooked_read_part): Likewise.
11408         (regcache_cooked_write_part): Likewise.
11409         (regcache_raw_supply): Likewise.
11410         (regcache_raw_collect): Likewise.
11411         (regcache_transfer_regset): Likewise.
11412         (regcache_supply_regset): Likewise.
11413         (regcache_collect_regset): Likewise.
11414         (regcache_debug_print_register): Likewise.
11415         (enum regcache_dump_what): Move it to regcache.h.
11416         (regcache_dump): Change it to method dump.
11417         * regcache.h (enum regcache_dump_what): New.
11418         (class regcache): New.
11419         * target.c (target_fetch_registers): Call method
11420         debug_print_register.
11421         (target_store_registers): Likewise.
11422
11423 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11424
11425         * windows-nat.c (struct lm_info_windows): Initialize field.
11426         (windows_make_so): Allocate lm_info_windows with new.
11427         (windows_free_so): Free lm_info_windows with delete.
11428
11429 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11430
11431         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11432         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11433         cleanup.
11434         (darwin_free_so): Free lm_info_darwin with delete.
11435
11436 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11437
11438         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11439         <l_addr_p>: Change type to bool.
11440         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11441         (svr4_free_so): Free lm_info_svr4 with delete.
11442         (svr4_copy_library_list): Replace memcpy with call to copy
11443         constructor.
11444         (library_list_start_library, svr4_default_sos): Allocate
11445         lm_info_svr4 with new.
11446
11447 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11448
11449         * solib-target.c (struct lm_info_target): Add destructor,
11450         initialize fields.
11451         <name>: Change type to std::string.
11452         (library_list_start_library): Allocate lm_info_target with new.
11453         (solib_target_free_library_list): Free lm_info_target with
11454         delete.
11455         (solib_target_current_sos): Adapt to std::string.
11456         (solib_target_free_so): Free lm_info_target with delete.
11457
11458 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11459
11460         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11461         fields.
11462         (frv_current_sos): Allocate lm_info_frv with new.
11463         (frv_relocate_main_executable): Free lm_info_frv with delete,
11464         allocate with new.
11465         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11466
11467 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11468
11469         * solib-frv.c (struct lm_info_frv): Fix indentation.
11470
11471 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11472
11473         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11474         map field.
11475         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11476         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11477         and allocate with new.
11478         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11479
11480 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11481
11482         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11483         <filename, member_name>: Change type to std::string.
11484         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11485         (library_list_start_library): Allocate lm_info_aix with new.
11486         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11487         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11488         with copy constructor.
11489
11490 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11491
11492         * solist.h (struct lm_info): Remove.
11493         (struct lm_info_base): New class.
11494         (struct so_list) <lm_info>: Change type to lm_info_base *.
11495         * nto-tdep.c (struct lm_info): Remove.
11496         (lm_addr): Adjust.
11497         * solib-aix.c (struct lm_info): Rename to ...
11498         (struct lm_info_aix): ... this.  Extend lm_info_base.
11499         (lm_info_p): Rename to ...
11500         (lm_info_aix_p): ... this, and adjust.
11501         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11502         solib_aix_parse_libraries, library_list_start_library,
11503         solib_aix_free_library_list, solib_aix_parse_libraries,
11504         solib_aix_get_library_list,
11505         solib_aix_relocate_section_addresses, solib_aix_free_so,
11506         solib_aix_get_section_offsets,
11507         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11508         Adjust.
11509         (struct solib_aix_inferior_data) <library_list>: Adjust.
11510         * solib-darwin.c (struct lm_info): Rename to ...
11511         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11512         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11513         * solib-dsbt.c (struct lm_info): Rename to ...
11514         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11515         (struct dsbt_info) <main_executable_lm_info): Adjust.
11516         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11517         dsbt_relocate_section_addresses): Adjust.
11518         * solib-frv.c (struct lm_info): Rename to ...
11519         (struct lm_info_frv): ... this.  Extend lm_info_base.
11520         (main_executable_lm_info): Adjust.
11521         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11522         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11523         find_canonical_descriptor_in_load_object,
11524         frv_fdpic_find_canonical_descriptor): Adjust.
11525         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11526         to lm_info_svr4.
11527         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11528         svr4_clear_so, svr4_copy_library_list,
11529         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11530         svr4_current_sos, svr4_fetch_objfile_link_map,
11531         solist_update_incremental): Adjust.
11532         * solib-svr4.h (struct lm_info_svr4): Move here from
11533         solib-svr4.c.
11534         * solib-target.c (struct lm_info): Rename to ...
11535         (struct lm_info_target): ... this.  Extend lm_info_base.
11536         (lm_info_p): Rename to ...
11537         (lm_info_target_p): ... this.
11538         (solib_target_parse_libraries, library_list_start_segment,
11539         library_list_start_section, library_list_start_library,
11540         library_list_end_library, solib_target_free_library_list,
11541         solib_target_current_sos, solib_target_free_so,
11542         solib_target_relocate_section_addresses): Adjust.
11543         * windows-nat.c (struct lm_info): Rename to ...
11544         (struct lm_info_windows): ... this.  Extend lm_info_base.
11545         (windows_make_so, handle_load_dll, handle_unload_dll,
11546         windows_xfer_shared_libraries): Adjust.
11547
11548 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11549
11550         * solib-darwin.c (struct darwin_so_list): Remove.
11551         (darwin_current_sos): Allocate an so_list object instead of a
11552         darwin_so_list, separately allocate an lm_info object.
11553         (darwin_free_so): Free lm_info.
11554
11555 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11556
11557         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11558         with fprintf_filtered.
11559
11560 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11561
11562         * regcache.c (regcache::regcache): New function.
11563         (regcache::~regcache): New function.
11564         (regcache_xmalloc_1): Remove.
11565         (regcache_xmalloc): Call new regcache.
11566         (regcache_xfree): Call delete regcache.
11567         (get_thread_arch_aspace_regcache): Call new regcache.
11568
11569 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11570
11571         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11572         lwp instead of ptid_get_lwp.
11573
11574 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11575
11576         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11577         lwp_info instead of getting from inferior_ptid.
11578
11579 2017-04-27  Keith Seitz  <keiths@redhat.com>
11580
11581         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11582         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11583         (CV_CONVERSION_BADNESS): Define.
11584         (rank_one_type): Remove overly restrictive rvalue reference
11585         rank checks.
11586         Add cv-qualifier checks and subranks for type equality.
11587         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11588         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11589         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11590
11591 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11592
11593         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11594         count when creating the object.
11595
11596 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11597             Ulrich Weigand  <uweigand@de.ibm.com>
11598
11599         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11600         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11601         is used in AIX.
11602         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11603         (process_xcoff_symbol): Likewise.
11604         (scan_xcoff_symtab): Likewise.
11605
11606 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11607
11608         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11609         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11610         (ia64_access_reg): Use get_frame_register_unsigned.
11611         (ia64_access_rse_reg): Likewise.
11612         (ia64_libunwind_frame_prev_register): Likewise.
11613
11614 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11615
11616         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11617         * gdbarch.c: Regenerated.
11618         * gdbarch.h: Regenerated.
11619         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11620         visibility external.
11621         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11622         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11623         (enum cfa_how_kind): Move to ...
11624         (struct dwarf2_frame_state_reg_info): Likewise.
11625         (struct dwarf2_frame_state): Likewise.
11626         * dwarf2-frame.h: ... here.
11627         (dwarf2_frame_state_alloc_regs): New declaration.
11628         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11629         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11630
11631 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11632
11633         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11634         regcache_raw_read_unsigned.
11635         (xtensa_pseudo_register_write): Likewise.
11636
11637 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11638
11639         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11640         (nds32_pseudo_register_write): Likewise.
11641
11642 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11643
11644         * regcache.c (struct regcache) <readonly_p>: Change its type
11645         to bool.
11646         (regcache_xmalloc_1): Update parameter type and callers update.
11647
11648 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11649
11650         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11651         set_gdbarch_wchar_bit.
11652         * arm-tdep.c (arm_gdbarch_init): Likewise.
11653
11654 2017-04-25  Pedro Alves  <palves@redhat.com>
11655
11656         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11657         (BothAreRelocatable, memcopy, memmove): Don't define.
11658         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11659         macros.
11660
11661 2017-04-25  Pedro Alves  <palves@redhat.com>
11662
11663         * common/common-defs.h: Include "common/poison.h".
11664         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11665         and adjust.
11666         * common/poison.h: New file.
11667         * common/traits.h: Include <type_traits>.
11668         (Not, Or, Requires): New, moved from common/function-view.h.
11669
11670 2017-04-25  Pedro Alves  <palves@redhat.com>
11671
11672         * breakpoint.h (struct breakpoint): In-class initialize all
11673         fields.  Make boolean fields "bool".
11674         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11675         memset call and initializations no longer necessary.
11676
11677 2017-04-25  Pedro Alves  <palves@redhat.com>
11678
11679         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11680         reference.
11681         (pt_btrace_insn): New function.
11682         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11683
11684 2017-04-25  Pedro Alves  <palves@redhat.com>
11685
11686         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11687         "base" field and inherit from "bp_location" instead.  Add
11688         non-default ctor.
11689         (allocate_location_exception): Use new non-default ctor.
11690         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11691         (init_bp_location): Convert to ...
11692         (bp_location::bp_location): ... this new ctor, and remove memset
11693         call.
11694         (base_breakpoint_allocate_location): Use the new non-default ctor.
11695         * breakpoint.h (bp_location): Now a class.  Declare default and
11696         non-default ctors.  In-class initialize all members.
11697         (init_bp_location): Remove declaration.
11698
11699 2017-04-25  Pedro Alves  <palves@redhat.com>
11700
11701         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11702         assignment operator.
11703
11704 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11705
11706         * doublest.c (convert_doublest_to_floatformat): Call
11707         floatformat_totalsize_bytes.
11708
11709 2017-04-22  Tom Tromey  <tom@tromey.com>
11710
11711         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11712         ui_out_emit_list.
11713         * stack.c (print_frame): Use ui_out_emit_list.
11714         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11715         ui_out_emit_list.
11716         * mi/mi-main.c (print_one_inferior)
11717         (mi_cmd_data_list_register_names)
11718         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11719         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11720         ui_out_emit_list.
11721         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11722         (mi_output_solib_attribs): Use ui_out_emit_list,
11723         ui_out_emit_tuple.
11724         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11725         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11726         (mi_cmd_stack_list_args, list_args_or_locals): Use
11727         ui_out_emit_list.
11728         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11729         * breakpoint.c (print_solib_event, output_thread_groups): Use
11730         ui_out_emit_list.
11731
11732 2017-04-22  Tom Tromey  <tom@tromey.com>
11733
11734         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11735         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11736         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11737
11738 2017-04-22  Tom Tromey  <tom@tromey.com>
11739
11740         * tracepoint.c (tvariables_info_1)
11741         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11742
11743 2017-04-22  Tom Tromey  <tom@tromey.com>
11744
11745         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11746         annotate_arg_emitter.
11747         * breakpoint.c (print_mention_watchpoint)
11748         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11749         * annotate.h (struct annotate_arg_emitter): New.
11750
11751 2017-04-22  Tom Tromey  <tom@tromey.com>
11752
11753         * record-btrace.c (record_btrace_insn_history)
11754         (record_btrace_insn_history_range, record_btrace_call_history)
11755         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11756         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11757         ui_out_emit_tuple.
11758         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11759         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11760         * skip.c (skip_info): Use ui_out_emit_tuple.
11761         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11762         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11763         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11764         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11765         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11766         ui_out_emit_tuple.
11767         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11768         (output_register, mi_cmd_data_read_memory)
11769         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11770         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11771         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11772         Use ui_out_emit_tuple.
11773         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11774         ui_out_emit_tuple.
11775         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11776         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11777         * linux-thread-db.c (info_auto_load_libthread_db): Use
11778         ui_out_emit_tuple.
11779         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11780         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11781         * disasm.c (do_mixed_source_and_assembly_deprecated)
11782         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11783         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11784         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11785         * breakpoint.c (print_one_breakpoint_location)
11786         (print_one_breakpoint): Use ui_out_emit_tuple.
11787         * auto-load.c (print_script, info_auto_load_cmd): Use
11788         ui_out_emit_tuple.
11789         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11790
11791 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11792
11793         * thread.c (print_thread_info_1): Remove dead code.
11794
11795 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11796
11797         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11798         GDB_SELF_TEST.
11799         * arm-tdep.c (selftests::arm_record_test): Likewise.
11800
11801 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11802
11803         * regcache.c (regcache_restore): Remove argument 2.  Replace
11804         argument 3 with regcache.  Get register status from
11805         src->register_status and get register contents from
11806         register_buffer (src, regnum).
11807         (regcache_cpy): Update.
11808
11809 2017-04-19  Pedro Alves  <palves@redhat.com>
11810
11811         * gdbthread.h (thread): Add missing closing parenthesis in
11812         comment.
11813
11814 2017-04-19  Pedro Alves  <palves@redhat.com>
11815
11816         * common/refcounted-object.h: New file.
11817         * gdbthread.h: Include "common/refcounted-object.h".
11818         (thread_info): Inherit from refcounted_object and add comments.
11819         (thread_info::incref, thread_info::decref)
11820         (thread_info::m_refcount): Delete.
11821         (thread_info::deletable): Use the refcounted_object::refcount()
11822         method.
11823         * inferior.c (current_inferior_): Add comment.
11824         (set_current_inferior): Increment/decrement refcounts.
11825         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11826         not-deletable instead of comparing with the current inferior.
11827         (initialize_inferiors): Increment the initial inferior's refcount.
11828         * inferior.h (struct inferior): Forward declare.
11829         Include "common/refcounted-object.h".
11830         (current_inferior, set_current_inferior): Move declaration to
11831         before struct inferior's definition, and fix comment.
11832         (inferior): Inherit from refcounted_object.  Add comments.
11833         * thread.c (switch_to_thread_no_regs): Reference the thread's
11834         inferior pointer directly instead of doing a ptid lookup.
11835         (switch_to_no_thread): New function.
11836         (switch_to_thread(thread_info *)): New function, factored out
11837         from ...
11838         (switch_to_thread(ptid_t)): ... this.
11839         (restore_current_thread): Delete.
11840         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11841         fields, and add 'inf' field.
11842         (do_restore_current_thread_cleanup): Check whether old->inf is
11843         alive instead of looking up an inferior by ptid.  Use
11844         switch_to_thread and switch_to_no_thread.
11845         (restore_current_thread_cleanup_dtor): Use old->inf directly
11846         instead of lookup up an inferior by id.  Decref the inferior.
11847         Don't restore 'removable'.
11848         (make_cleanup_restore_current_thread): Same the inferior pointer
11849         in old, instead of the inferior number.  Incref the inferior.
11850         Don't save/clear 'removable'.
11851
11852 2017-04-19  Pedro Alves  <palves@redhat.com>
11853
11854         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11855         unittests/scoped_restore-selftests.c.
11856         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11857         * common/scoped_restore.h (scoped_restore_base): Make "class".
11858         (scoped_restore_base::release): New public method.
11859         (scoped_restore_base::scoped_restore_base): New protected ctor.
11860         (scoped_restore_base::m_saved_var): New protected field.
11861         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11862         scoped_restore_base base class instead of m_saved_var directly.
11863         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11864         (scoped_restore_tmpl::scoped_restore_tmpl(const
11865         scoped_restore_tmpl<T>&)): Likewise.
11866         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11867         method.
11868         (scoped_restore_tmpl::saved_var): New method.
11869         (scoped_restore_tmpl::m_saved_var): Delete.
11870         * inferior.h (inferior::detaching): Now a bool.
11871         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11872         cleanup.
11873         * unittests/scoped_restore-selftests.c: New file.
11874
11875 2017-04-19  Pedro Alves  <palves@redhat.com>
11876
11877         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11878         Re-sort in alphabetic order.
11879
11880 2017-04-18  Pedro Alves  <palves@redhat.com>
11881
11882         * xml-support.c (obstack_xml_printf): Delete.
11883         * xml-support.h (obstack_xml_printf): Delete.
11884
11885 2017-04-18  Pedro Alves  <palves@redhat.com>
11886
11887         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11888         vdebug, verror, body_text, start_element, end_element, name,
11889         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11890         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11891         is_xinclude>: Make private and add m_ prefix.
11892         (gdb_xml_parser::body_text): New method, based on ...
11893         (gdb_xml_body_text): ... this.  Adjust.
11894         (gdb_xml_parser::vdebug): New method, based on ...
11895         (gdb_xml_debug): ... this.  Adjust.
11896         (gdb_xml_parser::verror): New method, based on ...
11897         (gdb_xml_error): ... this.  Adjust.
11898         (gdb_xml_parser::start_element): New method, based on ...
11899         (gdb_xml_start_element): ... this.  Adjust.
11900         (gdb_xml_start_element_wrapper): Defer to
11901         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11902         (gdb_xml_parser::end_element): New method, based on ...
11903         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11904         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11905         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11906         (gdb_xml_parser::use_dtd): New method, based on ...
11907         (gdb_xml_use_dtd): ... this.  Adjust.
11908         (gdb_xml_parser::parse): New method, based on ...
11909         (gdb_xml_parse): ... this.  Adjust.
11910         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11911         (xinclude_start_include): Adjust to call the parser's name method.
11912         (xml_xinclude_default, xml_xinclude_start_doctype)
11913         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11914         method.
11915         (xml_process_xincludes): Adjust to call parser methods.
11916         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11917         declarations.
11918
11919 2017-04-18  Pedro Alves  <palves@redhat.com>
11920
11921         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11922         gdb::optional<std::string>.
11923         * xml-support.c: Include <string>.
11924         (scope_level::scope_level(scope_level &&))
11925         (scope_level::~scope_level): Delete.
11926         (scope_level::body): Now a std::string.
11927         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11928         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11929         parameter.
11930         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11931         (xinclude_parsing_data::output): Now a std::string reference.
11932         (xinclude_start_include): Adjust.
11933         (xml_xinclude_default): Adjust.
11934         (xml_process_xincludes): Add 'output' parameter, and return bool.
11935         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11936         and return bool.
11937         * xml-tdesc.c: Include <unordered_map> and <string>.
11938         (tdesc_xml_cache): Delete.
11939         (tdesc_xml_cache_s): Delete.
11940         (xml_cache): Now an std::unordered_map.
11941         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11942         (target_fetch_description_xml): Change return type to
11943         gdb::optional<std::string>, and adjust.
11944         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11945         (target_fetch_description_xml): Change return type to
11946         gdb::optional<std::string>.
11947
11948 2017-04-18  Pedro Alves  <palves@redhat.com>
11949
11950         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11951         unittests/optional-selftests.c.
11952         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11953         * unittests/optional-selftests.c: New file.
11954         * unittests/optional/assignment/1.cc: New file.
11955         * unittests/optional/assignment/2.cc: New file.
11956         * unittests/optional/assignment/3.cc: New file.
11957         * unittests/optional/assignment/4.cc: New file.
11958         * unittests/optional/assignment/5.cc: New file.
11959         * unittests/optional/assignment/6.cc: New file.
11960         * unittests/optional/assignment/7.cc: New file.
11961         * unittests/optional/cons/copy.cc: New file.
11962         * unittests/optional/cons/default.cc: New file.
11963         * unittests/optional/cons/move.cc: New file.
11964         * unittests/optional/cons/value.cc: New file.
11965         * unittests/optional/in_place.cc: New file.
11966         * unittests/optional/observers/1.cc: New file.
11967         * unittests/optional/observers/2.cc: New file.
11968
11969 2017-04-18  Pedro Alves  <palves@redhat.com>
11970
11971         * common/gdb_optional.h: Include common/traits.h.
11972         (in_place_t): New type.
11973         (in_place): New constexpr variable.
11974         (optional::optional): Remove member initialization of
11975         m_instantiated.
11976         (optional::optional(in_place_t...)): New constructor.
11977         (optional::~optional): Use reset.
11978         (optional::optional(const optional&)): New.
11979         (optional::optional(const optional&&)): New.
11980         (optional::optional(T &)): New.
11981         (optional::optional(T &&)): New.
11982         (operator::operator=(const optional &)): New.
11983         (operator::operator=(optional &&)): New.
11984         (operator::operator= (const T &))
11985         (operator::operator= (T &&))
11986         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11987         (operator::reset): New.
11988         (operator::m_instantiated):: Add in-class initializer.
11989         * common/traits.h: Include <type_traits>.
11990         (struct And): New types.
11991
11992 2017-04-18  Pedro Alves  <palves@redhat.com>
11993
11994         * xml-support.c: Include <vector>.
11995         (scope_level::scope_level(const gdb_xml_element *))
11996         (scope_level::scope_level(scope_level&&)): New.
11997         (scope_level::~scope_level): New.
11998         (scope_level_s): Delete.
11999         (gdb_xml_parser::scopes): Now a std::vector.
12000         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12001         Use std::vector.
12002         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12003         scope cleanup code.
12004         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12005         of the scopes member.  Use std::vector::emplace_back.
12006
12007 2017-04-18  Pedro Alves  <palves@redhat.com>
12008
12009         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
12010         a bool.
12011         (gdb_xml_end_element): Change type of first parameter.
12012         (gdb_xml_cleanup): Rename to ...
12013         (gdb_xml_parser::~gdb_xml_parser): ... this.
12014         (gdb_xml_create_parser_and_cleanup): Delete with ...
12015         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12016         to this new ctor.
12017         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12018         using gdb_xml_create_parser_and_cleanup.
12019         (xinclude_parsing_data): Add ctor/dtor.
12020         (xml_xinclude_cleanup): Delete.
12021         (xml_process_xincludes): Create a local xinclude_parsing_data
12022         instead of heap-allocating one.  Create a local gdb_xml_parser
12023         instead of heap-allocating one with
12024         gdb_xml_create_parser_and_cleanup.
12025
12026 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
12027
12028         PR threads/20743
12029         * fbsd-nat.c (resume_one_thread_cb): Remove.
12030         (resume_all_threads_cb): Remove.
12031         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12032         iterate_over_threads.
12033
12034 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12035
12036         * NEWS: Create a new section for the next release branch.
12037         Rename the section of the current branch, now that it has
12038         been cut.
12039
12040 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12041
12042         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12043         * version.in: Bump version to 8.0.50.DATE-git.
12044
12045 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
12046
12047         PR gdb/21385
12048         * windows-nat.c (windows_create_inferior): Declare 'allargs'
12049         independently of the host, and fix build breakage on Cygwin.
12050
12051 2017-04-13  Pedro Alves  <palves@redhat.com>
12052
12053         * inferior.c (free_inferior): Convert to ...
12054         (inferior::~inferior): ... this dtor.
12055         (inferior::inferior): New ctor, factored out from ...
12056         (add_inferior_silent): ... here.  Allocate the inferior with a new
12057         expression.
12058         (delete_inferior): Call delete instead of free_inferior.
12059         * inferior.h (gdb_environ, continuation): Forward declare.
12060         (inferior): Now a class.  Add in-class initialization to all
12061         members.  Make boolean fields bool, except 'detaching'.
12062         (inferior::inferior): New explicit ctor.
12063         (inferior::~inferior): New.
12064
12065 2017-04-13  Pedro Alves  <palves@redhat.com>
12066
12067         * inferior.c (init_inferior_list): Delete.
12068         * inferior.h (init_inferior_list): Delete.
12069
12070 2017-04-13  Pedro Alves  <palves@redhat.com>
12071
12072         PR threads/13217
12073         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12074         (top level): Call it twice, with different thread sets.
12075
12076 2017-04-13  Pedro Alves  <palves@redhat.com>
12077
12078         * thread.c: Include <algorithm>.
12079         (thread_array_cleanup): Delete.
12080         (scoped_inc_dec_ref): New class.
12081         (live_threads_count): New function.
12082         (set_thread_refcount): Delete.
12083         (tp_array_compar_ascending): Now a bool.
12084         (tp_array_compar): Convert to a std::sort comparison function.
12085         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12086         and live_threads_count.
12087
12088 2017-04-13  Pedro Alves  <palves@redhat.com>
12089
12090         * infrun.c (follow_fork_inferior): Also switch the current
12091         inferior.
12092
12093 2017-04-13  Pedro Alves  <palves@redhat.com>
12094
12095         * breakpoint.c (watch_command_1): Save watchpoint-frame info
12096         before calling create_internal_breakpoint.
12097
12098 2017-04-13  Pedro Alves  <palves@redhat.com>
12099
12100         * fork-child.c (execv_argv): New class.
12101         (breakup_args): Refactored as ...
12102         (execv_argv::init_for_no_shell): .. this method of execv_argv.
12103         Copy arguments to storage and replace separators with NULL
12104         terminators in place.
12105         (escape_bang_in_quoted_argument): Adjust to return bool.
12106         (execv_argv::execv_argv): New ctor.
12107         (execv_argv::init_for_shell): New method, factored out from
12108         fork_inferior.  Don't strdup strings into the vector.
12109         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
12110         Remove free_vector_argv call.
12111
12112 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12113
12114         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12115         tdep->rx_psw_type.
12116
12117 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12118
12119         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12120         * rx-tdep.c (rx_gdbarch_init): Likewise.
12121
12122 2017-04-13  Pedro Alves  <palves@redhat.com>
12123
12124         * breakpoint.h (struct breakpoint): Reindent.
12125
12126 2017-04-13  Pedro Alves  <palves@redhat.com>
12127
12128         * breakpoint.c (bp_location): Rename to ...
12129         (bp_locations): ... this.  All references updated.
12130         (bp_location_count): Rename to ...
12131         (bp_locations_count): ... this.  All references updated.
12132         (bp_location_placed_address_before_address_max): Rename to ...
12133         (bp_locations_placed_address_before_address_max): ... this.  All
12134         references updated.
12135         (bp_location_shadow_len_after_address_max): Rename to ...
12136         (bp_locations_shadow_len_after_address_max): ... this.  All
12137         references updated.
12138         (bp_location_compare_addrs): Rename to ...
12139         (bp_locations_compare_addrs): ... this.  All references updated.
12140         (bp_location_compare):Rename to ...
12141         (bp_locations_compare): ... this.  All references updated.
12142         (bp_location_target_extensions_update): Rename to ...
12143         (bp_locations_target_extensions_update): ... this.  All references
12144         updated.
12145
12146 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12147
12148         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12149         * common/common.m4: Check headers 'termios.h', 'termio.h' and
12150         'sgtty.h'.
12151         * common/gdb_termios.h: New file, with parts of "terminal.h".
12152         * inflow.c: Include "gdb_termios.h".
12153         * ser-unix.c: Include "gdb_termios.h".
12154         * terminal.h: Move terminal-related defines to
12155         "common/gdb_termios.h".
12156
12157 2017-04-12  Tom Tromey  <tom@tromey.com>
12158
12159         * probe.c (parse_probes): Update.
12160         * location.h (delete_event_location): Don't declare.
12161         (event_location_deleter::operator()): Update.
12162         * location.c (event_location_deleter::operator()): Rename from
12163         delete_event_location.
12164         * linespec.h (linespec_result) <location>: Change type to
12165         event_location_up.
12166         * linespec.c (canonicalize_linespec, event_location_to_sals)
12167         (decode_objc): Update.
12168         (linespec_result): Don't call delete_event_location.
12169         * breakpoint.c (create_breakpoints_sal)
12170         (bkpt_probe_create_sals_from_location)
12171         (strace_marker_create_sals_from_location): Update.
12172
12173 2017-04-12  Tom Tromey  <tom@tromey.com>
12174
12175         * linespec.h (struct linespec_result): Add constructor and
12176         destructor.
12177         (init_linespec_result, destroy_linespec_result)
12178         (make_cleanup_destroy_linespec_result): Don't declare.
12179         * linespec.c (init_linespec_result): Remove.
12180         (linespec_result::~linespec_result): Rename from
12181         destroy_linespec_result.  Update.
12182         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12183         Remove.
12184         * breakpoint.c (create_breakpoint, break_range_command)
12185         (decode_location_default): Update.
12186         * ax-gdb.c (agent_command_1): Update.
12187
12188 2017-04-12  Tom Tromey  <tom@tromey.com>
12189
12190         * remote.c (remote_download_tracepoint): Update.
12191         * python/py-breakpoint.c (bppy_get_location): Update.
12192         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12193         (gdbscm_breakpoint_location): Update.
12194         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12195         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12196         Change type to event_location_up.
12197         * breakpoint.c (create_overlay_event_breakpoint)
12198         (create_longjmp_master_breakpoint)
12199         (create_std_terminate_master_breakpoint)
12200         (create_exception_master_breakpoint)
12201         (breakpoint_event_location_empty_p, print_breakpoint_location)
12202         (print_one_breakpoint_location, create_thread_event_breakpoint)
12203         (init_breakpoint_sal, create_breakpoint)
12204         (print_recreate_ranged_breakpoint, break_range_command)
12205         (init_ada_exception_breakpoint, say_where): Update.
12206         (base_breakpoint_dtor): Don't call delete_event_location.
12207         (bkpt_print_recreate, tracepoint_print_recreate)
12208         (dprintf_print_recreate, update_static_tracepoint)
12209         (breakpoint_re_set_default): Update.
12210
12211 2017-04-12  Tom Tromey  <tom@tromey.com>
12212
12213         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12214         type of "to_do".  Update.
12215         (compute_stack_depth): Use std::vector.
12216
12217 2017-04-12  Tom Tromey  <tom@tromey.com>
12218
12219         * printcmd.c (find_instruction_backward): Use std::vector.
12220
12221 2017-04-12  Tom Tromey  <tom@tromey.com>
12222
12223         * symfile.c (objfilep): Remove typedef.
12224         (reread_symbols): Use a std::vector.
12225
12226 2017-04-12  Tom Tromey  <tom@tromey.com>
12227
12228         * mi/mi-main.c (exec_direction_forward): Remove.
12229         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12230         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12231         scoped_restore.
12232         * guile/guile.c (guile_repl_command, guile_command)
12233         (gdbscm_execute_gdb_command): Use scoped_restore.
12234         * go-exp.y (go_parse): Use scoped_restore.
12235         * d-exp.y (d_parse): Use scoped_restore.
12236         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12237         * c-exp.y (c_parse): Use scoped_restore.
12238
12239 2017-04-12  Tom Tromey  <tom@tromey.com>
12240
12241         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12242         (mi_parse): Update return type.
12243         (mi_parse_free): Remove.
12244         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12245         (mi_parse::~mi_parse): Rename from mi_parse_free.
12246         (mi_parse_cleanup): Remove.
12247         (mi_parse): Return a unique_ptr.  Use new.
12248         * mi/mi-main.c (mi_execute_command): Update.
12249
12250 2017-04-12  Tom Tromey  <tom@tromey.com>
12251
12252         * location.c (explicit_location_lex_one): Return a
12253         unique_xmalloc_ptr.
12254         (string_to_explicit_location): Update.  Remove cleanups.
12255
12256 2017-04-12  Tom Tromey  <tom@tromey.com>
12257
12258         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12259         (compare_value_and_voffset): Change type.  Update.
12260         (compute_vtable_size): Change type of "offset_vec".
12261         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12262         (gnuv3_get_typeid): Remove extraneous declaration.
12263
12264 2017-04-12  Tom Tromey  <tom@tromey.com>
12265
12266         * charset.h (wchar_iterator): Fix comment.
12267
12268 2017-04-12  Tom Tromey  <tom@tromey.com>
12269
12270         * charset.c (iconv_wrapper): New class.
12271         (cleanup_iconv): Remove.
12272         (convert_between_encodings): Use it.
12273
12274 2017-04-12  Tom Tromey  <tom@tromey.com>
12275
12276         * symfile.h (increment_reading_symtab): Update type.
12277         * symfile.c (decrement_reading_symtab): Remove.
12278         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12279         * psymtab.c (psymtab_to_symtab): Update.
12280         * dwarf2read.c (dw2_instantiate_symtab): Update.
12281
12282 2017-04-12  Tom Tromey  <tom@tromey.com>
12283
12284         * jit.c (struct jit_reader): Declare separately.  Add constructor
12285         and destructor.  Change type of "handle".
12286         (loaded_jit_reader): Define separately.
12287         (jit_reader_load): Update.  New "new".
12288         (jit_reader_unload_command): Use "delete".
12289         * gdb-dlfcn.h (struct dlclose_deleter): New.
12290         (gdb_dlhandle_up): New typedef.
12291         (gdb_dlopen, gdb_dlsym): Update types.
12292         (gdb_dlclose): Remove.
12293         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12294         (gdb_dlsym): Change type of "handle".
12295         (make_cleanup_dlclose): Remove.
12296         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12297         * compile/compile-c-support.c (load_libcc): Update.
12298
12299 2017-04-12  Tom Tromey  <tom@tromey.com>
12300
12301         * symtab.h (find_pcs_for_symtab_line): Change return type.
12302         * symtab.c (find_pcs_for_symtab_line): Change return type.
12303         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12304         type of "vec".  Update.
12305         (ltpy_get_pcs_for_line): Update.
12306         * linespec.c (decode_digits_ordinary): Update.
12307
12308 2017-04-12  Tom Tromey  <tom@tromey.com>
12309
12310         * tracepoint.c (actions_command): Update.
12311         * python/python.c (python_command, python_interactive_command):
12312         Update.
12313         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12314         * guile/guile.c (guile_command): Update.
12315         * defs.h (read_command_lines, read_command_lines_1): Return
12316         command_line_up.
12317         (command_lines_deleter): New struct.
12318         (command_line_up): New typedef.
12319         * compile/compile.c (compile_code_command)
12320         (compile_print_command): Update.
12321         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12322         command_line_up.
12323         (make_cleanup_free_command_lines): Remove.
12324         * cli/cli-script.c (get_command_line, read_command_lines_1)
12325         (copy_command_lines): Return command_line_up.
12326         (while_command, if_command, read_command_lines, define_command)
12327         (document_command): Update.
12328         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12329         Remove.
12330         * breakpoint.h (breakpoint_set_commands): Change type of
12331         "commands".
12332         * breakpoint.c (breakpoint_set_commands): Change type of
12333         "commands".  Update.
12334         (do_map_commands_command, update_dprintf_command_list)
12335         (create_tracepoint_from_upload): Update.
12336
12337 2017-04-12  Tom Tromey  <tom@tromey.com>
12338
12339         * tracepoint.c (scope_info): Update.
12340         * spu-tdep.c (spu_catch_start): Update.
12341         * python/python.c (gdbpy_decode_line): Update.
12342         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12343         * python/py-breakpoint.c (bppy_init): Update.
12344         * probe.c (parse_probes): Update.
12345         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12346         * location.h (event_location_deleter): New struct.
12347         (event_location_up): New typedef.
12348         (new_linespec_location, new_address_location, new_probe_location)
12349         (new_explicit_location, copy_event_location)
12350         (string_to_event_location, string_to_event_location_basic)
12351         (string_to_explicit_location): Update return type.
12352         (make_cleanup_delete_event_location): Remove.
12353         * location.c (new_linespec_location, new_address_location)
12354         (new_probe_location, new_explicit_location, copy_event_location):
12355         Return event_location_up.
12356         (delete_event_location_cleanup)
12357         (make_cleanup_delete_event_location): Remove.
12358         (string_to_explicit_location, string_to_event_location_basic)
12359         (string_to_event_location): Return event_location_up.
12360         * linespec.c (canonicalize_linespec, event_location_to_sals)
12361         (decode_line_with_current_source)
12362         (decode_line_with_last_displayed, decode_objc): Update.
12363         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12364         * completer.c (location_completer): Update.
12365         * cli/cli-cmds.c (edit_command, list_command): Update.
12366         * breakpoint.c (create_overlay_event_breakpoint)
12367         (create_longjmp_master_breakpoint)
12368         (create_std_terminate_master_breakpoint)
12369         (create_exception_master_breakpoint)
12370         (create_thread_event_breakpoint): Update.
12371         (init_breakpoint_sal): Update.  Remove some dead code.
12372         (create_breakpoint_sal): Change type of "location".  Update.
12373         (create_breakpoints_sal, create_breakpoint, break_command_1)
12374         (dprintf_command, break_range_command, until_break_command)
12375         (init_ada_exception_breakpoint)
12376         (strace_marker_create_sals_from_location)
12377         (update_static_tracepoint, trace_command, ftrace_command)
12378         (strace_command, create_tracepoint_from_upload): Update.
12379         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12380         * ax-gdb.c (agent_command_1): Update.
12381
12382 2017-04-12  Pedro Alves  <palves@redhat.com>
12383
12384         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12385         * configure.tgt: Handle i[34567]86-*-go32* and
12386         i[34567]86-*-msdosdjgpp*.
12387         * i386-tdep.c (i386_svr4_reg_to_regnum):
12388         Make extern.
12389         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12390         i386-go32-tdep.c.
12391         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12392         * i386-go32-tdep.c: New file.
12393         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12394         declarations.
12395
12396 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12397
12398         * aix-thread.c (pd_status2str): Change return type to const char *.
12399
12400 2017-04-12  Pedro Alves  <palves@redhat.com>
12401
12402         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12403         calls to set_gdbarch_gnu_triplet_regexp.
12404
12405 2017-04-12  Pedro Alves  <palves@redhat.com>
12406
12407         PR gdb/21323
12408         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12409         New enum value.
12410         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12411         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12412         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12413         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12414         * gdbarch.h, gdbarch.c: Regenerate.
12415         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12416         gdbarch_wchar_bit and gdbarch_wchar_signed.
12417         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12418         * arm-tdep.c (arm_gdbarch_init): Likewise.
12419         * avr-tdep.c (avr_gdbarch_init): Likewise.
12420         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12421         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12422         * i386-tdep.c (i386_go32_init_abi): Likewise.
12423         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12424         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12425         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12426         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12427         * sh-tdep.c (sh_gdbarch_init): Likewise.
12428         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12429         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12430         * windows-tdep.c (windows_init_abi): Likewise.
12431         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12432
12433 2017-04-12  Pedro Alves  <palves@redhat.com>
12434
12435         PR c++/21323
12436         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12437         cplus_primitive_type_char32_t>: New enum values.
12438         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12439         and cplus_primitive_type_char32_t.
12440         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12441         32, use the archtecture's built-in type for char16_t and char32_t,
12442         respectively.  Otherwise, fallback to init_integer_type as before,
12443         but make the type unsigned, and issue a complaint.
12444         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12445
12446 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12447
12448         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12449         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12450
12451 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12452
12453         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12454         'const char *'.
12455
12456 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12457
12458         * common/common-utils.c (free_vector_argv): New function.
12459         * common/common-utils.h: Include <vector>.
12460         (free_vector_argv): New prototype.
12461         * darwin-nat.c (darwin_create_inferior): Rewrite function
12462         prototype in order to constify "exec_file" and accept a
12463         "std::string" for "allargs".
12464         * fork-child.c: Include <vector>.
12465         (breakup_args): Rewrite function, using C++.
12466         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12467         and accept "std::string" for "allargs".  Update the code to
12468         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12469         and "execvp".
12470         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12471         order to constify "exec_file" and accept a "std::string" for
12472         "allargs".
12473         * go32-nat.c (go32_create_inferior): Likewise.
12474         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12475         * infcmd.c (run_command_1): Constify "exec_file".  Use
12476         "std::string" for inferior arguments.
12477         * inferior.h (fork_inferior): Update prototype.
12478         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12479         prototype in order to constify "exec_file" and accept a
12480         "std::string" for "allargs".
12481         * nto-procfs.c (procfs_create_inferior): Likewise.
12482         * procfs.c (procfs_create_inferior): Likewise.
12483         * remote-sim.c (gdbsim_create_inferior): Likewise.
12484         * remote.c (extended_remote_run): Update code to accept
12485         "std::string" as argument.
12486         (extended_remote_create_inferior): Rewrite function prototype in
12487         order to constify "exec_file" and accept a "std::string" for
12488         "allargs".
12489         * rs6000-nat.c (super_create_inferior): Likewise.
12490         (rs6000_create_inferior): Likewise.
12491         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12492         * windows-nat.c (windows_create_inferior): Likewise.
12493
12494 2017-04-11  Pedro Alves  <palves@redhat.com>
12495
12496         * thread.c: Fix whitespace throughout.
12497
12498 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12499
12500         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12501
12502 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12503
12504         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12505
12506 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12507
12508         PR gdb/21364
12509         * osdata.c (info_osdata): Check if 'type' is an empty string
12510         instead of NULL.
12511
12512 2017-04-10  Pedro Alves  <palves@redhat.com>
12513
12514         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12515         (ptid_to_global_thread_id, in_thread_list)
12516         (do_captured_list_thread_ids, set_resumed, set_running)
12517         (set_executing, set_stop_requested, finish_thread_state)
12518         (validate_registers_access, can_access_registers_ptid)
12519         (print_thread_info_1, switch_to_thread)
12520         (do_restore_current_thread_cleanup)
12521         (make_cleanup_restore_current_thread, thread_command)
12522         (thread_name_command): Use operator== instead of ptid_equal.
12523
12524 2017-04-10  Pedro Alves  <palves@redhat.com>
12525
12526         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12527         (current_thread_cleanup_chain): Delete.
12528         (restore_current_thread_cleanup_dtor)
12529         (make_cleanup_restore_current_thread): Remove references to
12530         current_thread_cleanup_chain.
12531
12532 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12533
12534         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12535         REG_UNKNOWN.
12536
12537 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12538
12539         PR gdb/19942
12540         * gdbthread.h (thread_info::deletable): New method.
12541         (thread_info::incref): New method.
12542         (thread_info::decref): New method.
12543         (thread_info::refcount): Move it to private.
12544         * infrun.c (save_stop_context): Call inc_refcount.
12545         (release_stop_context_cleanup): Likewise.
12546         * thread.c (set_thread_exited): New function.
12547         (init_thread_list): Delete "tp" only it is deletable, otherwise
12548         call set_thread_exited.
12549         (delete_thread_1): Call set_thread_exited.
12550         (current_thread_cleanup) <inferior_pid>: Remove.
12551         <thread>: New field.
12552         (restore_current_thread_ptid_changed): Removed.
12553         (do_restore_current_thread_cleanup): Adjust.
12554         (restore_current_thread_cleanup_dtor): Don't call
12555         find_thread_ptid.
12556         (set_thread_refcount): Use dec_refcount.
12557         (make_cleanup_restore_current_thread): Adjust.
12558         (thread_apply_all_command): Call inc_refcount.
12559         (_initialize_thread): Don't call
12560         observer_attach_thread_ptid_changed.
12561
12562 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12563
12564         * thread.c (delete_thread_1): Hoist code on marking thread as
12565         exited.
12566
12567 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12568
12569         * windows-nat.c (windows_detach): Initialize ptid with
12570         minus_one_ptid.
12571
12572 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12573
12574         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12575
12576 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12577
12578         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12579         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12580         (bfin_pseudo_register_write): Likewise
12581
12582 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12583
12584         * common/ptid.h (struct ptid): Change to...
12585         (class ptid_t): ... this.
12586         <ptid_t>: New constructors.
12587         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12588         matches>: New methods.
12589         <make_null, make_minus_one>: New static methods.
12590         <pid>: Rename to...
12591         <m_pid>: ...this.
12592         <lwp>: Rename to...
12593         <m_lwp>: ...this.
12594         <tid>: Rename to...
12595         <m_tid>: ...this.
12596         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12597         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12598         as references, move comment to class ptid_t.
12599         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12600         ptid_t static methods.
12601         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12602         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12603         Take ptid arguments as references, implement using ptid_t methods.
12604         * unittests/ptid-selftests.c: New file.
12605         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12606         unittests/ptid-selftests.c.
12607         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12608
12609 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12610
12611         * python/python.c (python_run_simple_file): Cast mode literal to
12612         non-const char pointer as expected by PyFile_FromString.
12613
12614 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12615
12616         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12617         minus_one_ptid and null_ptid.
12618
12619 2017-04-05  Pedro Alves  <palves@redhat.com>
12620
12621         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12622         * configure: Regenerate.
12623
12624 2017-04-05  Pedro Alves  <palves@redhat.com>
12625
12626         * ada-exp.y (yyerror): Constify.
12627         * ada-lang.c (bound_name, get_selections)
12628         (ada_variant_discrim_type)
12629         (ada_variant_discrim_name, ada_value_struct_elt)
12630         (ada_lookup_struct_elt_type, is_unchecked_variant)
12631         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12632         (catch_ada_exception_command_split)
12633         (catch_ada_assert_command_split, catch_assert_command)
12634         (ada_op_name): Constify.
12635         * ada-lang.h (ada_yyerror, get_selections)
12636         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12637         * arc-tdep.c (arc_print_frame_cache): Constify.
12638         * arm-tdep.c (arm_skip_stub): Constify.
12639         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12640         (gen_aggregate_elt_ref): Constify.
12641         * bcache.c (print_bcache_statistics): Constify.
12642         * bcache.h (print_bcache_statistics): Constify.
12643         * break-catch-throw.c (catch_exception_command_1):
12644         * breakpoint.c (struct ep_type_description::description):
12645         Constify.
12646         (add_solib_catchpoint): Constify.
12647         (catch_fork_command_1): Add cast.
12648         (add_catch_command): Constify.
12649         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12650         Constify.
12651         * bsd-uthread.c (bsd_uthread_state): Constify.
12652         * buildsym.c (patch_subfile_names): Constify.
12653         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12654         Constify.
12655         * c-exp.y (yyerror): Constify.
12656         (token::oper): Constify.
12657         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12658         * c-varobj.c (cplus_describe_child): Constify.
12659         * charset.c (find_charset_names): Add cast.
12660         (find_charset_names): Constify array and add const_cast.
12661         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12662         (edit_command): Constify.
12663         * cli/cli-decode.c (lookup_cmd): Constify.
12664         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12665         Constify.
12666         (struct dump_context): Constify.
12667         (add_dump_command, restore_command): Constify.
12668         * cli/cli-script.c (get_command_line): Constify.
12669         * cli/cli-script.h (get_command_line): Constify.
12670         * cli/cli-utils.c (check_for_argument): Constify.
12671         * cli/cli-utils.h (check_for_argument): Constify.
12672         * coff-pe-read.c (struct read_pe_section_data): Constify.
12673         * command.h (lookup_cmd): Constify.
12674         * common/print-utils.c (decimal2str): Constify.
12675         * completer.c (gdb_print_filename): Constify.
12676         * corefile.c (set_gnutarget): Constify.
12677         * cp-name-parser.y (yyerror): Constify.
12678         * cp-valprint.c (cp_print_class_member): Constify.
12679         * cris-tdep.c (cris_register_name, crisv32_register_name):
12680         Constify.
12681         * d-exp.y (yyerror): Constify.
12682         (struct token::oper): Constify.
12683         * d-lang.h (d_yyerror): Constify.
12684         * dbxread.c (struct header_file_location::name): Constify.
12685         (add_old_header_file, add_new_header_file, last_function_name)
12686         (dbx_next_symbol_text, add_bincl_to_list)
12687         (find_corresponding_bincl_psymtab, set_namestring)
12688         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12689         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12690         * defs.h (command_line_input, print_address_symbolic)
12691         (deprecated_readline_begin_hook): Constify.
12692         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12693         Constify.
12694         * event-top.c (handle_line_of_input): Constify and add cast.
12695         * exceptions.c (catch_errors): Constify.
12696         * exceptions.h (catch_errors): Constify.
12697         * expprint.c (print_subexp_standard, op_string, op_name)
12698         (op_name_standard, dump_raw_expression, dump_raw_expression):
12699         * expression.h (op_name, op_string, dump_raw_expression):
12700         Constify.
12701         * f-exp.y (yyerror): Constify.
12702         (struct token::oper): Constify.
12703         (struct f77_boolean_val::name): Constify.
12704         * f-lang.c (f_word_break_characters): Constify.
12705         * f-lang.h (f_yyerror): Constify.
12706         * fork-child.c (fork_inferior): Add cast.
12707         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12708         (new_variant): Constify.
12709         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12710         * gdbarch.c: Regenerate.
12711         * gdbcore.h (set_gnutarget): Constify.
12712         * go-exp.y (yyerror): Constify.
12713         (token::oper): Constify.
12714         * go-lang.h (go_yyerror): Constify.
12715         * go32-nat.c (go32_sysinfo): Constify.
12716         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12717         * guile/scm-cmd.c (cmdscm_function): Constify.
12718         * guile/scm-param.c (pascm_param_value): Constify.
12719         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12720         (h8300sx_register_name): Constify.
12721         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12722         Constify.
12723         * ia64-tdep.c (ia64_register_names): Constify.
12724         * infcmd.c (construct_inferior_arguments): Constify.
12725         (path_command, attach_post_wait): Constify.
12726         * language.c (show_range_command, show_case_command)
12727         (unk_lang_error): Constify.
12728         * language.h (language_defn::la_error)
12729         (language_defn::la_name_of_this): Constify.
12730         * linespec.c (decode_line_2): Constify.
12731         * linux-thread-db.c (thread_db_err_str): Constify.
12732         * lm32-tdep.c (lm32_register_name): Constify.
12733         * m2-exp.y (yyerror): Constify.
12734         * m2-lang.h (m2_yyerror): Constify.
12735         * m32r-tdep.c (m32r_register_names): Constify and make static.
12736         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12737         * m88k-tdep.c (m88k_register_name): Constify.
12738         * macroexp.c (appendmem): Constify.
12739         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12740         (upgrade_type, parse_external, parse_partial_symbols)
12741         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12742         (new_symbol): Constify.
12743         * memattr.c (mem_info_command): Constify.
12744         * mep-tdep.c (register_name_from_keyword): Constify.
12745         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12746         Constify.
12747         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12748         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12749         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12750         cast.
12751         (mi_execute_async_cli_command): Constify.
12752         * mips-tdep.c (mips_register_name): Constify.
12753         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12754         (am33_register_name, am33_2_register_name)
12755         * moxie-tdep.c (moxie_register_names): Constify.
12756         * nat/linux-osdata.c (osdata_type): Constify fields.
12757         * nto-tdep.c (nto_parse_redirection): Constify.
12758         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12759         (lookup_child_selector): Constify.
12760         (objc_methcall::name): Constify.
12761         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12762         (lookup_struct_typedef): Constify.
12763         * objfiles.c (pc_in_section): Constify.
12764         * objfiles.h (pc_in_section): Constify.
12765         * p-exp.y (struct token::oper): Constify.
12766         (yyerror): Constify.
12767         * p-lang.h (pascal_yyerror): Constify.
12768         * parser-defs.h (op_name_standard): Constify.
12769         (op_print::string): Constify.
12770         (exp_descriptor::op_name): Constify.
12771         * printcmd.c (print_address_symbolic): Constify.
12772         * psymtab.c (print_partial_symbols): Constify.
12773         * python/py-breakpoint.c (stop_func): Constify.
12774         (bppy_get_expression): Constify.
12775         * python/py-cmd.c (cmdpy_completer::name): Constify.
12776         (cmdpy_function): Constify.
12777         * python/py-event.c (evpy_add_attribute)
12778         (gdbpy_initialize_event_generic): Constify.
12779         * python/py-event.h (evpy_add_attribute)
12780         (gdbpy_initialize_event_generic): Constify.
12781         * python/py-evts.c (add_new_registry): Constify.
12782         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12783         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12784         * python/py-inferior.c (get_buffer): Add cast.
12785         * python/py-param.c (parm_constant::name): Constify.
12786         * python/py-unwind.c (fprint_frame_id): Constify.
12787         * python/python.c (gdbpy_parameter_value): Constify.
12788         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12789         * remote.c (memory_packet_config::name): Constify.
12790         (show_packet_config_cmd, remote_write_bytes)
12791         (remote_buffer_add_string):
12792         * reverse.c (exec_reverse_once): Constify.
12793         * rs6000-tdep.c (variant::name, variant::description): Constify.
12794         * rust-exp.y (rustyyerror): Constify.
12795         * rust-lang.c (rust_op_name): Constify.
12796         * rust-lang.h (rustyyerror): Constify.
12797         * serial.h (serial_ops::name): Constify.
12798         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12799         (sh_sh3e_register_name, sh_sh2e_register_name)
12800         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12801         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12802         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12803         (sh_sh4al_dsp_register_name): Constify.
12804         * sh64-tdep.c (sh64_register_name): Constify.
12805         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12806         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12807         * stabsread.c (patch_block_stabs, read_type_number)
12808         (ref_map::stabs, ref_add, process_reference)
12809         (symbol_reference_defined, define_symbol, define_symbol)
12810         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12811         (read_one_struct_field, read_struct_fields, read_baseclasses)
12812         (read_tilde_fields, read_struct_type, read_array_type)
12813         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12814         (read_huge_number, read_range_type, read_args, common_block_start)
12815         (find_name_end): Constify.
12816         * stabsread.h (common_block_start, define_symbol)
12817         (process_one_symbol, symbol_reference_defined, ref_add):
12818         * symfile.c (get_section_index, add_symbol_file_command):
12819         * symfile.h (get_section_index): Constify.
12820         * target-descriptions.c (tdesc_type::name): Constify.
12821         (tdesc_free_type): Add cast.
12822         * target.c (find_default_run_target):
12823         (add_deprecated_target_alias, find_default_run_target)
12824         (target_announce_detach): Constify.
12825         (do_option): Constify.
12826         * target.h (add_deprecated_target_alias): Constify.
12827         * thread.c (print_thread_info_1): Constify.
12828         * top.c (deprecated_readline_begin_hook, command_line_input):
12829         Constify.
12830         (init_main): Add casts.
12831         * top.h (handle_line_of_input): Constify.
12832         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12833         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12834         (tfind_command): Rename to ...
12835         (tfind_command_1): ... this and constify.
12836         (tfind_command): New function.
12837         (tfind_end_command, tfind_start_command): Adjust.
12838         (encode_source_string): Constify.
12839         * tracepoint.h (encode_source_string): Constify.
12840         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12841         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12842         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12843         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12844         * tui/tui-win.c (parse_scrolling_args): Constify.
12845         * tui/tui-windata.c (tui_erase_data_content): Constify.
12846         * tui/tui-windata.h (tui_erase_data_content): Constify.
12847         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12848         * tui/tui.c (tui_enable): Add cast.
12849         * utils.c (defaulted_query): Constify.
12850         (init_page_info): Add cast.
12851         (puts_debug, subset_compare): Constify.
12852         * utils.h (subset_compare): Constify.
12853         * varobj.c (varobj_format_string): Constify.
12854         * varobj.h (varobj_format_string): Constify.
12855         * vax-tdep.c (vax_register_name): Constify.
12856         * windows-nat.c (windows_detach): Constify.
12857         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12858         * xml-support.c (gdb_xml_end_element): Constify.
12859         * xml-tdesc.c (tdesc_start_reg): Constify.
12860         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12861         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12862         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12863
12864 2017-04-05  Pedro Alves  <palves@redhat.com>
12865
12866         * proc-api.c (struct trans): Constify.
12867         (procfs_note): Constify.
12868         * proc-events.c (struct trans, syscall_table):
12869         * proc-flags.c (struct trans): Constify.
12870         * proc-utils.h (procfs_note): Constify.
12871         * proc-why.c (struct trans): Constify.
12872         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12873         (procfs_detach): Constify.
12874         * sol-thread.c (struct string_map): Constify.
12875         (td_err_string, td_state_string): Constify.
12876
12877 2017-04-05  Pedro Alves  <palves@redhat.com>
12878
12879         * proc-api.c (procfs_filename): Don't initialize
12880         procfs_filename.
12881         (prepare_to_trace): Assume procfs_filename is non-NULL.
12882         (_initialize_proc_api): Give procfs_filename a default value here.
12883
12884 2017-04-05  Pedro Alves  <palves@redhat.com>
12885
12886         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12887         'cond_string' parameter.
12888         (extract_exception_regexp): Constify 'string' parameter.
12889         (catch_exception_command_1): Constify.
12890         * breakpoint.c (init_catchpoint)
12891         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12892         parameter.
12893         (ep_parse_optional_if_clause, catch_fork_command_1)
12894         (catch_exec_command_1): Constify.
12895         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12896         parameter.
12897         (ep_parse_optional_if_clause): Constify.
12898         * cli/cli-utils.c (remove_trailing_whitespace)
12899         (check_for_argument): Constify.
12900         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12901         non-const overload.
12902         (check_for_argument): Likewise.
12903
12904 2017-04-05  Pedro Alves  <palves@redhat.com>
12905
12906         * event-top.c (command_line_handler): Add cast to execute_command
12907         call.
12908         * record-btrace.c (cmd_record_btrace_bts_start)
12909         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12910         (cmd_record_btrace_start): Add cast to execute_command call.
12911         * record-full.c (record_full_goto_insn):
12912         * record.c (record_start, record_stop): Add cast to
12913         execute_command_to_string calls.
12914         (cmd_record_start): Add cast to execute_command calls.
12915
12916 2017-04-05  Pedro Alves  <palves@redhat.com>
12917
12918         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12919         static inline function.
12920         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12921         array and use gdb_PyArg_ParseTupleAndKeywords.
12922         * python/py-cmd.c (cmdpy_init): Likewise.
12923         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12924         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12925         (infpy_search_memory): Likewise.
12926         * python/py-objfile.c (objfpy_add_separate_debug_file)
12927         (gdbpy_lookup_objfile): Likewise.
12928         * python/py-symbol.c (gdbpy_lookup_symbol)
12929         (gdbpy_lookup_global_symbol): Likewise.
12930         * python/py-type.c (gdbpy_lookup_type): Likewise.
12931         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12932         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12933         Likewise.
12934
12935 2017-04-05  Pedro Alves  <palves@redhat.com>
12936
12937         * python/python-internal.h (gdb_PyGetSetDef): New type.
12938         * python/py-block.c (block_object_getset)
12939         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12940         * python/py-event.c (event_object_getset)
12941         (finish_breakpoint_object_getset): Likewise.
12942         * python/py-inferior.c (inferior_object_getset): Likewise.
12943         * python/py-infthread.c (thread_object_getset): Likewise.
12944         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12945         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12946         * python/py-objfile.c (objfile_getset): Likewise.
12947         * python/py-progspace.c (pspace_getset): Likewise.
12948         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12949         Likewise.
12950         * python/py-record.c (recpy_record_getset): Likewise.
12951         * python/py-symbol.c (symbol_object_getset): Likewise.
12952         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12953         Likewise.
12954         * python/py-type.c (type_object_getset, field_object_getset):
12955         Likewise.
12956         * python/py-value.c (value_object_getset): Likewise.
12957
12958 2017-04-05  Pedro Alves  <palves@redhat.com>
12959
12960         * python/python-internal.h (gdb_PyObject_CallMethod)
12961         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12962         New functions.
12963         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12964         (PySys_GetObject, PySys_SetPath): New macros.
12965
12966 2017-04-05  Pedro Alves  <palves@redhat.com>
12967
12968         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12969         info_osdata_command.
12970         * osdata.c (info_osdata_command): Rename to ...
12971         (info_osdata): ... this.  Constify 'type' parameter, and remove
12972         the 'from_tty' parameter.  Accept NULL TYPE.
12973         (info_osdata_command): New function.
12974         * osdata.h (info_osdata_command): Remove declaration.
12975         (info_osdata): New declaration.
12976
12977 2017-04-05  Pedro Alves  <palves@redhat.com>
12978
12979         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12980         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12981         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12982         parameter.
12983         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12984         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12985         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12986         parameter.
12987         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12988         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12989         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12990         (mi_cmd_file_list_exec_source_files)
12991         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12992         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12993         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12994         parameter.
12995         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12996         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12997         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12998         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12999         (mi_cmd_stack_info_frame): Constify 'command' parameter.
13000         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13001         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13002         'command' parameter.
13003         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13004         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13005         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13006         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13007         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13008         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13009         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13010         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13011         (mi_cmd_var_set_update_range): Constify 'command' parameter.
13012         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13013         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13014         parameter.
13015         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13016         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13017         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13018         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13019         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13020         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13021         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13022         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13023         (mi_cmd_data_list_changed_registers)
13024         (mi_cmd_data_write_register_values)
13025         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13026         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13027         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13028         (mi_cmd_list_features, mi_cmd_list_target_features)
13029         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13030         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13031         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13032         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13033         (mi_cmd_trace_frame_collected): Constify 'command'
13034         parameter.
13035         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13036         'command' parameter.
13037
13038 2017-04-05  Pedro Alves  <palves@redhat.com>
13039
13040         * ada-lang.c (ada_completer_word_break_characters): Now a const
13041         array.
13042         (ada_get_gdb_completer_word_break_characters): Constify.
13043         * completer.c (gdb_completer_command_word_break_characters)
13044         (gdb_completer_file_name_break_characters)
13045         (gdb_completer_quote_characters): Now const arrays.
13046         (get_gdb_completer_quote_characters): Constify.
13047         (set_rl_completer_word_break_characters): New function.
13048         (set_gdb_completion_word_break_characters)
13049         (complete_line_internal): Use it.
13050         * completer.h (get_gdb_completer_quote_characters): Constify.
13051         (set_rl_completer_word_break_characters): Declare.
13052         * f-lang.c (f_word_break_characters): Constify.
13053         * language.c (default_word_break_characters): Constify.
13054         * language.h (language_defn::la_word_break_characters): Constify.
13055         (default_word_break_characters): Constify.
13056         * top.c (init_main): Use set_rl_completer_word_break_characters.
13057
13058 2017-04-05  Pedro Alves  <palves@redhat.com>
13059
13060         * aix-thread.c (aix_thread_pid_to_str)
13061         (aix_thread_extra_thread_info): Constify.
13062         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13063         * bsd-uthread.c (bsd_uthread_extra_thread_info)
13064         (bsd_uthread_pid_to_str): Constify.
13065         * corelow.c (core_pid_to_str): Constify.
13066         * darwin-nat.c (darwin_pid_to_str): Constify.
13067         * fbsd-nat.c (fbsd_pid_to_str): Constify.
13068         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13069         Constify.
13070         * gnu-nat.c (gnu_pid_to_str): Constify.
13071         * go32-nat.c (go32_pid_to_str): Constify.
13072         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13073         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13074         * inferior.c (inferior_pid_to_str): Constify.
13075         * linux-nat.c (linux_nat_pid_to_str): Constify.
13076         * linux-tdep.c (linux_core_pid_to_str): Constify.
13077         * linux-thread-db.c (thread_db_pid_to_str)
13078         (thread_db_extra_thread_info): Constify.
13079         * nto-tdep.c (nto_extra_thread_info): Constify.
13080         * nto-tdep.h (nto_extra_thread_info): Constify.
13081         * obsd-nat.c (obsd_pid_to_str): Constify.
13082         * procfs.c (procfs_pid_to_str): Constify.
13083         * ravenscar-thread.c (ravenscar_extra_thread_info)
13084         (ravenscar_pid_to_str): Constify.
13085         * remote-sim.c (gdbsim_pid_to_str): Constify.
13086         * remote.c (remote_threads_extra_info, remote_pid_to_str):
13087         Constify.
13088         * sol-thread.c (solaris_pid_to_str): Constify.
13089         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13090         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13091         * target.c (default_pid_to_str, target_pid_to_str)
13092         (normal_pid_to_str, default_pid_to_str): Constify.
13093         * target.h (target_ops::to_pid_to_str)
13094         (target_ops::to_extra_thread_info): Constify.
13095         (target_pid_to_str, normal_pid_to_str): Constify.
13096         * windows-nat.c (windows_pid_to_str): Constify.
13097         * gdbarch.sh (core_pid_to_str): Constify.
13098         * target-delegates.c: Regenerate.
13099         * gdbarch.h, gdbarch.c: Regenerate.
13100
13101 2017-04-05  Pedro Alves  <palves@redhat.com>
13102
13103         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13104         the memory of the temporary warning_pre_print override.
13105         * utils.c (warning_pre_print): Constify.
13106         * utils.h (warning_pre_print): Constify.
13107
13108 2017-04-05  Pedro Alves  <palves@redhat.com>
13109
13110         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13111         (shell_command): New function.
13112         (make_command): Use std::string.
13113         (init_cli_cmds): Register shell_command instead of shell_escape.
13114
13115 2017-04-05  Pedro Alves  <palves@redhat.com>
13116
13117         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13118         * tracepoint.c (default_collect): Don't initialize.
13119
13120 2017-04-05  Pedro Alves  <palves@redhat.com>
13121
13122         * macroexp.c (macro_buffer::shared): Now a bool.
13123         (init_buffer): Update.
13124         (init_shared_buffer): Constify 'addr' parameter.
13125         (substitute_args, expand, macro_expand, macro_expand_next): Remove
13126         casts.
13127
13128 2017-04-05  Pedro Alves  <palves@redhat.com>
13129
13130         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13131         * disasm.c (set_disassembler_options): Constify local.
13132         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13133
13134 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
13135
13136         PR gdb/21352
13137         * tracefile.c (tsave_command): Fix argument parsing for '-r'
13138         option.
13139
13140 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13141
13142         * frame.c (frame_unwind_register_unsigned): Call
13143         frame_unwind_register_value.
13144
13145 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13146
13147         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13148         Use gdb_test_multiple, and don't match anchor.
13149
13150 2017-04-05  Pedro Alves  <palves@redhat.com>
13151
13152         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13153         (Write After Approval): Remove Simon Marchi.
13154
13155 2017-04-05  Pedro Alves  <palves@redhat.com>
13156
13157         * common/gdb_optional.h (optional::optional): Make constexpr and
13158         initialize m_dummy.
13159
13160 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13161
13162         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13163         (amd64fbsd_jmp_buf_reg_offset): Remove.
13164         (amd64fbsd_supply_uthread): Remove function.
13165         (amd64fbsd_collect_uthread): Remove function.
13166         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13167         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13168         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13169         (fbsd-nat.c): Update comment.
13170         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13171         (i386fbsd_jmp_buf_reg_offset): Remove.
13172         (i386fbsd_supply_uthread): Remove function.
13173         (i386fbsd_collect_uthread): Remove function.
13174         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13175
13176 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13177
13178         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13179         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13180         * NEWS: Mention that support for FreeBSD/alpha was removed.
13181         * alpha-fbsd-tdep.c: Delete file.
13182         * config/alpha/fbsd.mh: Delete file.
13183         * configure.host: Delete alpha*-*-freebsd* and
13184         alpha*-*-kfreebsd*-gnu.
13185         * configure.tgt: Delete alpha*-*-freebsd* and
13186         alpha*-*-kfreebsd*-gnu.
13187
13188 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13189
13190         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13191         amd64bsd_store_inferior_registers): Use ptid from regcache.
13192
13193 2017-04-04  Pedro Alves  <palves@redhat.com>
13194
13195         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13196         data fields, make them private and add "m_" prefixes.
13197         (lnp_state_machine::lnp_state_machine): New ctor.
13198         (record_line, check_line_address, handle_set_discriminator)
13199         (handle_set_address, handle_advance_pc, handle_special_opcode)
13200         (handle_advance_line, handle_set_file, handle_negate_stmt)
13201         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13202         (end_sequence, advance_line): New methods.
13203         (m_gdbarch, m_record_lines_p): New fields.
13204         (lnp_reader_state): Delete.
13205         (dwarf_record_line): Rename to ...
13206         (lnp_state_machine::record_line): ... adjust.
13207         (init_lnp_state_machine): Delete.
13208         (lnp_state_machine::lnp_state_machine): New.
13209         (check_line_address): Rename to ...
13210         (lnp_state_machine::check_line_address): This.
13211         (dwarf_decode_lines_1): Remove reference to "reader_state".
13212         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13213         State machine internal state manipulation moved to
13214         lnp_state_machine methods.
13215
13216 2017-04-04  Pedro Alves  <palves@redhat.com>
13217
13218         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13219         unittests/offset-type-selftests.c.
13220         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13221         * common/offset-type.h: New file.
13222         * common/preprocessor.h: New file.
13223         * common/traits.h: New file.
13224         * common/valid-expr.h: New file.
13225         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13226         sect_offset and cu_offset strong typedefs throughout.
13227         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13228         typedefs throughout.
13229         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13230         sect_offset and cu_offset strong typedefs throughout.
13231         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13232         typedefs throughout.
13233         * gdbtypes.h: Include "common/offset-type.h".
13234         (cu_offset): Now an offset type (strong typedef) instead of a
13235         struct.
13236         (sect_offset): Likewise.
13237         (union call_site_parameter_u): Rename "param_offset" field to
13238         "param_cu_off".
13239         * unittests/offset-type-selftests.c: New file.
13240
13241 2017-04-04  Pedro Alves  <palves@redhat.com>
13242
13243         * common/underlying.h: New file.
13244         * dwarf2read.c: Include "common/gdb_optional.h" and
13245         "common/underlying.h".
13246         (dir_index, file_name_index): New types.
13247         (file_entry): Use them.
13248         (file_entry::include): Use to_underlying.
13249         (line_header::add_file_name): Use dir_index.
13250         (read_formatted_entries): Use gdb::optional.  Read form before
13251         writting to file_entry.
13252         (dwarf_decode_line_header): Use dir_index.
13253         (lnp_state_machine::current_file): Use to_underlying.
13254         (lnp_state_machine::file): Change type to file_name_index.
13255         (dwarf_record_line): Use to_underlying.
13256         (init_lnp_state_machine): Use file_name_index.
13257         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13258
13259 2017-04-04  Pedro Alves  <palves@redhat.com>
13260
13261         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13262         operator bool, has_value and get methods.
13263
13264 2017-04-04  Pedro Alves  <palves@redhat.com>
13265
13266         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13267         fields.
13268         (line_header): Initialize all data fields.  Change type of
13269         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13270         Change type of include_dirs to std::vector<const char *>.  Remove
13271         num_include_dirs, include_dirs_size.  Change type of file_names to
13272         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13273         (line_header::line_header): New.
13274         (line_header::add_include_dir, line_header::add_file_name): New
13275         methods.
13276         (line_header::include_dir_at): Remove NULL check.
13277         (line_header::file_name_at): Add const overload.
13278         (line_header_up): New unique_ptr typedef.
13279         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13280         std::vector.  Remove free_line_header call.
13281         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13282         free_line_header call.
13283         (free_cu_line_header): Delete.
13284         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13285         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13286         Adjust to use std::vector.
13287         (free_line_header): Delete.
13288         (free_line_header_voidp): Use delete.
13289         (add_include_dir): Replace with ...
13290         (line_header::add_include_dir): ... this method.  Use std::vector.
13291         (add_file_name): Replace with ...
13292         (line_header::add_file_name): ... this method.  Use std::vector.
13293         (add_include_dir_stub): Delete.
13294         (read_formatted_entries): Remove memset.
13295         (dwarf_decode_line_header): Return a line_header_up instead of a
13296         raw pointer.  Remove cleanup handling.  Pass lambdas to
13297         read_formatted_entries.  Adjust to use line_header methods.
13298         (dwarf_decode_lines_1): Adjust to use line_header methods.
13299         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13300         use std::vector.
13301
13302 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13303
13304         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13305         instead of struct ptid.
13306
13307 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13308
13309         * frame.c (get_frame_register_bytes): Unwind using value.
13310         (put_frame_register_bytes): Likewise.
13311
13312 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13313
13314         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13315         aggregate-like.
13316
13317 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13318
13319         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13320
13321 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13322
13323         * gdbthread.h (struct thread_info): Declare constructor and
13324         destructor.  Add some in-class member initializers.
13325         * thread.c (free_thread): Remove.
13326         (init_thread_list): Call delete instead of free_thread.
13327         (new_thread): Call thread_info constructor.
13328         (thread_info::thread_info): New function.
13329         (thread_info::~thread_info): New function.
13330         (delete_thread_1): Call delete instead of free_thread.
13331         (make_cleanup_restore_current_thread): Move tp and frame to
13332         inner block.
13333
13334 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13335
13336         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13337         (arc_skip_prologue): Likewise.
13338         (arc_make_frame_cache): Likewise.
13339         (arc_pv_get_operand): New function.
13340         (arc_is_in_prologue): Likewise.
13341         (arc_analyze_prologue): Likewise.
13342         (arc_print_frame_cache): Likewise.
13343         (MAX_PROLOGUE_LENGTH): New constant.
13344
13345 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13346
13347         * configure.tgt: Add arc-insn.o.
13348         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13349         (dump_arc_instruction_command): New function.
13350         (arc_fprintf_disasm): Likewise.
13351         (arc_disassemble_info): Likewise.
13352         (arc_insn_get_operand_value): Likewise.
13353         (arc_insn_get_operand_value_signed): Likewise.
13354         (arc_insn_get_memory_base_reg): Likewise.
13355         (arc_insn_get_memory_offset): Likewise.
13356         (arc_insn_get_branch_target): Likewise.
13357         (arc_insn_dump): Likewise.
13358         (arc_insn_get_linear_next_pc): Likewise.
13359         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13360         (arc_disassemble_info): Likewise.
13361         (arc_insn_get_branch_target): Likewise.
13362         (arc_insn_get_linear_next_pc): Likewise.
13363         * NEWS: Mention new "maint print arc arc-instruction".
13364
13365 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13366
13367         * arc-tdep (maintenance_print_arc_list): New variable.
13368         (maintenance_print_arc_command): New function.
13369
13370 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13371
13372         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13373         Add "limm" and "reserved".
13374         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13375         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13376         * arc-tdep.h (arc_regnum): Likewise.
13377
13378 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13379
13380         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13381         for THREADPTR register.
13382         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13383         register.
13384         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13385         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13386         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13387
13388 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13389
13390         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13391         registers above gdbarch_num_regs (gdbarch) as privileged in
13392         call0 ABI.
13393
13394 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13395
13396         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13397         for a single specified register or for all registers in
13398         a0_base..a0_base + C0_NREGS range.
13399         (supply_gregset_reg): Call regcache_raw_supply for a single
13400         specified register or for all registers in a0_base..a0_base +
13401         C0_NREGS range.
13402
13403 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13404
13405         * arch/xtensa.h (C0_NREGS): Add definition.
13406         * xtensa-tdep.c (C0_NREGS): Remove definition.
13407
13408 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13409
13410         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13411         Drop xtensa_default_isa initialization.
13412         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13413
13414 2017-03-27  Pedro Alves  <palves@redhat.com>
13415
13416         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13417         (file_entry::include_dir): New method.
13418         (line_header::include_dir_at, line_header::file_name_at): New
13419         methods.
13420         (setup_type_unit_groups, setup_type_unit_groups)
13421         (psymtab_include_file_name): Simplify using the new methods.
13422         (lnp_state_machine) <the_line_header>: New field.
13423         <file>: Add comment.
13424         (lnp_state_machine::current_file): New method.
13425         (dwarf_record_line): Simplify using the new methods.
13426         (init_lnp_state_machine): Initialize the "the_line_header" field.
13427         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13428         Simplify using the new methods.
13429
13430 2017-03-27  Pedro Alves  <palves@redhat.com>
13431
13432         * cp-name-parser.y (make_empty): Delete.
13433         (demangler_special, nested_name, ptr_operator, array_indicator)
13434         (direct_declarator, declarator_1): Use fill_comp instead of
13435         make_empty.
13436
13437 2017-03-27  Pedro Alves  <palves@redhat.com>
13438
13439         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13440         to ATTRIBUTE_PRINTF.
13441         * solib-target.c (library_list_start_list): Print "string" not
13442         "version".
13443         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13444         gdb_xml_error call.
13445
13446 2017-03-27  Pedro Alves  <palves@redhat.com>
13447
13448         * dwarf2read.c (struct file_and_directory): New.
13449         (dwarf2_get_dwz_file): Adjust to use std::string.
13450         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13451         (find_file_and_directory): Adjust to return a file_and_directory
13452         object.
13453         (read_file_scope): Adjust to use file_and_directory.  Remove
13454         make_cleanup/do_cleanups calls.
13455         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13456         make_cleanup/do_cleanups calls.
13457         * python/python.c (do_start_initialization): Adjust to ldirname
13458         returning a std::string.
13459         * utils.c (ldirname): Now returns a std::string.
13460         * utils.h (ldirname): Change return type to std::string.
13461         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13462         returning a std::string.
13463         * xml-tdesc.c (file_read_description_xml): Likewise.
13464
13465 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13466
13467         * regcache.c (regcache_debug_print_register): New function.
13468         * regcache.h (regcache_debug_print_register): New declaration.
13469         * target.c (debug_print_register): Remove.
13470         (target_fetch_registers): Call regcache_debug_print_register.
13471         (target_store_registers): Likewise.
13472
13473 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13474
13475         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13476         reference beyond the 'lh->include_dirs' array before accessing to
13477         it.
13478         (psymtab_include_file_name): Likewise.
13479         (dwarf_decode_lines_1): Likewise.
13480         (dwarf_decode_lines): Likewise.
13481         (file_file_name): Likewise.
13482
13483 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13484
13485         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13486         inferior_ptid.
13487         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13488         ps_lsetfpregs): Likewise.
13489         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13490         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13491         ps_lsetfpregs): Likewise.
13492         * target.c (target_fetch_registers, target_store_registers):
13493         Remove asserts.
13494
13495 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13496
13497         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13498
13499 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13500
13501         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13502         (_initialize_aarch64_tdep): Register it.
13503         (aarch64_record_load_store): Handle PRFM instruction.
13504         (aarch64_process_record_test): New function.
13505
13506 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13507
13508         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13509         indentation.
13510
13511 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13512
13513         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13514
13515 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13516
13517         python/python.c (do_start_initialization): Fix memory leak.
13518
13519 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13520
13521         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13522         using get_ptrace_pid.
13523         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13524         inferior_ptid.
13525         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13526         inferior_ptid instead of pid.
13527
13528 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13529
13530         * aarch64-tdep.c: Wrap locally used classes in anonymous
13531         namespace.
13532         * arm-tdep.c: Likewise.
13533         * linespec.c: Likewise.
13534         * ui-out.c: Likewise.
13535
13536 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13537
13538         PR gdb/19637
13539         * python/lib/gdb/printer/bound_registers.py: Import sys.
13540
13541 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13542
13543         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13544         windows_thread_info parameter and use it instead of
13545         current_thread.
13546         (windows_fetch_inferior_registers): Don't set current_thread,
13547         pass the thread to do_windows_fetch_inferior_registers.  Use
13548         ptid from regcache instead of inferior_ptid.
13549         (do_windows_store_inferior_registers): Add windows_thread_info
13550         parameter and use it instead of current_thread.
13551         (windows_store_inferior_registers): Don't set current_thread,
13552         pass the thread to do_windows_store_inferior_registers.  Use
13553         ptid from regcache instead of inferior_ptid.
13554
13555 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13556
13557         * ser-mingw.c (ser_windows_raw): Remove reference to
13558         struct serial::current_timeout.
13559
13560 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13561
13562         PR tdep/20928
13563         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13564         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13565         (sparc64_fsr_type): Fix %fsr decoding.
13566
13567 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13568
13569         * python/py-record-btrace.c (btpy_insn_data): Change return type
13570         for Python 2.
13571
13572 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13573
13574         * spu-linux-nat.c (spu_fetch_inferior_registers,
13575         spu_store_inferior_registers): Use ptid from regcache, set and
13576         restore inferior_ptid.
13577         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13578         Likewise.
13579
13580 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13581
13582         * i386-linux-nat.c (fetch_register, store_register,
13583         i386_linux_fetch_inferior_registers,
13584         i386_linux_store_inferior_registers): Use ptid from regcache.
13585         * ia64-linux-nat.c (ia64_linux_fetch_register,
13586         ia64_linux_store_register): Likewise.
13587         * inf-ptrace.c (inf_ptrace_fetch_register,
13588         inf_ptrace_store_register): Likewise.
13589         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13590         m32r_linux_store_inferior_registers): Likewise.
13591         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13592         m68kbsd_store_inferior_registers): Likewise.
13593         * m68k-linux-nat.c (fetch_register, store_register,
13594         m68k_linux_fetch_inferior_registers,
13595         m68k_linux_store_inferior_registers): Likewise.
13596         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13597         m88kbsd_store_inferior_registers): Likewise.
13598         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13599         mips_fbsd_store_inferior_registers): Likewise.
13600         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13601         mips64_linux_regsets_store_registers): Likewise.
13602         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13603         mipsnbsd_store_inferior_registers): Likewise.
13604         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13605         mips64obsd_store_inferior_registers): Likewise.
13606         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13607         Likewise.
13608         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13609         ppcfbsd_store_inferior_registers): Likewise.
13610         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13611         ppc_linux_store_inferior_registers): Likewise.
13612         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13613         ppcnbsd_store_inferior_registers): Likewise.
13614         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13615         ppcobsd_store_registers): Likewise.
13616         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13617         Likewise.
13618         * ravenscar-thread.c (ravenscar_fetch_registers,
13619         ravenscar_store_registers, ravenscar_prepare_to_store):
13620         Likewise.
13621         * record-btrace.c (record_btrace_fetch_registers,
13622         record_btrace_store_registers, record_btrace_prepare_to_store):
13623         Likewise.
13624         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13625         Lookup inferior using ptid from regcache, instead of
13626         current_inferior.
13627         * remote.c (remote_fetch_registers, remote_store_registers): Use
13628         ptid from regcache.
13629         * rs6000-nat.c (fetch_register, store_register): Likewise.
13630         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13631         s390_linux_store_inferior_registers): Likewise.
13632         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13633         shnbsd_store_inferior_registers): Likewise.
13634         * sol-thread.c (sol_thread_fetch_registers,
13635         sol_thread_store_registers): Likewise.
13636         * sparc-nat.c (sparc_fetch_inferior_registers,
13637         sparc_store_inferior_registers): Likewise.
13638         * tilegx-linux-nat.c (fetch_inferior_registers,
13639         store_inferior_registers): Likewise.
13640         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13641         vaxbsd_store_inferior_registers): Likewise.
13642         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13643         store_xtregs): Likewise.
13644
13645 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13646
13647         PR gdb/14441
13648         * NEWS: Mention support for rvalue references in GDB and python.
13649         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13650         supports both lvalue and rvalue references.
13651
13652 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13653
13654         PR gdb/14441
13655         * gdbtypes.c (rank_one_type): Implement overloading
13656         resolution rules regarding rvalue references.
13657
13658 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13659
13660         PR gdb/14441
13661         * aarch64-tdep.c (aarch64_type_align)
13662         (aarch64_extract_return_value, aarch64_store_return_value): Change
13663         lvalue reference type checks to general reference type checks.
13664         * amd64-tdep.c (amd64_classify): Likewise.
13665         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13666         Likewise.
13667         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13668         (arm_store_return_value): Likewise.
13669         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13670         * c-typeprint.c (c_print_type): Likewise.
13671         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13672         (cplus_number_of_children, cplus_describe_child): Likewise.
13673         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13674         * completer.c (expression_completer): Likewise.
13675         * cp-support.c (make_symbol_overload_list_adl_namespace):
13676         Likewise.
13677         * darwin-nat-info.c (info_mach_region_command): Likewise.
13678         * dwarf2loc.c (entry_data_value_coerce_ref)
13679         (value_of_dwarf_reg_entry): Likewise.
13680         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13681         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13682         Likewise.
13683         * findvar.c (extract_typed_address, store_typed_address):
13684         Likewise.
13685         * gdbtypes.c (rank_one_type): Likewise.
13686         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13687         * infcall.c (value_arg_coerce): Likewise.
13688         * language.c (pointer_type): Likewise.
13689         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13690         Likewise.
13691         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13692         * mn10300-tdep.c (mn10300_type_align): Likewise.
13693         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13694         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13695         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13696         Likewise.
13697         * printcmd.c (print_formatted, x_command): Likewise.
13698         * python/py-type.c (typy_get_composite, typy_template_argument):
13699         Likewise.
13700         * python/py-value.c (valpy_referenced_value)
13701         (valpy_get_dynamic_type, value_has_field): Likewise.
13702         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13703         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13704         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13705         * spu-tdep.c (spu_scalar_value_p): Likewise.
13706         * symtab.c (lookup_symbol_aux): Likewise.
13707         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13708         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13709         Likewise.
13710         * valops.c (value_cast_pointers, value_cast)
13711         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13712         (value_struct_elt, value_struct_elt_bitpos)
13713         (value_find_oload_method_list, find_overload_match)
13714         (value_rtti_indirect_type): Likewise.
13715         * valprint.c (val_print_scalar_type_p, generic_val_print):
13716         Likewise.
13717         * value.c (value_actual_type, value_as_address, unpack_long)
13718         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13719         (coerce_ref): Likewise.
13720         * varobj.c (varobj_get_value_type): Likewise.
13721
13722 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13723
13724         PR gdb/14441
13725         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13726         table of constants.
13727         * python/lib/gdb/command/explore.py: Support exploring values
13728         of rvalue reference types.
13729         * python/lib/gdb/types.py: Implement get_basic_type() for
13730         rvalue reference types.
13731         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13732         constant.
13733         * python/py-value.c (valpy_getitem): Add an rvalue reference
13734         check.
13735         (valpy_reference_value): Add new parameter "refcode".
13736         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13737         New wrappers for valpy_reference_value().
13738         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13739         (gdbpy_invoke_xmethod): Likewise.
13740
13741 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13742
13743         PR gdb/14441
13744         * dwarf2read.c (process_die, read_type_die_1): Handle the
13745         DW_TAG_rvalue_reference_type DIE.
13746         (read_tag_reference_type): Add new parameter "refcode".
13747
13748 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13749
13750         PR gdb/14441
13751         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13752         (c_type_print_modifier, c_type_print_varspec_suffix)
13753         (c_type_print_base): Support printing rvalue reference types.
13754         * c-valprint.c (c_val_print, c_value_print): Support printing
13755         rvalue reference values.
13756
13757 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13758
13759         PR gdb/14441
13760         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13761         typename.
13762         * cp-support.c (replace_typedefs): Handle
13763         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13764         * python/py-type.c (typy_lookup_type): Likewise.
13765
13766 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13767
13768         PR gdb/14441
13769         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13770         * parse.c (insert_type): Change assert statement.
13771         (follow_types): Handle rvalue reference types.
13772         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13773         constant.
13774
13775 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13776
13777         PR gdb/14441
13778         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13779         value_ref() interface.
13780         * c-valprint.c (c_value_print): Likewise.
13781         * infcall.c (value_arg_coerce): Likewise.
13782         * python/py-value.c (valpy_reference_value): Likewise.
13783         * valops.c (value_cast, value_reinterpret_cast)
13784         (value_dynamic_cast, typecmp): Likewise.
13785         (value_ref): Parameterize by kind of return value reference type.
13786         * value.h (value_ref): Add new parameter "refcode".
13787
13788 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13789
13790         PR gdb/14441
13791         * dwarf2read.c (read_tag_reference_type): Use
13792         lookup_lvalue_reference_type() instead of lookup_reference_type().
13793         * eval.c (evaluate_subexp_standard): Likewise.
13794         * f-exp.y: Likewise.
13795         * gdbtypes.c (make_reference_type, lookup_reference_type):
13796         Generalize with rvalue reference types.
13797         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13798         convenience wrappers for lookup_reference_type().
13799         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13800         reference kind parameter.
13801         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13802         wrappers for lookup_reference_type().
13803         * guile/scm-type.c (gdbscm_type_reference): Use
13804         lookup_lvalue_reference_type() instead of lookup_reference_type().
13805         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13806         * parse.c (follow_types): Likewise.
13807         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13808         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13809         Likewise.
13810         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13811         (gdbpy_invoke_xmethod): Likewise.
13812         * stabsread.c: Provide extra argument to make_reference_type()
13813         call.
13814         * valops.c (value_ref, value_rtti_indirect_type): Use
13815         lookup_lvalue_reference_type() instead of lookup_reference_type().
13816
13817 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13818
13819         PR gdb/14441
13820         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13821         (TYPE_IS_REFERENCE): New macro.
13822         (struct type): Add rvalue_reference_type field.
13823         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13824
13825 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13826
13827         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13828         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13829         New function definition.
13830         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13831         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13832         New function declaration.
13833         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13834         * mi/mi-interp.h: New file.
13835         * solib.c (info_sharedlibrary_command): Replace for loop with
13836         ALL_SO_LIBS macro
13837         * solib.h (update_solib_list): New function declaration.
13838         (so_list_head): Move macro.
13839         * solist.h (ALL_SO_LIBS): New macro.
13840
13841 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13842
13843         * infcmd.c (post_create_inferior): Remove unused argument in
13844         call to solib_add.
13845         * remote.c (remote_start_remote): Likewise.
13846         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13847         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13848         (enable_break): Likewise.
13849         * solib.c (update_solib_list): Remove unused target argument
13850         and its documentation.
13851         (solib_add): Remove unused target argument.  Remove unused
13852         argument in call to update_solib_list.
13853         (info_sharedlibrary_command): Remove unused argument in call
13854         to update_solib_list.
13855         (sharedlibrary_command): Remove unused argument in call to
13856         solib_add.
13857         (handle_solib_event): Likewise.
13858         (reload_shared_libraries): Likewise.
13859         * solib.h (solib_add): Remove unused target argument.
13860
13861 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13862
13863         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13864         (s390_displaced_step_fixup): Cover relative branches with the
13865         default fixup handling.  This fixes lack of support for some
13866         relative branch instructions.
13867
13868 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13869
13870         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13871         ptid from regcache.
13872
13873 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13874
13875         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13876         i386_darwin_store_inferior_registers): Use ptid from regcache.
13877
13878 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13879
13880         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13881         i386bsd_store_inferior_registers): Use ptid from regcache.
13882
13883 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13884
13885         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13886         hppaobsd_store_registers): Use ptid from regcache.
13887
13888 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13889
13890         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13891         hppanbsd_store_registers): Use ptid from regcache.
13892
13893 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13894
13895         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13896         from regcache.  Use get_ptrace_pid.
13897
13898 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13899
13900         * corelow.c (get_core_register_section): Use ptid from regcache,
13901         update doc.
13902
13903 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13904
13905         * bsd-uthread.c (bsd_uthread_fetch_registers,
13906         bsd_uthread_store_registers): Use ptid from regcache, set and
13907         restore inferior_ptid.
13908
13909 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13910
13911         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13912         fetch_fp_regs, store_register, store_regs, store_fp_register,
13913         store_fp_regs): Use ptid from regcache.
13914
13915 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13916
13917         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13918         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13919         store_vfp_regs): Use ptid from regcache.
13920
13921 2017-03-17  Pedro Alves  <palves@redhat.com>
13922
13923         PR remote/21188
13924         * ser-base.c (ser_base_wait_for): Add comment.
13925         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13926         version.
13927         * ser-unix.c (hardwire_raw): Remove reference to
13928         scb->current_timeout.
13929         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13930         (hardwire_ops): Install ser_base_readchar instead of
13931         hardwire_readchar.
13932         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13933         Remove fields.
13934
13935 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13936
13937         PR gdb/19637
13938         * python/lib/gdb/printer/bound_registers.py: Add support for
13939         Python 3.
13940
13941 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13942
13943         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13944         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13945         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13946         byte_offset to subobj_byte_offset.  Fix the handling of
13947         DWARF_VALUE_STACK on big-endian targets when coming via an
13948         implicit pointer.
13949         (dwarf2_evaluate_loc_desc): Adjust call to
13950         dwarf2_evaluate_loc_desc_full.
13951         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13952         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13953
13954 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13955
13956         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13957         and REVSH instructions.
13958
13959 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13960
13961         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13962         (arm_record_test): Declare.
13963         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13964         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13965         align with the manual.
13966         (thumb_record_misc): Adjust the code order to align with the
13967         manual.
13968         (thumb2_record_decode_insn_handler): Fix instruction matching.
13969         (instruction_reader_thumb): New class.
13970         (arm_record_test): New function.
13971
13972 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13973
13974         * arm-tdep.c (abstract_memory_reader): New class.
13975         (instruction_reader): New class.
13976         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13977         (decode_insn): Likewise.
13978
13979 2017-03-16  Doug Evans  <dje@google.com>
13980
13981         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13982         member.  Change type of TYPE member to SCM.  All uses updated.
13983         (lsscm_make_lazy_string_smob): Add assert.
13984         (lsscm_make_lazy_string): Flag bad length values.
13985         (lsscm_elt_type): New function.
13986         (gdbscm_lazy_string_to_value): Rewrite to use
13987         lsscm_safe_lazy_string_to_value.
13988         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13989         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13990         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13991         in incoming type.
13992         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13993         * guile/scm-type.c (tyscm_scm_to_type): New function.
13994
13995 2017-03-15  Doug Evans  <dje@google.com>
13996
13997         PR python/17728, python/18439, python/18779
13998         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13999         member.  Change type of TYPE member to PyObject *.  All uses updated.
14000         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14001         (gdbpy_create_lazy_string_object): Flag bad length values.
14002         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14003         Handle typedefs in incoming type.
14004         (stpy_lazy_string_elt_type): New function.
14005         (gdbpy_extract_lazy_string): Call it.
14006         * python/py-value.c (valpy_lazy_string): Flag bad length values.
14007         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
14008         typedefs in incoming type.
14009
14010 2017-03-16  Doug Evans  <dje@google.com>
14011
14012         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14013         * guile/scm-type.c (tyscm_scm_to_type): New function.
14014
14015 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
14016
14017         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14018         "ULONGEST" for "skip".
14019
14020 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14021
14022         PR gdb/21220
14023         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14024         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14025         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
14026         over ptrace peek/poke until end of buffer or error.
14027
14028 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
14029
14030         * parse.c (length_of_subexp): Make static.
14031         * parser-defs.h (length_of_subexp): Remove.
14032
14033 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14034
14035         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14036         as well.
14037
14038 2017-03-14  Pedro Alves  <palves@redhat.com>
14039
14040         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14041         (main): Use std::unique_ptr.  Remove calls to
14042         cp_demangled_name_parse_free.
14043
14044 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14045
14046         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14047         alphabsd_store_inferior_registers): Use regcache->ptid instead
14048         of inferior_ptid.
14049
14050 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14051
14052         * aix-thread.c (aix_thread_fetch_registers,
14053         aix_thread_store_registers): Use regcache->ptid instead of
14054         inferior_ptid.
14055
14056 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14057
14058         * aarch64-linux-nat.c (fetch_gregs_from_thread,
14059         store_gregs_to_thread, fetch_fpregs_from_thread,
14060         store_fpregs_to_thread): Use regcache->ptid instead of
14061         inferior_ptid.
14062
14063 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14064
14065         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14066         amd64_linux_fetch_inferior_registers): Use regcache->ptid
14067         instead of inferior_ptid.
14068
14069 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14070
14071         * target.c (target_fetch_registers, target_store_registers): Add
14072         assert.
14073
14074 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14075
14076         * regcache.h (regcache_get_ptid): New function.
14077         * regcache.c (regcache_get_ptid): New function.
14078
14079 2017-03-13  Mark Wielaard  <mark@klomp.org>
14080
14081         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14082
14083 2017-03-10  Keith Seitz  <keiths@redhat.com>
14084
14085         PR c++/8218
14086         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14087
14088 2017-03-08  Pedro Alves  <palves@redhat.com>
14089
14090         PR gdb/18360
14091         * infrun.c (start_step_over, do_target_resume, resume)
14092         (restart_threads): Assert we're not resuming a thread that is
14093         meant to be stopped.
14094         (infrun_thread_stop_requested_callback): Delete.
14095         (infrun_thread_stop_requested): If the thread is internally
14096         stopped, queue a pending stop event and clear the thread's
14097         inline-frame state.
14098         (handle_stop_requested): New function.
14099         (handle_syscall_event, handle_inferior_event_1): Use
14100         handle_stop_requested.
14101         (handle_stop_requested): New function.
14102         (handle_signal_stop): Set the thread's stop_signal here instead of
14103         at caller.
14104         (finish_step_over): Clear step over info unconditionally.
14105         (handle_signal_stop): If the user had interrupted the event
14106         thread, consider the stop a random signal.
14107         (handle_signal_stop) <signal arrived while stepping over
14108         breakpoint>: Don't restart threads here.
14109         (stop_waiting): Don't clear step-over info here.
14110
14111 2017-03-08  Pedro Alves  <palves@redhat.com>
14112
14113         PR 21206
14114         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14115         goes to argument 2, not 1.
14116
14117 2017-03-08  Pedro Alves  <palves@redhat.com>
14118
14119         PR cli/21218
14120         * top.c (gdb_readline_wrapper): Avoid passing NULL to
14121         display_gdb_prompt.
14122         (command_line_input): Add comment.
14123
14124 2017-03-08  Pedro Alves  <palves@redhat.com>
14125
14126         PR tui/21216
14127         * tui/tui-file.c (tui_file::write): New.
14128         * tui/tui-file.h (tui_file): Override "write".
14129         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14130         factored out from ...
14131         (tui_puts): ... here.
14132         (tui_putc): Use them.
14133         (tui_write): New function.
14134         * tui/tui-io.h (tui_write): Declare.
14135
14136 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
14137
14138         * Makefile.in (SFILES): Replace "environ.c" with
14139         "common/environ.c".
14140         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14141         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
14142         to...
14143         * common/environ.c: ... here.
14144         * environ.h: Moved to...
14145         * common/environ.h: ... here.
14146
14147 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14148
14149         * gdbarch.sh (pstring_ptr): New static function.
14150         (gdbarch_disassembler_options): Use it.
14151         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14152         not valid_disassembler_option->name.
14153         * gdbarch.c: Regenerate.
14154
14155 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14156
14157         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14158
14159 2017-03-07  Pedro Alves  <palves@redhat.com>
14160
14161         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14162
14163 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14164
14165         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14166         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14167         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14168         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14169
14170 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14171
14172         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14173
14174 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14175
14176         * remote.c (remote_add_target_side_commands): Use range-based
14177         for loop.
14178
14179 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14180
14181         PR gdb/21165
14182         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14183         value is lazy.
14184         * valprint.c (common_val_print): Likewise.
14185
14186 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14187
14188         * NEWS: Mention new set/show disassembler-options commands.
14189         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14190         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14191         (prospective_options): New static variable.
14192         (gdb_disassembler::gdb_disassembler): Initialize
14193         m_di.disassembler_options.
14194         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14195         (get_disassembler_options): New function.
14196         (set_disassembler_options): Likewise.
14197         (set_disassembler_options_sfunc): Likewise.
14198         (show_disassembler_options_sfunc): Likewise.
14199         (disassembler_options_completer): Likewise.
14200         (_initialize_disasm): Likewise.
14201         * disasm.h (get_disassembler_options): New prototype.
14202         (set_disassembler_options): Likewise.
14203         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14204         (gdbarch_verify_disassembler_options): Likewise.
14205         * gdbarch.c: Regenerate.
14206         * gdbarch.h: Likewise.
14207         * arm-tdep.c (num_disassembly_options): Delete.
14208         (set_disassembly_style): Likewise.
14209         (arm_disassembler_options): New static variable.
14210         (set_disassembly_style_sfunc): Convert short style name into long
14211         option name.  Call set_disassembler_options.
14212         (show_disassembly_style_sfunc): New function.
14213         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14214         set_gdbarch_verify_disassembler_options.
14215         (_initialize_arm_tdep): Delete regnames variable and update callers.
14216         (arm_disassembler_options): Initialize.
14217         (disasm_options): New variable.
14218         (num_disassembly_options): Rename from this...
14219         (num_disassembly_styles): ...to this.  Compute by scanning through
14220         disasm_options.
14221         (valid_disassembly_styles): Initialize using disasm_options.
14222         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14223         set_arm_regname_option.
14224         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14225         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14226         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14227         set_gdbarch_verify_disassembler_options.
14228         * s390-tdep.c (s390_disassembler_options): New static variable.
14229         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14230         set_gdbarch_verify_disassembler_options.
14231
14232 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14233
14234         * remote.c (remote_add_target_side_condition): Remove "struct"
14235         keyword from range-based for loop.
14236
14237 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14238
14239         * remote.c (remote_add_target_side_condition): Use range-based
14240         for loop.  Update comment.
14241
14242 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14243
14244         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14245
14246 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14247
14248         * regcache.c (regcache_raw_update): New function.
14249         (regcache_raw_read): Move code to regcache_raw_update.
14250         * regcache.h (regcache_raw_update): New declaration.
14251         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14252
14253 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14254
14255         * dwarf2read.c (create_debug_type_hash_table): Initialize
14256         header.signature and header.type_offset_in_tu.
14257
14258 2017-02-24  Pedro Alves  <palves@redhat.com>
14259
14260         * symtab.c (make_file_symbol_completion_list_1): Use
14261         add_symtab_completions.
14262
14263 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14264
14265         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14266
14267 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14268
14269         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14270         I386_MAX_REGISTER_SIZE.
14271         (i386_pseudo_register_write): Likewise.
14272         (i386_process_record): Likewise.
14273         * i387-tdep.c (i387_supply_xsave): Likewise.
14274         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14275         (store_register): Likewise.
14276
14277 2017-02-23  Pedro Alves  <palves@redhat.com>
14278
14279         * ada-lang.c: Include "common/function-view.h".
14280         (ada_iterate_over_symbols): Adjust to use function_view as
14281         callback type.
14282         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14283         (ada_make_symbol_completion_list): Use a lambda.
14284         (ada_exc_search_name_matches): Delete.
14285         (name_matches_regex): New.
14286         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14287         * compile/compile-c-support.c: Include "common/function-view.h".
14288         (print_one_macro): Change prototype to accept a ui_file pointer.
14289         (write_macro_definitions): Use a lambda.
14290         * dwarf2read.c: Include "common/function-view.h".
14291         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14292         (dw2_expand_symtabs_matching): Adjust to use function_view as
14293         callback type.
14294         * language.h: Include "common/function-view.h".
14295         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14296         function_view as callback type.
14297         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14298         * linespec.c: Include "common/function-view.h".
14299         (collect_info::add_symbol): New method.
14300         (struct symbol_and_data_callback, iterate_inline_only, struct
14301         symbol_matcher_data, iterate_name_matcher): Delete.
14302         (iterate_over_all_matching_symtabs): Adjust to use function_view
14303         as callback type and lambdas.
14304         (iterate_over_file_blocks): Adjust to use function_view as
14305         callback type.
14306         (decode_compound_collector): Now a class with private fields.
14307         (decode_compound_collector::release_symbols): New method.
14308         (collect_one_symbol): Rename to...
14309         (decode_compound_collector::operator()): ... this and adjust.
14310         (lookup_prefix_sym): decode_compound_collector construction bits
14311         move to decode_compound_collector ctor.  Pass the
14312         decode_compound_collector object directly as callback.  Remove
14313         cleanups and use decode_compound_collector::release_symbols
14314         instead.
14315         (symtab_collector): Now a class with private fields.
14316         (symtab_collector::release_symtabs): New method.
14317         (add_symtabs_to_list): Rename to...
14318         (symtab_collector::operator()): ... this and adjust.
14319         (collect_symtabs_from_filename): symtab_collector construction
14320         bits move to symtab_collector ctor.  Pass the symtab_collector
14321         object directly as callback.  Remove cleanups and use
14322         symtab_collector::release_symtabs instead.
14323         (collect_symbols): Delete.
14324         (add_matching_symbols_to_info): Use lambdas.
14325         * macrocmd.c (print_macro_callback): Delete.
14326         (info_macro_command): Use a lambda.
14327         (info_macros_command): Pass print_macro_definition as callable
14328         directly.
14329         (print_one_macro): Remove 'ignore' parameter.
14330         (macro_list_command): Adjust.
14331         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14332         (macro_for_each_data::user_data): Delete field.
14333         (foreach_macro): Adjust to call the function_view.
14334         (macro_for_each): Adjust to use function_view as callback type.
14335         (foreach_macro_in_scope): Adjust to call the function_view.
14336         (macro_for_each_in_scope): Adjust to use function_view as callback
14337         type.
14338         * macrotab.h: Include "common/function-view.h".
14339         (macro_callback_fn): Declare a prototype instead of a pointer.
14340         Remove "user_data" parameter.
14341         (macro_for_each, macro_for_each_in_scope): Adjust to use
14342         function_view as callback type.
14343         * psymtab.c (partial_map_expand_apply)
14344         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14345         Adjust to use function_view as callback type and to return bool.
14346         (psym_expand_symtabs_matching): Adjust to use function_view as
14347         callback types.
14348         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14349         to use function_view as callback type and to return bool.
14350         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14351         callback types.
14352         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14353         as callback types.
14354         * symfile.h: Include "common/function-view.h".
14355         (expand_symtabs_file_matcher_ftype)
14356         (expand_symtabs_symbol_matcher_ftype)
14357         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14358         return bool.
14359         (quick_symbol_functions::map_symtabs_matching_filename)
14360         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14361         function_view as callback type and return bool.
14362         (expand_symtabs_matching): Adjust to use function_view as callback
14363         type.
14364         (maintenance_expand_name_matcher)
14365         (maintenance_expand_file_matcher): Delete.
14366         (maintenance_expand_symtabs): Use lambdas.
14367         * symtab.c (iterate_over_some_symtabs): Adjust to use
14368         function_view as callback types and return bool.
14369         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14370         of a cleanup.
14371         (lookup_symtab_callback): Delete.
14372         (lookup_symtab): Use a lambda.
14373         (iterate_over_symbols): Adjust to use function_view as callback
14374         type.
14375         (struct search_symbols_data, search_symbols_file_matches)
14376         (search_symbols_name_matches): Delete.
14377         (search_symbols): Use a pair of lambdas.
14378         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14379         (symtab_expansion_callback): Delete.
14380         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14381         * symtab.h: Include "common/function-view.h".
14382         (iterate_over_some_symtabs): Adjust to use function_view as
14383         callback type and return bool.
14384         (iterate_over_symtabs): Adjust to use function_view as callback
14385         type.
14386         (symbol_found_callback_ftype): Remove 'data' parameter and return
14387         bool.
14388         (iterate_over_symbols): Adjust to use function_view as callback
14389         type.
14390
14391 2017-02-23  Pedro Alves  <palves@redhat.com>
14392
14393         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14394         (%.o) <unittests/%.c>: New pattern.
14395         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14396         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14397         * common/function-view.h: New file.
14398         * unittests/function-view-selftests.c: New file.
14399         * configure: Regenerate.
14400
14401 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14402
14403         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14404         inferior_ptid.
14405         * go32-nat.c (go32_thread_alive): Likewise.
14406
14407 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14408
14409         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14410         delete.
14411
14412 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14413
14414         * varobj.c (varobj_clear_saved_item): Use delete instead of
14415         xfree.
14416         (update_dynamic_varobj_children): Likewise.
14417
14418 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14419
14420         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14421
14422 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14423
14424         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14425         m_enum_value to 0 in default constructor.
14426
14427 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14428
14429         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14430         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14431         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14432         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14433         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14434         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14435         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14436         IS_STORE_CONDITIONAL_INSN.
14437
14438 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14439
14440         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14441
14442 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14443
14444         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14445
14446 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14447
14448         * dwarf2read.c (skip_one_die, read_attribute_value)
14449         (dwarf2_const_value_attr, dump_die_shallow)
14450         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14451         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14452
14453 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14454
14455         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14456         (dwarf_parse_macro_header): Accept DWARF version 5.
14457         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14458
14459 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14460
14461         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14462         DW_AT_GNU_*.
14463         * common/common-exceptions.h (enum errors): Likewise.
14464         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14465         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14466         (dwarf_expr_context::execute_stack_op): Likewise.
14467         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14468         Likewise.
14469         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14470         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14471         (show_entry_values_debug, call_site_to_target_addr)
14472         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14473         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14474         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14475         (value_of_dwarf_block_entry, indirect_pieced_value)
14476         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14477         (disassemble_dwarf_expression): Likewise.
14478         * dwarf2read.c (process_die, inherit_abstract_dies)
14479         (read_call_site_scope): Likewise.
14480         * gdbtypes.h (struct func_type, struct call_site_parameter)
14481         (struct call_site): Likewise.
14482         * stack.c (read_frame_arg): Likewise.
14483         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14484
14485 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14486
14487         * defs.h (read_unsigned_leb128): New declaration.
14488         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14489         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14490         (dwarf2_find_location_expression): Call also
14491         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14492         * dwarf2loc.h (dwarf2_version): New declaration.
14493         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14494         rnglists.
14495         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14496         .debug_rnglists.
14497         (struct dwop_section_names): Add loclists_dwo.
14498         (dwop_section_names): Add .debug_loclists.dwo.
14499         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14500         (struct dwarf2_per_cu_data): Add dwarf_version.
14501         (struct dwo_sections): Add loclists.
14502         (struct attr_abbrev): Add implicit_const.
14503         (read_indirect_line_string): New declaration.
14504         (read_unsigned_leb128): Delete declaration.
14505         (rcuh_kind): New definition.
14506         (read_and_check_comp_unit_head): Change parameter
14507         is_debug_types_section to section_kind.
14508         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14509         (read_comp_unit_head): Change parameter abfd to section, add parameter
14510         section_kind.  Handle DWARF-5.
14511         (error_check_comp_unit_head): Accept also DWARF version 5.
14512         (read_and_check_comp_unit_head): Change parameter
14513         is_debug_types_section to section_kind.
14514         (read_and_check_type_unit_head): Delete function.
14515         (read_abbrev_offset): Handle DWARF-5.
14516         (create_debug_type_hash_table): Add parameter section_kind.  Process
14517         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14518         comp_unit_head.
14519         (create_debug_types_hash_table): Update create_debug_type_hash_table
14520         caller.
14521         (create_all_type_units): Call create_debug_type_hash_table.
14522         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14523         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14524         caller.
14525         (skip_one_die): Handle DW_FORM_implicit_const.
14526         (dwarf2_rnglists_process): New function.
14527         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14528         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14529         (read_attribute_value): Handle DW_FORM_implicit_const,
14530         DW_FORM_line_strp.
14531         (read_attribute): Handle DW_FORM_implicit_const.
14532         (read_indirect_string_at_offset_from): New function from
14533         read_indirect_string_at_offset.
14534         (read_indirect_string_at_offset): Call
14535         read_indirect_string_at_offset_from.
14536         (read_indirect_line_string_at_offset): New function.
14537         (read_indirect_string): New function comment.
14538         (read_indirect_line_string): New function.
14539         (read_unsigned_leb128): Make it global.
14540         (dwarf2_string_attr): Handle DWARF-5.
14541         (add_include_dir_stub, read_formatted_entries): New functions.
14542         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14543         Handle DWARF-5.
14544         (per_cu_header_read_in): Update read_comp_unit_head caller.
14545         (dwarf2_version): New function.
14546         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14547         rnglists.
14548         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14549         fields.
14550
14551 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14552
14553         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14554
14555 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14556
14557         * dwarf2read.c (dwarf2_ranges_process): New function from
14558         dwarf2_ranges_read.
14559         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14560         dwarf2_ranges_process.
14561
14562 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14563
14564         * dwarf2read.c (create_debug_type_hash_table): New function from
14565         create_debug_types_hash_table.
14566         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14567         (create_all_type_units, open_and_init_dwo_file): Update
14568         create_debug_types_hash_table callers.
14569
14570 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14571
14572         PR gdb/16188
14573         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14574         refer to 'ap', not 'args'.
14575
14576 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14577             Pedro Alves  <palves@redhat.com>
14578
14579         PR gdb/16188
14580         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14581         calls succeeded.
14582         * fork-child.c (trace_start_error): New function.
14583         (trace_start_error_with_name): Likewise.
14584         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14585         * inf-ptrace.c (inf_ptrace_me): Likewise.
14586         * inferior.h (trace_start_error): New prototype.
14587         (trace_start_error_with_name): Likewise.
14588
14589 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14590
14591         PR gdb/21164
14592         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14593         NULL before using it.
14594         * symmisc.c (maintenance_print_symbols): Likewise.
14595         (maintenance_print_msymbols): Likewise.
14596
14597 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14598
14599         * NEWS: Add record Python bindings entry.
14600
14601 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14602
14603         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14604         py-record-full.o.
14605         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14606         * python/py-record-btrace.c, python/py-record-btrace.h,
14607         python/py-record-full.c, python/py-record-full.h: New file.
14608         * python/py-record.c: Add include for py-record-btrace.h and
14609         py-record-full.h.
14610         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14611         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14612         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14613         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14614         New definition.
14615         (gdbpy_initialize_btrace): New export.
14616         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14617
14618 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14619
14620         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14621         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14622         * python/py-record.c: New file.
14623         * python/python-internal.h (gdbpy_start_recording,
14624         gdbpy_current_recording, gdpy_stop_recording,
14625         gdbpy_initialize_record): New export.
14626         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14627         (python_GdbMethods): Add gdbpy_start_recording,
14628         gdbpy_current_recording and gdbpy_stop_recording.
14629
14630 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14631
14632         * record-btrace.c (record_btrace_record_method): New function.
14633         (init_record_btrace_ops): Initialize to_record_method.
14634         * record-full.c (record_full_record_method): New function.
14635         (init_record_full_ops, init_record_full_core_ops): Add
14636         record_full_record_method.
14637         * record.h (enum record_method): New enum.
14638         * target-debug.h (target_debug_print_enum_record_method: New define.
14639         * target-delegates.c: Regenerate.
14640         * target.c (target_record_method): New function.
14641         * target.h: Include record.h.
14642         (struct target_ops) <to_record_method>: New field.
14643         (target_record_method): New export.
14644
14645 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14646
14647         * record.h (record_start, record_stop): New export.
14648         * record.c (record_start, record_stop): New function.
14649
14650 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14651
14652         * btrace.c (btrace_fetch): Copy function call segments pointer
14653         into a vector.
14654         (btrace_clear): Clear the vector.
14655         (btrace_find_insn_by_number): Use binary search to find the correct
14656         function call segment.
14657         * btrace.h (brace_fun_p): New typedef.
14658         (struct btrace_thread_info) <functions>: New field.
14659
14660 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14661
14662         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14663         * btrace.c (btrace_decode_error): ... here.  New function.
14664         * btrace.h (btrace_decode_error): New export.
14665
14666 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14667
14668         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14669         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14670         btrace_find_insn_by_number): Remove special case for gaps.
14671         * btrace.h (btrace_insn_get_error): New export.
14672         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14673         * record-btrace.c (btrace_insn_history): Print number for gaps.
14674         (record_btrace_info, record_btrace_goto): Handle gaps.
14675
14676 2017-02-14  Tom Tromey  <tom@tromey.com>
14677
14678         PR python/13598:
14679         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14680         event.
14681         * python/py-evts.c (gdbpy_initialize_py_events): Add
14682         before_prompt registry.
14683         * python/py-events.h (events_object) <before_prompt>: New field.
14684
14685 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14686
14687         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14688
14689 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14690
14691         * symfile (_initialize_symfile): Add usage text to the load command's
14692         help text.
14693
14694 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14695
14696         * utils.c (defaulted_query): Don't query on secondary UIs.
14697
14698 2017-02-10  Tom Tromey  <tom@tromey.com>
14699
14700         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14701
14702 2017-02-10  Tom Tromey  <tom@tromey.com>
14703
14704         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14705         "cleanup" local.
14706         * python/py-type.c (typy_legacy_template_argument): Remove
14707         unnecessary "cleanup" local.
14708
14709 2017-02-10  Tom Tromey  <tom@tromey.com>
14710
14711         * python/python.c (do_start_initialization): New function, from
14712         _initialize_python.
14713         (_initialize_python): Call do_start_initialization.
14714         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14715         goto.
14716
14717 2017-02-10  Tom Tromey  <tom@tromey.com>
14718
14719         * python/py-prettyprint.c (pretty_print_one_value): Use
14720         gdbpy_ref.
14721
14722 2017-02-10  Tom Tromey  <tom@tromey.com>
14723
14724         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14725         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14726         gdbpy_ref.
14727         * python/py-type.c (field_new): Use gdbpy_ref.
14728         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14729         gdbpy_ref.
14730         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14731         (py_free_pspace): Likewise.
14732         (pspace_to_pspace_object): Likewise.
14733         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14734         (py_free_objfile): Likewise.
14735         (objfile_to_objfile_object): Likewise.
14736         * python/py-inferior.c (delete_thread_object): Use
14737         gdbpy_ref.
14738         (infpy_read_memory): Likewise.
14739         (py_free_inferior): Likewise.
14740         * python/py-evtregistry.c (create_eventregistry_object): Use
14741         gdbpy_ref.
14742         * python/py-event.c (create_event_object): Use gdbpy_ref.
14743
14744 2017-02-10  Tom Tromey  <tom@tromey.com>
14745
14746         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14747         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14748         used.
14749         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14750         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14751         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14752         python/py-framefilter.c, python/py-function.c,
14753         python/py-inferior.c, python/py-infevents.c,
14754         python/py-linetable.c, python/py-newobjfileevent.c,
14755         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14756         python/py-signalevent.c, python/py-stopevent.c,
14757         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14758         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14759         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14760         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14761
14762 2017-02-10  Tom Tromey  <tom@tromey.com>
14763
14764         * ui-out.h (ui_out_emit_type): New class.
14765         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14766         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14767         and ui_out_emit_tuple.
14768         (enumerate_locals): Likewise.
14769         (py_mi_print_variables, py_print_locals, py_print_args): Use
14770         ui_out_emit_list.
14771         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14772         ui_out_emit_list.
14773         * common/gdb_optional.h: New file.
14774
14775 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14776
14777         * MAINTAINERS (Write After Approval): Update my e-mail address.
14778
14779 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14780
14781         PR gdb/21122
14782         * breakpoint.c (_initialize_breakpoint): Update the help description
14783         of the 'commands' command to indicate that it takes a list argument.
14784
14785 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14786
14787         * interps.c (current_interp_set_logging): Remove "return".
14788
14789 2017-02-09  Gary Benson  <gbenson@redhat.com>
14790
14791         * symtab.c (add_symtab_completions): Prevent NULL pointer
14792         dereference.
14793
14794 2017-02-08  Pedro Alves  <palves@redhat.com>
14795
14796         * interps.c (interp::interp): Remove reference to quiet_p.
14797         (interp_set): Make static.  Remove dead "Switching to" output
14798         code.
14799         (interp_quiet_p, interp_set_quiet): Delete.
14800         (interpreter_exec_cmd): Don't set the interpreter quiet.
14801         * interps.h (interp_quiet_p): Make static.
14802         (class interp) <quiet_p>: Remove field
14803
14804 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14805
14806         * cli/cli-decode.c (find_command_name_length): Make it extern.
14807         * cli/cli-decode.h (find_command_name_length): Declare.
14808         * cli/cli-script.c (command_name_equals, line_first_arg):
14809         New functions.
14810         (process_next_line): Use cli-decode to parse command names.
14811         (build_command_line): Make args a constant pointer.
14812
14813 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14814
14815         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14816         Remove case-insensitive search.
14817
14818 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14819
14820         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14821         at the end of the line.  Avoids an ARI warning.
14822
14823 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14824
14825         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14826         rdseed instructions.
14827         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14828
14829 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14830
14831         PR tdep/20936
14832         Provide and use sparc32 and sparc64 target description XML files.
14833         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14834         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14835         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14836         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14837         * features/sparc/sparc32-solaris.xml: New file.
14838         * features/sparc/sparc64-solaris.xml: New file.
14839         * features/sparc/sparc32-solaris.c: Generated.
14840         * features/sparc/sparc64-solaris.c: Generated.
14841         * sparc-tdep.h: Account for differences in target descriptions.
14842         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14843         (sparc32_register_type): Use target provided registers.
14844         (validate_tdesc_registers): New function.
14845         (sparc32_gdbarch_init): Use tdesc_has_registers.
14846         Set pseudoregister functions.
14847         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14848         (sparc64_register_type): Use target provided registers.
14849         (sparc64_init_abi): Set pseudoregister functions.
14850
14851 2017-02-03  Tom Tromey  <tom@tromey.com>
14852
14853         PR rust/21097:
14854         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14855         with a single member.
14856
14857 2017-02-03  Pedro Alves  <palves@redhat.com>
14858
14859         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14860         (cli_interp_base::~cli_interp_base): New.
14861         (cli_interp): New struct.
14862         (as_cli_interp): Cast the interp itself to cli_interp.
14863         (cli_interpreter_pre_command_loop): Rename to ...
14864         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14865         parameter.
14866         (cli_interpreter_init): Rename to ...
14867         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14868         boolean.  Make extern.
14869         (cli_interpreter_resume): Rename to ...
14870         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14871         extern.
14872         (cli_interpreter_suspend): Rename to ...
14873         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14874         extern.
14875         (cli_interpreter_exec): Rename to ...
14876         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14877         extern.
14878         (cli_interpreter_supports_command_editing): Rename to ...
14879         (cli_interp_base::supports_command_editing): ... this.  Remove
14880         'interp' parameter.  Make extern.
14881         (cli_ui_out): Rename to ...
14882         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14883         Make extern.
14884         (cli_set_logging): Rename to ...
14885         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14886         parameter.  Make extern.
14887         (cli_interp_procs): Delete.
14888         (cli_interp_factory): Adjust to use "new".
14889         * cli/cli-interp.h: Include "interps.h".
14890         (struct cli_interp_base): New struct.
14891         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14892         (interp_new): Delete.
14893         (interp::interp, interp::~interp): New.
14894         (interp_set): Use bool, and return void.  Assume the interpreter
14895         has suspend, init and resume methods, and that the all return
14896         void.
14897         (set_top_level_interpreter): interp_set returns void.
14898         (interp_ui_out): Adapt.
14899         (current_interp_set_logging): Adapt.
14900         (interp_data): Delete.
14901         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14902         (interp_exec): Adapt.
14903         (top_level_interpreter_data): Delete.
14904         * interps.h (interp_init_ftype, interp_resume_ftype)
14905         (interp_suspend_ftype, interp_exec_ftype)
14906         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14907         (class interp): New.
14908         (interp_new): Delete.
14909         (interp_set): Now returns void.  Use bool.
14910         (interp_data, top_level_interpreter_data): Delete.
14911         * mi/mi-common.h: Include interps.h.
14912         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14913         init, resume, suspect, exec, interp_ui_out, set_logging and
14914         pre_command_loop methods.
14915         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14916         (mi_interpreter_init): Rename to ...
14917         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14918         bool, return void and make extern.  Adjust.
14919         (mi_interpreter_resume): ... Rename to ...
14920         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14921         return void and make extern.  Adjust.
14922         (mi_interpreter_suspend): ... Rename to ...
14923         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14924         return void and make extern.  Adjust.
14925         (mi_interpreter_exec): ... Rename to ...
14926         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14927         extern.  Adjust.
14928         (mi_interpreter_pre_command_loop): ... Rename to ...
14929         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14930         parameter and make extern.
14931         (mi_on_normal_stop_1): Adjust.
14932         (mi_ui_out): Rename to ...
14933         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14934         parameter and make extern.  Adjust.
14935         (mi_set_logging): Rename to ...
14936         (mi_interp::set_logging): ... this.  Remove the 'interp'
14937         parameter and make extern.  Adjust.
14938         (mi_interp_procs): Delete.
14939         (mi_interp_factory): Adjust to use 'new'.
14940         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14941         (mi_print_exception, mi_execute_command, mi_load_progress):
14942         Adjust.
14943         * tui/tui-interp.c (tui_interp): New class.
14944         (as_tui_interp): Return a tui_interp pointer.
14945         (tui_on_normal_stop, tui_on_signal_received)
14946         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14947         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14948         to use interp::interp_ui_out.
14949         (tui_init): Rename to ...
14950         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14951         bool, return void and make extern.  Adjust.
14952         (tui_resume): Rename to ...
14953         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14954         return void and make extern.  Adjust.
14955         (tui_suspend): Rename to ...
14956         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14957         return void and make extern.  Adjust.
14958         (tui_ui_out): Rename to ...
14959         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14960         parameter, and make extern.  Adjust.
14961         (tui_exec): Rename to ...
14962         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14963         make extern.
14964         (tui_interp_procs): Delete.
14965         (tui_interp_factory): Use "new".
14966
14967 2017-02-02  Tom Tromey  <tom@tromey.com>
14968
14969         * rust-exp.y (ends_raw_string, space_then_number)
14970         (rust_identifier_start_p): Return bool.
14971         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14972         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14973         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14974         (rust_chartype_p): Return bool.
14975         (val_print_struct, rust_print_struct_def, rust_print_type):
14976         Update.
14977         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14978         Return bool.
14979
14980 2017-02-02  Tom Tromey  <tom@tromey.com>
14981
14982         * rust-lang.c: Reindent.
14983
14984 2017-02-02  Tom Tromey  <tom@tromey.com>
14985
14986         * rust-lang.h (rust_crate_for_block): Update.
14987         * rust-lang.c (rust_crate_for_block): Return std::string.
14988         (rust_get_disr_info): Use std:;string, not
14989         gdb::unique_xmalloc_ptr.
14990         * rust-exp.y (crate_name): Update.
14991
14992 2017-02-02  Pedro Alves  <palves@redhat.com>
14993
14994         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14995         field out of gdb_disassembler_test and make it static.
14996
14997 2017-02-02  Pedro Alves  <palves@redhat.com>
14998
14999         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15000         mi1_interp and mi_interp fields.
15001
15002 2017-02-02  Pedro Alves  <palves@redhat.com>
15003
15004         * cli/cli-interp.c (struct saved_output_files, saved_output):
15005         Moved from cli/cli-logging.c.
15006         (cli_set_logging): New function.
15007         (cli_interp_procs): Install cli_set_logging.
15008         * cli/cli-interp.h (make_logging_output, cli_set_logging):
15009         Declare.
15010         * cli/cli-logging.c (struct saved_output_files, saved_output):
15011         Moved to cli/cli-interp.c.
15012         (pop_output_files): Don't save outputs here.
15013         (make_logging_output): New function.
15014         (handle_redirections): Don't build tee nor save previous outputs
15015         here.
15016         * interps.c (current_interp_set_logging): Change prototype.
15017         Assume there's always a set_logging_proc method installed.
15018         * interps.h (interp_set_logging_ftype): Change prototype.
15019         (current_interp_set_logging): Change prototype and adjust comment.
15020         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
15021         use make_logging_output.
15022         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15023 2017-02-02  Pedro Alves  <palves@redhat.com>
15024
15025         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15026         from ...
15027         (set_logging_overwrite): ... here.
15028         (logging_no_redirect_file): Delete.
15029         (set_logging_redirect): Don't handle redirection on the fly.
15030         Instead warn that "logging off" / "logging on" is necessary.
15031         (pop_output_files): Delete references to logging_no_redirect_file.
15032         (show_logging_command): Always speak in terms of what will happen
15033         once logging is reenabled.
15034
15035 2017-02-02  Pedro Alves  <palves@redhat.com>
15036
15037         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15038
15039 2017-02-02  Pedro Alves  <palves@redhat.com>
15040
15041         * disasm.c (gdb_pretty_print_insn): Rename to ...
15042         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15043         Remove gdbarch parameter.  Adapt to clear the object's buffers
15044         instead of allocating new buffers, and to print using the object's
15045         gdb_disassembler instead of calling gdb_print_insn.
15046         (dump_insns): Use gdb_pretty_print_disassembler.
15047         * disasm.h (gdb_pretty_print_insn): Delete declaration.
15048         (gdb_pretty_print_disassembler): New class.
15049         * record-btrace.c (btrace_insn_history): Use
15050         gdb_pretty_print_disassembler.
15051
15052 2017-02-02  Pedro Alves  <palves@redhat.com>
15053
15054         * ada-lang.c (type_as_string): Use string_file.
15055         * ada-valprint.c (ada_print_floating): Use string_file.
15056         * ada-varobj.c (ada_varobj_scalar_image)
15057         (ada_varobj_get_value_image): Use string_file.
15058         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15059         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15060         * breakpoint.c (update_inserted_breakpoint_locations)
15061         (insert_breakpoint_locations, reattach_breakpoints)
15062         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15063         (print_it_watchpoint): Use string_file.
15064         (save_breakpoints): Use stdio_file.
15065         * c-exp.y (oper): Use string_file.
15066         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15067         tee_file.
15068         (pop_output_files): Use delete.
15069         (handle_redirections): Use stdio_file and tee_file.
15070         * cli/cli-setshow.c (do_show_command): Use string_file.
15071         * compile/compile-c-support.c (c_compute_program): Use
15072         string_file.
15073         * compile/compile-c-symbols.c (generate_vla_size): Take a
15074         'string_file &' instead of a 'ui_file *'.
15075         (generate_c_for_for_one_variable): Take a 'string_file &' instead
15076         of a 'ui_file *'.  Use string_file.
15077         (generate_c_for_variable_locations): Take a 'string_file &'
15078         instead of a 'ui_file *'.
15079         * compile/compile-internal.h (generate_c_for_for_one_variable):
15080         Take a 'string_file &' instead of a 'ui_file *'.
15081         * compile/compile-loc2c.c (push, pushf, unary, binary)
15082         (print_label, pushf_register_address, pushf_register)
15083         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15084         'ui_file *'.  Adjust.
15085         * compile/compile.c (compile_to_object): Use string_file.
15086         * compile/compile.h (compile_dwarf_expr_to_c)
15087         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15088         'ui_file *'.
15089         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15090         (replace_typedefs_qualified_name): Use string_file and
15091         obstack_copy0.
15092         * disasm.c (gdb_pretty_print_insn): Use string_file.
15093         (gdb_disassembly): Adjust reference the null_stream global.
15094         (do_ui_file_delete): Delete.
15095         (gdb_insn_length): Use null_stream.
15096         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15097         * dwarf2loc.c (dwarf2_compile_property_to_c)
15098         (locexpr_generate_c_location, loclist_generate_c_location): Take a
15099         'string_file &' instead of a 'ui_file *'.
15100         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15101         * dwarf2read.c (do_ui_file_peek_last): Delete.
15102         (dwarf2_compute_name): Use string_file.
15103         * event-top.c (gdb_setup_readline): Use stdio_file.
15104         * gdbarch.sh (verify_gdbarch): Use string_file.
15105         * gdbtypes.c (safe_parse_type): Use null_stream.
15106         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15107         string_file.
15108         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15109         'string_file *' instead of a 'ui_file *'.
15110         (gdbscm_arch_disassemble): Use string_file.
15111         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15112         * guile/scm-ports.c (class ioscm_file_port): Now a class that
15113         inherits from ui_file.
15114         (ioscm_file_port_delete, ioscm_file_port_rewind)
15115         (ioscm_file_port_put): Delete.
15116         (ioscm_file_port_write): Rename to ...
15117         (ioscm_file_port::write): ... this.  Remove file_port_magic
15118         checks.
15119         (ioscm_file_port_new): Delete.
15120         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15121         ui_file_up.
15122         * guile/scm-type.c (tyscm_type_name): Use string_file.
15123         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15124         Use string_file.
15125         * infcmd.c (print_return_value_1): Use string_file.
15126         * infrun.c (print_target_wait_results): Use string_file.
15127         * language.c (add_language): Use string_file.
15128         * location.c (explicit_to_string_internal): Use string_file.
15129         * main.c (captured_main_1): Use null_file.
15130         * maint.c (maintenance_print_architecture): Use stdio_file.
15131         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15132         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15133         event_channel>: Change type to mi_console_file pointer.
15134         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15135         (mi_console_file_delete): Delete.
15136         (struct mi_console_file): Delete.
15137         (mi_console_file_magic): Delete.
15138         (mi_console_file_new): Delete.
15139         (mi_console_file::mi_console_file): New.
15140         (mi_console_file_delete): Delete.
15141         (mi_console_file_fputs): Delete.
15142         (mi_console_file::write): New.
15143         (mi_console_raw_packet): Delete.
15144         (mi_console_file::flush): New.
15145         (mi_console_file_flush): Delete.
15146         (mi_console_set_raw): Rename to ...
15147         (mi_console_file::set_raw): ... this.
15148         * mi/mi-console.h (class mi_console_file): New class.
15149         (mi_console_file_new, mi_console_set_raw): Delete.
15150         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15151         (mi_set_logging): Use delete and tee_file.  Adjust.
15152         * mi/mi-main.c (output_register): Use string_file.
15153         (mi_cmd_data_evaluate_expression): Use string_file.
15154         (mi_cmd_data_read_memory): Use string_file.
15155         (mi_cmd_execute, print_variable_or_computed): Use string_file.
15156         * mi/mi-out.c (mi_ui_out::main_stream): New.
15157         (mi_ui_out::rewind): Use main_stream and
15158         string_file.
15159         (mi_ui_out::put): Use main_stream and string_file.
15160         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15161         Allocate a 'string_file' instead.
15162         (mi_out_new): Don't allocate a mem_fileopen stream here.
15163         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15164         (mi_ui_out::main_stream): Declare method.
15165         * printcmd.c (eval_command): Use string_file.
15166         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15167         * python/py-arch.c (archpy_disassemble): Use string_file.
15168         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15169         * python/py-frame.c (frapy_str): Use string_file.
15170         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15171         Use string_file.
15172         * python/py-type.c (typy_str): Use string_file.
15173         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15174         * python/py-value.c (valpy_str): Use string_file.
15175         * record-btrace.c (btrace_insn_history): Use string_file.
15176         * regcache.c (regcache_print): Use stdio_file.
15177         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15178         * remote.c (escape_buffer): Use string_file.
15179         * rust-lang.c (rust_get_disr_info): Use string_file.
15180         * serial.c (serial_open_ops_1): Use stdio_file.
15181         (do_serial_close): Use delete.
15182         * stack.c (print_frame_arg): Use string_file.
15183         (print_frame_args): Remove local mem_fileopen stream, not used.
15184         (print_frame): Use string_file.
15185         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15186         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15187         Take a 'string_file *' instead of a 'ui_file *'.
15188         * top.c (new_ui): Use stdio_file and stderr_file.
15189         (free_ui): Use delete.
15190         (execute_command_to_string): Use string_file.
15191         (quit_confirm): Use string_file.
15192         * tracepoint.c (collection_list::append_exp): Use string_file.
15193         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15194         * tui/tui-file.c: Don't include "ui-file.h".
15195         (enum streamtype, struct tui_stream): Delete.
15196         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15197         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15198         (tui_file::tui_file): New method.
15199         (tui_file_fputs): Delete.
15200         (tui_file_get_strbuf): Delete.
15201         (tui_file::puts): New method.
15202         (tui_file_adjust_strbuf): Delete.
15203         (tui_file_flush): Delete.
15204         (tui_file::flush): New method.
15205         * tui/tui-file.h: Tweak intro comment.
15206         Include ui-file.h.
15207         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15208         (tui_file_adjust_strbuf): Delete declarations.
15209         (class tui_file): New class.
15210         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15211         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15212         (tui_register_format): Use string_stream.
15213         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15214         (tui_get_function_from_frame): Use string_file.
15215         * typeprint.c (type_to_string): Use string_file.
15216         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15217         (null_stream): New global.
15218         (ui_file_delete): Delete.
15219         (ui_file::ui_file): New.
15220         (null_file_isatty): Delete.
15221         (ui_file::~ui_file): New.
15222         (null_file_rewind): Delete.
15223         (ui_file::printf): New.
15224         (null_file_put): Delete.
15225         (null_file_flush): Delete.
15226         (ui_file::putstr): New.
15227         (null_file_write): Delete.
15228         (ui_file::putstrn): New.
15229         (null_file_read): Delete.
15230         (ui_file::putc): New.
15231         (null_file_fputs): Delete.
15232         (null_file_write_async_safe): Delete.
15233         (ui_file::vprintf): New.
15234         (null_file_delete): Delete.
15235         (null_file::write): New.
15236         (null_file_fseek): Delete.
15237         (null_file::puts): New.
15238         (ui_file_data): Delete.
15239         (null_file::write_async_safe): New.
15240         (gdb_flush, ui_file_isatty): Adjust.
15241         (ui_file_put, ui_file_rewind): Delete.
15242         (ui_file_write): Adjust.
15243         (ui_file_write_for_put): Delete.
15244         (ui_file_write_async_safe, ui_file_read): Adjust.
15245         (ui_file_fseek): Delete.
15246         (fputs_unfiltered): Adjust.
15247         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15248         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15249         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15250         (set_ui_file_data): Delete.
15251         (string_file::~string_file, string_file::write)
15252         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15253         (do_ui_file_as_string, ui_file_as_string): Delete.
15254         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15255         (struct mem_file): Delete.
15256         (mem_file_new): Delete.
15257         (stdio_file::stdio_file): New.
15258         (mem_file_delete): Delete.
15259         (stdio_file::stdio_file): New.
15260         (mem_fileopen): Delete.
15261         (stdio_file::~stdio_file): New.
15262         (mem_file_rewind): Delete.
15263         (stdio_file::set_stream): New.
15264         (mem_file_put): Delete.
15265         (stdio_file::open): New.
15266         (mem_file_write): Delete.
15267         (stdio_file_magic, struct stdio_file): Delete.
15268         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15269         (stdio_file::flush): New.
15270         (stdio_file_read): Rename to ...
15271         (stdio_file::read): ... this.  Adjust.
15272         (stdio_file_write): Rename to ...
15273         (stdio_file::write): ... this.  Adjust.
15274         (stdio_file_write_async_safe): Rename to ...
15275         (stdio_file::write_async_safe) ... this.  Adjust.
15276         (stdio_file_fputs): Rename to ...
15277         (stdio_file::puts) ... this.  Adjust.
15278         (stdio_file_isatty): Delete.
15279         (stdio_file_fseek): Delete.
15280         (stdio_file::isatty): New.
15281         (stderr_file_write): Rename to ...
15282         (stderr_file::write) ... this.  Adjust.
15283         (stderr_file_fputs): Rename to ...
15284         (stderr_file::puts) ... this.  Adjust.
15285         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15286         (stderr_file::stderr_file): New.
15287         (tee_file_magic): Delete.
15288         (struct tee_file): Delete.
15289         (tee_file::tee_file): New.
15290         (tee_file_new): Delete.
15291         (tee_file::~tee_file): New.
15292         (tee_file_delete): Delete.
15293         (tee_file_flush): Rename to ...
15294         (tee_file::flush): ... this.  Adjust.
15295         (tee_file_write): Rename to ...
15296         (tee_file::write): ... this.  Adjust.
15297         (tee_file::write_async_safe): New.
15298         (tee_file_fputs): Rename to ...
15299         (tee_file::puts): ... this.  Adjust.
15300         (tee_file_isatty): Rename to ...
15301         (tee_file::isatty): ... this.  Adjust.
15302         * ui-file.h (struct obstack, struct ui_file): Don't
15303         forward-declare.
15304         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15305         (ui_file_write_ftype)
15306         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15307         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15308         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15309         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15310         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15311         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15312         (set_ui_file_fseek): Delete.
15313         (ui_file_data, ui_file_delete, ui_file_rewind)
15314         (struct ui_file): New.
15315         (ui_file_up): New.
15316         (class null_file): New.
15317         (null_stream): Declare.
15318         (ui_file_write_for_put, ui_file_put): Delete.
15319         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15320         Delete.
15321         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15322         (gdb_fopen, tee_file_new): Delete.
15323         (struct string_file): New.
15324         (struct stdio_file): New.
15325         (stdio_file_up): New.
15326         (struct stderr_file): New.
15327         (class tee_file): New.
15328         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15329         of a 'ui_file *'.  Adjust.
15330         * ui-out.h (class ui_out) <field_stream>: Likewise.
15331         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15332         (null_stream): Delete.
15333         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15334         Adjust.
15335         * utils.h (struct ui_file): Delete forward declaration..
15336         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15337         (error_stream): Take a 'string_file &' instead of a
15338         'ui_file *'.
15339         * varobj.c (varobj_value_get_print_value): Use string_file.
15340         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15341         * gdbarch.c: Regenerate.
15342
15343 2017-02-02  Pedro Alves  <palves@redhat.com>
15344
15345         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15346         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15347         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15348         Adjust to call gdb_print_insn instead of
15349         gdb_disassembler::print_insn.
15350         (dump_insns, do_mixed_source_and_assembly_deprecated)
15351         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15352         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15353         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15354         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15355         declaration.
15356         (gdb_pretty_print_insn): Re-add declaration.
15357         * record-btrace.c (btrace_insn_history): Don't allocate a
15358         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15359
15360 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15361
15362         * disasm.h (gdb_disassembly): Remove file_string parameter.
15363         * disasm.c (gdb_disassembly): Likewise.
15364         * cli/cli-cmds.c (print_disassembly): Adapt.
15365         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15366         * stack.c (do_gdb_disassembly): Likewise.
15367
15368 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15369
15370         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15371         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15372         targets.  And if the implicit value is longer than needed, extract
15373         the first bytes instead of the "least significant" ones.
15374
15375 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15376
15377         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15378         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15379         (btrace_fetch): Assert can_access_registers_ptid.
15380         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15381         validate_registers_access.
15382
15383 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15384
15385         * gdbthread.h (can_access_registers_ptid): New.
15386         * thread.c (can_access_registers_ptid): New.
15387
15388 2017-02-01  Pedro Alves  <palves@redhat.com>
15389
15390         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15391
15392 2017-01-31  Pedro Alves  <palves@redhat.com>
15393
15394         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15395         Fix typos.
15396
15397 2017-01-31  Pedro Alves  <palves@redhat.com>
15398
15399         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15400         not used.
15401
15402 2017-01-31  Pedro Alves  <palves@redhat.com>
15403
15404         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15405
15406 2017-01-31  Pedro Alves  <palves@redhat.com>
15407
15408         * common/scoped_restore.h
15409         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15410         change the value's parameter type to T2.
15411         (make_scoped_restore): Likewise.
15412
15413 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15414             Richard Henderson  <rth@redhat.com>
15415
15416         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15417         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15418         GS_BASE for older kernels.
15419         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15420         GS_BASE for older kernels.
15421         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15422         and GS_BASE to the offset table.
15423         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15424         system register group.
15425         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15426         for older kernels.
15427         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15428         amd64 ABI.
15429         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15430         AMD64_GSBASE_REGNUM.
15431         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15432         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15433         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15434         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15435         i386/64bit-segments.xml in those rules.
15436         * features/i386/64bit-segments.xml: New file.
15437         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15438         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15439         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15440         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15441         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15442         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15443         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15444         * features/i386/amd64-avx-linux.c: Regenerated.
15445         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15446         * features/i386/amd64-avx-mpx.c: Regenerated.
15447         * features/i386/amd64-avx512-linux.c: Regenerated.
15448         * features/i386/amd64-linux.c: Regenerated.
15449         * features/i386/amd64-mpx-linux.c: Regenerated.
15450         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15451         * features/i386/i386-avx-mpx.c: Regenerated.
15452         * features/i386/x32-avx-linux.c: Regenerated.
15453         * features/i386/x32-avx512-linux.c: Regenerated.
15454         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15455         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15456         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15457         * regformats/i386/amd64-linux.dat: Regenerated.
15458         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15459         * regformats/i386/x32-avx-linux.dat: Regenerated.
15460         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15461         * regformats/i386/x32-linux.dat: Regenerated.
15462
15463 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15464
15465         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15466         Set to AMD64_NUM_REGS.
15467
15468 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15469
15470         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15471         that checks validity of a register number.
15472
15473 2017-01-27  Kees Cook  <keescook@google.com>
15474
15475         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15476         fetch_fpregs if target has fpa registers.
15477         (arm_linux_store_inferior_registers): Call store_fpregs if target
15478         has fpa registers.
15479
15480 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15481
15482         * cris-tdep.c (cris_gdbarch_init): Remove check for
15483         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15484
15485 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15486
15487         * corelow.c (get_core_register_section): Check for regset
15488         existence before checking for REGSET_VARIABLE_SIZE.
15489
15490 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15491             Pedro Alves  <palves@redhat.com>
15492
15493         PR gdb/20939
15494         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15495         call memory_error, save memaddr instead.
15496         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15497         negative, cal memory_error.
15498         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15499
15500 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15501
15502         * disasm-selftests.c (memory_error_test): New function.
15503         (_initialize_disasm_selftests): Register memory_error_test.
15504
15505 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15506
15507         * Makefile.in (SFILES): Add disasm-selftests.c and
15508         selftest-arch.c.
15509         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15510         * disasm-selftests.c: New file.
15511         * selftest-arch.c: New file.
15512         * selftest-arch.h: New file.
15513
15514 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15515
15516         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15517         to bfd_arch_mep.  Don't return 0 if section is not
15518         found.  Call print_insn_mep.
15519
15520 2017-01-26  Pedro Alves  <palves@redhat.com>
15521             Yao Qi  <yao.qi@linaro.org>
15522
15523         * arm-tdep.c: Include "disasm.h".
15524         (gdb_print_insn_arm): Update code to get gdbarch.
15525         * disasm.c (dis_asm_read_memory): Change it to
15526         gdb_disassembler::dis_asm_read_memory.
15527         (dis_asm_memory_error): Likewise.
15528         (dis_asm_print_address): Likewise.
15529         (gdb_pretty_print_insn): Change it to
15530         gdb_disassembler::pretty_print_insn.
15531         (dump_insns): Add one argument gdb_disassemlber.  All
15532         callers updated.
15533         (do_mixed_source_and_assembly_deprecated): Likewise.
15534         (do_mixed_source_and_assembly): Likewise.
15535         (do_assembly_only): Likewise.
15536         (gdb_disassembler::gdb_disassembler): New.
15537         (gdb_disassembler::print_insn): New.
15538         * disasm.h (class gdb_disassembler): New.
15539         (gdb_pretty_print_insn): Remove declaration.
15540         (gdb_disassemble_info): Likewise.
15541         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15542         (gdbscm_disasm_read_memory_worker): Update.
15543         (gdbscm_disasm_read_memory): Update.
15544         (gdbscm_disasm_memory_error): Remove.
15545         (gdbscm_disasm_print_address): Remove.
15546         (gdbscm_disassembler::gdbscm_disassembler): New.
15547         (gdbscm_print_insn_from_port): Update.
15548         * mips-tdep.c: Include disasm.h.
15549         (gdb_print_insn_mips): Update code to get gdbarch.
15550         * record-btrace.c (btrace_insn_history): Update.
15551         * spu-tdep.c: Include disasm.h.
15552         (struct spu_dis_asm_data): Remove.
15553         (struct spu_dis_asm_info): New.
15554         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15555         SPU id.
15556         (gdb_print_insn_spu): Cast disassemble_info to
15557         spu_dis_asm_info.
15558
15559 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15560
15561         * disasm.c (do_ui_file_delete): Delete.
15562         (gdb_insn_length): Move code creating stream to ...
15563         * utils.c (null_stream): ... here.  New function.
15564         * utils.h (null_stream): Declare.
15565
15566 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15567
15568         * python/py-inferior.c (find_thread_object): Return directly
15569         from the loop.  Remove "found" variable.
15570
15571 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15572
15573         GDB 7.12.1 released.
15574
15575 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15576
15577         * python/py-function.c (fnpy_call): Reorder declarations to have
15578         the gdbpy_enter object declared first.
15579         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15580
15581 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15582
15583         PR python/21068
15584         * python/python-internal.h (PyMem_RawMalloc): Define for
15585         Python < 3.4.
15586         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15587         PyMem_RawMalloc instead of PyMem_Malloc.
15588
15589 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15590             Luis Machado  <lgustavo@codesourcery.com>
15591
15592         * NEWS (New commands): Mention flash-erase.
15593         (New MI commands): Mention target-flash-erase.
15594         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15595         command.
15596         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15597         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15598         * target.c (flash_erase_command): New function.
15599         (initialize_targets): Add new flash-erase command.
15600         * target.h (flash_erase_command): New declaration.
15601
15602 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15603
15604         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15605         HAVE_SYS_PROCFS_H is defined.
15606
15607 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15608
15609         * remote.c (struct cached_reg): Change data into a pointer.
15610         * (stop_reply_dtr): Free data pointers before deleting vector.
15611         (process_stop_reply): Likewise.
15612         (remote_parse_stop_reply): Allocate space for data
15613
15614 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15615
15616         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15617         MAX_REGISTER_SIZE.
15618         (amd64_pseudo_register_read_value): Likewise.
15619         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15620         (store_register_using_P): Likewise.
15621         * regcache.c (regcache_xfer_part): Likewise.
15622
15623 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15624
15625         Split real and pseudo registers.
15626         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15627         (sparc32_pseudo_regnum): New enum.
15628         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15629         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15630         (SPARC32_CP0_REGISTERS): New macro.
15631         (sparc32_pseudo_register_name): New function.
15632         (sparc32_register_name): Use sparc32_pseudo_register_name.
15633         (sparc32_pseudo_register_type): New function.
15634         (sparc32_register_type): Use sparc32_pseudo_register_type.
15635         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15636         pseudo register numbers.
15637         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15638         (SPARC64_CP0_REGISTERS): New macro.
15639         (sparc64_pseudo_register_name): New function.
15640         (sparc64_register_name): Use sparc64_pseudo_register_name.
15641         (sparc64_pseudo_register_type): New function.
15642         (sparc64_register_type): Use sparc64_pseudo_register_type.
15643         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15644         pseudo register numbers.
15645         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15646         sparc64_store_arguments): Handle pseudo register numbers.
15647
15648 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15649
15650         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15651         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15652         output.
15653         (getpkt_or_notif_sane_1): Likewise.
15654
15655 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15656
15657         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15658         of CC.  Pass "-x c++-header" instead of "-x c".
15659
15660 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15661
15662         * remote.c (remote_can_async_p): Update comment.
15663
15664 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15665
15666         * linux-nat.c (linux_nat_can_async_p): Update comment.
15667
15668 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15669
15670         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15671
15672 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15673
15674         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15675
15676 2017-01-10  Tom Tromey  <tom@tromey.com>
15677
15678         * python/py-type.c (typy_legacy_template_argument): Update.
15679         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15680         ~demangle_parse_info): Declare new members.
15681         (cp_demangled_name_to_comp): Return unique_ptr.
15682         (cp_demangled_name_parse_free)
15683         (make_cleanup_cp_demangled_name_parse_free)
15684         (cp_new_demangle_parse_info): Remove.
15685         * cp-support.c (do_demangled_name_parse_free_cleanup)
15686         (make_cleanup_cp_demangled_name_parse_free): Remove.
15687         (inspect_type, cp_canonicalize_string_full)
15688         (cp_canonicalize_string): Update.
15689         (mangled_name_to_comp): Change return type.
15690         (cp_class_name_from_physname, method_name_from_physname)
15691         (cp_func_name, cp_remove_params): Update.
15692         * cp-name-parser.y (demangle_parse_info): New constructor, from
15693         cp_new_demangle_parse_info.
15694         (~demangle_parse_info): New destructor, from
15695         cp_demangled_name_parse_free.
15696         (cp_merge_demangle_parse_infos): Update.
15697         (cp_demangled_name_to_comp): Change return type.
15698
15699 2017-01-10  Tom Tromey  <tom@tromey.com>
15700
15701         * top.c (prevent_dont_repeat): Change return type.
15702         * python/python.c (execute_gdb_command): Use std::string.
15703         Update.
15704         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15705         * command.h (prevent_dont_repeat): Change return type.
15706         * breakpoint.c (bpstat_do_actions_1): Update.
15707
15708 2017-01-10  Tom Tromey  <tom@tromey.com>
15709
15710         * value.h (scoped_value_mark::~scoped_value_mark): Call
15711         free_to_mark.
15712         (scoped_value_mark::free_to_mark): New method.
15713         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15714         scoped_value_mark.
15715
15716 2017-01-10  Tom Tromey  <tom@tromey.com>
15717
15718         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15719         (valpy_reference_value, valpy_const_value, valpy_get_address)
15720         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15721         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15722         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15723         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15724         scoped_value_mark.
15725         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15726         * value.h (scoped_value_mark): New class.
15727
15728 2017-01-10  Tom Tromey  <tom@tromey.com>
15729
15730         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15731         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15732         * psymtab.c (discard_psymtabs_upto): Remove.
15733         (make_cleanup_discard_psymtabs): Remove.
15734         (struct psymtab_state): Remove.
15735
15736 2017-01-10  Tom Tromey  <tom@tromey.com>
15737
15738         * record-full.c (record_full_save_cleanups): Remove.
15739         (record_full_save): Use gdb::unlinker.
15740         * gcore.c (do_bfd_delete_cleanup): Remove.
15741         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15742         cleanups.
15743         * dwarf2read.c (unlink_if_set): Remove.
15744         (write_psymtabs_to_index): Use gdb::unlinker.
15745         * common/gdb_unlinker.h: New file.
15746
15747 2017-01-10  Tom Tromey  <tom@tromey.com>
15748
15749         * windows-tdep.c (windows_xfer_shared_library): Update.
15750         * windows-nat.c (windows_make_so): Update.
15751         * utils.h (make_cleanup_bfd_unref): Remove.
15752         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15753         * symfile.h (symfile_bfd_open)
15754         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15755         * symfile.c (read_symbols, symbol_file_add)
15756         (separate_debug_file_exists): Update.
15757         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15758         (generic_load, reread_symbols): Update.
15759         * symfile-mem.c (symbol_file_add_from_memory): Update.
15760         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15761         (spu_symbol_file_add_from_memory): Update.
15762         * solist.h (struct target_so_ops) <bfd_open>: Return
15763         gdb_bfd_ref_ptr.
15764         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15765         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15766         gdb_bfd_ref_ptr.
15767         (solib_map_sections, reload_shared_libraries_1): Update.
15768         * solib-svr4.c (enable_break): Update.
15769         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15770         * solib-frv.c (enable_break2): Update.
15771         * solib-dsbt.c (enable_break): Update.
15772         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15773         gdb_bfd_ref_ptr.
15774         (darwin_solib_get_all_image_info_addr_at_init): Update.
15775         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15776         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15777         * record-full.c (record_full_save): Update.
15778         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15779         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15780         * minidebug.c (find_separate_debug_file_in_section): Return
15781         gdb_bfd_ref_ptr.
15782         * machoread.c (macho_add_oso_symfile): Change abfd to
15783         gdb_bfd_ref_ptr.
15784         (macho_symfile_read_all_oso): Update.
15785         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15786         (macho_symfile_read): Update.
15787         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15788         (jit_bfd_try_read_symtab): Update.
15789         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15790         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15791         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15792         gdb_bfd_ref_ptr.
15793         (gdb_bfd_ref_policy): New struct.
15794         (gdb_bfd_ref_ptr): New typedef.
15795         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15796         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15797         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15798         gdb_bfd_ref_ptr.
15799         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15800         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15801         (gcore_command): Update.
15802         * exec.c (exec_file_attach): Update.
15803         * elfread.c (elf_symfile_read): Update.
15804         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15805         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15806         (open_and_init_dwo_file): Update.
15807         (open_dwp_file): Return gdb_bfd_ref_ptr.
15808         (open_and_init_dwp_file): Update.
15809         * corelow.c (core_open): Update.
15810         * compile/compile-object-load.c (compile_object_load): Update.
15811         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15812         * coffread.c (coff_symfile_read): Update.
15813         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15814         gdb_bfd_ref_ptr.  Rename.
15815         (dump_bfd_file, restore_command): Update.
15816         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15817         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15818         (find_separate_debug_file_by_buildid): Update.
15819
15820 2017-01-10  Tom Tromey  <tom@tromey.com>
15821
15822         * common/gdb_ref_ptr.h: New file.
15823         * python/py-ref.h (struct gdbpy_ref_policy): New.
15824         (gdbpy_ref): Now a typedef.
15825
15826 2017-01-10  Tom Tromey  <tom@tromey.com>
15827
15828         * utils.h (make_cleanup_htab_delete): Don't declare.
15829         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15830         Remove.
15831         * linespec.c (decode_compound_collector): Add constructor,
15832         destructor.
15833         (lookup_prefix_sym): Remove cleanup.
15834         (symtab_collector): Add constructor, destructor.
15835         (collect_symtabs_from_filename): Remove cleanup.
15836         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15837         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15838         Use htab_up.
15839         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15840         * dwarf2read.c (dw2_expand_symtabs_matching)
15841         (dw2_map_symbol_filenames, dwarf_decode_macros)
15842         (write_psymtabs_to_index): Use htab_up.
15843         * dwarf2loc.c (func_verify_no_selftailcall)
15844         (call_site_find_chain_1, func_verify_no_selftailcall)
15845         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15846         std::vector, gdb::unique_xmalloc_ptr.
15847         (call_sitep): Remove typedef.
15848         (dwarf2_locexpr_baton_eval): Remove unused variable.
15849
15850 2017-01-10  Tom Tromey  <tom@tromey.com>
15851
15852         * python/python-internal.h (make_cleanup_py_decref)
15853         (make_cleanup_py_xdecref): Don't declare.
15854         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15855         (py_xdecref, make_cleanup_py_xdecref): Remove.
15856
15857 2017-01-10  Tom Tromey  <tom@tromey.com>
15858
15859         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15860         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15861
15862 2017-01-10  Tom Tromey  <tom@tromey.com>
15863
15864         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15865
15866 2017-01-10  Tom Tromey  <tom@tromey.com>
15867
15868         * python/py-utils.c (unicode_to_encoded_string)
15869         (python_string_to_target_string)
15870         (python_string_to_target_python_string)
15871         (python_string_to_host_string, gdbpy_obj_to_string)
15872         (get_addr_from_python): Use gdbpy_ref.
15873
15874 2017-01-10  Tom Tromey  <tom@tromey.com>
15875
15876         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15877         gdbpy_ref.
15878
15879 2017-01-10  Tom Tromey  <tom@tromey.com>
15880
15881         * python/python.c (eval_python_command, gdbpy_decode_line)
15882         (gdbpy_run_events, gdbpy_start_type_printers)
15883         (gdbpy_apply_type_printers): Use gdbpy_ref.
15884
15885 2017-01-10  Tom Tromey  <tom@tromey.com>
15886
15887         * python/py-param.c (get_doc_string, compute_enum_values): Use
15888         gdbpy_ref.
15889
15890 2017-01-10  Tom Tromey  <tom@tromey.com>
15891
15892         * python/py-inferior.c (find_thread_object, build_inferior_list):
15893         Use gdbpy_ref.
15894
15895 2017-01-10  Tom Tromey  <tom@tromey.com>
15896
15897         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15898
15899 2017-01-10  Tom Tromey  <tom@tromey.com>
15900
15901         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15902         gdbpy_ref.
15903
15904 2017-01-10  Tom Tromey  <tom@tromey.com>
15905
15906         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15907         extra incref.
15908         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15909         Use gdbpy_ref.
15910
15911 2017-01-10  Tom Tromey  <tom@tromey.com>
15912
15913         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15914         gdbpy_ref.
15915
15916 2017-01-10  Tom Tromey  <tom@tromey.com>
15917
15918         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15919         decref results of PyArg_ParseTupleAndKeywords.
15920
15921 2017-01-10  Tom Tromey  <tom@tromey.com>
15922
15923         * python/python.c (python_run_simple_file): Use
15924         unique_xmalloc_ptr, gdbpy_ref.
15925
15926 2017-01-10  Tom Tromey  <tom@tromey.com>
15927
15928         * python/py-prettyprint.c (print_stack_unless_memory_error)
15929         (print_string_repr, print_children): Use gdbpy_ref.
15930         (dummy_python_frame): New class.
15931         (dummy_python_frame::dummy_python_frame): Rename from
15932         push_dummy_python_frame.
15933         (py_restore_tstate): Remove.
15934
15935 2017-01-10  Tom Tromey  <tom@tromey.com>
15936
15937         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15938
15939 2017-01-10  Tom Tromey  <tom@tromey.com>
15940
15941         * python/python.c (ensure_python_env, restore_python_env):
15942         Remove.
15943         * python/python-internal.h (ensure_python_env): Don't declare.
15944         * varobj.h (varobj_ensure_python_env): Don't declare.
15945         * varobj.c (varobj_ensure_python_env): Remove.
15946
15947 2017-01-10  Tom Tromey  <tom@tromey.com>
15948
15949         * varobj.c (varobj_value_get_print_value): Use
15950         gdbpy_enter_varobj.
15951
15952 2017-01-10  Tom Tromey  <tom@tromey.com>
15953
15954         * python/py-prettyprint.c (print_string_repr, print_children):
15955         Update.
15956         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15957         of "encoding".
15958         * varobj.c (varobj_value_get_print_value): Update.
15959         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15960
15961 2017-01-10  Tom Tromey  <tom@tromey.com>
15962
15963         * varobj.c (varobj_get_display_hint)
15964         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15965         (varobj_set_visualizer, free_variable): Use
15966         gdbpy_enter_varobj.
15967
15968 2017-01-10  Tom Tromey  <tom@tromey.com>
15969
15970         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15971         (do_finish_initialization): New function.  Use gdbpy_ref.
15972         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15973         do_finish_initialization.
15974
15975 2017-01-10  Tom Tromey  <tom@tromey.com>
15976
15977         * python/py-param.c (get_set_value, get_show_value): Use
15978         gdbpy_enter, gdbpy_ref.
15979
15980 2017-01-10  Tom Tromey  <tom@tromey.com>
15981
15982         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15983
15984 2017-01-10  Tom Tromey  <tom@tromey.com>
15985
15986         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15987
15988 2017-01-10  Tom Tromey  <tom@tromey.com>
15989
15990         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15991         Use gdbpy_enter_varobj.
15992
15993 2017-01-10  Tom Tromey  <tom@tromey.com>
15994
15995         * varobj.c (gdbpy_enter_varobj): New constructor.
15996         * python/python-internal.h (gdbpy_enter_varobj): New class.
15997         * python/py-varobj.c (py_varobj_get_iterator): Use
15998         gdbpy_enter_varobj.
15999
16000 2017-01-10  Tom Tromey  <tom@tromey.com>
16001
16002         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16003         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16004         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16005         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16006         unique_xmalloc_ptr.
16007         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16008
16009 2017-01-10  Tom Tromey  <tom@tromey.com>
16010
16011         * python/py-xmethods.c (invoke_match_method): Use
16012         gdbpy_ref.
16013
16014 2017-01-10  Tom Tromey  <tom@tromey.com>
16015
16016         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16017         gdbpy_enter, gdbpy_ref.
16018
16019 2017-01-10  Tom Tromey  <tom@tromey.com>
16020
16021         * python/python.c (python_interactive_command): Use gdbpy_enter.
16022
16023 2017-01-10  Tom Tromey  <tom@tromey.com>
16024
16025         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16026         gdbpy_ref.
16027
16028 2017-01-10  Tom Tromey  <tom@tromey.com>
16029
16030         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16031         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16032
16033 2017-01-10  Tom Tromey  <tom@tromey.com>
16034
16035         * utils.h (htab_deleter): New struct.
16036         (htab_up): New typedef.
16037         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16038         gdbpy_enter, gdbpy_ref, htab_up.
16039
16040 2017-01-10  Tom Tromey  <tom@tromey.com>
16041
16042         * python/py-unwind.c (pending_frame_invalidate): Remove.
16043         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16044
16045 2017-01-10  Tom Tromey  <tom@tromey.com>
16046
16047         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16048         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16049
16050 2017-01-10  Tom Tromey  <tom@tromey.com>
16051
16052         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16053
16054 2017-01-10  Tom Tromey  <tom@tromey.com>
16055
16056         * python/python.c (gdbpy_eval_from_control_command)
16057         (gdbpy_source_script, gdbpy_run_events)
16058         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16059         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16060         gdbpy_enter.
16061
16062 2017-01-10  Tom Tromey  <tom@tromey.com>
16063
16064         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16065
16066 2017-01-10  Tom Tromey  <tom@tromey.com>
16067
16068         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16069
16070 2017-01-10  Tom Tromey  <tom@tromey.com>
16071
16072         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16073         (python_on_inferior_call_pre, python_on_inferior_call_post)
16074         (python_on_memory_change, python_on_register_change)
16075         (python_inferior_exit, python_new_objfile, add_thread_object)
16076         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16077
16078 2017-01-10  Tom Tromey  <tom@tromey.com>
16079
16080         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16081         (bpfinishpy_handle_exit): Use gdbpy_enter.
16082
16083 2017-01-10  Tom Tromey  <tom@tromey.com>
16084
16085         * python/py-cmd.c (cmdpy_destroyer)
16086         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16087         gdbpy_enter.
16088
16089 2017-01-10  Tom Tromey  <tom@tromey.com>
16090
16091         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16092         gdbpy_enter.
16093         (gdbpy_breakpoint_has_cond): Likewise.
16094
16095 2017-01-10  Tom Tromey  <tom@tromey.com>
16096
16097         * python/python.c (gdbpy_enter): New constructor.
16098         (~gdbpy_enter): New destructor.
16099         (restore_python_env, ensure_python_env): Rewrite.
16100         * python/python-internal.h (gdbpy_enter): New class.
16101
16102 2017-01-10  Tom Tromey  <tom@tromey.com>
16103
16104         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16105
16106 2017-01-10  Tom Tromey  <tom@tromey.com>
16107
16108         * python/py-value.c (value_has_field, get_field_flag)
16109         (get_field_type, valpy_getitem, convert_value_from_python): Use
16110         gdbpy_ref.
16111
16112 2017-01-10  Tom Tromey  <tom@tromey.com>
16113
16114         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16115         gdbpy_ref.
16116
16117 2017-01-10  Tom Tromey  <tom@tromey.com>
16118
16119         * python/py-prettyprint.c (search_pp_list)
16120         (find_pretty_printer_from_objfiles)
16121         (find_pretty_printer_from_progspace)
16122         (find_pretty_printer_from_gdb, find_pretty_printer)
16123         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16124         gdbpy_ref.
16125
16126 2017-01-10  Tom Tromey  <tom@tromey.com>
16127
16128         * python/py-param.c (call_doc_function): Use gdbpy_ref.
16129
16130 2017-01-10  Tom Tromey  <tom@tromey.com>
16131
16132         * python/py-linetable.c (build_line_table_tuple_from_pcs)
16133         (ltpy_get_all_source_lines): Use gdbpy_ref.
16134
16135 2017-01-10  Tom Tromey  <tom@tromey.com>
16136
16137         * python/py-framefilter.c (extract_sym, extract_value)
16138         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16139         gdbpy_ref.
16140
16141 2017-01-10  Tom Tromey  <tom@tromey.com>
16142
16143         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16144
16145 2017-01-10  Tom Tromey  <tom@tromey.com>
16146
16147         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16148
16149 2017-01-10  Tom Tromey  <tom@tromey.com>
16150
16151         * python/py-function.c (convert_values_to_python, fnpy_init): Use
16152         gdbpy_ref.
16153
16154 2017-01-10  Tom Tromey  <tom@tromey.com>
16155
16156         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16157
16158 2017-01-10  Tom Tromey  <tom@tromey.com>
16159
16160         * python/py-type.c (convert_field, make_fielditem, typy_fields)
16161         (typy_range): Use gdbpy_ref.
16162
16163 2017-01-10  Tom Tromey  <tom@tromey.com>
16164
16165         * python/py-threadevent.c (create_thread_event_object): Use
16166         gdbpy_ref.
16167         * python/py-stopevent.c (create_stop_event_object): Simplify.
16168         (emit_stop_event): Use gdbpy_ref.
16169         * python/py-signalevent.c (create_signal_event_object): Use
16170         gdbpy_ref.
16171         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16172         (emit_new_objfile_event, create_clear_objfiles_event_object)
16173         (emit_clear_objfiles_event): Use gdbpy_ref.
16174         * python/py-infevents.c (create_inferior_call_event_object)
16175         (create_register_changed_event_object)
16176         (create_memory_changed_event_object, emit_inferior_call_event)
16177         (emit_memory_changed_event, emit_register_changed_event): Use
16178         gdbpy_ref.
16179         * python/py-exitedevent.c (create_exited_event_object)
16180         (emit_exited_event): Use gdbpy_ref.
16181         * python/py-event.h (evpy_emit_event): Remove
16182         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16183         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16184         * python/py-continueevent.c (emit_continue_event): Use
16185         gdbpy_ref.
16186         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16187         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16188         gdbpy_ref.
16189         * python/py-bpevent.c (create_breakpoint_event_object): Use
16190         gdbpy_ref.
16191
16192 2017-01-10  Tom Tromey  <tom@tromey.com>
16193
16194         * python/py-ref.h: New file.
16195
16196 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16197
16198         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16199         void.
16200         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16201         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16202         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16203         * ui-out.c (ui_out::redirect): Likewise.
16204         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16205         * cli/cli-logging.c (set_logging_redirect): Update call site of
16206         ui_out::redirect.
16207         (handle_redirections): Likewise.
16208         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16209         * top.c (execute_command_to_string): Likewise.
16210         * utils.c (do_ui_out_redirect_pop): Likewise.
16211
16212 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16213
16214         * stack.c (_initialize_stack): Update "frame" command help message.
16215
16216 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16217
16218         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16219
16220 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16221
16222         * x86-linux-nat.h: Include gdb_proc_service.h.
16223
16224 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16225
16226         * ser-base.h: Include serial.h.
16227
16228 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16229
16230         * ppc-linux-tdep.h: Include ppc-tdep.h.
16231
16232 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16233
16234         * nat/amd64-linux-siginfo.h: Include signal.h.
16235
16236 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16237
16238         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16239
16240 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16241
16242         * mi/mi-parse.h: Include mi-cmds.h.
16243
16244 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16245
16246         * inf-loop.c: Don't include "target.h".
16247         * inf-loop.h: Include it here.
16248
16249 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16250
16251         * dfp.h: Include "dboulest.h" and "expression.h".
16252
16253 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16254
16255         * ax-gdb.h: Include "ax.h".
16256
16257 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16258
16259         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16260         with nat/gdb_ptrace.h.
16261
16262 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16263
16264         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16265         new line.
16266         (mips64_fbsd_sigframe_init): Likewise.
16267
16268 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16269
16270         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16271         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16272
16273 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16274
16275         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16276         * NEWS: Mention new FreeBSD/mips native configuration.
16277         * config/mips/fbsd.mh: New file.
16278         * configure.host: Add mips*-*-freebsd*.
16279         * mips-fbsd-nat.c: New file.
16280
16281 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16282
16283         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16284         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16285         * NEWS: Mention new FreeBSD/mips target.
16286         * configure.tgt: Add mips*-*-freebsd*.
16287         * mips-fbsd-tdep.c: New file.
16288         * mips-fbsd-tdep.h: New file.
16289
16290 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16291
16292         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16293         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16294
16295 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16296
16297         Update copyright year range in all GDB files.
16298
16299 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16300
16301         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16302
16303 For older changes see ChangeLog-2016.
16304 \f
16305 Local Variables:
16306 mode: change-log
16307 left-margin: 8
16308 fill-column: 74
16309 version-control: never
16310 coding: utf-8
16311 End: