Convert DTrace probe interface to C++ (and perform some cleanups)
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
4         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
5         <type_str>: Convert to 'std::string'.
6         <expr>: Convert to 'expression_up'.
7         (dtrace_probe_arg_s): Delete type and VEC.
8         (dtrace_probe_enabler_s): Likewise.
9         (struct dtrace_probe): Replace by...
10         (class dtrace_static_probe_ops): ...this and...
11         (class dtrace_probe): ...this.
12         (dtrace_probe_is_linespec): Rename to...
13         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
14         to reflect change.
15         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
16         Adjust code.  Create new instance of 'dtrace_probe'.
17         (dtrace_build_arg_exprs): Rename to...
18         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
19         reflect change.
20         (dtrace_get_probes): Rename to...
21         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
22         to reflect change.
23         (dtrace_get_arg): Rename to...
24         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
25         reflect change.
26         (dtrace_probe_is_enabled): Rename to...
27         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
28         change.
29         (dtrace_get_probe_address): Rename to...
30         (dtrace_probe::get_relocated_address): ...this.  Adjust code
31         to reflect change.
32         (dtrace_get_probe_argument_count): Rename to...
33         (dtrace_probe::get_argument_count): ...this.  Adjust code to
34         reflect change.
35         (dtrace_can_evaluate_probe_arguments): Rename to...
36         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
37         to reflect change.
38         (dtrace_evaluate_probe_argument): Rename to...
39         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
40         reflect change.
41         (dtrace_compile_to_ax): Rename to...
42         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
43         reflect change.
44         (dtrace_probe_destroy): Delete.
45         (dtrace_type_name): Rename to...
46         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
47         reflect change.
48         (dtrace_probe::get_static_ops): New method.
49         (dtrace_gen_info_probes_table_header): Rename to...
50         (dtrace_static_probe_ops::gen_info_probes_table_header):
51         ...this.  Adjust code to reflect change.
52         (dtrace_gen_info_probes_table_values): Rename to...
53         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
54         code to reflect change.
55         (dtrace_enable_probe): Rename to...
56         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
57         change.
58         (dtrace_disable_probe): Rename to...
59         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
60         change.
61         (struct probe_ops dtrace_probe_ops): Delete.
62         (info_probes_dtrace_command): Call 'info_probes_for_spops'
63         instead of 'info_probes_for_ops'.
64         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
65         of 'all_probe_ops'.
66
67 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
68             Simon Marchi  <simark@simark.ca>
69
70         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
71         variable.
72         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
73         <aexpr>: Change type to 'expression_up'.
74         (stap_probe_arg_s): Delete type and VEC.
75         (struct stap_probe): Delete.  Replace by...
76         (class stap_static_probe_ops): ...this and...
77         (class stap_probe): ...this.  Rename variables to add 'm_'
78         prefix.  Do not use 'union' for arguments anymore.
79         (stap_get_expected_argument_type): Receive probe name instead
80         of 'struct stap_probe'.  Adjust code.
81         (stap_parse_probe_arguments): Rename to...
82         (stap_probe::parse_arguments): ...this.  Adjust code to
83         reflect change.
84         (stap_get_probe_address): Rename to...
85         (stap_probe::get_relocated_address): ...this.  Adjust code
86         to reflect change.
87         (stap_get_probe_argument_count): Rename to...
88         (stap_probe::get_argument_count): ...this.  Adjust code
89         to reflect change.
90         (stap_get_arg): Rename to...
91         (stap_probe::get_arg_by_number'): ...this. Adjust code to
92         reflect change.
93         (can_evaluate_probe_arguments): Rename to...
94         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
95         to reflect change.
96         (stap_evaluate_probe_argument): Rename to...
97         (stap_probe::evaluate_argument): ...this.  Adjust code
98         to reflect change.
99         (stap_compile_to_ax): Rename to...
100         (stap_probe::compile_to_ax): ...this.  Adjust code to
101         reflect change.
102         (stap_probe_destroy): Delete.
103         (stap_modify_semaphore): Adjust comment.
104         (stap_set_semaphore): Rename to...
105         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
106         change.
107         (stap_clear_semaphore): Rename to...
108         (stap_probe::clear_semaphore): ...this.  Adjust code to
109         reflect change.
110         (stap_probe::get_static_ops): New method.
111         (handle_stap_probe): Adjust code to create instance of
112         'stap_probe'.
113         (stap_get_probes): Rename to...
114         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
115         reflect change.
116         (stap_probe_is_linespec): Rename to...
117         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
118         reflect change.
119         (stap_type_name): Rename to...
120         (stap_static_probe_ops::type_name): ...this.  Adjust code to
121         reflect change.
122         (stap_gen_info_probes_table_header): Rename to...
123         (stap_static_probe_ops::gen_info_probes_table_header):
124         ...this.  Adjust code to reflect change.
125         (stap_gen_info_probes_table_values): Rename to...
126         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
127         code to reflect change.
128         (struct probe_ops stap_probe_ops): Delete.
129         (info_probes_stap_command): Use 'info_probes_for_spops'
130         instead of 'info_probes_for_ops'.
131         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
132         of 'all_probe_ops'.
133
134 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
135
136         * break-catch-throw.c (fetch_probe_arguments): Use
137         'probe.prob' instead of 'probe.probe'.
138         * breakpoint.c (create_longjmp_master_breakpoint): Call
139         'can_evaluate_arguments' and 'get_relocated_address' methods
140         from probe.
141         (create_exception_master_breakpoint): Likewise.
142         (add_location_to_breakpoint): Use 'sal->prob' instead of
143         'sal->probe'.
144         (bkpt_probe_insert_location): Call 'set_semaphore' method from
145         probe.
146         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
147         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
148         of 'probe_ops'.
149         (probe_key_free): Call 'delete' on probe.
150         (check_exception_resume): Use 'probe.prob' instead of
151         'probe.probe'.
152         * location.c (string_to_event_location_basic): Call
153         'probe_linespec_to_static_ops'.
154         * probe.c (class any_static_probe_ops): New class.
155         (any_static_probe_ops any_static_probe_ops): New variable.
156         (parse_probes_in_pspace): Receive 'static_probe_ops' as
157         argument.  Adjust code to reflect change.
158         (parse_probes): Use 'static_probe_ops' instead of
159         'probe_ops'.  Adjust code to reflect change.
160         (find_probes_in_objfile): Call methods to get name and
161         provider from probe.
162         (find_probe_by_pc): Use 'result.prob' instead of
163         'result.probe'.  Call 'get_relocated_address' method from
164         probe.
165         (collect_probes): Adjust comment and argument list to receive
166         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
167         reflect change.  Call necessary methods from probe.
168         (compare_probes): Call methods to get name and provider from
169         probes.
170         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
171         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
172         adjust code accordingly.
173         (print_ui_out_not_applicables): Likewise.
174         (info_probes_for_ops): Rename to...
175         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
176         as argument instead of 'probe_ops'.  Adjust code.  Call
177         necessary methods from probe.
178         (info_probes_command): Use 'info_probes_for_spops'.
179         (enable_probes_command): Pass correct argument to
180         'collect_probes'.  Call methods from probe.
181         (disable_probes_command): Likewise.
182         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
183         (get_probe_argument_count): Move to
184         'any_static_probe_ops::get_argument_count'.
185         (can_evaluate_probe_arguments): Move to
186         'any_static_probe_ops::can_evaluate_arguments'.
187         (evaluate_probe_argument): Move to
188         'any_static_probe_ops::evaluate_argument'.
189         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
190         'probe.probe'.
191         (probe_linespec_to_ops): Rename to...
192         (probe_linespec_to_static_ops): ...this.  Adjust code.
193         (probe_any_is_linespec): Rename to...
194         (any_static_probe_ops::is_linespec): ...this.
195         (probe_any_get_probes): Rename to...
196         (any_static_probe_ops::get_probes): ...this.
197         (any_static_probe_ops::type_name): New method.
198         (any_static_probe_ops::gen_info_probes_table_header): New
199         method.
200         (compute_probe_arg): Use 'pc_probe.prob' instead of
201         'pc_probe.probe'.  Call methods from probe.
202         (compile_probe_arg): Likewise.
203         (std::vector<const probe_ops *> all_probe_ops): Delete.
204         (std::vector<const static_probe_ops *> all_static_probe_ops):
205         New variable.
206         (_initialize_probe): Use 'all_static_probe_ops' instead of
207         'all_probe_ops'.
208         * probe.h (struct info_probe_column) <field_name>: Delete
209         extraneous newline
210         (info_probe_column_s): Delete type and VEC.
211         (struct probe_ops): Delete.  Replace with...
212         (class static_probe_ops): ...this and...
213         (clas probe): ...this.
214         (struct bound_probe) <bound_probe>: Delete extraneous
215         newline.  Adjust constructor to receive 'probe' instead of
216         'struct probe'.
217         <probe>: Rename to...
218         <prob>: ...this.  Delete extraneous newline.
219         <objfile>: Delete extraneous newline.
220         (register_probe_ops): Delete unused prototype.
221         (info_probes_for_ops): Rename to...
222         (info_probes_for_spops): ...this.  Adjust comment.
223         (get_probe_address): Move to 'probe::get_address'.
224         (get_probe_argument_count): Move to
225         'probe::get_argument_count'.
226         (can_evaluate_probe_arguments): Move to
227         'probe::can_evaluate_arguments'.
228         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
229         * solib-svr4.c (struct svr4_info): Adjust comment.
230         (struct probe_and_action) <probe>: Rename to...
231         <prob>: ...this.
232         (register_solib_event_probe): Receive 'probe' instead of
233         'struct probe' as argument.  Use 'prob' instead of 'probe'
234         when applicable.
235         (solib_event_probe_action): Call 'get_argument_count' method
236         from probe.  Adjust comment.
237         (svr4_handle_solib_event): Adjust comment.  Call
238         'evaluate_argument' method from probe.
239         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
240         from probe.
241         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
242         'struct probe'.  Call 'can_evaluate_arguments' from probe.
243         * symfile.h: Forward declare 'class probe' instead of 'struct
244         probe'.
245         * symtab.h: Likewise.
246         (struct symtab_and_line) <probe>: Rename to...
247         <prob>: ...this.
248         * tracepoint.c (start_tracing): Use 'prob' when applicable.
249         Call probe methods.
250         (stop_tracing): Likewise.
251
252 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
253
254         * ravenscar-thread.c (ravenscar_inferior_created): Remove
255         trailing newline at end of string in call to warning.
256
257 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
258
259         * osdata.h: Include vector isntead of vec.h.
260         (osdata_column_s): Remove typedef.
261         (struct osdata_column): Add constructor.
262         <name, value>: Change type to std::string.
263         (DEF_VEC_O (osdata_column_s)): Remove.
264         (osdata_item_s): Remove typedef.
265         (struct osdata_item) <columns>: Change type to std::vector.
266         (DEF_VEC_O (osdata_item_s)): Remove.
267         (struct osdata): Add constructor.
268         <type>: Change type to std::string.
269         <items>: Change type to std::vector.
270         (osdata_p): Remove typedef.
271         (DEF_VEC_P (osdata_p)): Remove.
272         (osdata_parse): Return a unique_ptr.
273         (osdata_free): Remove.
274         (make_cleanup_osdata_free): Remove.
275         (get_osdata): Return a unique_ptr.
276         (get_osdata_column): Return pointer to std::string, take a
277         reference to osdata_item as parameter.
278         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
279         unique_ptr.
280         <property_name>: Change type to std::string.
281         (osdata_start_osdata): Allocate osdata with new and adjust.
282         (osdata_start_item): Adjust.
283         (osdata_start_column): Adjust.
284         (osdata_end_column): Adjust.
285         (clear_parsing_data): Remove.
286         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
287         (osdata_item_clear): Remove.
288         (get_osdata): return a unique_ptr and adjust.
289         (get_osdata_column): Return a pointer to std::string and adjust.
290         (info_osdata): Adjust.
291         * mi/mi-main.c: Include <map>.
292         (free_vector_of_osdata_items): Remove.
293         (list_available_thread_groups): Adjust, use std::map instead of
294         splay tree.
295
296 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
297
298         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
299         case in switch.
300
301 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
302
303         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
304
305 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
306
307         * varobj.h (struct varobj_update_result): Add constructor, add
308         move constructor, disable copy and assign, initialize fields.
309         <newobj>: Change type to std::vector.
310         (varobj_update): Return std::vector.
311         * varobj.c (install_dynamic_child): Change VEC parameters to
312         std::vector and adjust.
313         (update_dynamic_varobj_children): Likewise.
314         (varobj_update): Return std::vector and adjust.
315         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
316
317 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
318
319         * varobj.h (struct varobj) <parent>: Remove const.
320         <children>: Change type to std::vector.
321         (varobj_list_children): Return std::vector const reference.
322         (varobj_restrict_range): Change parameter type to std::vector
323         const reference.
324         * varobj.c (varobj_has_more): Adjust.
325         (varobj_restrict_range): Change parameter type to std::vector
326         const reference and adjust.
327         (install_dynamic_child): Adjust.
328         (update_dynamic_varobj_children): Adjust.
329         (varobj_list_children): Return std::vector const reference and
330         adjust.
331         (varobj_add_child): Adjust.
332         (update_type_if_necessary): Adjust.
333         (varobj_update): Adjust.
334         (delete_variable_1): Adjust.
335         * ada-varobj.c (ada_value_has_mutated): Adjust.
336         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
337
338 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
339
340         * varobj.h (struct varobj): Add constructor and destructor,
341         initialize fields.
342         * varobj.c (struct varobj_root): Initialize fields.
343         (struct varobj_dynamic): Initialize fields.
344         (varobj_create): Use unique_ptr instead of cleanup.  Create
345         varobj with new instead of new_root_variable.
346         (delete_variable_1): Free variable with delete instead of
347         free_variable.
348         (create_child_with_value): Create variable with new instead of
349         new_variable.
350         (varobj::varobj): New.
351         (varobj::~varobj): New (body mostly coming from free_variable).
352         (new_variable): Remove.
353         (free_variable): Remove.
354         (do_free_variable_cleanup): Remove.
355         (make_cleanup_free_variable): Remove.
356
357 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
358
359         * core-regset.c: Remove file.
360         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
361
362 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
363
364         * NEWS: Document use of GNU MPFR.
365         * README: Likewise.
366
367         * Makefile.in (LIBMPFR): Add define.
368         (CLIBS): Add $(LIBMPFR).
369         * configure.ac: Add --with-mpfr configure option.
370         * configure: Regenerate.
371         * config.in: Regenerate.
372
373         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
374         (class mpfr_float_ops): New type.
375         (mpfr_float_ops::from_target): Two new overloaded functions.
376         (mpfr_float_ops::to_target): Likewise.
377         (mpfr_float_ops::to_string): New function.
378         (mpfr_float_ops::from_string): Likewise.
379         (mpfr_float_ops::to_longest): Likewise.
380         (mpfr_float_ops::from_longest): Likewise.
381         (mpfr_float_ops::from_ulongest): Likewise.
382         (mpfr_float_ops::to_host_double): Likewise.
383         (mpfr_float_ops::from_host_double): Likewise.
384         (mpfr_float_ops::convert): Likewise.
385         (mpfr_float_ops::binop): Likewise.
386         (mpfr_float_ops::compare): Likewise.
387         (get_target_float_ops): Use mpfr_float_ops if available.
388
389 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
390
391         * target-float.c: Do not include <math.h>.
392         Include <cmath> and <limits>.
393         (DOUBLEST): Do not define.
394         (class target_float_ops): New type.
395         (class host_float_ops): New templated type.
396         (class decimal_float_ops): New type.
397
398         (floatformat_to_doublest): Rename to ...
399         (host_float_ops<T>::from_target): ... this.  Use template type T
400         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
401         (host_float_ops<T>::from_target): New overload using a type argument.
402         (floatformat_from_doublest): Rename to ...
403         (host_float_ops<T>::to_target): ... this.  Use template type T
404         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
405         (host_float_ops<T>::to_target): New overload using a type argument.
406         (floatformat_printf_format): New function.
407         (struct printf_length_modifier): New templated type.
408         (floatformat_to_string): Rename to ...
409         (host_float_ops<T>::to_string): ... this.  Use type instead of
410         floatformat argument.  Use floatformat_printf_format and
411         printf_length_modifier.  Remove special handling of invalid numbers,
412         infinities and NaN (moved to target_float_to_string).
413         (struct scanf_length_modifier): New templated type.
414         (floatformat_from_string): Rename to ...
415         (host_float_ops<T>::from_string): ... this.  Use type instead of
416         floatformat argument.  Use scanf_length_modifier.
417         (floatformat_to_longest): Rename to ...
418         (host_float_ops<T>::to_longest): ... this.  Use type instead of
419         floatformat argument.  Handle out-of-range values deterministically.
420         (floatformat_from_longest): Rename to ...
421         (host_float_ops<T>::from_longest): ... this.  Use type instead of
422         floatformat argument.
423         (floatformat_from_ulongest): Rename to ...
424         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
425         floatformat argument.
426         (floatformat_to_host_double): Rename to ...
427         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
428         floatformat argument.
429         (floatformat_from_host_double): Rename to ...
430         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
431         floatformat argument.
432         (floatformat_convert): Rename to ...
433         (host_float_ops<T>::convert): ... this.  Use type instead of
434         floatformat arguments.  Remove handling of no-op conversions.
435         (floatformat_binop): Rename to ...
436         (host_float_ops<T>::binop): ... this.  Use type instead of
437         floatformat arguments.
438         (floatformat_compare): Rename to ...
439         (host_float_ops<T>::compare): ... this.  Use type instead of
440         floatformat arguments.
441
442         (match_endianness): Use type instead of length/byte_order arguments.
443         (set_decnumber_context): Likewise.
444         (decimal_from_number): Likewise.  Update calls.
445         (decimal_to_number): Likewise.
446         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
447         (decimal_float_ops::to_host_double): New dummy function.
448         (decimal_float_ops::from_host_double): Likewise.
449         (decimal_to_string): Rename to ...
450         (decimal_float_ops::to_string): ... this.  Use type instead of
451         length/byte_order arguments.  Update calls.
452         (decimal_from_string): Rename to ...
453         (decimal_float_ops::from_string): ... this.  Use type instead of
454         length/byte_order arguments.  Update calls.
455         (decimal_from_longest): Rename to ...
456         (decimal_float_ops::from_longest): ... this.  Use type instead of
457         length/byte_order arguments.  Update calls.
458         (decimal_from_ulongest): Rename to ...
459         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
460         length/byte_order arguments.  Update calls.
461         (decimal_to_longest): Rename to ...
462         (decimal_float_ops::to_longest): ... this.  Use type instead of
463         length/byte_order arguments.  Update calls.
464         (decimal_binop): Rename to ...
465         (decimal_float_ops::binop): ... this.  Use type instead of
466         length/byte_order arguments.  Update calls.
467         (decimal_compare): Rename to ...
468         (decimal_float_ops::compare): ... this.  Use type instead of
469         length/byte_order arguments.  Update calls.
470         (decimal_convert): Rename to ...
471         (decimal_float_ops::convert): ... this.  Use type instead of
472         length/byte_order arguments.  Update calls.
473
474         (target_float_same_category_p): New function.
475         (target_float_same_format_p): Likewise.
476         (target_float_format_length): Likewise.
477         (enum target_float_ops_kind): New type.
478         (get_target_float_ops_kind): New function.
479         (get_target_float_ops): Three new overloaded functions.
480
481         (target_float_is_zero): Update call.
482         (target_float_to_string): Add special handling of invalid numbers,
483         infinities and NaN (moved from floatformat_to_string).  Use
484         target_float_ops callback.
485         (target_float_from_string): Use target_float_ops callback.
486         (target_float_to_longest): Likewise.
487         (target_float_from_longest): Likewise.
488         (target_float_from_ulongest): Likewise.
489         (target_float_to_host_double): Likewise.
490         (target_float_from_host_double): Likewise.
491         (target_float_convert): Add special case for no-op conversions.
492         Use target_float_ops callback.
493         (target_float_binop): Use target_float_ops callback.
494         (target_float_compare): Likewise.
495
496 2017-11-22  Yao Qi  <yao.qi@linaro.org>
497
498         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
499
500 2017-11-22  Yao Qi  <yao.qi@linaro.org>
501
502         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
503         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
504
505 2017-11-21  Jerome Guitton  <guitton@adacore.com>
506
507         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
508         with event ptid from the lower layer before doing the
509         ravenscar-specific update.
510
511 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
512
513         * ravenscar-thread.c (is_ravenscar_task): Also verify that
514         the ptid's TID is nonzero.
515
516 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
517
518         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
519         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
520         Make non-static.  Change return type to char *.  Adjust code
521         accordingly.  Rewrite the function's documentation.
522         (read_atcb): Adjust call to get_tcb_types_info accordingly.
523         * ravenscar-thread.c (ravenscar_inferior_created): Check that
524         we have enough debugging information in the runtime to support
525         Ada task debugging before we enable the ravenscar-thread layer.
526
527 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
528
529         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
530         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
531         * ravenscar-thread.c: Add into comment.
532         (base_magic_null_ptid): Delete.
533         (base_ptid): Change documentation.
534         (ravenscar_active_task): Renames ravenscar_running_thread.
535         All callers updated throughout.
536         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
537         (ravenscar_task_is_currently_active): Likewise.
538         (get_base_thread_from_ravenscar_task): Ditto.
539         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
540         (ravenscar_runtime_initialized): Likewise.
541         (get_running_thread_id): Add new parameter "cpu".  Adjust
542         implementation to handle this new parameter.
543         (ravenscar_fetch_registers): Small adjustment to use
544         is_ravenscar_task and ravenscar_task_is_currently_active in
545         order to decide whether to use the target beneath or this
546         module's arch_ops.
547         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
548         (ravenscar_stopped_by_sw_breakpoint): Use
549         get_base_thread_from_ravenscar_task to get the underlying
550         thread, rather than using base_ptid.
551         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
552         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
553         Likewise.
554         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
555
556 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
557
558         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
559         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
560         (get_tcb_types_info): Set fieldnos.base_cpu.
561         (read_atcb): Set task_info->base_cpu.
562         (info_task): Print "Base CPU" info if set by runtime.
563
564 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
565
566         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
567         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
568         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
569         New functions.
570         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
571         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
572         to_stopped_data_address and to_core_of_thread fields of
573         ravenscar_ops.
574
575 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
576
577         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
578         (struct gdbarch_tdep): New member long_double_abi.
579         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
580         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
581         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
582         format depending on long_double_abi tdep member.
583         (ppc_floatformat_for_type): Handle __ibm128 type.
584
585 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
586
587         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
588
589 2017-11-21  Pedro Alves  <palves@redhat.com>
590
591         * dwarf2read.c (mapped_index::find_name_components_bounds)
592         <completion mode, upper bound>: Use std::lower_bound instead of
593         std::upper_bound.
594         (test_mapped_index_find_name_component_bounds): Remove incorrect
595         "t1_fund" from expected symbols.
596
597 2017-11-21  Pedro Alves  <palves@redhat.com>
598
599         * dwarf2read.c (mapped_index::name_components_casing): New field.
600         (mapped_index) <build_name_components,
601         find_name_components_bounds): Declare new methods.
602         (mapped_index::find_name_components_bounds)
603         (mapped_index::build_name_components): New methods, factored out
604         from dw2_expand_symtabs_matching_symbol.
605         (check_find_bounds_finds)
606         (test_mapped_index_find_name_component_bounds): New.
607         (run_test): Rename to ...
608         (test_dw2_expand_symtabs_matching_symbol): ... this.
609         (run_test): Reimplement.
610
611 2017-11-21  Pedro Alves  <palves@redhat.com>
612
613         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
614         (symbol_end): Use cp_ident_is_alnum.
615         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
616         * dwarf2read.c (make_sort_after_prefix_name): New function.
617         (dw2_expand_symtabs_matching_symbol): Use it.
618         (test_symbols): Add more symbols.
619         (run_test): Add tests.
620
621 2017-11-17  Tom Tromey  <tom@tromey.com>
622
623         * symtab.h (enum symbol_subclass_kind): New.
624         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
625         Remove.
626         <subclass>: New member.
627         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
628         * rust-lang.c (rust_get_trait_object_pointer): Update.
629         * dwarf2read.c (read_func_scope): Update.
630         (read_variable): Update.
631
632 2017-11-17  Tom Tromey  <tom@tromey.com>
633
634         * dwarf2read.c (read_func_scope): Update.
635         * symtab.h (struct template_symbol): Derive from symbol.
636         <base>: Remove.
637
638 2017-11-17  Tom Tromey  <tom@tromey.com>
639
640         * symtab.h (struct symbol) <is_rust_vtable>: New member.
641         (struct rust_vtable_symbol): New.
642         (find_symbol_at_address): Declare.
643         * symtab.c (find_symbol_at_address): New function.
644         * symfile.h (struct quick_symbol_functions)
645         <find_compunit_symtab_by_address>: New member.
646         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
647         function.
648         (debug_sym_quick_functions): Link to
649         debug_qf_find_compunit_symtab_by_address.
650         * rust-lang.c (rust_get_trait_object_pointer): New function.
651         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
652         rust_get_trait_object_pointer.
653         * psymtab.c (psym_relocate): Clear psymbol_map.
654         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
655         functions.
656         (psym_functions): Link to psym_find_compunit_symtab_by_address.
657         * objfiles.h (struct objfile) <psymbol_map>: New member.
658         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
659         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
660         (rust_containing_type, read_variable): New functions.
661
662 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
663
664         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
665
666 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
667
668         * common/filestuff.c: Include <algorithm>.
669         (open_fds): Change type to std::vector<int>.
670         (do_mark_open_fd): Adjust.
671         (unmark_fd_no_cloexec): Adjust.
672         (do_close): Adjust.
673
674 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
675
676         * breakpoint.c (output_thread_groups): Take an std::vector.
677         (print_one_breakpoint_location): Adjust.
678
679 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
680
681         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
682         (ada_evaluate_subexp_for_cast): New function.
683         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
684         ada_evaluate_subexp_for_cast.
685         (ada_evaluate_subexp) <nosideret>: Replace code by call to
686         eval_skip_value.
687         * eval.c (evaluate_var_value): Make non-static.
688         (evaluate_var_msym_value, eval_skip_value): Likewise.
689         * value.h (evaluate_var_value, evaluate_var_msym_value)
690         (eval_skip_value): Declare.
691
692 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
693
694         * ada-lang.c (ada_value_cast): Remove parameter "noside".
695         Update all callers.
696
697 2017-11-16  Pedro Alves  <palves@redhat.com>
698
699         * python/py-unwind.c (pyuw_sniffer): Translate
700         PyExc_KeyboardInterrupt to a GDB Quit exception.
701
702 2017-11-16  Pedro Alves  <palves@redhat.com>
703
704         * infrun.c (resume_cleanups): Delete.
705         (resume): No longer install a resume_cleanups cleanup nor call
706         QUIT.
707         (proceed): Pass the terminal to the inferior.
708         (keep_going_pass_signal): No longer install a resume_cleanups
709         cleanup.
710
711 2017-11-16  Pedro Alves  <palves@redhat.com>
712
713         * inf-loop.c (inferior_event_handler): Don't swallow the exception
714         if the prompt is blocked.
715
716 2017-11-16  Pedro Alves  <palves@redhat.com>
717
718         * breakpoint.c (insert_bp_location): Replace bp_err and
719         bp_err_message locals by a gdb_exception local.
720
721 2017-11-16  Pedro Alves  <palves@redhat.com>
722
723         * inflow.c (scoped_ignore_sigttou): New class.
724         (child_terminal_ours_1, new_tty): Use it.
725
726 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
727
728         * target-float.c (decimal_from_number): Add byte_order argument and
729         call match_endianness.  Error if unknown floating-point type.
730         (decimal_to_number): Add byte_order argument and call match_endianness.
731         (decimal_from_longest): Update call.  Do not call match_endianness.
732         (decimal_from_ulongest): Likewise.
733         (decimal_binop): Likewise.
734         (decimal_is_zero): Likewise.
735         (decimal_compare): Likewise.
736         (decimal_convert): Likewise.
737
738 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
739
740         * python/python.c (gdbpy_rbreak): New function.
741         * NEWS: Document Python rbreak feature.
742
743 2017-11-16  Yao Qi  <yao.qi@linaro.org>
744
745         * features/tic6x-c62x.xml: Remove.
746         * features/tic6x-c64x.xml: Remove.
747         * features/tic6x-c64xp.xml: Remove.
748
749 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
750
751         * symtab.h: Include <array>.
752
753 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
754
755         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
756         (bsd_kvm_proc_cmd): Likewise.
757
758 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
759
760         * tui/tui-win.c (window_name_completer): Replace VEC with
761         std::vector.
762
763 2017-11-15  Andrew Cagney  <cagney@gnu.org>
764
765         * MAINTAINERS: Remove no-longer applicable entries.
766
767 2017-11-15  Andrew Cagney  <cagney@gnu.org>
768
769         * MAINTAINERS: Move self to Past Maintainers.
770
771 2017-11-15  Yao Qi  <yao.qi@linaro.org>
772
773         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
774         * features/nios2-linux.c: Remove.
775         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
776         initialize_tdesc_nios2_linux.
777
778 2017-11-15  Yao Qi  <yao.qi@linaro.org>
779
780         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
781         M68HC11_LAST_HARD_REG + 1.
782
783 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
784
785         PR gdb/22388
786         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
787         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
788         Return TARGET_XFER_EOF if size of returned data is 0.
789
790 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
791
792         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
793         memory-map-selftests.c.
794         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
795         * memory-map.c (memory_map_start_memory): Fix computation of hi
796         address.
797         * unittests/memory-map-selftests.c: New file.
798
799 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
800
801         * ada-lang.c: Fix some typos in the general command documenting
802         how Ada expressions are being evaluated and how their result
803         is printed.
804
805 2017-11-09  Tom Tromey  <tom@tromey.com>
806
807         * psymtab.c (psymbol_hash): Do not hash string contents.
808         (psymbol_compare): Add comment.
809
810 2017-11-09  Tom Tromey  <tom@tromey.com>
811
812         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
813
814 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
815
816         * ada-exp.y (write_var_from_sym): Remove parameter
817         "orig_left_context".  Update all callers.
818
819 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
820
821         * tracepoint.h (class collection_list) <stringify>: Return
822         std::vector<std::string>.
823         (encode_actions_rsp): Change parameters to
824         std::vector<std::string> *.
825         * tracepoint.c (collection_list::stringify): Return
826         std::vector<std::string> and adjust accordingly.
827         (encode_actions_rsp): Changee parameters to
828         std::vector<std::string> and adjust accordingly.
829         * remote.c (free_actions_list),
830         free_actions_list_cleanup_wrapper): Remove.
831         (remote_download_tracepoint): Adjust to std::vector.
832
833 2017-11-08  Tom Tromey  <tom@tromey.com>
834
835         * dwarf2read.c (symbolp): Remove typedef.
836         (read_func_scope): Use std::vector.
837         (process_structure_scope): Use std::vector.
838
839 2017-11-08  Pedro Alves  <palves@redhat.com>
840
841         * ada-lang.c (ada_make_symbol_completion_list): Use
842         completion_skip_symbol.
843         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
844         (symbol_is_function_or_method(symbol*)): New.
845         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
846         completion_skip_symbol.
847         (default_collect_symbol_completion_matches_break_on): Use
848         completion_skip_symbol.  Pass down mode.
849         (collect_file_symbol_completion_matches): Pass down mode.
850         * symtab.h (symbol_is_function_or_method): New declarations.
851         (completion_skip_symbol): New template function.
852
853 2017-11-08  Pedro Alves  <palves@redhat.com>
854
855         * linespec.c (iterate_over_all_matching_symtabs): Add
856         search_domain parameter.  Pass it down to expand_symtabs_matching.
857         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
858         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
859         search_domain.
860         (add_all_symbol_names_from_pspace): Add search_domain parameter.
861         Pass it down.
862         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
863         symbols.
864         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
865         it down.
866
867 2017-11-08  Pedro Alves  <palves@redhat.com>
868
869         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
870         text_len locals and don't pass them down.
871         * symtab.c (completion_list_add_name): Remove
872         sym_text/sym_text_len parameters and adjust.
873         (completion_list_add_symbol, completion_list_add_msymbol)
874         (completion_list_objc_symbol, completion_list_add_fields)
875         (add_symtab_completions): Likewise.
876         (default_collect_symbol_completion_matches_break_on)
877         (collect_file_symbol_completion_matches): Remove sym_text_len
878         local and don't pass it down.
879         * symtab.h (completion_list_add_name): Remove
880         sym_text/sym_text_len parameters.
881
882 2017-11-08  Pedro Alves  <palves@redhat.com>
883
884         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
885         unittests/lookup_name_info-selftests.c.
886         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
887         * cp-support.c: Include "selftest.h".
888         (cp_remove_params_1): Rename from cp_remove_params.  Add
889         'require_param' parameter, and handle it.
890         (cp_remove_params): Reimplement.
891         (cp_remove_params_if_any): New.
892         (selftests::quote): New.
893         (selftests::check_remove_params): New.
894         (selftests::test_cp_remove_params): New.
895         (_initialize_cp_support): Install
896         selftests::test_cp_remove_params.
897         * cp-support.h (cp_remove_params_if_any): Declare.
898         * dwarf2read.c :Include "selftest.h".
899         (dw2_expand_symtabs_matching_symbol): Use
900         lookup_name_info::make_ignore_params.
901         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
902         (selftests::dw2_expand_symtabs_matching::string_or_null)
903         (selftests::dw2_expand_symtabs_matching::check_match)
904         (selftests::dw2_expand_symtabs_matching::test_symbols)
905         (selftests::dw2_expand_symtabs_matching::run_test): New.
906         (_initialize_dwarf2_read): Register
907         selftests::dw2_expand_symtabs_matching::run_test.
908         * psymtab.c (psym_expand_symtabs_matching): Use
909         lookup_name_info::make_ignore_params.
910         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
911         If the lookup name wants to ignore parameters, strip them.
912         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
913         code handling '('.
914         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
915         (default_collect_symbol_completion_matches_break_on): Don't try to
916         strip parameters.
917         * symtab.h (lookup_name_info::lookup_name_info): Add
918         'ignore_parameters' parameter.
919         (lookup_name_info::ignore_parameters)
920         (lookup_name_info::make_ignore_params): New methods.
921         (lookup_name_info::m_ignore_parameters): New field.
922         * unittests/lookup_name_info-selftests.c: New file.
923
924 2017-11-08  Pedro Alves  <palves@redhat.com>
925
926         * dwarf2read.c (dw2_expand_marked_cus)
927         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
928         (dw2_expand_symtabs_matching): Move further below.
929         (dw2_expand_marked_cus): Reindent.
930
931 2017-11-08  Pedro Alves  <palves@redhat.com>
932
933         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
934         (struct name_component): New.
935         (mapped_index::name_components): New field.
936         (mapped_index::symbol_name_at): New method.
937         (dwarf2_read_index): Call mapped_index ctor.
938         (dw2_map_matching_symbols): Add comment about name_components
939         table.
940         (dw2_expand_symtabs_matching): Factor part to...
941         (dw2_expand_symtabs_matching_symbol): ... this new function.
942         Build name components table, and lookup symbols in it before
943         calling the name matcher.
944         (dw2_expand_marked_cus): New, factored out from
945         dw2_expand_symtabs_matching.
946         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
947
948 2017-11-08   Pedro Alves  <palves@redhat.com>
949
950         * ada-lang.c (ada_encode): Rename to ..
951         (ada_encode_1): ... this.  Add throw_errors parameter and handle
952         it.
953         (ada_encode): Reimplement.
954         (match_name): Delete, folded into full_name.
955         (resolve_subexp): No longer pass the encoded name to
956         ada_lookup_symbol_list.
957         (should_use_wild_match): Delete.
958         (name_match_type_from_name): New.
959         (ada_lookup_simple_minsym): Use lookup_name_info and the
960         language's symbol_name_matcher_ftype.
961         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
962         (ada_add_block_renamings): Adjust to use lookup_name_info.
963         (ada_lookup_name): New.
964         (add_nonlocal_symbols, ada_add_all_symbols)
965         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
966         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
967         (ada_name_for_lookup): Delete.
968         (ada_lookup_encoded_symbol): Construct a verbatim name.
969         (wild_match): Reverse sense of return type.  Use bool.
970         (full_match): Reverse sense of return type.  Inline bits of old
971         match_name here.
972         (ada_add_block_symbols): Adjust to use lookup_name_info.
973         (symbol_completion_match): Delete, folded into...
974         (ada_lookup_name_info::matches): ... .this new method.
975         (symbol_completion_add): Delete.
976         (ada_collect_symbol_completion_matches): Add name_match_type
977         parameter.  Adjust to use lookup_name_info and
978         completion_list_add_name.
979         (get_var_value, ada_add_global_exceptions): Adjust to use
980         lookup_name_info.
981         (ada_get_symbol_name_cmp): Delete.
982         (do_wild_match, do_full_match): New functions.
983         (ada_lookup_name_info::ada_lookup_name_info): New method.
984         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
985         functions.
986         (ada_language_defn): Install ada_get_symbol_name_matcher.
987         * ada-lex.l (processId): If name starts with '<', copy it
988         verbatim.
989         * block.c (block_iter_match_step, block_iter_match_first)
990         (block_iter_match_next, block_lookup_symbol)
991         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
992         lookup_name_info.
993         * block.h (block_iter_match_first, block_iter_match_next)
994         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
995         * c-lang.c (c_language_defn, cplus_language_defn)
996         (asm_language_defn, minimal_language_defn): Adjust comments to
997         refer to la_get_symbol_name_matcher.
998         * completer.c (complete_files_symbols)
999         (collect_explicit_location_matches, symbol_completer): Pass a
1000         symbol_name_match_type down.
1001         * completer.h (class completion_match, completion_match_result):
1002         New classes.
1003         (completion_tracker::reset_completion_match_result): New method.
1004         (completion_tracker::m_completion_match_result): New field.
1005         * cp-support.c (make_symbol_overload_list_block): Adjust to use
1006         lookup_name_info.
1007         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1008         functions.
1009         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1010         * d-lang.c: Adjust comments to refer to
1011         la_get_symbol_name_matcher.
1012         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1013         Adjust to use lookup_name_info.
1014         (dict_iter_match_first, dict_iter_match_next)
1015         (iter_match_first_hashed, iter_match_next_hashed)
1016         (iter_match_first_linear, iter_match_next_linear): Adjust to work
1017         with a lookup_name_info.
1018         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1019         Likewise.
1020         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1021         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1022         (gdb_index_symbol_name_matcher): New class.
1023         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1024         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
1025         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1026         with a symbol_name_match_type.
1027         (f_language_defn): Adjust comments to refer to
1028         la_get_symbol_name_matcher.
1029         * go-lang.c (go_language_defn): Adjust comments to refer to
1030         la_get_symbol_name_matcher.
1031         * language.c (default_symbol_name_matcher)
1032         (language_get_symbol_name_matcher): New functions.
1033         (unknown_language_defn, auto_language_defn): Adjust comments to
1034         refer to la_get_symbol_name_matcher.
1035         * language.h (symbol_name_cmp_ftype): Delete.
1036         (language_defn) <la_collect_symbol_completion_matches>: Add match
1037         type parameter.
1038         <la_get_symbol_name_cmp>: Delete field.
1039         <la_get_symbol_name_matcher>: New field.
1040         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1041         (default_symbol_name_matcher, language_get_symbol_name_matcher):
1042         Declare.
1043         * linespec.c (iterate_over_all_matching_symtabs)
1044         (iterate_over_file_blocks): Adjust to use lookup_name_info.
1045         (find_methods): Add language parameter, and use lookup_name_info
1046         and the language's symbol_name_matcher_ftype.
1047         (linespec_complete_function): Adjust.
1048         (lookup_prefix_sym): Use lookup_name_info.
1049         (add_all_symbol_names_from_pspace): Adjust.
1050         (find_superclass_methods): Add language parameter and pass it
1051         down.
1052         (find_method): Pass symbol language down.
1053         (find_linespec_symbols): Don't demangle or Ada encode here.
1054         (search_minsyms_for_name): Add lookup_name_info parameter.
1055         (add_matching_symbols_to_info): Add name_match_type parameter.
1056         Use lookup_name_info.
1057         * m2-lang.c (m2_language_defn): Adjust comments to refer to
1058         la_get_symbol_name_matcher.
1059         * minsyms.c: Include <algorithm>.
1060         (add_minsym_to_demangled_hash_table): Remove table parameter and
1061         add objfile parameter.  Use search_name_hash, and add language to
1062         demangled languages vector.
1063         (struct found_minimal_symbols): New struct.
1064         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1065         New functions.
1066         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
1067         input names here.  Use lookup_name_info instead.  Lookup up
1068         demangled names once for each language in the demangled names
1069         vector.
1070         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
1071         demangled names once for each language in the demangled names
1072         vector.
1073         (build_minimal_symbol_hash_tables): Adjust.
1074         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1075         lookup_name_info.
1076         * objc-lang.c (objc_language_defn): Adjust comment to refer to
1077         la_get_symbol_name_matcher.
1078         * objfiles.h: Include <vector>.
1079         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1080         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1081         la_get_symbol_name_matcher.
1082         * p-lang.c (pascal_language_defn): Adjust comment to refer to
1083         la_get_symbol_name_matcher.
1084         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1085         (match_partial_symbol): Use symbol_name_match_type,
1086         lookup_name_info and psymbol_name_matches.
1087         (lookup_partial_symbol): Use lookup_name_info.
1088         (map_block): Use symbol_name_match_type and lookup_name_info.
1089         (psym_map_matching_symbols): Use symbol_name_match_type.
1090         (psymbol_name_matches): New.
1091         (recursively_search_psymtabs): Use lookup_name_info and
1092         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
1093         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
1094         'kind' parameter to 'domain'.
1095         * rust-lang.c (rust_language_defn): Adjust comment to refer to
1096         la_get_symbol_name_matcher.
1097         * symfile-debug.c (debug_qf_map_matching_symbols)
1098         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1099         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1100         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1101         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1102         Adjust to use symbol_name_match_type.
1103         <expand_symtabs_matching>: Adjust to use lookup_name_info.
1104         (expand_symtabs_matching): Adjust to use lookup_name_info.
1105         * symmisc.c (maintenance_expand_symtabs): Use
1106         lookup_name_info::match_any ().
1107         * symtab.c (symbol_matches_search_name): New.
1108         (eq_symbol_entry): Adjust to use lookup_name_info and the
1109         language's matcher.
1110         (demangle_for_lookup_info::demangle_for_lookup_info): New.
1111         (lookup_name_info::match_any): New.
1112         (iterate_over_symbols, search_symbols): Use lookup_name_info.
1113         (compare_symbol_name): Add language, lookup_name_info and
1114         completion_match_result parameters, and use them.
1115         (completion_list_add_name): Make extern.  Add language and
1116         lookup_name_info parameters.  Use them.
1117         (completion_list_add_symbol, completion_list_add_msymbol)
1118         (completion_list_objc_symbol): Add lookup_name_info parameters and
1119         adjust.  Pass down language.
1120         (completion_list_add_fields): Add lookup_name_info parameters and
1121         adjust.  Pass down language.
1122         (add_symtab_completions): Add lookup_name_info parameters and
1123         adjust.
1124         (default_collect_symbol_completion_matches_break_on): Add
1125         name_match_type parameter, and use it.  Use lookup_name_info.
1126         (default_collect_symbol_completion_matches)
1127         (collect_symbol_completion_matches): Add name_match_type
1128         parameter, and pass it down.
1129         (collect_symbol_completion_matches_type): Adjust.
1130         (collect_file_symbol_completion_matches): Add name_match_type
1131         parameter, and use lookup_name_info.
1132         * symtab.h: Include <string> and "common/gdb_optional.h".
1133         (enum class symbol_name_match_type): New.
1134         (class ada_lookup_name_info): New.
1135         (struct demangle_for_lookup_info): New.
1136         (class lookup_name_info): New.
1137         (symbol_name_matcher_ftype): New.
1138         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1139         (symbol_matches_search_name): Declare.
1140         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1141         (default_collect_symbol_completion_matches)
1142         (collect_symbol_completion_matches)
1143         (collect_file_symbol_completion_matches): Add name_match_type
1144         parameter.
1145         (iterate_over_symbols): Use lookup_name_info.
1146         (completion_list_add_name): Declare.
1147         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1148         (strncmp_iw_with_mode): Now extern.
1149         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1150         (strncmp_iw_with_mode): Declare.
1151
1152 2017-11-08  Keith Seitz  <keiths@redhat.com>
1153             Pedro Alves  <palves@redhat.com>
1154
1155         * ada-lang.c (ada_language_defn): Install
1156         default_search_name_hash.
1157         * buildsym.c (struct buildsym_compunit): <language>: New field.
1158         (finish_block_internal): Pass language when creating dictionaries.
1159         (start_buildsym_compunit, start_symtab): New language parameters.
1160         Use them.
1161         (restart_symtab): Pass down compilation unit's language.
1162         * buildsym.h (enum language): Forward declare.
1163         (start_symtab): New 'language' parameter.
1164         * c-lang.c (c_language_defn, cplus_language_defn)
1165         (asm_language_defn, minimal_language_defn): Install
1166         default_search_name_hash.
1167         * coffread.c (coff_start_symtab): Adjust.
1168         * d-lang.c (d_language_defn): Install default_search_name_hash.
1169         * dbxread.c (struct symloc): Add 'pst_language' field.
1170         (PST_LANGUAGE): Define.
1171         (start_psymtab, read_ofile_symtab): Use it.
1172         (process_one_symbol): New 'language' parameter.  Pass it down.
1173         * dictionary.c (struct dictionary) <language>: New field.
1174         (DICT_LANGUAGE): Define.
1175         (dict_create_hashed, dict_create_hashed_expandable)
1176         (dict_create_linear, dict_create_linear_expandable): New parameter
1177         'language'.  Set the dictionary's language.
1178         (iter_match_first_hashed): Adjust to rename.
1179         (insert_symbol_hashed): Assert we don't see mismatching
1180         languages.  Adjust to rename.
1181         (dict_hash): Rename to ...
1182         (default_search_name_hash): ... this and make extern.
1183         * dictionary.h (struct language_defn): Forward declare.
1184         (dict_create_hashed): New parameter 'language'.
1185         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1186         * f-lang.c (f_language_defn): Install default_search_name_hash.
1187         * go-lang.c (go_language_defn): Install default_search_name_hash.
1188         * jit.c (finalize_symtab): Pass compunit's language to dictionary
1189         creation.
1190         * language.c (unknown_language_defn, auto_language_defn):
1191         * language.h (language_defn::la_search_name_hash): New field.
1192         (default_search_name_hash): Declare.
1193         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1194         * mdebugread.c (new_block): New parameter 'language'.
1195         * mdebugread.c (parse_symbol): Pass symbol language to block
1196         allocation.
1197         (psymtab_to_symtab_1): Pass down language.
1198         (new_symtab): Pass compunit's language to block allocation.
1199         * objc-lang.c (objc_language_defn): Install
1200         default_search_name_hash.
1201         * opencl-lang.c (opencl_language_defn):
1202         * p-lang.c (pascal_language_defn): Install
1203         default_search_name_hash.
1204         * rust-lang.c (rust_language_defn): Install
1205         default_search_name_hash.
1206         * stabsread.h (enum language): Forward declare.
1207         (process_one_symbol): Add 'language' parameter.
1208         * symtab.c (search_name_hash): New function.
1209         * symtab.h (search_name_hash): Declare.
1210         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1211
1212 2017-11-08  Pedro Alves  <palves@redhat.com>
1213
1214         * cp-name-parser.y (main): Don't initialize extra_chars.
1215
1216 2017-11-07  Tom Tromey  <tom@tromey.com>
1217
1218         * event-top.h (command_handler): Constify.
1219         * record-full.c (cmd_record_full_start): Update.
1220         * thread.c (thread_apply_all_command): Update.
1221         * printcmd.c (eval_command): Update.
1222         * mi/mi-main.c (mi_execute_cli_command): Update.
1223         (mi_execute_async_cli_command): Update.
1224         * tui/tui-stack.c (tui_update_command): Update.
1225         * cli/cli-interp.c (safe_execute_command): Constify.
1226         * record.c (record_start): Update.
1227         (record_start, record_stop, cmd_record_start): Update.
1228         * record-btrace.c (cmd_record_btrace_bts_start): Update.
1229         (cmd_record_btrace_pt_start): Update.
1230         (cmd_record_btrace_start): Update.
1231         (cmd_record_btrace_start): Update.
1232         * reverse.c (exec_reverse_once): Update.
1233         * python/python.c (execute_gdb_command): Don't copy the command.
1234         * event-top.c (command_line_handler): Update.
1235         (command_handler): Constify.
1236         * defs.h (deprecated_call_command_hook): Constify.
1237         * cli/cli-script.h (execute_user_command): Constify.
1238         * cli/cli-script.c (execute_user_command): Constify.
1239         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1240         (enum command_control_type): Update.
1241         * main.c (catch_command_errors): Remove non-const overload.
1242         (catch_command_errors_ftype): Remove.
1243         * python/py-cmd.c (cmdpy_function): Constify.
1244         * guile/scm-cmd.c (cmdscm_function): Constify.
1245         * cli/cli-dump.c (call_dump_func): Constify.
1246         * cli/cli-decode.c (do_const_cfunc): Constify.
1247         (do_sfunc): Constify.
1248         (cmd_func): Constify.
1249         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1250         * top.h (execute_command): Constify.
1251         * top.c (execute_command): Constify.
1252         (execute_command_to_string): Constify.
1253         (deprecated_call_command_hook): Constify.
1254         * command.h (cmd_func): Constify.
1255         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1256
1257 2017-11-07  Tom Tromey  <tom@tromey.com>
1258
1259         * ada-lang.c (catch_ada_exception_command): Constify.
1260         (catch_assert_command): Constify.
1261         * break-catch-throw.c (catch_catch_command, catch_throw_command)
1262         (catch_rethrow_command): Constify.
1263         (catch_exception_command_1): Constify.
1264         * breakpoint.h (add_catch_command): Constify.
1265         * break-catch-syscall.c (catch_syscall_command_1): Constify.
1266         (catch_syscall_split_args): Constify.
1267         * break-catch-sig.c (catch_signal_command): Constify.
1268         (catch_signal_split_args): Constify.
1269         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1270         cmd_const_sfunc_ftype.
1271         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1272         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1273         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1274         (add_setshow_string_cmd, struct cmd_list_element)
1275         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1276         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1277         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1278         Constify.
1279         (set_cmd_sfunc): Constify.
1280         (empty_sfunc): Constify.
1281         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1282         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1283         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1284         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1285         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1286         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1287         Constify.
1288         (set_cmd_sfunc): Constify.
1289         (cmd_sfunc_ftype): Remove.
1290         * compile/compile.c (set_compile_args): Constify.
1291         * infrun.c (set_disable_randomization): Constify.
1292         * infcmd.c (set_args_command, set_cwd_command): Constify.
1293         * breakpoint.c (set_condition_evaluation_mode): Constify.
1294         (add_catch_command): Constify.
1295         (catch_fork_command_1, catch_exec_command_1)
1296         (catch_load_command_1, catch_unload_command_1): Constify.
1297         (catch_load_or_unload): Constify.
1298         * guile/scm-param.c (pascm_set_func): Constify.
1299         (add_setshow_generic): Constify.
1300         * python/py-param.c (get_set_value): Constify.
1301         * top.h (set_verbose): Constify.
1302         * tui/tui-win.c (tui_set_var_cmd): Constify.
1303         * mi/mi-main.c (set_mi_async_command): Constify.
1304         * cli/cli-logging.c (set_logging_overwrite)
1305         (set_logging_redirect): Constify.
1306         * value.c (set_max_value_size): Constify.
1307         * valprint.c (set_input_radix, set_output_radix): Constify.
1308         * utils.c (set_width_command, set_height_command): Constify.
1309         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1310         * tracepoint.c (set_disconnected_tracing)
1311         (set_circular_trace_buffer, set_trace_buffer_size)
1312         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1313         * top.c (set_history_size_command, set_verbose, set_editing)
1314         (set_gdb_datadir, set_history_filename): Constify.
1315         * target.c (set_targetdebug, maint_set_target_async_command)
1316         (maint_set_target_non_stop_command, set_target_permissions)
1317         (set_write_memory_permission): Constify.
1318         (open_target): Constify.
1319         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1320         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1321         * symtab.c (set_symbol_cache_size_handler): Constify.
1322         * symfile.c (set_ext_lang_command): Constify.
1323         * symfile-debug.c (set_debug_symfile): Constify.
1324         * source.c (set_directories_command): Constify.
1325         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1326         * serial.c (set_parity): Constify.
1327         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1328         * remote.c (set_remote_exec_file, set_remotebreak)
1329         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1330         * record.c (set_record_insn_history_size)
1331         (set_record_call_history_size): Constify.
1332         * record-full.c (set_record_full_insn_max_num): Constify.
1333         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1334         * osabi.c (set_osabi): Constify.
1335         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1336         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1337         * maint.c (maintenance_set_profile_cmd): Constify.
1338         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1339         * language.c (set_language_command, set_range_command)
1340         (set_case_command): Constify.
1341         * infrun.c (set_non_stop, set_observer_mode)
1342         (set_stop_on_solib_events, set_schedlock_func)
1343         (set_exec_direction_func): Constify.
1344         * infcmd.c (set_inferior_tty_command): Constify.
1345         * disasm.c (set_disassembler_options_sfunc): Constify.
1346         * demangle.c (set_demangling_command): Constify.
1347         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1348         * cris-tdep.c (set_cris_version, set_cris_mode)
1349         (set_cris_dwarf2_cfi): Constify.
1350         * corefile.c (set_gnutarget_command): Constify.
1351         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1352         (set_target_wide_charset_sfunc): Constify.
1353         * breakpoint.c (update_dprintf_commands): Constify.
1354         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1355         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1356         (set_disassembly_style_sfunc): Constify.
1357         * arch-utils.c (set_endian, set_architecture): Constify.
1358         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1359         * agent.c (set_can_use_agent): Constify.
1360
1361 2017-11-07  Tom Tromey  <tom@tromey.com>
1362
1363         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1364         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1365         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1366         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1367         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1368         (parse_int_arg, show_thread_default_detach_sc_cmd)
1369         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1370         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1371         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1372         (show_task_pause_cmd, set_task_detach_sc_cmd)
1373         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1374         (set_noninvasive_cmd, set_thread_pause_cmd)
1375         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1376         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1377         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1378         * windows-nat.c (display_selectors): Constify.
1379         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1380         non-const "cfunc".
1381         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1382         (cmd_cfunc_eq): Likewise.
1383         (struct cmd_list_element): Likewise.
1384         (do_cfunc): Remove.
1385         (cli_user_command_p): Update.
1386         * command.h (add_cmd): Remove non-const overload.
1387         (cmd_cfunc_ftype): Remove typedef.
1388         (cmd_cfunc_eq): Remove non-const overload.
1389         * value.c (show_values): Constify.
1390         * thread.c (thread_apply_all_command): Constify.
1391         * symfile.c (load_command): Constify.
1392         * source.c (directory_command): Constify.
1393         * maint.c (maintenance_internal_error)
1394         (maintenance_demangler_warning, maintenance_space_display)
1395         (maintenance_print_architecture, maintenance_translate_address)
1396         (maintenance_info_selftests, maintenance_internal_warning):
1397         Constify.
1398         * breakpoint.c (disable_trace_command, enable_trace_command):
1399         Constify.
1400         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1401         Constify.
1402         (add_auto_load_safe_path): Constify.
1403         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1404         * top.h (show_commands): Constify.
1405         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1406         * sparc64-tdep.c (adi_examine_command): Constify.
1407         (adi_assign_command): Constify.
1408
1409 2017-11-07  Tom Tromey  <tom@tromey.com>
1410
1411         * frame.h (info_locals_command, info_args_command): Constify.
1412         * auto-load.h (auto_load_info_scripts): Constify.
1413         * inferior.h (registers_info): Constify.
1414         * copying.c: Rebuild.
1415         * copying.awk: Constify generated commands.
1416         * auto-load.c (auto_load_info_scripts)
1417         (info_auto_load_gdb_scripts): Constify.
1418         * cli/cli-decode.c (struct cmd_list_element): Take a
1419         cmd_const_cfunc_ftype.
1420         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1421         * tui/tui-win.c (tui_all_windows_info): Constify.
1422         * python/py-auto-load.c (info_auto_load_python_scripts):
1423         Constify.
1424         * cli/cli-cmds.c (show_command): Remove non-const overload.
1425         * tracepoint.c (info_tvariables_command, info_scope_command):
1426         Constify.
1427         (info_static_tracepoint_markers_command): Constify.
1428         * thread.c (info_threads_command): Constify.
1429         (print_thread_info_1): Constify.
1430         * target.c (info_target_command): Constify.
1431         * symtab.c (info_sources_command, info_functions_command)
1432         (info_types_command): Constify.
1433         (info_variables_command): Remove non-const overload.
1434         * symfile.c (info_ext_lang_command): Constify.
1435         * stack.c (info_frame_command, info_locals_command)
1436         (info_args_command): Constify.
1437         (backtrace_command): Remove non-const overload.
1438         * source.c (info_source_command, info_line_command): Constify.
1439         * solib.c (info_sharedlibrary_command): Constify.
1440         * skip.c (info_skip_command): Constify.
1441         * ser-go32.c (info_serial_command): Constify.
1442         * reverse.c (info_bookmarks_command): Constify.
1443         * printcmd.c (info_symbol_command, info_address_command)
1444         (info_display_command): Constify.
1445         * osdata.c (info_osdata_command): Constify.
1446         * objc-lang.c (info_selectors_command, info_classes_command):
1447         Constify.
1448         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1449         * memattr.c (info_mem_command): Constify.
1450         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1451         * linux-fork.c (info_checkpoints_command): Constify.
1452         * infrun.c (info_signals_command): Constify.
1453         * inflow.c (info_terminal_command): Constify.
1454         * inferior.c (info_inferiors_command): Constify.
1455         (print_inferior): Constify.
1456         * infcmd.c (info_program_command, info_all_registers_command)
1457         (info_registers_command, info_vector_command)
1458         (info_float_command): Constify.
1459         (registers_info): Constify.
1460         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1461         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1462         Constify.
1463         * f-valprint.c (info_common_command): Constify.
1464         * dcache.c (info_dcache_command): Constify.
1465         (dcache_info_1): Constify.
1466         * darwin-nat-info.c (info_mach_tasks_command)
1467         (info_mach_task_command, info_mach_ports_command)
1468         (info_mach_port_command, info_mach_threads_command)
1469         (info_mach_thread_command, info_mach_regions_command)
1470         (info_mach_regions_recurse_command, info_mach_region_command)
1471         (info_mach_exceptions_command): Constify.
1472         (get_task_from_args): Constify.
1473         * cp-support.c (info_vtbl_command): Constify.
1474         * breakpoint.c (info_watchpoints_command)
1475         (info_tracepoints_command): Constify.
1476         (info_breakpoints_command): Remove non-const overload.
1477         * avr-tdep.c (avr_io_reg_read_command): Constify.
1478         * auxv.c (info_auxv_command): Constify.
1479         * ada-tasks.c (info_tasks_command): Constify.
1480         (info_task): Constify.
1481         * ada-lang.c (info_exceptions_command): Constify.
1482
1483 2017-11-07  Tom Tromey  <tom@tromey.com>
1484
1485         * solib.h (no_shared_libraries): Constify.
1486         * frame.h (return_command): Constify.
1487         * cli/cli-cmds.h (quit_command): Constify.
1488         * top.h (quit_command, execute_command): Constify.
1489         * target.h (flash_erase_command): Constify.
1490         * inferior.h (set_inferior_args, attach_command): Constify.
1491         * tracepoint.h (start_tracing, stop_tracing): Constify.
1492         * breakpoint.h (break_command, tbreak_command)
1493         (hbreak_command_wrapper, thbreak_command_wrapper)
1494         (rbreak_command_wrapper, watch_command_wrapper)
1495         (awatch_command_wrapper, rwatch_command_wrapper)
1496         (get_tracepoint_by_number): Constify.
1497         * symtab.c (info_variables_command, rbreak_command)
1498         (symtab_symbol_info): Constify.
1499         (info_variables_command): Add non-const overload.
1500         * top.c (dont_repeat_command): Constify.
1501         * breakpoint.c (ignore_command, commands_command)
1502         (condition_command, tbreak_command, hbreak_command)
1503         (thbreak_command, clear_command, break_command)
1504         (info_breakpoints_command, watch_command, rwatch_command)
1505         (awatch_command, trace_command, ftrace_command, strace_command)
1506         (trace_pass_command, break_range_command, dprintf_command)
1507         (agent_printf_command, get_tracepoint_by_number)
1508         (watch_maybe_just_location, trace_pass_command): Constify.
1509         (info_breakpoints_command): Add non-const overload.
1510         * tracefile.c (tsave_command): Constify.
1511         * infcmd.c (attach_command, disconnect_command, signal_command)
1512         (queue_signal_command, stepi_command, nexti_command)
1513         (finish_command, next_command, step_command, until_command)
1514         (advance_command, jump_command, continue_command, run_command)
1515         (start_command, starti_command, interrupt_command)
1516         (run_command_1, set_inferior_args, step_1): Constify.
1517         * inferior.c (add_inferior_command, remove_inferior_command)
1518         (clone_inferior_command): Constify.
1519         * linux-fork.c (checkpoint_command, restart_command): Constify.
1520         * windows-nat.c (signal_event_command): Constify.
1521         * guile/guile.c (guile_repl_command, guile_command): Constify.
1522         * printcmd.c (x_command, display_command, printf_command)
1523         (output_command, set_command, call_command, print_command)
1524         (eval_command): Constify.
1525         (non_const_set_command): Remove.
1526         (_initialize_printcmd): Update.
1527         * source.c (forward_search_command, reverse_search_command):
1528         Constify.
1529         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1530         Constify.
1531         * infrun.c (handle_command): Constify.
1532         * memattr.c (mem_command): Constify.
1533         * stack.c (return_command, up_command, up_silently_command)
1534         (down_command, down_silently_command, frame_command)
1535         (backtrace_command, func_command, backtrace_command_1): Constify.
1536         (backtrace_command): Add non-const overload.
1537         * remote-sim.c (simulator_command): Constify.
1538         * exec.c (set_section_command): Constify.
1539         * tracepoint.c (tdump_command, trace_variable_command)
1540         (tstatus_command, tstop_command, tstart_command)
1541         (end_actions_pseudocommand, while_stepping_pseudocommand)
1542         (collect_pseudocommand, teval_pseudocommand, actions_command)
1543         (start_tracing, stop_tracing): Constify.
1544         * value.c (init_if_undefined_command): Constify.
1545         * tui/tui-stack.c (tui_update_command): Constify.
1546         * tui/tui-win.c (tui_refresh_all_command)
1547         (tui_set_tab_width_command, tui_set_win_height_command)
1548         (tui_set_focus_command, tui_scroll_forward_command)
1549         (tui_scroll_backward_command, tui_scroll_left_command)
1550         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1551         (tui_set_win_height): Constify.
1552         * tui/tui-layout.c (tui_layout_command): Constify.
1553         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1554         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1555         (proc_untrace_sysexit_cmd): Constify.
1556         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1557         (threadset_test_cmd, threadlist_update_test_cmd)
1558         (threadalive_test): Constify.
1559         * objc-lang.c (print_object_command): Constify.
1560         * command.h (add_com): Constify.
1561         * cli/cli-dump.c (restore_command): Constify.
1562         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1563         (help_command, complete_command, shell_command, edit_command)
1564         (list_command, disassemble_command, make_command)
1565         (apropos_command, alias_command): Constify.
1566         * cli/cli-script.c (document_command, define_command)
1567         (while_command, if_command, validate_comname): Constify.
1568         * cli/cli-decode.c (struct cmd_list_element): Change type of
1569         "fun".
1570         * target.c (do_monitor_command, flash_erase_command): Constify.
1571         * regcache.c (reg_flush_command): Constify.
1572         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1573         (reverse_nexti, reverse_continue, reverse_finish)
1574         (save_bookmark_command, goto_bookmark_command)
1575         (exec_reverse_once): Constify.
1576         * python/python.c (python_interactive_command, python_command):
1577         Constify.
1578         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1579         Constify.
1580         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1581         * gcore.c (gcore_command): Constify.
1582
1583 2017-11-07  Tom Tromey  <tom@tromey.com>
1584
1585         * printcmd.c (x_command): Call set_repeat_arguments.
1586         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1587         * top.c (repeat_arguments): New global.
1588         (set_repeat_arguments): New function.
1589         (execute_command): Handle repeat_arguments.
1590         (show_commands): Calls set_repeat_arguments.
1591         * command.h (set_repeat_arguments): Declare.
1592
1593 2017-11-07  Tom Tromey  <tom@tromey.com>
1594
1595         * stack.c (backtrace_command): Use std::string.
1596         (backtrace_command_1): Make "count_exp" const.
1597
1598 2017-11-07  Tom Tromey  <tom@tromey.com>
1599
1600         * source.c (directory_switch, mod_path, add_path): Constify.
1601         * defs.h (add_path, mod_path, directory_switch): Constify.
1602         * mi/mi-cmd-env.c (env_mod_path): Constify.
1603
1604 2017-11-07  Tom Tromey  <tom@tromey.com>
1605
1606         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1607         (run_command_1, continue_command, step_1, jump_command)
1608         (signal_command, until_command, advance_command, finish_command)
1609         (attach_command): Update.
1610
1611 2017-11-07  Tom Tromey  <tom@tromey.com>
1612
1613         * command.h (set_cmd_cfunc): Don't declare.
1614         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1615
1616 2017-11-07  Tom Tromey  <tom@tromey.com>
1617
1618         * stack.c (select_frame_command): Constify.
1619         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1620         * command.h (add_com_suppress_notification): Constify.
1621
1622 2017-11-07  Tom Tromey  <tom@tromey.com>
1623
1624         * breakpoint.c (stop_command): Constify.
1625         * cli/cli-decode.c (struct cmd_list_element): Constify.
1626         * command.h (add_abbrev_prefix_cmd): Constify.
1627
1628 2017-11-07  Pedro Alves  <palves@redhat.com>
1629
1630         * breakpoint.c (extract_bp_kind): New enum.
1631         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1632         factored out from ...
1633         (extract_bp_number_and_location): ... here.
1634         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1635
1636 2017-11-07  Pedro Alves  <palves@redhat.com>
1637
1638         * breakpoint.c (extract_bp_number_and_location): Change return
1639         type to void.  Throw error instead of warning.
1640         (enable_disable_command): Adjust.
1641
1642 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1643             Pedro Alves  <palves@redhat.com>
1644
1645         * breakpoint.c (map_breakpoint_number_range): New, factored out
1646         from ...
1647         (map_breakpoint_numbers): ... here.
1648         (find_location_by_number): Change parameters from string to
1649         breakpoint number and location.
1650         (extract_bp_number_and_location): New function.
1651         (enable_disable_bp_num_loc)
1652         (enable_disable_breakpoint_location_range)
1653         (enable_disable_command): New functions, factored out ...
1654         (enable_command, disable_command): ... these functions, and
1655         adjusted to support ranges.
1656         * NEWS: Document enable/disable breakpoint location range feature.
1657
1658 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1659
1660         * MAINTAINERS (Write After Approval): Update my e-mail address.
1661
1662 2017-11-06  Pedro Alves  <palves@redhat.com>
1663
1664         * gnu-nat.c (gnu_terminal_init): Delete.
1665         (gnu_target): Don't install gnu_terminal_init.
1666         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1667         (child_terminal_init): ... this function.
1668
1669 2017-11-06  Pedro Alves  <palves@redhat.com>
1670
1671         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1672         sgtty.h.
1673         * config.in, configure: Regenerate.
1674
1675 2017-11-06  Pedro Alves  <palves@redhat.com>
1676
1677         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1678         (async_init_signals): Adjust.
1679         (handle_stop_sig): Rename to ...
1680         (handle_sigtstp): ... this.
1681         (async_stop_sig): Rename to ...
1682         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1683         SIGTSTP path.
1684         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1685         instead of STOP_SIGNAL thoughout.
1686         (handle_stop_sig): Rename to ...
1687         (handle_sigtstp): ... this.
1688         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1689
1690 2017-11-06  Pedro Alves  <palves@redhat.com>
1691
1692         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1693         longer set flags twice in row.
1694
1695 2017-11-06  Pedro Alves  <palves@redhat.com>
1696
1697         * Makefile.in (SER_HARDWIRE): Update comment.
1698         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1699         * common/gdb_termios.h: Delete file.
1700         * common/job-control.c: Include termios.h and unistd.h instead of
1701         gdb_termios.h.
1702         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1703         check.
1704         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1705         Remove sgtty code.
1706         * configure.ac: No longer check for termio.h and sgtty.h.
1707         * configure: Regenerate.
1708         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1709         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1710         Replace PROCESS_GROUP_TYPE references with pid_t references
1711         throughout.
1712         (gdb_getpgrp): Delete.
1713         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1714         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1715         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1716         gdb_getpgrp.  Use serial_set_tty_state instead aof
1717         serial_noflush_set_tty_state.  Remove sgtty code.
1718         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1719         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1720         (inferior_process_group): Now returns pid_t.
1721         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1722         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1723         * ser-event.c (serial_event_ops): Update.
1724         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1725         (dos_ops): Update.
1726         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1727         * ser-pipe.c (pipe_ops): Update.
1728         * ser-tcp.c (tcp_ops): Update.
1729         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1730         HAVE_TERMIOS checks.
1731         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1732         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1733         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1734         assume termios.
1735         (hardwire_noflush_set_tty_state): Delete.
1736         (hardwire_print_tty_state, hardwire_drain_output)
1737         (hardwire_flush_output, hardwire_flush_input)
1738         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1739         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1740         code, and assume termios.
1741         (hardwire_ops): Update.
1742         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1743         * serial.c (serial_noflush_set_tty_state): Delete.
1744         * serial.h (serial_noflush_set_tty_state): Delete.
1745         (serial_ops::noflush_set_tty_state): Delete.
1746
1747 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1748
1749         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1750         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1751         (COMMON_OBS): Remove doublest.o and dfp.o.
1752         Do not build target-float.c (instead of doublest.c)
1753         with -Wformat-nonliteral.
1754
1755         * doublest.c: Remove file.
1756         * doublest.h: Remove file.
1757         * dfp.c: Remove file.
1758         * dfp.h: Remove file.
1759
1760         * target-float.c: Do not include "doublest.h" and "dfp.h".
1761         (DOUBLEST): Move here from doublest.h.
1762         (enum float_kind): Likewise.
1763         (FLOATFORMAT_CHAR_BIT): Likewise.
1764         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1765         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1766         (floatformat_precision): Likewise.
1767         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1768         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1769         Likewise.
1770         (host_float_format, host_double_format, host_long_double_format):
1771         Likewise.
1772         (floatformat_to_string, floatformat_from_string): Likewise.
1773         (floatformat_to_doublest): Likewise.  Also, inline the original
1774         convert_floatformat_to_doublest.
1775         (floatformat_from_doublest): Likewise.  Also, inline the original
1776         convert_floatformat_from_doublest.
1777
1778         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1779         (MAX_DECIMAL_STRING): Move here from dfp.c.
1780         (match_endianness): Likewise.
1781         (set_decnumber_context, decimal_check_errors): Likewise.
1782         (decimal_from_number, decimal_to_number): Likewise.
1783         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1784         (decimal_from_longest, decimal_from_ulongest): Likewise.
1785         (decimal_to_longest): Likewise.
1786         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1787         (decimal_convert): Likewise.
1788
1789 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1790
1791         * doublest.c: Do not include "gdbtypes.h".
1792         (extract_typed_floating): Remove.
1793         (store_typed_floating): Remove.
1794         (convert_typed_floating): Remove.
1795         * doublest.h (struct type): Remove.
1796         (DOUBLEST_PRINT_FORMAT): Remove.
1797         (DOUBLEST_SCAN_FORMAT): Remove.
1798         (extract_typed_floating): Remove.
1799         (store_typed_floating): Remove.
1800         (convert_typed_floating): Remove.
1801
1802         * dfp.c (decimal_from_doublest): Remove.
1803         (decimal_to_doublest): Remove.
1804         * dfp.h: Do not include "doublest.h".
1805         (decimal_from_doublest): Remove.
1806         (decimal_to_doublest): Remove.
1807
1808         * value.c: Do not include "doublest.h" and "dfp.h".
1809         (value_as_double): Remove.
1810         (unpack_double): Remove.
1811         (value_from_double): Remove.
1812         (value_from_decfloat): Remove.
1813         * value.h: Do not include "doublest.h".
1814         (value_as_double): Remove.
1815         (unpack_double): Remove.
1816         (value_from_double): Remove.
1817         (value_from_decfloat): Remove.
1818
1819 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1820
1821         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1822         (i386_extract_return_value): Use target_float_convert.
1823         (i386_store_return_value): Likewise.
1824         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1825         (i387_value_to_register): Likewise.
1826         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1827         (ia64_register_to_value): Use target_float_convert.
1828         (ia64_value_to_register): Likewise.
1829         (ia64_extract_return_value): Likewise.
1830         (ia64_store_return_value): Likewise.
1831         (ia64_push_dummy_call): Likewise.
1832         * m68k-tdep.c: Include "target-float.h".
1833         (m68k_register_to_value): Use target_float_convert.
1834         (m68k_value_to_register): Likewise.
1835         (m68k_svr4_extract_return_value): Likewise.
1836         (m68k_svr4_store_return_value): Likewise.
1837         * ppc-sysv-tdep.c: Include "target-float.h".
1838         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1839         (do_ppc_sysv_return_value): Likewise.
1840         (ppc64_sysv_abi_push_freg): Likewise.
1841         (ppc64_sysv_abi_return_value_base): Likewise.
1842         * rs6000-aix-tdep.c: Include "target-float.h".
1843         (rs6000_push_dummy_call): Use target_float_convert.
1844         (rs6000_return_value): Likewise.
1845         * rs6000-lynx178-tdep.c: Include "target-float.h".
1846         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1847         (rs6000_lynx178_return_value): Likewise.
1848         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1849         (rs6000_register_to_value): Use target_float_convert.
1850         (rs6000_value_to_register): Likewise.
1851         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1852         (arm_extract_return_value): Use target_float_convert.
1853         (arm_store_return_value): Likewise.
1854         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1855         (sh_register_convert_to_virtual): Use target_float_convert.
1856         (sh_register_convert_to_raw): Likewise.
1857         * sh64-tdep.c: Include "target-float.h".
1858         (sh64_extract_return_value): Use target_float_convert.
1859         (sh64_register_convert_to_virtual): Likewise.
1860         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1861
1862 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1863
1864         * target-float.c (floatformat_to_host_double): New function.
1865         (floatformat_from_host_double): Likewise.
1866         (target_float_to_host_double): Likewise.
1867         (target_float_from_host_double): Likewise.
1868         * target-float.h (target_float_to_host_double): Add prototype.
1869         (target_float_from_host_double): Likewise.
1870
1871         * guile/scm-value.c: Include "target-float.h".
1872         (gdbscm_value_to_real): Use target_float_to_host_double.
1873         Handle integer source values via value_as_long.
1874         * guile/scm-math.c: Include "target-float.h".  Do not include
1875         "doublest.h", "dfp.h", and "expression.h".
1876         (vlscm_convert_typed_number): Use target_float_from_host_double.
1877         (vlscm_convert_number): Likewise.
1878
1879         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1880         (convert_value_from_python): Use target_float_from_host_double.
1881
1882 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1883
1884         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1885         (cast_from_fixed): Likewise.
1886         (ada_scaling_type): New function.
1887         (ada_delta): Return value instead of DOUBLEST.  Perform target
1888         arithmetic instead of host arithmetic.
1889         (scaling_factor): Rename to ...
1890         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1891         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1892         (ada_fixed_to_float): Remove.
1893         (ada_float_to_fixed): Remove.
1894         * ada-lang.h (ada_fixed_to_float): Remove.
1895         (ada_float_to_fixed): Remove.
1896         (ada_delta): Return value instead of DOUBLEST.
1897         (ada_scaling_factor): Add prototype.
1898
1899         * ada-typeprint.c: Include "target-float.h".
1900         (print_fixed_point_type): Perform target arithmetic instead of
1901         host arithmetic.
1902         * ada-valprint.c: Include "target-float.h".
1903         (ada_val_print_num): Perform target arithmetic instead of
1904         host arithmetic for fixed-point types.
1905
1906 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1907
1908         * target-float.c: Include <math.h>.
1909         (floatformat_binop): New function.
1910         (floatformat_compare): Likewise.
1911         (target_float_binop): Likewise.
1912         (target_float_compare): Likewise.
1913         * target-float.h: Include "expression.h".
1914         (target_float_binop): Add prototype.
1915         (target_float_compare): Likewise.
1916
1917         * valarith.c: Do not include "doublest.h" and "dfp.h".
1918         Include "common/byte-vector.h".
1919         (value_args_as_decimal): Remove, replace by ...
1920         (value_args_as_target_float): ... this function.  Handle both
1921         binary and decimal target floating-point formats.
1922         (scalar_binop): Handle both binary and decimal FP using
1923         value_args_as_target_float and target_float_binop.
1924         (value_equal): Handle both binary and decimal FP using
1925         value_args_as_target_float and target_float_compare.
1926         (value_less): Likewise.
1927         (value_pos): Handle all scalar types as simple copy.
1928         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1929         * dfp.c (decimal_binop): Throw error instead of internal_error
1930         when called with an unsupported operation code.
1931
1932 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1933
1934         * target-float.c (target_float_to_string): New function.
1935         (target_float_from_string): New function.
1936         * target-float.h (target_float_to_string): Add prototype.
1937         (target_float_from_string): Add prototype.
1938
1939         * valprint.c: Include "target-float.h".  Do not include
1940         "doublest.h" and "dfp.h".
1941         (print_floating): Use target_float_to_string.
1942         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1943         (printf_floating): Use target_float_to_string.
1944         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1945         (print_i387_value): Use target_float_to_string.
1946         * mips-tdep.c: Include "target-float.h".
1947         (mips_print_fp_register): Use target_float_to_string.
1948         * sh64-tdep.c: Include "target-float.h".
1949         (sh64_do_fp_register): Use target_float_to_string.
1950
1951         * parse.c: Include "target-float.h".  Do not include
1952         "doublest.h" and "dfp.h".
1953         (parse_float): Use target_float_from_string.
1954         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1955         (define_symbol): Use target_float_from_string.
1956         * gdbarch-selftests.c: Include "target-float.h".
1957         (register_to_value_test): Use target_float_from_string.
1958
1959 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1960
1961         * Makefile.c (SFILES): Add target-float.c.
1962         (HFILES_NO_SRCDIR): Add target-float.h.
1963         (COMMON_OBS): Add target-float.o.
1964         * target-float.h: New file.
1965         * target-float.c: New file.
1966
1967         * doublest.c (floatformat_classify): Fix detection of float_zero.
1968
1969         * gdbtypes.c (is_floating_type): New function.
1970         * gdbtypes.h (is_floating_type): Add prototype.
1971
1972         * value.c: Do not include "floatformat.h".
1973         (unpack_double): Use target_float_is_valid.
1974         (is_floating_value): New function.
1975         * value.h (is_floating_value): Add prototype-
1976
1977         * valarith.c: Include "target-float.h".
1978         (value_logical_not): Use target_float_is_zero.
1979
1980         * python/py-value.c: Include "target-float.h".
1981         (valpy_nonzero): Use target_float_is_zero.
1982
1983 2017-11-04  Tom Tromey  <tom@tromey.com>
1984
1985         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1986
1987 2017-11-04  Tom Tromey  <tom@tromey.com>
1988
1989         * breakpoint.c (set_momentary_breakpoint): Return
1990         breakpoint_up.
1991         (until_break_command): Update.
1992         (new_until_break_fsm): Change argument types to
1993         breakpoint_up.
1994         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1995         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1996         Remove.
1997         * infcmd.c (finish_forward): Update.
1998         * breakpoint.h (set_momentary_breakpoint)
1999         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2000         (make_cleanup_delete_breakpoint): Remove.
2001         (struct breakpoint_deleter): New.
2002         (breakpoint_up): New typedef.
2003         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2004         (insert_exception_resume_breakpoint): Update.
2005         (insert_exception_resume_from_probe): Update.
2006         (insert_longjmp_resume_breakpoint): Update.
2007         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2008         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2009         * infcall.c (call_function_by_hand_dummy): Update
2010
2011 2017-11-04  Tom Tromey  <tom@tromey.com>
2012
2013         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2014
2015 2017-11-04  Tom Tromey  <tom@tromey.com>
2016
2017         * linux-tdep.c (linux_core_info_proc_mappings): Use
2018         gdb::def_vector.
2019         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
2020         "size" argument.
2021         (linux_corefile_thread): Update.
2022         (linux_make_corefile_notes): Remove unused variable.
2023
2024 2017-11-04  Tom Tromey  <tom@tromey.com>
2025
2026         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2027         gdb::byte_vector.
2028
2029 2017-11-04  Tom Tromey  <tom@tromey.com>
2030
2031         * objfiles.c (do_free_objfile_cleanup): Remove.
2032         * compile/compile-object-load.c (compile_object_load): Update.
2033         * objfiles.h (make_cleanup_free_objfile): Remove.
2034
2035 2017-11-04  Tom Tromey  <tom@tromey.com>
2036
2037         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2038         (adi_read_versions): Change "tags" to "gdb_byte *".
2039         (adi_print_versions): Likewise.
2040
2041 2017-11-04  Tom Tromey  <tom@tromey.com>
2042
2043         * breakpoint.c
2044         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2045         from start_rbreak_breakpoints.
2046         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2047         * breakpoint.h (class scoped_rbreak_breakpoints): New.
2048         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2049         * symtab.c (do_end_rbreak_breakpoints): Remove.
2050         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2051
2052 2017-11-04  Tom Tromey  <tom@tromey.com>
2053
2054         * cp-namespace.c (reset_directive_searched): Remove.
2055         (cp_lookup_symbol_via_imports): Use scoped_restore.
2056         * cp-support.c (reset_directive_searched): Remove.
2057         (make_symbol_overload_list_using): Use scoped_restore.
2058         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2059         (reset_directive_searched): Remove.
2060
2061 2017-11-04  Tom Tromey  <tom@tromey.com>
2062
2063         * symfile.c (find_separate_debug_file_by_debuglink): Use
2064         unique_xmalloc_ptr.
2065
2066 2017-11-04  Tom Tromey  <tom@tromey.com>
2067
2068         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2069         type of "info".
2070         (compute_stack_depth): Likewise.
2071         (do_compile_dwarf_expr_to_c): Use std::vector.
2072
2073 2017-11-04  Tom Tromey  <tom@tromey.com>
2074
2075         * compile/compile-object-load.c (link_callbacks_einfo): Use
2076         std::string.
2077
2078 2017-11-04  Tom Tromey  <tom@tromey.com>
2079
2080         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2081         Use scoped_free_pendings.
2082         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2083         scoped_free_pendings.
2084         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2085         (xcoff_initial_scan): Likewise.
2086         * buildsym.c (reset_symtab_globals): Update comment.
2087         (scoped_free_pendings): Rename from really_free_pendings.
2088         (prepare_for_building): Update comment.
2089         (buildsym_init): Likewise.
2090         * buildsym.h (class scoped_free_pendings): New class.
2091         (really_free_pendings): Don't declare.
2092
2093 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
2094
2095         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2096         output when converting a zero value to a special byteorder format.
2097
2098 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2099
2100         * frame.c (do_frame_register_read): Remove aspace.
2101         * jit.c (jit_frame_sniffer): Likwise.
2102         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2103         * regcache.c (regcache::regcache): Pass nullptr.
2104         (regcache_print): Caller updated.
2105         * regcache.h (regcache::regcache): Remove one constructor
2106         parameter aspace.
2107
2108 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2109
2110         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2111
2112 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2113
2114         * breakpoint.c (insert_single_step_breakpoints): Update.
2115         * frame.c (struct frame_info) <aspace>: Add const.
2116         (frame_save_as_regcache): Add const.
2117         (get_frame_address_space): Return const address_space *.
2118         * frame.h (get_frame_address_space): Update declaration.
2119         * infrun.c (struct step_over_info) <aspace>: Add const.
2120         (set_step_over_info): Make aspace const.
2121         (displaced_step_prepare_throw): Change variable const.
2122         (resume): Likewise.
2123         (proceed): Likewise.
2124         (adjust_pc_after_break): Likewise.
2125         (save_waitstatus): Likewise.
2126         (handle_signal_stop): Likewise.
2127         (keep_going_pass_signal): Likewise.
2128         * jit.c (jit_frame_sniffer): Add const.
2129         * mips-tdep.c (mips_single_step_through_delay): Likewise.
2130         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2131         * record-full.c (record_full_wait_1): Likewise.
2132         * regcache.c (regcache::regcache): Change parameter to const.
2133         * regcache.h (regcache::regcache): Likewise.
2134         (regcache::aspace): Return const address_space *.
2135         (regcache) <m_aspace>: Add const.
2136
2137 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2138
2139         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2140         * frame.c (create_sentinel_frame): Likewise.
2141         * infrun.c (displaced_step_prepare_throw): Likewise.
2142         (resume): Likewise.
2143         (thread_still_needs_step_over_bp): Likewise.
2144         (proceed): Likewise.
2145         (do_target_wait): Likewise.
2146         (adjust_pc_after_break): Likewise.
2147         (handle_syscall_event): Likewise.
2148         (save_waitstatus): Likewise.
2149         (handle_inferior_event_1): Likewise.
2150         (handle_signal_stop): Likewise.
2151         (keep_going_pass_signal): Likewise.
2152         * linux-nat.c (status_callback): Likewise.
2153         (save_stop_reason): Likewise.
2154         (resume_stopped_resumed_lwps): Likewise.
2155         * record-full.c (record_full_exec_insn): Likewise.
2156         (record_full_wait_1): Likewise.
2157         * regcache.c (get_regcache_aspace): Remove.
2158         * regcache.h (get_regcache_aspace): Remove.
2159
2160 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2161
2162         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2163         (init_regcache_descr): Use gdbarch_num_regs.
2164         (regcache::regcache): Likewise.
2165         (regcache::get_register_status): Likewise.
2166         (regcache::assert_raw_regnum): Likewise.
2167         (regcache::cooked_read): Likewise.
2168         (regcache::cooked_read_value): Likewise.
2169         (regcache::cooked_write): Likewise.
2170         (regcache::dump): Likewise.
2171         (regcache::num_raw_registers): New method.
2172         * regcache.h (class regcache) <num_raw_registers>: New.
2173
2174 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2175
2176         * regcache.c (regcache::assert_regnum): New method.
2177         (regcache::invalidate): Call assert_regnum.
2178         (regcache::raw_update): Likewise.
2179         (regcache::raw_write): Likewise.
2180         (regcache::raw_read_part): Likewise.
2181         (regcache::raw_write_part): Likewise.
2182         (regcache::raw_supply): Likewise.
2183         (regcache::raw_supply_integer): Likewise.
2184         (regcache::raw_supply_zeroed): Likewise.
2185         (regcache::raw_collect): Likewise.
2186         (regcache::raw_collect_integer): Likewise.
2187         * regcache.h (regcache::assert_regnum): Declare.
2188
2189 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2190
2191         * regcache.c (regcache::dump): Remove code.
2192
2193 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2194
2195         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2196         Remove.
2197         <sizeof_cooked_register_status>: Remove.
2198         (init_regcache_descr): Update.
2199         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2200         (regcache::save): Likewise.
2201         (regcache::dump): Likewise.
2202
2203 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
2204
2205         * ft32-tdep.c (ft32_fetch_instruction): New function.
2206         (ft32_analyze_prologue): Use ft32_fetch_instruction().
2207
2208 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
2209
2210         * cli/cli-script.c (execute_control_command): Rename to ...
2211         (execute_control_command_1): ... this.
2212         (execute_control_command): New function.
2213
2214 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
2215
2216         * tracepoint.c (tfind_command): Remove const_cast.
2217
2218 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
2219
2220         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2221
2222 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
2223
2224         * common/common-utils.h (in_inclusive_range): New function.
2225         * arm-tdep.c (arm_record_extension_space): Use
2226         in_inclusive_range.
2227         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2228         * cris-tdep.c (cris_spec_reg_applicable): Use
2229         in_inclusive_range.
2230
2231 2017-10-30  Pedro Alves  <palves@redhat.com>
2232             Simon Marchi <simon.marchi@ericsson.com>
2233
2234         * remote.c (remote_set_syscall_catchpoint): Build a std::string
2235         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2236
2237 2017-10-30  Pedro Alves  <palves@redhat.com>
2238
2239         * common/common-utils.c (string_appendf, string_vappendf): New
2240         functions.
2241         * common/common-utils.h (string_appendf, string_vappendf): New
2242         declarations.
2243         * unittests/common-utils-selftests.c (string_appendf_func)
2244         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2245         (string_vappendf_tests): New functions.
2246         (_initialize_common_utils_selftests): Register "string_appendf" and
2247         "string_vappendf tests".
2248
2249 2017-10-30  Pedro Alves  <palves@redhat.com>
2250
2251         * unittests/common-utils-selftests.c (format_func): New typedef.
2252         (string_printf_tests, string_vprintf_tests): Tests factored out
2253         and merged to ...
2254         (test_format_func): ... this new function.
2255         (string_printf_tests, string_vprintf_tests): Reimplement on top of
2256         test_format_func.
2257
2258 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2259
2260         * darwin-nat.c: Remove include of gdb.h.
2261
2262 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2263
2264         * xtensa-xtregs.c: Fix formatting issues.
2265
2266 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2267
2268         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2269
2270 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
2271
2272         PR python/21213
2273         * python/py-infthread.c (thpy_get_inferior): Increment reference
2274         of inferior before returning it.
2275
2276 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2277
2278         * unittests/common-utils-selftests.c (format): Add
2279         ATTRIBUTE_PRINTF.
2280
2281 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2282
2283         * xml-syscall.c (struct syscall_desc): Add constructor.
2284         <name>: Change type to std::string.
2285         (syscall_desc_up): New typedef.
2286         (syscall_desc_p): Remove typeder.
2287         (DEF_VEC_P(syscall_desc_p)): Remove.
2288         (struct syscall_group_desc): Add constructor.
2289         <name>: Change type to std::string.
2290         <syscalls>: Change type to std::vector.
2291         (syscall_group_desc_up): New typedef.
2292         (syscall_group_desc_p): Remove typedef.
2293         (DEF_VEC_P(syscall_group_desc_p)): Remove.
2294         (struct syscalls_info) <syscalls>: Change type to std::vector of
2295         unique_ptr.
2296         <groups>: Likewise.
2297         <my_gdb_datadir>: Change type to std::string.
2298         (syscalls_info_up): New typedef.
2299         (allocate_syscalls_info): Remove.
2300         (syscalls_info_free_syscalls_desc): Remove.
2301         (syscalls_info_free_syscall_group_desc): Remove.
2302         (free_syscalls_info): Remove.
2303         (make_cleanup_free_syscalls_info): Remove.
2304         (syscall_group_create_syscall_group_desc): Adjust.
2305         (syscall_group_add_syscall): Adjust.
2306         (syscall_create_syscall_desc): Adjust.
2307         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2308         (init_syscalls_info): Adjust.
2309         (syscall_group_get_group_by_name): Adjust.
2310         (xml_get_syscall_number): Adjust.
2311         (xml_get_syscall_name): Adjust.
2312         (xml_list_of_syscalls): Adjust.
2313         (xml_list_syscalls_by_group): Adjust.
2314         (xml_list_of_groups): Adjust.
2315
2316 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2317
2318         * probe.h: Don't include gdb_vecs.h.
2319         (DEF_VEC_P (probe_p)): Remove.
2320         (find_probes_in_objfile): Return an std::vector.
2321         * probe.c (find_probes_in_objfile): Likewise.
2322         * breakpoint.c (breakpoint_objfile_data)
2323         <longjmp_probes>: Change type to std::vector.
2324         <exception_probes>: Likewise.
2325         (free_breakpoint_probes): Don't manually free vectors.
2326         (create_longjmp_master_breakpoint): Adjust.
2327         (create_exception_master_breakpoint): Adjust.
2328         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2329         parameter type, adjust.
2330         (svr4_create_solib_event_breakpoints): Adjust.
2331
2332 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2333
2334         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2335         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2336         with new.
2337         (free_breakpoint_probes): Rename to ...
2338         (free_breakpoint_objfile_data): ... this, and call delete on
2339         bp_objfile_data..
2340
2341 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2342
2343         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2344         (loaded_script_ptr): Remove typedef.
2345         (DEF_VEC_P (loaded_script_ptr)): Remove.
2346         (struct collect_matching_scripts_data): Add constructor.
2347         <scripts_p>: Change type to (pointer to) std::vector.
2348         (collect_matching_scripts_data): Adjust.
2349         (sort_scripts_by_name): Make suitable for std::sort.
2350         (print_scripts): Don't sort vector, adjust to std::vector.
2351         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2352
2353 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2354
2355         * symfile.c (filename_language): Make struct, not typedef.  Add
2356         constructor.
2357         <ext>: Change type to std::string.
2358         (DEF_VEC_O (filename_language)): Remove.
2359         (filename_language_table): Change type to std::vector.
2360         (add_filename_language): Adjust.
2361         (set_ext_lang_command): Adjust.
2362         (info_ext_lang_command): Adjust.
2363         (deduce_language_from_filename): Adjust.
2364         (class scoped_restore_filename_language_table): Remove.
2365         (test_filename_language): Use scoped_restore.
2366         (test_set_ext_lang_command): Use scoped_restore, adjust to
2367         std::vector change.
2368
2369 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2370
2371         * symfile.c: Include selftest.h.
2372         (class scoped_restore_filename_language_table): New.
2373         (test_filename_language): New test.
2374         (test_set_ext_lang_command): New test.
2375         (_initialize_symfile): Register tests.
2376
2377 2017-10-27  Keith Seitz  <keiths@redhat.com>
2378
2379         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2380         in the bp_location, falling back to find_pc_sect_function when
2381         needed.
2382         (add_location_to_breakpoint): Save sal->symbol.
2383         * breakpoint.h (struct bp_location) <symbol>: New field.
2384         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2385         * symtab.h (struct symtab_and_line) <symbol>: New field.
2386
2387 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2388
2389         PR gdb/13669
2390         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2391         to rewind obstack.
2392
2393 2017-10-26  Pedro Alves  <palves@redhat.com>
2394
2395         * remote.c (remote_async_terminal_ours_p): Delete.
2396         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2397         Remove references to 'remote_async_terminal_ours_p'.
2398
2399 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2400
2401         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2402
2403 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2404
2405         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2406         aspace const.
2407         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2408         Likewise.
2409         * breakpoint.c (bpstat_check_location): Remove cast.
2410         (breakpoint_hit_catch_fork): Make aspce const.
2411         (breakpoint_hit_catch_solib): Likewise.
2412         (breakpoint_hit_catch_exec): Likewise.
2413         (breakpoint_hit_ranged_breakpoint): Likewise.
2414         (breakpoint_hit_watchpoint): Likewise.
2415         (base_breakpoint_breakpoint_hit): Likewise.
2416         (bkpt_breakpoint_hit): Likewise.
2417         (dprintf_breakpoint_hit): Likewise.
2418         (tracepoint_breakpoint_hit): Likewise.
2419         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2420
2421 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2422
2423         * breakpoint.c (breakpoint_location_address_match): Change
2424         "struct address_space *" to "const address_space".
2425         (breakpoint_location_address_range_overlap): Likewise.
2426         (breakpoint_here_p): Likewise.
2427         (breakpoint_in_range_p): Likewise.
2428         (moribund_breakpoint_here_p): Likewise.
2429         (bp_location_inserted_here_p): Likewise.
2430         (software_breakpoint_inserted_here_p): Likewise.
2431         (hardware_breakpoint_inserted_here_p): Likewise.
2432         (hardware_watchpoint_inserted_in_range): Likewise.
2433         (bpstat_check_location): Likewise.
2434         (bpstat_stop_status): Likewise.
2435         (breakpoint_address_match): Likewise.
2436         (breakpoint_address_match_range): Likewise.
2437         (breakpoint_location_address_match): Likewise.
2438         (breakpoint_location_address_range_overlap): Likewise.
2439         (insert_single_step_breakpoint): Likewise.
2440         (breakpoint_has_location_inserted_here): Likewise.
2441         (single_step_breakpoint_inserted_here_p): Likewise.
2442         (pc_at_non_inline_function): Likewise.
2443         * breakpoint.h (bpstat_stop_status): Update declaration.
2444         (breakpoint_here_p): Likewise.
2445         (breakpoint_in_range_p): Likewise.
2446         (moribund_breakpoint_here_p): Likewise.
2447         (breakpoint_inserted_here_p): Likewise.
2448         (software_breakpoint_inserted_here_p): Likewise.
2449         (hardware_breakpoint_inserted_here_p): Likewise.
2450         (breakpoint_has_location_inserted_here): Likewise.
2451         (single_step_breakpoint_inserted_here_p): Likewise.
2452         (hardware_watchpoint_inserted_in_range): Likewise.
2453         (breakpoint_address_match): Likewise.
2454         (insert_single_step_breakpoint): Likewise.
2455         (pc_at_non_inline_function): Likewise.
2456         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2457         * record.c (record_check_stopped_by_breakpoint): Likewise.
2458         * record.h (record_check_stopped_by_breakpoint): Likewise.
2459         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2460
2461 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2462
2463         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2464         regcache->arch () instead get_regcache_arch.
2465         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2466         Likewise.
2467         (aarch64_fbsd_store_inferior_registers): Likewise.
2468         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2469         (store_gregs_to_thread): Likewise.
2470         (fetch_fpregs_from_thread): Likewise.
2471         (store_fpregs_to_thread): Likewise.
2472         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2473         (aarch64_store_return_value): Likewise.
2474         (aarch64_software_single_step): Likewise.
2475         * aix-thread.c (aix_thread_wait): Likewise.
2476         (supply_reg32): Likewise.
2477         (supply_sprs64): Likewise.
2478         (supply_sprs32): Likewise.
2479         (fill_gprs64): Likewise.
2480         (fill_gprs32): Likewise.
2481         (fill_sprs64): Likewise.
2482         (fill_sprs32): Likewise.
2483         (store_regs_user_thread): Likewise.
2484         (store_regs_kernel_thread): Likewise.
2485         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2486         (alphabsd_store_inferior_registers): Likewise.
2487         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2488         (alpha_store_return_value): Likewise.
2489         (alpha_deal_with_atomic_sequence): Likewise.
2490         (alpha_next_pc): Likewise.
2491         (alpha_software_single_step): Likewise.
2492         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2493         (amd64bsd_store_inferior_registers): Likewise.
2494         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2495         Likewise.
2496         (amd64_linux_store_inferior_registers): Likewise.
2497         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2498         (amd64_collect_native_gregset): Likewise.
2499         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2500         (amd64obsd_collect_uthread): Likewise.
2501         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2502         (amd64_collect_fpregset): Likewise.
2503         (amd64_supply_fxsave): Likewise.
2504         (amd64_supply_xsave): Likewise.
2505         (amd64_collect_fxsave): Likewise.
2506         (amd64_collect_xsave): Likewise.
2507         * arc-tdep.c (arc_write_pc): Likewise.
2508         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2509         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2510         (arm_fbsd_store_inferior_registers): Likewise.
2511         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2512         (store_vfp_regs): Likewise.
2513         (arm_linux_fetch_inferior_registers): Likewise.
2514         (arm_linux_store_inferior_registers): Likewise.
2515         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2516         (arm_linux_sigreturn_next_pc): Likewise.
2517         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2518         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2519         (fetch_register): Likewise.
2520         (store_register): Likewise.
2521         * arm-tdep.c (arm_is_thumb): Likewise.
2522         (displaced_in_arm_mode): Likewise.
2523         (bx_write_pc): Likewise.
2524         (arm_get_next_pcs_addr_bits_remove): Likewise.
2525         (arm_software_single_step): Likewise.
2526         (arm_extract_return_value): Likewise.
2527         (arm_store_return_value): Likewise.
2528         (arm_write_pc): Likewise.
2529         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2530         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2531         (bsd_uthread_store_registers): Likewise.
2532         * core-regset.c (fetch_core_registers): Likewise.
2533         * corelow.c (get_core_registers): Likewise.
2534         * cris-tdep.c (cris_store_return_value): Likewise.
2535         (cris_extract_return_value): Likewise.
2536         (find_step_target): Likewise.
2537         (find_step_target): Likewise.
2538         (cris_software_single_step): Likewise.
2539         * ctf.c (ctf_fetch_registers): Likewise.
2540         * darwin-nat.c (cancel_breakpoint): Likewise.
2541         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2542         * frv-tdep.c (frv_extract_return_value): Likewise.
2543         * ft32-tdep.c (ft32_store_return_value): Likewise.
2544         (ft32_extract_return_value): Likewise.
2545         * go32-nat.c (fetch_register): Likewise.
2546         (go32_fetch_registers): Likewise.
2547         (go32_store_registers): Likewise.
2548         (store_register): Likewise.
2549         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2550         (h8300_store_return_value): Likewise.
2551         * hppa-linux-nat.c (fetch_register): Likewise.
2552         (store_register): Likewise.
2553         (hppa_linux_fetch_inferior_registers): Likewise.
2554         (hppa_linux_store_inferior_registers): Likewise.
2555         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2556         (i386_darwin_store_inferior_registers): Likewise.
2557         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2558         (gnu_store_registers): Likewise.
2559         * i386-linux-nat.c (fetch_register): Likewise.
2560         (store_register): Likewise.
2561         (supply_gregset): Likewise.
2562         (fill_gregset): Likewise.
2563         (i386_linux_fetch_inferior_registers): Likewise.
2564         (i386_linux_store_inferior_registers): Likewise.
2565         (i386_linux_resume): Likewise.
2566         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2567         Likewise.
2568         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2569         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2570         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2571         (i386obsd_collect_uthread): Likewise.
2572         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2573         (i386_supply_gregset): Likewise.
2574         (i386_collect_gregset): Likewise.
2575         (i386_supply_fpregset): Likewise.
2576         (i386_collect_fpregset): Likewise.
2577         (i386_mpx_bd_base): Likewise.
2578         * i386-v4-nat.c (supply_fpregset): Likewise.
2579         (fill_fpregset): Likewise.
2580         * i387-tdep.c (i387_supply_fsave): Likewise.
2581         (i387_collect_fsave): Likewise.
2582         (i387_supply_fxsave): Likewise.
2583         (i387_collect_fxsave): Likewise.
2584         (i387_supply_xsave): Likewise.
2585         (i387_collect_xsave): Likewise.
2586         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2587         (ia64_linux_store_registers): Likewise.
2588         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2589         (ia64_extract_return_value): Likewise.
2590         (ia64_store_return_value): Likewise.
2591         (find_func_descr): Likewise.
2592         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2593         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2594         (inf_ptrace_store_registers): Likewise.
2595         * infrun.c (use_displaced_stepping): Likewise.
2596         (displaced_step_prepare_throw): Likewise.
2597         (resume): Likewise.
2598         (proceed): Likewise.
2599         (do_target_wait): Likewise.
2600         (adjust_pc_after_break): Likewise.
2601         (handle_inferior_event_1): Likewise.
2602         (handle_signal_stop): Likewise.
2603         (save_infcall_suspend_state): Likewise.
2604         (restore_infcall_suspend_state): Likewise.
2605         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2606         * jit.c (jit_frame_prev_register): Likewise.
2607         * linux-nat.c (save_stop_reason): Likewise.
2608         (linux_nat_wait_1): Likewise.
2609         (resume_stopped_resumed_lwps): Likewise.
2610         * linux-record.c (record_linux_sockaddr): Likewise.
2611         (record_linux_msghdr): Likewise.
2612         (record_linux_system_call): Likewise.
2613         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2614         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2615         (lm32_store_return_value): Likewise.
2616         * m32c-tdep.c (m32c_read_flg): Likewise.
2617         (m32c_pseudo_register_read): Likewise.
2618         (m32c_pseudo_register_write): Likewise.
2619         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2620         (m32r_linux_collect_gregset): Likewise.
2621         * m32r-tdep.c (m32r_store_return_value): Likewise.
2622         (m32r_extract_return_value): Likewise.
2623         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2624         (m68kbsd_collect_fpregset): Likewise.
2625         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2626         * m68k-linux-nat.c (fetch_register): Likewise.
2627         (old_fetch_inferior_registers): Likewise.
2628         (old_store_inferior_registers): Likewise.
2629         (store_regs): Likewise.
2630         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2631         (m68k_svr4_store_return_value): Likewise.
2632         * m88k-tdep.c (m88k_store_arguments): Likewise.
2633         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2634         (mi_cmd_data_write_register_values): Likewise.
2635         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2636         (mips_fbsd_store_inferior_registers): Likewise.
2637         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2638         (mips_fbsd_supply_gregs): Likewise.
2639         (mips_fbsd_collect_fpregs): Likewise.
2640         (mips_fbsd_collect_gregs): Likewise.
2641         (mips_fbsd_supply_fpregset): Likewise.
2642         (mips_fbsd_collect_fpregset): Likewise.
2643         (mips_fbsd_supply_gregset): Likewise.
2644         (mips_fbsd_collect_gregset): Likewise.
2645         * mips-linux-nat.c (supply_gregset): Likewise.
2646         (fill_gregset): Likewise.
2647         (supply_fpregset): Likewise.
2648         (fill_fpregset): Likewise.
2649         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2650         (mips_fill_gregset): Likewise.
2651         (mips_supply_fpregset): Likewise.
2652         (mips_fill_fpregset): Likewise.
2653         (mips64_supply_gregset): Likewise.
2654         (micromips_linux_sigframe_validate): Likewise.
2655         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2656         (mipsnbsd_fetch_inferior_registers): Likewise.
2657         (mipsnbsd_store_inferior_registers): Likewise.
2658         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2659         (mipsnbsd_supply_gregset): Likewise.
2660         (mipsnbsd_iterate_over_regset_sections): Likewise.
2661         (mipsnbsd_supply_reg): Likewise.
2662         (mipsnbsd_supply_fpreg): Likewise.
2663         * mips-tdep.c (mips_in_frame_stub): Likewise.
2664         (mips_dummy_id): Likewise.
2665         (is_octeon_bbit_op): Likewise.
2666         (micromips_bc1_pc): Likewise.
2667         (extended_mips16_next_pc): Likewise.
2668         (mips16_next_pc): Likewise.
2669         (deal_with_atomic_sequence): Likewise.
2670         * moxie-tdep.c (moxie_process_readu): Likewise.
2671         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2672         * nto-procfs.c (procfs_store_registers): Likewise.
2673         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2674         (ppcfbsd_store_inferior_registers): Likewise.
2675         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2676         (fetch_altivec_register): Likewise.
2677         (get_spe_registers): Likewise.
2678         (fetch_spe_register): Likewise.
2679         (fetch_altivec_registers): Likewise.
2680         (fetch_all_gp_regs): Likewise.
2681         (fetch_all_fp_regs): Likewise.
2682         (store_vsx_register): Likewise.
2683         (store_altivec_register): Likewise.
2684         (set_spe_registers): Likewise.
2685         (store_spe_register): Likewise.
2686         (store_altivec_registers): Likewise.
2687         (store_all_gp_regs): Likewise.
2688         (store_all_fp_regs): Likewise.
2689         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2690         (ppc_linux_collect_gregset): Likewise.
2691         (ppc_canonicalize_syscall): Likewise.
2692         (ppc_linux_record_signal): Likewise.
2693         (ppu2spu_prev_register): Likewise.
2694         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2695         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2696         (ppcobsd_store_registers): Likewise.
2697         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2698         Likewise.
2699         (ppc_ravenscar_generic_store_registers): Likewise.
2700         * procfs.c (procfs_fetch_registers): Likewise.
2701         (procfs_store_registers): Likewise.
2702         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2703         (ravenscar_store_registers): Likewise.
2704         (ravenscar_prepare_to_store): Likewise.
2705         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2706         * record-full.c (record_full_wait_1): Likewise.
2707         (record_full_registers_change): Likewise.
2708         (record_full_store_registers): Likewise.
2709         (record_full_core_fetch_registers): Likewise.
2710         (record_full_save): Likewise.
2711         (record_full_goto_insn): Likewise.
2712         * regcache.c (regcache_register_size): Likewise.
2713         (get_regcache_arch): Remove.
2714         (regcache_read_pc): Likewise.
2715         * regcache.h (get_regcache_arch): Remove.
2716         * remote-sim.c (gdbsim_fetch_register): Likewise.
2717         (gdbsim_store_register): Likewise.
2718         * remote.c (fetch_register_using_p): Likewise.
2719         (send_g_packet): Likewise.
2720         (remote_prepare_to_store): Likewise.
2721         (store_registers_using_G): Likewise.
2722         * reverse.c (save_bookmark_command): Likewise.
2723         (goto_bookmark_command): Likewise.
2724         * rs6000-aix-tdep.c (branch_dest): Likewise.
2725         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2726         (fetch_register): Likewise.
2727         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2728         (ppc_collect_reg): Likewise.
2729         (ppc_collect_gregset): Likewise.
2730         (ppc_collect_fpregset): Likewise.
2731         (ppc_collect_vsxregset): Likewise.
2732         (ppc_collect_vrregset): Likewise.
2733         (ppc_displaced_step_hw_singlestep): Likewise.
2734         (rs6000_pseudo_register_read): Likewise.
2735         (rs6000_pseudo_register_write): Likewise.
2736         * s390-linux-nat.c (supply_gregset): Likewise.
2737         (fill_gregset): Likewise.
2738         (s390_linux_fetch_inferior_registers): Likewise.
2739         * s390-linux-tdep.c (s390_write_pc): Likewise.
2740         (s390_software_single_step): Likewise.
2741         (s390_all_but_pc_registers_record): Likewise.
2742         (s390_linux_syscall_record): Likewise.
2743         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2744         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2745         (shnbsd_store_inferior_registers): Likewise.
2746         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2747         (sh_extract_return_value_fpu): Likewise.
2748         (sh_store_return_value_nofpu): Likewise.
2749         (sh_corefile_supply_regset): Likewise.
2750         (sh_corefile_collect_regset): Likewise.
2751         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2752         (sh64_store_return_value): Likewise.
2753         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2754         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2755         (sparc_store_inferior_registers): Likewise.
2756         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2757         (sparc_ravenscar_prepare_to_store): Likewise.
2758         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2759         (sparc_analyze_control_transfer): Likewise.
2760         (sparc_step_trap): Likewise.
2761         (sparc_software_single_step): Likewise.
2762         (sparc32_gdbarch_init): Likewise.
2763         (sparc_supply_rwindow): Likewise.
2764         (sparc_collect_rwindow): Likewise.
2765         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2766         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2767         (sparc64nbsd_collect_gregset): Likewise.
2768         (sparc64nbsd_supply_fpregset): Likewise.
2769         (sparc64nbsd_collect_fpregset): Likewise.
2770         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2771         (sparc64_supply_gregset): Likewise.
2772         (sparc64_collect_gregset): Likewise.
2773         (sparc64_supply_fpregset): Likewise.
2774         (sparc64_collect_fpregset): Likewise.
2775         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2776         * spu-tdep.c (spu_unwind_sp): Likewise.
2777         (spu2ppu_prev_register): Likewise.
2778         (spu_memory_remove_breakpoint): Likewise.
2779         * stack.c (return_command): Likewise.
2780         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2781         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2782         * tracefile.c (trace_save_ctf): Likewise.
2783         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2784         (do_windows_store_inferior_registers): Likewise.
2785         (windows_resume): Likewise.
2786         * xtensa-linux-nat.c (fill_gregset): Likewise.
2787         (supply_gregset_reg): Likewise.
2788         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2789         (xtensa_register_read_masked): Likewise.
2790         (xtensa_supply_gregset): Likewise.
2791         (xtensa_extract_return_value): Likewise.
2792         (xtensa_store_return_value): Likewise.
2793
2794 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2795
2796         * doublest.c (floatformat_from_string): New function.
2797         * doublest.h (floatformat_from_string): Add prototype.
2798
2799         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2800         (OP_FLOAT): ... this.
2801         * expression.h: Do not include "doublest.h".
2802         (union exp_element): Replace doubleconst and decfloatconst by
2803         new element floatconst.
2804         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2805         (ada_evaluate_subexp): Likewise.
2806         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2807         OP_DOUBLE and OP_DECFLOAT.
2808         * expprint.c (print_subexp_standard): Likewise.
2809         (dump_subexp_body_standard): Likewise.
2810         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2811
2812         * parse.c: Include "dfp.h".
2813         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2814         (write_exp_elt_floatcst): New function.
2815         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2816         and OP_DECFLOAT.
2817         (operator_check_standard): Likewise.
2818         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2819         Return target format buffer instead of host DOUBLEST.
2820         Use floatformat_from_string and decimal_from_string to parse
2821         either binary or decimal floating-point types.
2822         (parse_c_float): Remove.
2823         * parser-defs.h: Do not include "doublest.h".
2824         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2825         (write_exp_elt_floatcst): Add prototype.
2826         (parse_float): Update prototype.
2827         (parse_c_float): Remove.
2828
2829         * c-exp.y: Do not include "dfp.h".
2830         (typed_val_float): Use byte buffer instead of DOUBLEST.
2831         (typed_val_decfloat): Remove.
2832         (DECFLOAT): Remove.
2833         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2834         (parse_number): Update to new parse_float interface.
2835         Parse suffixes and determine type before calling parse_float.
2836         Handle decimal and binary FP types the same way.
2837
2838         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2839         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2840         (parse_number): Update to new parse_float interface.
2841         Parse suffixes and determine type before calling parse_float.
2842
2843         * f-exp.y: Replace dval by typed_val_float.
2844         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2845         (parse_number): Use parse_float instead of atof.
2846
2847         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2848         (parse_go_float): Remove.
2849         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2850         (parse_number): Call parse_float instead of parse_go_float.
2851         Parse suffixes and determine type before calling parse_float.
2852
2853         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2854         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2855         (parse_number): Update to new parse_float interface.
2856         Parse suffixes and determine type before calling parse_float.
2857
2858         * m2-exp.y: Replace dval by byte buffer val.
2859         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2860         (parse_number): Call parse_float instead of atof.
2861
2862         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2863         (lex_number): Call parse_float instead of strtod.
2864         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2865         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2866         Use write_exp_elt_floatcst.
2867         (unit_testing): Remove static variable.
2868         (rust_type): Do not check unit_testing.
2869         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2870
2871         * ada-exp.y (type_float, type_double): Remove.
2872         (typed_val_float): Use byte buffer instead of DOUBLEST.
2873         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2874         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2875
2876 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2877
2878         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2879         * arch/aarch64.h: New file.
2880
2881 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2882
2883         * dfp.h (decimal_from_string): Use const reference for argument.
2884         * dfp.c (decimal_from_string): Likewise.
2885
2886 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2887
2888         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2889         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2890         * mips-tdep.c (mips_print_fp_register): Likewise.
2891
2892 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2893
2894         * common/format.h (enum argclass): Replace decfloat_arg by
2895         dec32float_arg, dec64float_arg, and dec128float_arg.
2896         * common/format.c (parse_format_string): Update to return
2897         new decimal float argument classes.
2898
2899         * printcmd.c (printf_decfloat): Rename to ...
2900         (printf_floating): ... this.  Add argclass argument, and use it
2901         instead of parsing the format string again.  Add support for
2902         binary floating-point values, using floatformat_to_string.
2903         Convert value to the target format if it doesn't already match.
2904         (ui_printf): Call printf_floating instead of printf_decfloat,
2905         also for double_arg / long_double_arg.  Pass argclass.
2906
2907         * dfp.c (decimal_to_string): Add format string argument.
2908         * dfp.h (decimal_to_string): Likewise.
2909
2910         * doublest.c (floatformat_to_string): Add format string argument.
2911         * doublest.h (floatformat_to_string): Likewise.
2912
2913 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2914
2915         * doublest.c (floatformat_precision): New routine.
2916         (floatformat_to_string): Likewise.
2917         * doublest.c (floatformat_to_string): Add prototype.
2918
2919         * printcmd.c (print_scalar_formatted): Only call print_floating
2920         on floating-point types.
2921         * valprint.c: Do not include "floatformat.h".
2922         (generic_val_print_decfloat): Remove.
2923         (generic_val_print): Call generic_val_print_float for both
2924         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2925         (print_floating): Use floatformat_to_string.  Handle decimal float.
2926         (print_decimal_floating): Remove, merge into floatformat_to_string.
2927         * value.h (print_decimal_floating): Remove.
2928
2929         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2930
2931 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2932
2933         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2934
2935 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2936
2937         * memattr.h: Don't include vec.h.
2938         (struct mem_attrib): Initialize fields.
2939         <unknown>: New static method.
2940         (struct mem_region): Add constructors, operator<, initialize
2941         fields.
2942         * memattr.c: Include algorithm.
2943         (default_mem_attrib, unknown_mem_attrib): Remove.
2944         (user_mem_region_list): New global.
2945         (target_mem_region_list, mem_region_list): Change type to
2946         std::vector<mem_region>.
2947         (mem_use_target): Now a function.
2948         (target_mem_regions_valid): Change type to bool.
2949         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2950         (require_user_regions): Adjust.
2951         (require_target_regions): Adjust.
2952         (create_mem_region): Adjust.
2953         (lookup_mem_region): Adjust.
2954         (invalidate_target_mem_regions): Adjust.
2955         (mem_clear): Rename to...
2956         (user_mem_clear): ... this, and adjust.
2957         (mem_command): Adjust.
2958         (info_mem_command): Adjust.
2959         (mem_enable, enable_mem_command, mem_disable,
2960         disable_mem_command): Adjust.
2961         (mem_delete): Adjust.
2962         (delete_mem_command): Adjust.
2963         * memory-map.h (parse_memory_map): Return an std::vector.
2964         * memory-map.c (parse_memory_map): Likewise.
2965         (struct memory_map_parsing_data): Add constructor.
2966         <memory_map>: Point to std::vector.
2967         (memory_map_start_memory): Adjust.
2968         (memory_map_end_memory): Adjust.
2969         (memory_map_end_property): Adjust.
2970         (clear_result): Remove.
2971         * remote.c (remote_memory_map): Return an std::vector.
2972         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2973         Remove.
2974         (target_debug_print_mem_region_vector): New.
2975         * target-delegates.c: Regenerate.
2976         * target.h (mem_region_vector): New typedef.
2977         (to_memory_map): Return mem_region_vector.
2978         (target_memory_map): Return an std::vector.
2979         * target.c (target_memory_map): Return an std::vector.
2980         (flash_erase_command): Adjust.
2981
2982 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2983
2984         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2985         Change type to std::string.
2986         (memory_map_start_property): Adjust.
2987         (memory_map_end_property): Adjust.
2988
2989 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2990
2991         * infrun.h: Include common/byte-vector.h.
2992         (struct displaced_step_closure): New struct.
2993         (struct buf_displaced_step_closure): New struct.
2994         * infrun.c (displaced_step_closure::~displaced_step_closure):
2995         Provide default implementation.
2996         (displaced_step_clear): Deallocate step closure with delete.
2997         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2998         (aarch64_displaced_step_closure): ... this, extend
2999         displaced_step_closure.
3000         (aarch64_displaced_step_data) <dsc>: Change type to
3001         aarch64_displaced_step_closure.
3002         (aarch64_displaced_step_copy_insn): Adjust to type change, use
3003         unique_ptr.
3004         (aarch64_displaced_step_fixup): Add cast for displaced step
3005         closure.
3006         * amd64-tdep.c (displaced_step_closure): Rename to ...
3007         (amd64_displaced_step_closure): ... this, extend
3008         displaced_step_closure.
3009         <insn_buf>: Change type to std::vector<gdb_byte>.
3010         <max_len>: Remove.
3011         (fixup_riprel): Change type of DSC parameter, adjust to type
3012         change of insn_buf.
3013         (fixup_displaced_copy): Change type of DSC parameter.
3014         (amd64_displaced_step_copy_insn): Instantiate
3015         amd64_displaced_step_closure.
3016         (amd64_displaced_step_fixup): Add cast for closure type, adjust
3017         to type change of insn_buf.
3018         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3019         parameter DSC.
3020         (arm_linux_copy_svc): Likewise.
3021         (cleanup_kernel_helper_return): Likewise.
3022         (arm_catch_kernel_helper_return): Likewise.
3023         (arm_linux_displaced_step_copy_insn): Instantiate
3024         arm_displaced_step_closure.
3025         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3026         (displaced_read_reg): Change type of parameter DSC.
3027         (branch_write_pc): Likewise.
3028         (load_write_pc): Likewise.
3029         (alu_write_pc): Likewise.
3030         (displaced_write_reg): Likewise.
3031         (arm_copy_unmodified): Likewise.
3032         (thumb_copy_unmodified_32bit): Likewise.
3033         (thumb_copy_unmodified_16bit): Likewise.
3034         (cleanup_preload): Likewise.
3035         (install_preload): Likewise.
3036         (arm_copy_preload): Likewise.
3037         (thumb2_copy_preload): Likewise.
3038         (install_preload_reg): Likewise.
3039         (arm_copy_preload_reg): Likewise.
3040         (cleanup_copro_load_store): Likewise.
3041         (install_copro_load_store): Likewise.
3042         (arm_copy_copro_load_store) Likewise.
3043         (thumb2_copy_copro_load_store): Likewise.
3044         (cleanup_branch): Likewise.
3045         (install_b_bl_blx): Likewise.
3046         (arm_copy_b_bl_blx): Likewise.
3047         (thumb2_copy_b_bl_blx): Likewise.
3048         (thumb_copy_b): Likewise.
3049         (install_bx_blx_reg): Likewise.
3050         (arm_copy_bx_blx_reg): Likewise.
3051         (thumb_copy_bx_blx_reg): Likewise.
3052         (cleanup_alu_imm): Likewise.
3053         (arm_copy_alu_imm): Likewise.
3054         (thumb2_copy_alu_imm): Likewise.
3055         (cleanup_alu_reg): Likewise.
3056         (install_alu_reg): Likewise.
3057         (arm_copy_alu_reg): Likewise.
3058         (thumb_copy_alu_reg): Likewise.
3059         (cleanup_alu_shifted_reg): Likewise.
3060         (install_alu_shifted_reg): Likewise.
3061         (arm_copy_alu_shifted_reg): Likewise.
3062         (cleanup_load): Likewise.
3063         (cleanup_store): Likewise.
3064         (arm_copy_extra_ld_st): Likewise.
3065         (install_load_store): Likewise.
3066         (thumb2_copy_load_literal): Likewise.
3067         (thumb2_copy_load_reg_imm): Likewise.
3068         (arm_copy_ldr_str_ldrb_strb): Likewise.
3069         (cleanup_block_load_all): Likewise.
3070         (cleanup_block_store_pc): Likewise.
3071         (cleanup_block_load_pc): Likewise.
3072         (arm_copy_block_xfer): Likewise.
3073         (thumb2_copy_block_xfer): Likewise.
3074         (cleanup_svc): Likewise.
3075         (install_svc): Likewise.
3076         (arm_copy_svc): Likewise.
3077         (thumb_copy_svc): Likewise.
3078         (arm_copy_undef): Likewise.
3079         (thumb_32bit_copy_undef): Likewise.
3080         (arm_copy_unpred): Likewise.
3081         (arm_decode_misc_memhint_neon): Likewise.
3082         (arm_decode_unconditional): Likewise.
3083         (arm_decode_miscellaneous): Likewise.
3084         (arm_decode_dp_misc): Likewise.
3085         (arm_decode_ld_st_word_ubyte): Likewise.
3086         (arm_decode_media): Likewise.
3087         (arm_decode_b_bl_ldmstm): Likewise.
3088         (arm_decode_ext_reg_ld_st): Likewise.
3089         (thumb2_decode_dp_shift_reg): Likewise.
3090         (thumb2_decode_ext_reg_ld_st): Likewise.
3091         (arm_decode_svc_copro): Likewise.
3092         (thumb2_decode_svc_copro): Likewise.
3093         (install_pc_relative): Likewise.
3094         (thumb_copy_pc_relative_16bit): Likewise.
3095         (thumb_decode_pc_relative_16bit): Likewise.
3096         (thumb_copy_pc_relative_32bit): Likewise.
3097         (thumb_copy_16bit_ldr_literal): Likewise.
3098         (thumb_copy_cbnz_cbz): Likewise.
3099         (thumb2_copy_table_branch): Likewise.
3100         (cleanup_pop_pc_16bit_all): Likewise.
3101         (thumb_copy_pop_pc_16bit): Likewise.
3102         (thumb_process_displaced_16bit_insn): Likewise.
3103         (decode_thumb_32bit_ld_mem_hints): Likewise.
3104         (thumb_process_displaced_32bit_insn): Likewise.
3105         (thumb_process_displaced_insn): Likewise.
3106         (arm_process_displaced_insn): Likewise.
3107         (arm_displaced_init_closure): Likewise.
3108         (arm_displaced_step_fixup): Add cast for closure.
3109         * arm-tdep.h: Include infrun.h.
3110         (displaced_step_closure): Rename to ...
3111         (arm_displaced_step_closure): ... this, extend
3112         displaced_step_closure.
3113         <u::svc::copy_svc_os>: Change type of parameter DSC.
3114         <cleanup>: Likewise.
3115         (arm_process_displaced_insn): Likewise.
3116         (arm_displaced_init_closure): Likewise.
3117         (displaced_read_reg): Likewise.
3118         (displaced_write_reg): Likewise.
3119         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3120         Adjust.
3121         * i386-tdep.h: Include infrun.h.
3122         (i386_displaced_step_closure): New typedef.
3123         * i386-tdep.c (i386_displaced_step_copy_insn): Use
3124         i386_displaced_step_closure.
3125         (i386_displaced_step_fixup): Adjust.
3126         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3127         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3128         and unique_ptr.
3129         (ppc_displaced_step_fixup): Adjust.
3130         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3131         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3132         and unique_ptr.
3133         (s390_displaced_step_fixup): Adjust.
3134
3135 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3136
3137         * interps.h (interp_resume, interp_suspend, interp_set_temp):
3138         Remove declarations.
3139
3140 2017-10-20  Tom Tromey  <tom@tromey.com>
3141
3142         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3143         std::vector.
3144         (gdb_bfd_record_inclusion): Update.
3145         (bfdp): Remove typedef.
3146
3147 2017-10-20  Tom Tromey  <tom@tromey.com>
3148
3149         * gdb_bfd.c (gdb_bfd_ref): Use new.
3150         (struct gdb_bfd_data): Add constructor, destructor, and member
3151         initializers.
3152         (gdb_bfd_unref): Use delete.
3153
3154 2017-10-20  Tom Tromey  <tom@tromey.com>
3155
3156         * exec.c (exec_file_attach): Use new_bfd_ref.
3157         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3158         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3159         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3160         new_bfd_ref.
3161         * gdb_bfd.h (new_bfd_ref): New function.
3162
3163 2017-10-20  Pedro Alves  <palves@redhat.com>
3164
3165         * main.c (captured_command_loop): Add attribute noinline.
3166
3167 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
3168
3169         * interps.c (struct interp_factory): Add constructor.
3170         (interp_factory_p): Remove typedef.
3171         (DEF_VEC_P(interp_factory_p)): Remove.
3172         (interpreter_factories): Change type to std::vector.
3173         (interp_factory_register): Adjust.
3174         (interp_lookup): Adjust.
3175         (interpreter_completer): Adjust.
3176
3177 2017-10-19  Tom Tromey  <tom@tromey.com>
3178
3179         * break-catch-syscall.c (catch_syscall_completer): Use
3180         std::string, gdb::unique_xmalloc_ptr.
3181
3182 2017-10-19  Tom Tromey  <tom@tromey.com>
3183
3184         * infcall.c (call_function_by_hand_dummy): Use std::string.
3185
3186 2017-10-19  Tom Tromey  <tom@tromey.com>
3187
3188         * mi/mi-main.c (mi_cmd_execute): Update.
3189         * top.h (prepare_execute_command): Return scoped_value_mark.
3190         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3191         Add move constructor.
3192         * top.c (prepare_execute_command): Return scoped_value_mark.
3193         (execute_command): Update.
3194
3195 2017-10-19  Pedro Alves  <palves@redhat.com>
3196
3197         * xml-support.c (xml_fetch_content_from_file): Check fread's
3198         return.
3199
3200 2017-10-19  Pedro Alves  <palves@redhat.com>
3201
3202         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3203         async.
3204         (handle_error_fd): New function.
3205         (ser_base_async): Add/delete an event loop file handler for
3206         error_fd.
3207
3208 2017-10-19  Pedro Alves  <palves@redhat.com>
3209
3210         * xml-support.c (xml_fetch_content_from_file): Don't read in
3211         chunks.  Instead use fseek to determine the file's size, and read
3212         it in one go.
3213
3214 2017-11-18  Keith Seitz  <keiths@redhat.com>
3215
3216         * c-exp.y (oper): Canonicalize conversion operators of user-defined
3217         types.
3218         Add whitespace to front of type name.
3219
3220 2017-10-18  Keith Seitz  <keiths@redhat.com>
3221
3222         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3223         DW_AT_accessibility.
3224
3225 2017-10-18  Yao Qi  <yao.qi@linaro.org>
3226
3227         * features/tic6x-c62x-linux.c: Remove.
3228
3229 2017-10-17  Tom Tromey  <tom@tromey.com>
3230
3231         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3232         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3233         (do_mixed_source_and_assembly): Likewise.
3234
3235 2017-10-17  Tom Tromey  <tom@tromey.com>
3236
3237         * regcache.c (regcache::xfer_part): Remove assertion.
3238
3239 2017-10-17  Pedro Alves  <palves@redhat.com>
3240
3241         * xml-support.c (xml_fetch_content_from_file): Call
3242         unique_ptr::release() instead unique_ptr::get() when passing
3243         through xrealloc.
3244
3245 2017-10-17  Yao Qi  <yao.qi@linaro.org>
3246
3247         * regcache.c (regcache::xfer_part): Remove parameters read and
3248         write, add parameter is_raw.  All callers are updated.
3249
3250 2017-10-16  Keith Seitz  <keiths@redhat.com>
3251
3252         * c-typeprint.c (enum access_specifier): Moved here from
3253         c_type_print_base.
3254         (output_access_specifier): New function.
3255         (c_type_print_base): Consider typedefs when assessing
3256         whether access labels are needed.
3257         Use output_access_specifier as needed.
3258         Output access specifier for typedefs, if needed.
3259         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3260         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3261         fields.
3262         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3263         accessor macros.
3264
3265 2017-10-16  Tom Tromey  <tom@tromey.com>
3266
3267         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3268         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3269         * target.c (target_fileio_read_stralloc): Update.
3270         * sparc64-tdep.c (adi_is_addr_mapped): Update.
3271         * target.h (target_fileio_read_stralloc): Return
3272         unique_xmalloc_ptr.
3273
3274 2017-10-16  Tom Tromey  <tom@tromey.com>
3275
3276         * xml-syscall.c (xml_init_syscalls_info): Update.
3277         * xml-support.c (xinclude_start_include): Update.
3278         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3279         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3280         (xml_fetch_content_from_file): Likewise.
3281         * osdata.c (get_osdata): Update.
3282         * target.h (target_read_stralloc, target_get_osdata): Return
3283         unique_xmalloc_ptr.
3284         * solib-aix.c (solib_aix_get_library_list): Update.
3285         * solib-target.c (solib_target_current_sos): Update.
3286         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3287         * xml-tdesc.c (fetch_available_features_from_target): Update.
3288         (target_fetch_description_xml): Update.
3289         (file_read_description_xml): Update.
3290         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3291         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3292         (remote_pid_to_exec_file): Update.
3293         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3294         (target_get_osdata): Likewise.
3295
3296 2017-10-16  Tom Tromey  <tom@tromey.com>
3297
3298         * remote.c (remote_register_number_and_offset): Use std::vector.
3299         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3300         (putpkt_binary): Use gdb::def_vector.
3301         (compare_sections_command): Use gdb::byte_vector.
3302
3303 2017-10-16  Tom Tromey  <tom@tromey.com>
3304
3305         * ppc-linux-nat.c (hwdebug_insert_point): Use
3306         gdb::unique_xmalloc_ptr, XDUP.
3307
3308 2017-10-16  Tom Tromey  <tom@tromey.com>
3309
3310         * probe.c (parse_probes): Use std::string.
3311         (info_probes_for_ops, enable_probes_command)
3312         (disable_probes_command): Remove cleanups.
3313
3314 2017-10-16  Tom Tromey  <tom@tromey.com>
3315
3316         * buildsym.c (block_compar): Remove.
3317         (end_symtab_get_static_block): Use std::vector.
3318
3319 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3320
3321         * memrange.h (struct mem_range): Define operator< and operator==.
3322         (mem_range_s): Remove.
3323         (DEF_VEC_O (mem_range_s)): Remove.
3324         (normalize_mem_ranges): Change parameter type to std::vector.
3325         * memrange.c (compare_mem_ranges): Remove.
3326         (normalize_mem_ranges): Change parameter type to std::vector,
3327         adjust to vector change.
3328         * exec.c (section_table_available_memory): Return vector, remove
3329         parameter.
3330         (section_table_read_available_memory): Adjust to std::vector
3331         change.
3332         * remote.c (remote_read_bytes): Adjust to std::vector
3333         change.
3334         * tracepoint.h (traceframe_available_memory): Change parameter
3335         type to std::vector.
3336         * tracepoint.c (traceframe_available_memory): Change parameter
3337         type to std::vector, adjust.
3338         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3339         std::vector change.
3340         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3341         unittests/memrange-selftests.c.
3342         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3343         * gdb/unittests/memrange-selftests.c: New file.
3344
3345 2017-10-16  Pedro Alves  <palves@redhat.com>
3346
3347         * elfread.c (probe_key_free): Rename range-for variable.
3348         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3349         (find_probe_by_pc, collect_probes): Rename range-for variable.
3350
3351 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3352
3353         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3354         * features/tic6x-c62x.c: Remove.
3355         * features/tic6x-c64x-linux.c: Remove.
3356         * features/tic6x-c64x.c: Remove.
3357         * features/tic6x-c64xp-linux.c: Remove.
3358         * features/tic6x-c64xp.c: Remove.
3359         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3360         initialize_tdesc_tic6x_*_linux functions.
3361         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3362         initialize_tdesc_tic6x_* functions.
3363
3364 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3365
3366         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3367         tic6x-c62x.
3368         * regformats/tic6x-c62x.dat: Remove.
3369         * regformats/tic6x-c64x.dat: Remove.
3370         * regformats/tic6x-c64xp.dat: Remove.
3371
3372 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3373
3374         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3375         (the !HAVE_LIBEXPAT version).
3376
3377 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3378
3379         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3380         const.
3381
3382 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3383
3384         * target.h: Include tracepoint.h.
3385         (enum trace_find_type): Move to tracepoint.h.
3386         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3387         * tracepoint.h: Don't include target.h
3388         (enum trace_find_type): Move from target.h.
3389         (parse_traceframe_info): Return a unique ptr.
3390         * tracepoint.c (current_traceframe_info): Change type to unique
3391         ptr.
3392         (free_traceframe_info): Remove.
3393         (clear_traceframe_info): Don't manually free
3394         current_traceframe_info.
3395         (free_result): Remove.
3396         (parse_traceframe_info): Return a unique ptr.
3397         (get_traceframe_info): Adjust to unique ptr.
3398         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3399         * remote.c (remote_traceframe_info): Return a unique ptr.
3400         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3401         ptr.
3402         * target-debug.h (target_debug_print_traceframe_info_up): New
3403         macro.
3404         * target-delegates.c: Regenerate.
3405
3406 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3407
3408         * memrange.h (struct mem_range): Add constructors.
3409         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3410         std::vector<mem_range>.
3411         * tracepoint.c (free_traceframe_info): Don't manually free
3412         vector.
3413         (traceframe_info_start_memory): Adjust to vector change.
3414         (traceframe_available_memory): Likewise.
3415         * tracefile-tfile.c (build_traceframe_info): Likewise.
3416         * ctf.c (ctf_traceframe_info): Likewise.
3417
3418 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3419
3420         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3421         std::vector<int>.
3422         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3423         (traceframe_info_start_tvar): Adjust to vector change.
3424         (parse_traceframe_info): Allocate with new.
3425         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3426         vector change.
3427         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3428         change.
3429         tfile_traceframe_info): Allocate with new.
3430         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3431         change.
3432
3433 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3434
3435         * tracepoint.c (traceframe_info): Rename to...
3436         (current_traceframe_info): ...this.
3437         (clear_traceframe_info): Adjust.
3438         (get_traceframe_info): Adjust.
3439
3440 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * nat/linux-osdata.c: Include algorithm.
3443         (compare_processes): Remove.
3444         (struct pid_pgid_entry): New struct.
3445         (linux_xfer_osdata_processgroups): Use std::vector instead of
3446         XNEWVEC.
3447
3448 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3449
3450         * objfiles.h: Don't include symfile.h.
3451         (struct partial_symbol): Remove forward-declaration.
3452         (struct objfile) <global_psymbols, static_psymbols>: Change type
3453         to std::vector<partial_symbol *>.
3454         * objfiles.c (objfile::objfile): Don't memset those fields.
3455         (objfile::~objfile): Don't free those fields.
3456         * psympriv.h (struct psymbol_allocation_list): Remove
3457         forward-declaration.
3458         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3459         to std::vector.
3460         (start_psymtab_common): Change parameters to std::vector.
3461         * psymtab.c: Include algorithm.
3462         (require_partial_symbols): Call shrink_to_fit.
3463         (find_pc_sect_psymbol): Adjust to vector change.
3464         (match_partial_symbol): Likewise.
3465         (lookup_partial_symbol): Likewise.
3466         (psym_relocate): Likewise.
3467         (dump_psymtab): Likewise.
3468         (recursively_search_psymtabs): Likewise.
3469         (compare_psymbols): Remove.
3470         (sort_pst_symbols): Adjust to vector change.
3471         (start_psymtab_common): Likewise.
3472         (end_psymtab_common): Likewise.
3473         (psymbol_bcache_full): De-constify return value.
3474         (add_psymbol_to_bcache): Likewise.
3475         (extend_psymbol_list): Remove.
3476         (append_psymbol_to_list): Adjust to vector change.
3477         (add_psymbol_to_list): Likewise.
3478         (init_psymbol_list): Likewise.
3479         (maintenance_info_psymtabs): Likewise.
3480         (maintenance_check_psymtabs): Likewise.
3481         * symfile.h (struct psymbol_allocation_list): Remove.
3482         * symfile.c (reread_symbols): Adjust to vector change.
3483         * dbxread.c (start_psymtab): Change type of parameters.
3484         (dbx_symfile_read): Adjust to vector change.
3485         (read_dbx_symtab): Likewise.
3486         (start_psymtab): Change type of parameters.
3487         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3488         (create_partial_symtab): Likewise.
3489         (add_partial_symbol): Likewise.
3490         (write_one_signatured_type): Likewise.
3491         (recursively_write_psymbols): Likewise.
3492         * mdebugread.c (parse_partial_symbols): Likewise.
3493         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3494         (scan_xcoff_symtab): Adjust to vector change.
3495         (xcoff_initial_scan): Likewise.
3496
3497 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3498
3499         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3500
3501 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3502
3503         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3504         Remove s390x-*-expedite, add s390x-expedite.
3505
3506 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3507
3508         * features/s390-gs-linux64.c: Regenerated.
3509         * features/s390x-gs-linux64.c: Regenerated.
3510
3511 2017-10-13  Tom Tromey  <tom@tromey.com>
3512
3513         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3514         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3515         delete.
3516         * symfile.c (symbol_file_add_with_addrs): Use new.
3517         (symbol_file_add_separate): Update comment.
3518         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3519         * jit.c (jit_object_close_impl): Use new.
3520         (jit_unregister_code): Use delete.
3521         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3522         (~objfile): Rename from free_objfile.
3523         (free_objfile_separate_debug, do_free_objfile_cleanup)
3524         (free_all_objfiles, objfile_purge_solibs): Use delete.
3525         * objfiles.h (struct objfile): Add constructor and destructor.
3526         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3527         (allocate_objfile, free_objfile): Don't declare.
3528         (struct objstats): Add initializers.
3529
3530 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3531
3532         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3533         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3534         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3535         * gdbarch.h: Regenerate.
3536         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3537         Adjust comment.
3538         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3539         (i386_displaced_step_fixup): Adjust comment.
3540         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3541
3542 2017-10-12  Tom Tromey  <tom@tromey.com>
3543
3544         * prologue-value.h (pv_area::store_would_trash): Return bool.
3545         (pv_area::find_reg): Likewise.
3546         * prologue-value.c (pv_area::store_would_trash): Return bool.
3547         (pv_area::find_reg): Likewise.
3548
3549 2017-10-12  Tom Tromey  <tom@tromey.com>
3550
3551         * s390-linux-tdep.c (s390_store, s390_load)
3552         (s390_check_for_saved, s390_analyze_prologue): Update.
3553         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3554         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3555         * prologue-value.h (class pv_area): Move from prologue-value.c.
3556         Change names of members.  Add constructor, destructor, member
3557         functions.
3558         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3559         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3560         (pv_area_fetch, pv_area_scan): Don't declare.
3561         * prologue-value.c (struct pv_area::area_entry): Now member of
3562         pv_area.
3563         (struct pv_area): Move to prologue-value.h.
3564         (pv_area::pv_area): Rename from make_pv_area.
3565         (pv_area::~pv_area): Rename from free_pv_area.
3566         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3567         (clear_entries, find_entry, overlaps, store_would_trash, store)
3568         (fetch, find_reg, scan): Now member of pv_area.
3569         Remove "area" argument.  Update.
3570         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3571         Update.
3572         * mn10300-tdep.c (push_reg, check_for_saved)
3573         (mn10300_analyze_prologue): Update.
3574         * mep-tdep.c (is_arg_spill, check_for_saved)
3575         (mep_analyze_prologue): Update.
3576         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3577         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3578         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3579         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3580         Update.
3581         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3582         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3583
3584 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3585
3586         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3587         * linux-nat.c (linux_nat_delete_thread): New variable.
3588         (lwp_free): Invoke linux_nat_delete_thread if set.
3589         (linux_nat_set_delete_thread): New function.
3590         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3591         thread delete callback.
3592         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3593         (_initialize_arm_linux_nat): Assign thread delete callback.
3594         * s390-linux-nat.c (s390_delete_thread): New function.
3595         (_initialize_s390_nat): Assign thread delete callback.
3596         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3597         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3598         function.
3599         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3600         declaration.
3601         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3602         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3603
3604 2017-10-09  Tom Tromey  <tom@tromey.com>
3605
3606         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3607         std::string.
3608         * tui/tui-layout.c (enum tui_status): Use std::string.
3609
3610 2017-10-11  Tom Tromey  <tom@tromey.com>
3611
3612         * gdbthread.h (thread_command): Constify.
3613         * inferior.h (detach_command): Constify.
3614         * top.h (set_history, show_history): Constify.
3615         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3616         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3617         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3618         * printcmd.c (set_command): Constify.
3619         (non_const_set_command): New function.
3620         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3621         * breakpoint.c (enable_command, disable_command, delete_command)
3622         (catch_command, tcatch_command, set_breakpoint_cmd)
3623         (show_breakpoint_cmd): Constify.
3624         * macrocmd.c (macro_command): Constify.
3625         * infcmd.c (unset_command, kill_command, detach_command)
3626         (info_proc_cmd): Constify.
3627         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3628         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3629         (info_auto_load_cmd): Constify.
3630         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3631         (unset_tdesc_cmd): Constify.
3632         * ada-lang.c (set_ada_command, show_ada_command)
3633         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3634         * guile/guile.c (set_guile_command, show_guile_command)
3635         (info_guile_command): Constify.
3636         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3637         Constify.
3638         * skip.c (skip_command): Constify.
3639         * compile/compile.c (_initialize_compile): Constify.
3640         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3641         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3642         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3643         (maint_btrace_pt_show_cmd): Constify.
3644         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3645         Constify.
3646         * python/python.c (user_show_python, user_set_python): Constify.
3647         * mips-tdep.c (set_mips_command, show_mips_command)
3648         (set_mipsfpu_command): Constify.
3649         * record-btrace.c (cmd_record_btrace_start)
3650         (cmd_set_record_btrace, cmd_show_record_btrace)
3651         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3652         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3653         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3654         Constify.
3655         * symfile.c (overlay_command): Constify.
3656         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3657         * cli/cli-logging.c (set_logging_command, show_logging_command):
3658         Constify.
3659         * cli/cli-dump.c (dump_command, append_command)
3660         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3661         (tekhex_dump_command, binary_dump_command)
3662         (binary_append_command): Constify.
3663         * cli/cli-decode.c (struct cmd_list_element): Change type of
3664         "fun".
3665         * cli/cli-cmds.c (info_command, show_command, set_debug)
3666         (show_debug): Constify.
3667         (show_command): Add non-const overload.
3668         * top.c (set_history, show_history): Constify.
3669         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3670         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3671         * target.c (target_command): Constify.
3672         * sparc64-tdep.c (info_adi_command): Constify.
3673         * record-full.c (cmd_record_full_start): Constify.
3674         (set_record_full_command): Constify.  Fix typo.
3675         (show_record_full_command): Constify.
3676         * thread.c (thread_command, thread_apply_command): Constify.
3677         * memattr.c (dummy_cmd): Constify.
3678         * value.c (function_command): Constify.
3679         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3680         * probe.c (info_probes_command): Constify.
3681         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3682         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3683         (show_thread_cmd, set_thread_default_cmd)
3684         (show_thread_default_cmd): Constify.
3685         (check_empty): Constify.
3686         * tracepoint.c (tfind_command): Constify.
3687         * cp-support.c (maint_cplus_command): Constify.
3688         * windows-tdep.c (info_w32_command): Constify.
3689         * record.c (cmd_record_start, set_record_command)
3690         (show_record_command, info_record_command, cmd_record_goto):
3691         Constify.
3692         * ravenscar-thread.c (set_ravenscar_command)
3693         (show_ravenscar_command): Constify.
3694         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3695         Constify.
3696         (add_internal_problem_command): Remove casts.
3697         * arc-tdep.c (maintenance_print_arc_command): Constify.
3698         * valprint.c (set_print, show_print, set_print_raw)
3699         (show_print_raw): Constify.
3700         * maint.c (maintenance_command, maintenance_info_command)
3701         (maintenance_print_command, maintenance_set_cmd)
3702         (maintenance_show_cmd, set_per_command_cmd)
3703         (show_per_command_cmd, maintenance_check_command): Constify.
3704         * language.c (set_check, show_check): Constify.
3705         * typeprint.c (show_print_type, set_print_type): Constify.
3706         * go32-nat.c (go32_info_dos_command): Constify.
3707
3708 2017-10-11  Tom Tromey  <tom@tromey.com>
3709
3710         * breakpoint.c (prepare_re_set_context): Remove.
3711         (breakpoint_re_set_one): Update.  Don't use cleanups.
3712         (breakpoint_re_set): Use scoped_restore, std::string, and
3713         scoped_restore_current_language.
3714
3715 2017-10-11  Tom Tromey  <tom@tromey.com>
3716
3717         * breakpoint.c (commands_command_1): Use std::string.
3718         (cleanup_executing_breakpoints): Remove.
3719         (bpstat_do_actions_1): Use scoped_restore.
3720         (bpstat_check_watchpoint): Use std::string.
3721         (decode_static_tracepoint_spec): Likewise.
3722         (break_range_command): Likewise.
3723         (watch_command_1): Likewise.
3724         (compare_breakpoints): Change argument types.
3725         (clear_command): Use std::vector.
3726         (cleanup_executing_breakpoints): Remove.
3727         (update_global_location_list): Use unique_xmalloc_ptr.
3728         (strace_command): Remove unused declaration.
3729
3730 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3731
3732         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3733         * NEWS: Mention new FreeBSD/arm native configuration.
3734         * configure.host: Add arm*-*-freebsd*.
3735         * configure.nat: Likewise.
3736         * arm-fbsd-nat.c: New file.
3737
3738 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3739
3740         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3741         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3742         * NEWS: Mention new FreeBSD/arm target.
3743         * configure.tgt: Add arm*-*-freebsd*.
3744         * arm-fbsd-tdep.c: New file.
3745         * arm-fbsd-tdep.h: New file.
3746
3747 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3748
3749         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3750         `gdbarch_elfcore_write_linux_prpsinfo'.
3751         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3752         method.
3753         (elf_internal_linux_prpsinfo): Remove declaration.
3754         * gdbarch.h: Regenerate.
3755         * gdbarch.c: Regenerate.
3756
3757 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3758
3759         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3760         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3761
3762 2017-10-11  Pedro Alves  <palves@redhat.com>
3763
3764         * breakpoint.c (reattach_breakpoints): Delete.
3765         * breakpoint.h (reattach_breakpoints): Delete.
3766
3767 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3768
3769         * symfile.c (registered_sym_fns): Make struct, not typedef.
3770         (DEF_VEC_O (registered_sym_fns)): Remove.
3771         (symtab_fns): Change type to std::vector.
3772         (add_symtab_fns): Adjust.
3773         (find_sym_fns): Adjust.
3774
3775 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3776
3777         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3778         * arc-tdep.h (arc_arch_is_em): New function.
3779         (arc_arch_is_hs): Likewise.
3780
3781 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3782
3783         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3784         parentheses in the declaration.
3785         (macro_lookup_inclusion): Likewise.
3786         (macro_lookup_definition): Likewise.
3787         * p-lang.h (pascal_builtin_types): Likewise.
3788         * tui/tui-data.c (tui_win_list): Likewise.
3789         * tui/tui-data.h (tui_win_list): Likewise.
3790         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3791
3792 2017-10-11  Mark Rages  <markrages@gmail.com>
3793
3794         * target-memory.c (block_boundaries): Fix for block address not
3795         aligned on block size.
3796
3797 2017-10-10  Pedro Alves <palves@redhat.com>
3798             Tom Tromey  <tom@tromey.com>
3799
3800         * breakpoint.c (struct captured_breakpoint_query_args)
3801         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3802         (print_breakpoint): New.
3803         * breakpoint.h (print_breakpoint): Declare.
3804         * common/common-exceptions.h (enum return_reason): Remove
3805         references to catch_exceptions.
3806         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3807         Delete.
3808         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3809         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3810         * gdb.h: Delete.
3811         * gdbthread.h (thread_select): Declare.
3812         * mi/mi-cmd-break.c: Don't include gdb.h.
3813         (breakpoint_notify): Use print_breakpoint.
3814         * mi/mi-cmd-catch.c: Don't include gdb.h.
3815         * mi/mi-interp.c: Don't include gdb.h.
3816         (mi_print_breakpoint_for_event): New.
3817         (mi_breakpoint_created, mi_breakpoint_modified): Use
3818         mi_print_breakpoint_for_event.
3819         * mi/mi-main.c: Don't include gdb.h.
3820         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3821         thread_select instead of gdb_thread_select.
3822         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3823         of using gdb_list_thread_ids.
3824         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3825         FILEIO_ENOSYS here.
3826         (remote_fileio_request): Use TRY/CATCH instead of
3827         catch_exceptions.
3828         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3829         (symbol_file_add_from_memory_wrapper): Delete.
3830         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3831         * thread.c: Don't include gdb.h.
3832         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3833         (thread_alive): Use thread_select.
3834         (do_captured_thread_select): Delete, parts salvaged as ...
3835         (thread_select): ... this new function.
3836         (gdb_thread_select): Delete.
3837
3838 2017-10-10  Pedro Alves  <palves@redhat.com>
3839             Tom Tromey  <tom@tromey.com>
3840
3841         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3842         and reverse logic.
3843         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3844         No longer macros.  Instead ...
3845         (enum wp_check_result): They're now values of this new
3846         enumeration.
3847         (watchpoint_check): Change return type to wp_check_result and
3848         parameter type to bpstat.
3849         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3850         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3851         catch_errors.  Reverse logic of watchpoint_check call.
3852         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3853         pointer as parameter.
3854         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3855         * common/common-exceptions.c (throw_exception_sjlj): Update
3856         comments to avoid mentioning catch_errors.
3857         * exceptions.c (catch_errors): Delete.
3858         * exceptions.h: Update comments to avoid mentioning catch_errors.
3859         (catch_errors_ftype, catch_errors): Delete.
3860         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3861         (hook_stop_stub): Delete.
3862         (restore_selected_frame): Change return type to void, and
3863         parameter type to const frame_id &.
3864         (restore_infcall_control_state): Use TRY/CATCH instead of
3865         catch_errors.
3866         * main.c (captured_command_loop): Return void and remove
3867         parameter.  Remove references to catch_errors.
3868         (captured_main): Use TRY/CATCH instead of catch_errors.
3869         * objc-lang.c (objc_submethod_helper_data)
3870         (find_objc_msgcall_submethod_helper): Delete.
3871         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3872         catch_errors.
3873         * record-full.c (record_full_message): Return void.
3874         (record_full_message_args, record_full_message_wrapper): Delete.
3875         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3876         instead of catch_errors.
3877         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3878         parameter type to int.
3879         * solib-darwin.c (open_symbol_file_object): Ditto.
3880         * solib-dsbt.c (open_symbol_file_object): Ditto.
3881         * solib-frv.c (open_symbol_file_object): Ditto.
3882         * solib-svr4.c (open_symbol_file_object): Ditto.
3883         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3884         * solib.c (update_solib_list): Use TRY/CATCH instead of
3885         catch_errors.
3886         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3887         Change type.
3888         * symmisc.c (struct print_symbol_args): Remove.
3889         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3890         (print_symbol): Change type.
3891         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3892         and remove parameters.
3893         (catch_errors): New.
3894         (get_windows_debug_event): Adjust.
3895
3896 2017-10-09  Tom Tromey  <tom@tromey.com>
3897
3898         * mi/mi-main.c (free_splay_tree): Remove.
3899         (list_available_thread_groups): Use splay_tree_up.
3900         * common/gdb_splay_tree.h: New file.
3901
3902 2017-10-09  Tom Tromey  <tom@tromey.com>
3903
3904         * mi/mi-main.c (do_nothing): Remove.
3905         (list_available_thread_groups): Update.
3906
3907 2017-10-09  Pedro Alves  <palves@redhat.com>
3908
3909         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3910         reading registers when switching context.
3911
3912 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3913
3914         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3915         (fbsd_convert_siginfo): Likewise.
3916         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3917
3918 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3919
3920         * configure.ac (try_guile_versions): Remove guile-2.2.
3921         * configure: Regenerate.
3922
3923 2017-10-09  Tom Tromey  <tom@tromey.com>
3924
3925         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3926         (COMPILE.pre): Use $(CXX).
3927
3928 2017-10-09  Pedro Alves  <palves@redhat.com>
3929
3930         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3931         Use bool.
3932         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3933         * cp-support.h (cp_remove_params): Now returns a
3934         gdb::unique_xmalloc_ptr.
3935         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3936         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3937         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3938         returning a gdb::unique_xmalloc_ptr.
3939         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3940         * stack.c (find_frame_funname): Adjust to cp_remove_params
3941         returning a gdb::unique_xmalloc_ptr.
3942
3943 2017-10-08  Tom Tromey  <tom@tromey.com>
3944
3945         * dwarf2read.c (dwarf2_get_dwz_file): Use
3946         gdb::unique_xmalloc_ptr.
3947         (find_slot_in_mapped_hash): Likewise.
3948         (dwarf2_physname): Likewise.
3949         (create_dwo_unit_in_dwp_v1): Use std::string.
3950         (create_dwo_unit_in_dwp_v2): Likewise.
3951         (lookup_dwo_cutu): Likewise.
3952         (inherit_abstract_dies): Use std::vector.
3953         (read_array_type): Likewise.
3954         (dwarf_decode_macros): Remove unused declaration.
3955         (unsigned_int_compar): Remove.
3956         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3957         (psymtabs_addrmap_cleanup): Remove.
3958
3959 2017-10-08  Tom Tromey  <tom@tromey.com>
3960
3961         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3962         * frame.h (frame_cleanup_after_sniffer): Declare.
3963         (frame_prepare_for_sniffer): Return void.
3964         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3965         type of argument.
3966         (frame_prepare_for_sniffer): Return void.
3967
3968 2017-10-08  Tom Tromey  <tom@tromey.com>
3969
3970         * utils.h (make_cleanup_value_free): Remove.
3971         * utils.c (do_value_free, struct cleanup): Remove.
3972         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3973         Use gdb_value_up.
3974         * value.h (struct value_deleter): New.
3975         (gdb_value_up): New typedef.
3976
3977 2017-10-08  Tom Tromey  <tom@tromey.com>
3978
3979         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3980         (make_cleanup_free_search_symbols): Remove.
3981         (search_symbols): Return std::vector.
3982         (symbol_search::compare_search_syms): Now member of
3983         symbol_search.  Change arguments.
3984         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3985         (symtab_symbol_info, rbreak_command): Update.
3986         * symtab.h (struct symbol_search) <next>: Remove.
3987         Add constructors.
3988         (symbol_search::operator<): New function.
3989         (symbol_search::operator==): New function.
3990         (search_symbols): Remove std::vector.
3991         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3992         (symbol_search::compare_search_syms): Declare.
3993
3994 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3995
3996         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3997         arch/aarch64-insn.o.
3998         Remove one rule.
3999         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4000
4001 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4002
4003         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4004         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4005         arch/arm-linux.o respectively.
4006         * configure.tgt: Likewise.
4007
4008 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4009
4010         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4011         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4012
4013 2017-10-06  Pedro Alves  <palves@redhat.com>
4014
4015         * windows-nat.c: Include <algorithm>.
4016
4017 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4018
4019         * configure.tgt (i386_tobjs): New variable.
4020         (amd64_tobjs): New variable.
4021         Set $cpu_obs and $os_obs.
4022
4023 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4024
4025         * Makefile.in (CONFIG_SRC_SUBDIR): New.
4026         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4027         (clean): Remove object files and dependency files.
4028         (distclean): Remove the directory.
4029         * configure.ac: Invoke AC_CONFIG_COMMANDS.
4030         * configure: Re-generated.
4031         * configure.tgt: Replace amd64.o with arch/amd64.o.
4032
4033 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
4034
4035         PR build/22188
4036         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4037         and SETEND.
4038
4039 2017-10-05  Pedro Alves  <palves@redhat.com>
4040
4041         * linux-nat.c (linux_child_follow_fork): When following the parent
4042         and detaching the child, consult the parent thread's architecture
4043         instead of the child's.
4044
4045 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4046
4047         * ax.h: Do not include "doublest.h".
4048         (union agent_val): Remove.
4049
4050 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4051
4052         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4053         (decimal_to_string): Return std::string object.
4054         (decimal_from_string): Accept std::string object.  Return bool.
4055         (decimal_from_integral, decimal_from_doublest): Remove.
4056         (decimal_from_longest): Add prototype.
4057         (decimal_from_ulongest): Likewise.
4058         (decimal_to_longest): Likewise.
4059         (decimal_from_doublest): Likewise.
4060         * dfp.c: Do not include "gdbtypes.h" or "value.h".
4061         (MAX_DECIMAL_STRING): Move here.
4062         (decimal_to_string): Return std::string object.
4063         (decimal_from_string): Accept std::string object.  Return bool.
4064         (decimal_from_integral): Remove, replace by ...
4065         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4066         (decimal_to_longest): New function.
4067         (decimal_from_floating): Remove, replace by ...
4068         (decimal_from_doublest): ... this new function.
4069         (decimal_to_doublest): Update to new decimal_to_string interface.
4070
4071         * value.c (unpack_long): Use decimal_to_longest.
4072         * valops.c (value_cast): Use decimal_from_doublest instead of
4073         decimal_from_floating.  Use decimal_from_[u]longest isntead of
4074         decimal_from_integral.
4075         * valarith.c (value_args_as_decimal): Likewise.
4076         * valprint.c (print_decimal_floating): Update to new
4077         decimal_to_string interface.
4078         * printcmd.c (printf_decfloat): Likewise.
4079         * c-exp.y (parse_number): Update to new decimal_from_string interface.
4080
4081 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4082
4083         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
4084         * gdbtypes.c: Include "floatformat.h".
4085         * value.c: Likewise.
4086         * m68k-tdep.c: Likewise.
4087
4088         * findvar.c: Do not include "floatformat.h".
4089         * amd64-darwin-tdep.c: Likewise.
4090         * arm-linux-tdep.c: Likewise.
4091         * i386-darwin-tdep.c: Likewise.
4092         * i387-tdep.c: Likewise.
4093         * m68k-linux-tdep.c: Likewise.
4094         * mep-tdep.c: Likewise.
4095         * mips-tdep.c: Likewise.
4096         * nios2-tdep.c: Likewise.
4097         * s390-linux-tdep.c: Likewise.
4098         * sparc-obsd-tdep.c: Likewise.
4099         * sparc-tdep.c: Likewise.
4100         * sparc64-tdep.c: Likewise.
4101         * spu-tdep.c: Likewise.
4102         * tic6x-tdep.c: Likewise.
4103         * tilegx-tdep.c: Likewise.
4104         * vax-tdep.c: Likewise.
4105         * xstormy16-tdep.c: Likewise.
4106         * xtensa-tdep.c: Likewise.
4107
4108         * top.c: Do not include "doublest.h".
4109         * aarch64-tdep.c: Likewise.
4110         * alpha-tdep.c: Likewise.
4111         * arm-linux-tdep.c: Likewise.
4112         * m68k-linux-tdep.c: Likewise.
4113         * tilegx-tdep.c: Likewise.
4114         * xstormy16-tdep.c: Likewise.
4115
4116 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
4117
4118         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4119         (mipsn32_fbsd_sigframe): Define.
4120         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4121         for FreeBSD/mipsn32.
4122
4123 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
4124
4125         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4126         AT_HWCAP.
4127
4128 2017-10-05  Tristan Gingold  <tgingold@free.fr>
4129
4130         * MAINTAINERS (Misc): Update my email address.
4131
4132 2017-10-04  Pedro Alves  <palves@redhat.com>
4133
4134         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
4135         it instead of target_gdbarch.
4136         (get_remote_state, get_remote_packet_size): Adjust
4137         get_remote_arch_state calls, passing down target_gdbarch
4138         explicitly.
4139         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4140         'gdbarch' and use it instead of target_gdbarch.
4141         (get_memory_packet_size): Adjust get_remote_arch_state calls,
4142         passing down target_gdbarch explicitly.
4143         (struct stop_reply) <arch>: New field.
4144         (remote_parse_stop_reply): Use the stopped thread's architecture,
4145         not the current inferior's.  Save the architecture in the
4146         stop_reply.
4147         (process_stop_reply): Use the stop reply's architecture.
4148         (process_g_packet, remote_fetch_registers)
4149         (remote_prepare_to_store, store_registers_using_G)
4150         (remote_store_registers): Adjust get_remote_arch_state calls,
4151         using the regcache's architecture.
4152         (remote_get_trace_status): Adjust get_remote_arch_state calls,
4153         passing down target_gdbarch explicitly.
4154         * spu-multiarch.c (spu_thread_architecture): Defer to the target
4155         beneath instead of calling target_gdbarch.
4156         * target.c (default_thread_architecture): Use the specified
4157         inferior's architecture, instead of the current inferior's
4158         architecture (via target_gdbarch).
4159
4160 2017-10-04  Pedro Alves  <palves@redhat.com>
4161
4162         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4163         case.
4164         (regcache_print): Handle !target_has_registers here instead.
4165
4166 2017-10-04  Pedro Alves  <palves@redhat.com>
4167
4168         * frame.c (create_test_frame): Delete.
4169         * frame.h (create_test_frame): Delete.
4170         * gdbarch-selftests.c: Include gdbthread.h and target.h.
4171         (class regcache_test): Delete.
4172         (test_target_has_registers, test_target_has_stack)
4173         (test_target_has_memory, test_target_prepare_to_store)
4174         (test_target_store_registers): New functions.
4175         (test_target_ops): New class.
4176         (register_to_value_test): Error out if there's already a
4177         process_stratum (or higher) target pushed.  Create a fuller mock
4178         environment, with mock target_ops, inferior, address space, thread
4179         and inferior_ptid.
4180         * progspace.c (struct address_space): Move to ...
4181         * progspace.h (struct address_space): ... here.
4182         * regcache.h (regcache::~regcache, regcache::raw_write)
4183         [GDB_SELF_TEST]: No longer virtual.
4184
4185 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
4186
4187         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4188
4189 2017-10-04  Pedro Alves  <palves@redhat.com>
4190
4191         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4192         out of 'between TRY and CATCH'.
4193
4194 2017-10-04  Pedro Alves  <palves@redhat.com>
4195
4196         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4197         * common/common-exceptions.h (TRY): Open an outermost scope.
4198         Expand intro comment.
4199         (CATCH): Reindent.
4200         (END_CATCH): Close the outermost scope.
4201         * completer.c (complete_line_internal): Add missing END_CATCH.
4202
4203 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4204
4205         * NEWS (Changes since GDB 8.0): Add entry about new
4206         'set-cwd-on-gdbserver' feature.
4207         (New remote packets): Add entry for QSetWorkingDir.
4208         * common/common-inferior.h (set_inferior_cwd): New prototype.
4209         * infcmd.c (set_inferior_cwd): Remove "static".
4210         (show_cwd_command): Expand text to include remote debugging.
4211         * remote.c: Add PACKET_QSetWorkingDir.
4212         (remote_protocol_features) <QSetWorkingDir>: New entry for
4213         PACKET_QSetWorkingDir.
4214         (extended_remote_set_inferior_cwd): New function.
4215         (extended_remote_create_inferior): Call
4216         "extended_remote_set_inferior_cwd".
4217         (_initialize_remote): Call "add_packet_config_cmd" for
4218         QSetWorkingDir.
4219
4220 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4221
4222         * NEWS (New commands): Mention "set/show cwd".
4223         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4224         "cd" command's help text.
4225         * common/common-inferior.h (get_inferior_cwd): New prototype.
4226         * infcmd.c (inferior_cwd_scratch): New global variable.
4227         (set_inferior_cwd): New function.
4228         (get_inferior_cwd): Likewise.
4229         (set_cwd_command): Likewise.
4230         (show_cwd_command): Likewise.
4231         (_initialize_infcmd): Add "set/show cwd" commands.
4232         * inferior.h (class inferior) <cwd>: New field.
4233         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4234         (fork_inferior): Change inferior's cwd before its execution.
4235         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4236         to CreateProcess.
4237
4238 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4239
4240         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4241         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4242         (COMMON_OBS): Add gdb_tilde_expand.o.
4243         * common/gdb_tilde_expand.c: New file.
4244         * common/gdb_tilde_expand.h: Likewise.
4245
4246 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
4247
4248         * gdbarch.sh (objfile): Remove duplicate declaration.
4249         * gdbarch.h: Regenerate.
4250
4251 2017-10-03  Tom Tromey  <tom@tromey.com>
4252
4253         * utils.c (internal_vproblem): Use string_vprintf.
4254
4255 2017-10-03  Tom Tromey  <tom@tromey.com>
4256
4257         * printcmd.c (info_symbol_command): Use std::string.
4258
4259 2017-10-03  Tom Tromey  <tom@tromey.com>
4260
4261         * top.c (gdb_safe_append_history): Use std::string.
4262
4263 2017-10-03  Tom Tromey  <tom@tromey.com>
4264
4265         * event-top.c (stdin_event_handler): Update.
4266         * main.c (captured_main_1): Update.
4267         * top.h (make_delete_ui_cleanup): Remove.
4268         (struct ui): Add constructor and destructor.
4269         (new_ui, delete_ui): Remove.
4270         * top.c (make_delete_ui_cleanup): Remove.
4271         (new_ui_command): Use std::unique_ptr.
4272         (delete_ui_cleanup): Remove.
4273         (ui::ui): Rename from new_ui.  Update.
4274         (free_ui): Remove.
4275         (ui::~ui): Rename from delete_ui.  Update.
4276
4277 2017-10-03  Tom Tromey  <tom@tromey.com>
4278
4279         * symfile.c (load_progress): Use gdb::byte_vector.
4280
4281 2017-10-03  Tom Tromey  <tom@tromey.com>
4282
4283         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4284         declaration.
4285         * printcmd.c (x_command): Remove unused declaration.
4286         * symfile.c (symbol_file_command): Remove unused declaration.
4287
4288 2017-10-03  Tom Tromey  <tom@tromey.com>
4289
4290         * utils.c (internal_vproblem): Use std::string.
4291         (defaulted_query): Likewise.
4292
4293 2017-10-03  Tom Tromey  <tom@tromey.com>
4294
4295         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4296         * top.c (execute_command_to_string): Update.
4297         * utils.c (make_cleanup_restore_page_info): Remove.
4298         (do_restore_page_info_cleanup): Remove.
4299         (set_batch_flag_and_restore_page_info):
4300         New.
4301         (make_cleanup_restore_page_info): Remove.
4302         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4303         (~set_batch_flag_and_restore_page_info): New
4304         (make_cleanup_restore_uinteger): Remove.
4305         (make_cleanup_restore_integer): Remove.
4306         (struct restore_integer_closure): Remove.
4307         (restore_integer): Remove.
4308         * utils.h (struct set_batch_flag_and_restore_page_info): New
4309         class.
4310         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4311         (make_cleanup_restore_page_info): Remove.
4312         (make_cleanup_restore_uinteger) Remove.
4313         (make_cleanup_restore_integer) Remove.
4314
4315 2017-10-03  Tom Tromey  <tom@tromey.com>
4316
4317         * record-full.h (record_full_gdb_operation_disable_set): Return
4318         scoped_restore_tmpl<int>.
4319         * infrun.c (adjust_pc_after_break): Update.
4320         (handle_signal_stop): Update.
4321         * record-full.c (record_full_gdb_operation_disable_set): Return
4322         scoped_restore_tmpl<int>.
4323         (record_full_wait_1, record_full_insert_breakpoint)
4324         (record_full_remove_breakpoint, record_full_save)
4325         (record_full_goto_insn): Update.
4326
4327 2017-10-02  Tom Tromey  <tom@tromey.com>
4328
4329         PR rust/22236:
4330         * rust-lang.c (rust_val_print_str): New function.
4331         (val_print_struct): Call it.
4332         (rust_subscript): Preserve name of slice type.
4333
4334 2017-10-02  Tom Tromey  <tom@tromey.com>
4335
4336         * rust-lang.c (rust_subscript): Handle slices in
4337         EVAL_AVOID_SIDE_EFFECTS case.
4338
4339 2017-10-02  Tom Tromey  <tom@tromey.com>
4340
4341         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4342
4343 2017-10-02  Tom Tromey  <tom@tromey.com>
4344
4345         * rust-lang.h (rust_slice_type): Add "extern".
4346
4347 2017-10-02  Tom Tromey  <tom@tromey.com>
4348             Pedro Alves  <palves@redhat.com>
4349
4350         * ada-lang.h (ada_exc_info::operator<): Make const.
4351         (ada_exc_info::operator==): Make const.
4352         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4353         Make const.
4354
4355 2017-09-29  Tom Tromey  <tom@tromey.com>
4356
4357         * target.c (read_whatever_is_readable): Change type of "result".
4358         Update.
4359         (free_memory_read_result_vector): Remove.
4360         (read_memory_robust): Change return type.  Update.
4361         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4362         bin2hex, std::string.
4363         * target.h (memory_read_result_s): Remove typedef.
4364         (free_memory_read_result_vector): Remove.
4365         (read_memory_robust): Return std::vector.
4366
4367 2017-09-29  Tom Tromey  <tom@tromey.com>
4368
4369         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4370
4371 2017-09-29  Tom Tromey  <tom@tromey.com>
4372
4373         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4374         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4375         operator< and operator==.
4376         (ada_exceptions_list): Return a std::vector.
4377         * ada-lang.c (ada_exc_info::operator<): Rename from
4378         compare_ada_exception_info.
4379         (ada_exc_info::operator==): New.
4380         (sort_remove_dups_ada_exceptions_list): Change type of
4381         "exceptions".
4382         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4383         (ada_add_global_exceptions): Likewise.
4384         (ada_exceptions_list_1): Return a std::vector.
4385         (ada_exceptions_list): Likewise.
4386
4387 2017-09-29  Tom Tromey  <tom@tromey.com>
4388
4389         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4390         'std::set *'.
4391         (print_one_inferior): Update.
4392         (free_vector_of_ints): Remove.
4393         (list_available_thread_groups): Change "ids" to std::set.
4394         (mi_cmd_list_thread_groups): Update.
4395         (struct collect_cores_data) <core>: Now a std::set.
4396         (collect_cores): Update.
4397         (unique): Remove.
4398         (print_one_inferior): Update.
4399
4400 2017-09-29  Tom Tromey  <tom@tromey.com>
4401
4402         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4403         (mi_execute_async_cli_command): Likewise.
4404         (mi_cmd_trace_frame_collected): Use field_fmt.
4405
4406 2017-09-29  Tom Tromey  <tom@tromey.com>
4407
4408         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4409         gdb::byte_vector.
4410
4411 2017-09-29  Tom Tromey  <tom@tromey.com>
4412
4413         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4414
4415 2017-09-29  Tom Tromey  <tom@tromey.com>
4416
4417         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4418
4419 2017-09-29  Tom Tromey  <tom@tromey.com>
4420
4421         * varobj.h (varobj_gen_name): Return std::string.
4422         * varobj.c (varobj_gen_name): Return std::string.
4423         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4424         (mi_cmd_var_delete): Don't copy "name".
4425
4426 2017-09-29  Tom Tromey  <tom@tromey.com>
4427
4428         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4429         (mi_cmd_break_insert_1): Update.
4430
4431 2017-09-29  Tom Tromey  <tom@tromey.com>
4432
4433         * target.h (make_scoped_defer_target_commit_resume): Update.
4434         * target.c (make_scoped_defer_target_commit_resume): Rename from
4435         make_cleanup_defer_target_commit_resume.  Return a
4436         scoped_restore.
4437         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4438
4439 2017-09-29  Tom Tromey  <tom@tromey.com>
4440
4441         * main.c (captured_main_1): Remove unused declaration.
4442         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4443
4444 2017-09-29  Tom Tromey  <tom@tromey.com>
4445
4446         * symtab.c (search_symbols): Remove unused outer cleanup.
4447         (make_source_files_completion_list): Remove unused declaration.
4448
4449 2017-09-29  Tom Tromey  <tom@tromey.com>
4450
4451         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4452
4453 2017-09-29  Tom Tromey  <tom@tromey.com>
4454
4455         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4456         gdb::byte_vector.
4457
4458 2017-09-29  Tom Tromey  <tom@tromey.com>
4459
4460         * complaints.c (vcomplaint): Use std::string.
4461
4462 2017-09-29  Tom Tromey  <tom@tromey.com>
4463
4464         * tracepoint.c (trace_variable_command): Use std::string.
4465         (encode_actions_1): Remove unused declarations.
4466         (create_tsv_from_upload): Use std::string.
4467
4468 2017-09-29  Tom Tromey  <tom@tromey.com>
4469
4470         * cp-support.c (gdb_demangle): Use std::string.
4471
4472 2017-09-29  Tom Tromey  <tom@tromey.com>
4473
4474         * stack.c (parse_frame_specification): Use std::string
4475         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4476
4477 2017-09-29  Tom Tromey  <tom@tromey.com>
4478
4479         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4480
4481 2017-09-29  Tom Tromey  <tom@tromey.com>
4482
4483         * utils.c (vfprintf_maybe_filtered): Use std::string.
4484         (vfprintf_unfiltered): Likewise.
4485
4486 2017-09-29  Tom Tromey  <tom@tromey.com>
4487
4488         * event-top.c (top_level_prompt): Return std::string.
4489         (display_gdb_prompt): Update.
4490
4491 2017-09-29  Tom Tromey  <tom@tromey.com>
4492
4493         * unittests/common-utils-selftests.c (format): New function.
4494         (string_vprintf_tests): New function.
4495         (_initialize_common_utils_selftests): Register new tests.
4496         * common/common-utils.c (string_vprintf): New function.
4497         * common/common-utils.h (string_vprintf): Declare.
4498
4499 2017-09-29  Pedro Alves  <palves@redhat.com>
4500
4501         * common/rsp-low.c (unpack_varlen_hex): Constify.
4502         * common/rsp-low.h (unpack_varlen_hex): Constify.
4503         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4504         Constify.
4505         * remote.c (remote_set_permissions, read_ptid)
4506         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4507         (remote_static_tracepoint_marker_at)
4508         (remote_static_tracepoint_markers_by_strid)
4509         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4510         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4511         (parse_tracepoint_definition, parse_tsv_definition)
4512         (parse_static_tracepoint_marker_definition): Constify.
4513         * tracepoint.h (parse_static_tracepoint_marker_definition)
4514         (parse_trace_status, parse_tracepoint_status)
4515         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4516
4517 2017-09-29  Pedro Alves  <palves@redhat.com>
4518
4519         * remote.c (target_buf, target_buf_size): Delete.
4520         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4521         Use the connection's packet buffer instead.
4522         All callers adjusted.
4523         (_initialize_remote): Remove references to target_buf and
4524         target_buf_size.
4525
4526 2017-09-28  Pedro Alves  <palves@redhat.com>
4527
4528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4529         unittests/common-utils-selftests.c.
4530         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4531         (COMMON_OBS): Remove utils-selftests.o.
4532         * utils-selftests.c: Move to ...
4533         * unittests/common-utils-selftests.c: ... here and rename self
4534         test to "string_printf".
4535
4536 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4537
4538         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4539         having NULL cus or tus.
4540
4541 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4542
4543         * arm-tdep.c: (convert_from_extended): Remove.
4544         (convert_to_extended): Likewise.
4545         (arm_extract_return_value): Use convert_typed_floating.
4546         (arm_store_return_value): Likewise.
4547
4548         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4549         * sh-tdep.c: Do not include "floatformat.h".
4550         (sh_littlebyte_bigword_type): New function.
4551         (sh_register_convert_to_virtual): Use convert_typed_floating.
4552         (sh_register_convert_to_raw): Likewise.
4553         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4554         (sh64_littlebyte_bigword_type): New function.
4555         (sh64_extract_return_value): Use convert_typed_floating.
4556         (sh64_register_convert_to_virtual): Likewise.
4557         (sh64_register_convert_to_raw): Likewise.
4558
4559 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4560
4561         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4562         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4563
4564         * gdbtypes.h (union type_specific): Make field floatformat hold
4565         just a single struct floatformat, not an array.
4566         (floatformat_from_type): Move here.
4567         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4568         changed TYPE_FLOATFORMAT definition.
4569         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4570         (recursive_dump_type): Likewise.
4571         (init_float_type): Install correct floatformat for byte order.
4572         (arch_float_type): Likewise.
4573
4574 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4575
4576         * gdbtypes.c (init_type): Change incoming argument from
4577         length-in-bytes to length-in-bits.  Assert length is a
4578         multiple of TARGET_CHAR_BITS.
4579         (arch_type, arch_flags_type): Likewise.
4580         (init_integer_type): Update call to init_type.
4581         (init_character_type): Likewise.
4582         (init_boolean_type): Likewise.
4583         (init_float_type): Likewise.
4584         (init_decfloat_type): Likewise.
4585         (init_complex_type): Likewise.
4586         (init_pointer_type): Likewise.
4587         (objfile_type): Likewise.
4588         (arch_integer_type): Update call to arch_type.
4589         (arch_character_type): Likewise.
4590         (arch_boolean_type): Likewise.
4591         (arch_float_type): Likewise.
4592         (arch_decfloat_type): Likewise.
4593         (arch_complex_type): Likewise.
4594         (arch_pointer_type): Likewise.
4595         (gdbtypes_post_init): Likewise.
4596
4597         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4598         (read_base_type): Likewise.
4599         * mdebugread.c (basic_type): Likewise.
4600         * stabsread.c (dbx_init_float_type): Likewise.
4601         (rs6000_builtin_type): Likewise.
4602         (read_range_type): Likewise.  Also, fix call to init_integer_type
4603         with erroneous length argument.
4604
4605         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4606         * d-lang.c (build_d_types): Likewise.
4607         * f-lang.c (build_fortran_types): Likewise.
4608         * go-lang.c (build_go_types): Likewise.
4609         * opencl-lang.c (build_opencl_types): Likewise.
4610         * jit.c (finalize_symtab): Likewise.
4611         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4612         (build_std_type_info_type): Likewise.
4613         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4614         update call to arch_flags_type.
4615
4616         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4617         arch_type.
4618         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4619         * windows-tdep.c (windows_get_tlb_type): Likewise.
4620
4621         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4622         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4623         * m32c-tdep.c (make_types): Likewise.
4624         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4625         (rl78_psw_type): Update call to arch_flags_type.
4626         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4627         * rx-tdep.c (rx_psw_type): Likewise.
4628         (rx_fpsw_type): Likewise.
4629         * sparc-tdep.c (sparc_psr_type): Likewise.
4630         (sparc_fsr_type): Likewise.
4631         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4632         (sparc64_ccr_type): Likewise.
4633         (sparc64_fsr_type): Likewise.
4634         (sparc64_fprs_type): Likewise.
4635
4636 2017-09-27  Tom Tromey  <tom@tromey.com>
4637
4638         * findcmd.c (find_command): Constify.
4639
4640 2017-09-27  Tom Tromey  <tom@tromey.com>
4641
4642         * ada-tasks.c (task_command_1, task_command): Constify.
4643
4644 2017-09-27  Tom Tromey  <tom@tromey.com>
4645
4646         * symtab.c (maintenance_print_symbol_cache)
4647         (maintenance_flush_symbol_cache)
4648         (maintenance_print_symbol_cache_statistics): Constify.
4649
4650 2017-09-27  Tom Tromey  <tom@tromey.com>
4651
4652         * inferior.c (detach_inferior_command, kill_inferior_command)
4653         (inferior_command): Constify.
4654
4655 2017-09-27  Tom Tromey  <tom@tromey.com>
4656
4657         * regcache.c (regcache_print, maintenance_print_registers)
4658         (maintenance_print_raw_registers)
4659         (maintenance_print_cooked_registers)
4660         (maintenance_print_register_groups)
4661         (maintenance_print_remote_registers): Constify.
4662
4663 2017-09-27  Tom Tromey  <tom@tromey.com>
4664
4665         * printcmd.c (map_display_numbers, undisplay_command)
4666         (enable_disable_display_command, enable_display_command)
4667         (disable_display_command): Constify.
4668
4669 2017-09-27  Tom Tromey  <tom@tromey.com>
4670
4671         * breakpoint.h (delete_command): Don't declare.
4672         * breakpoint.c (delete_command, enable_once_command)
4673         (enable_count_command, enable_delete_command, breakpoint_1)
4674         (maintenance_info_breakpoints, stopin_command, stopat_command)
4675         (delete_command, delete_trace_command, save_breakpoints)
4676         (save_breakpoints_command, save_tracepoints_command): Constify.
4677
4678 2017-09-27  Tom Tromey  <tom@tromey.com>
4679
4680         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4681         (skip_ws, extract_identifier, macro_define_command)
4682         (macro_undef_command, macro_list_command): Constify.
4683
4684 2017-09-27  Tom Tromey  <tom@tromey.com>
4685
4686         * infcmd.c (environment_info, set_environment_command)
4687         (unset_environment_command, path_info, info_proc_cmd_1)
4688         (info_proc_cmd_mappings, info_proc_cmd_stat)
4689         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4690         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4691
4692 2017-09-27  Tom Tromey  <tom@tromey.com>
4693
4694         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4695         Constify.
4696
4697 2017-09-27  Tom Tromey  <tom@tromey.com>
4698
4699         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4700
4701 2017-09-27  Tom Tromey  <tom@tromey.com>
4702
4703         * demangle.c (demangle_command): Constify.
4704
4705 2017-09-27  Tom Tromey  <tom@tromey.com>
4706
4707         * progspace.c (maintenance_info_program_spaces_command):
4708         Constify.
4709
4710 2017-09-27  Tom Tromey  <tom@tromey.com>
4711
4712         * compile/compile.c (check_raw_argument, compile_file_command)
4713         (compile_code_command, compile_print_command): Constify.
4714
4715 2017-09-27  Tom Tromey  <tom@tromey.com>
4716
4717         * reggroups.c (maintenance_print_reggroups): Constify.
4718
4719 2017-09-27  Tom Tromey  <tom@tromey.com>
4720
4721         * dwarf2read.c (save_gdb_index_command): Constify.
4722
4723 2017-09-27  Tom Tromey  <tom@tromey.com>
4724
4725         * stap-probe.c (info_probes_stap_command): Constify.
4726
4727 2017-09-27  Tom Tromey  <tom@tromey.com>
4728
4729         * fork-child.c (unset_exec_wrapper_command): Constify.
4730
4731 2017-09-27  Tom Tromey  <tom@tromey.com>
4732
4733         * btrace.c (get_uint, get_context_size, no_chunk)
4734         (maint_btrace_packet_history_cmd)
4735         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4736         (maint_info_btrace_cmd): Constify.
4737
4738 2017-09-27  Tom Tromey  <tom@tromey.com>
4739
4740         * reverse.c (delete_bookmark_command): Constify.
4741
4742 2017-09-27  Tom Tromey  <tom@tromey.com>
4743
4744         * remote.c (set_memory_packet_size)
4745         (set_memory_write_packet_size, show_memory_write_packet_size)
4746         (set_memory_read_packet_size, show_memory_read_packet_size)
4747         (compare_sections_command, packet_command, remote_put_command)
4748         (remote_get_command, remote_delete_command): Constify.
4749
4750 2017-09-27  Tom Tromey  <tom@tromey.com>
4751
4752         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4753         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4754         (set_mipsfpu_auto_command): Constify.
4755
4756 2017-09-27  Tom Tromey  <tom@tromey.com>
4757
4758         * cli/cli-cmds.h (cd_command): Constify.
4759         * cli/cli-cmds.c (cd_command): Constify.
4760
4761 2017-09-27  Tom Tromey  <tom@tromey.com>
4762
4763         * thread.c (thread_name_command, thread_find_command): Constify.
4764
4765 2017-09-27  Tom Tromey  <tom@tromey.com>
4766
4767         * probe.c (enable_probes_command, disable_probes_command):
4768         Constify.
4769
4770 2017-09-27  Tom Tromey  <tom@tromey.com>
4771
4772         * symfile.c (symbol_file_command): Constify.
4773         * gdbcore.h (deprecated_file_changed_hook): Constify.
4774         * exec.c (deprecated_file_changed_hook, exec_file_command)
4775         (file_command): Constify.
4776         * defs.h (symbol_file_command): Constify.
4777
4778 2017-09-27  Tom Tromey  <tom@tromey.com>
4779
4780         * remote-fileio.c (set_system_call_allowed)
4781         (show_system_call_allowed): Constify.
4782
4783 2017-09-27  Tom Tromey  <tom@tromey.com>
4784
4785         * tracepoint.c (delete_trace_variable_command)
4786         (tfind_end_command, tfind_start_command, tfind_pc_command)
4787         (tfind_tracepoint_command, tfind_line_command)
4788         (tfind_range_command, tfind_outside_command): Constify.
4789
4790 2017-09-27  Tom Tromey  <tom@tromey.com>
4791
4792         * ax-gdb.c (maint_agent_printf_command, agent_command)
4793         (agent_eval_command): Constify.
4794
4795 2017-09-27  Tom Tromey  <tom@tromey.com>
4796
4797         * tracepoint.c (info_scope_command): Constify.
4798         * python/python.c (gdbpy_decode_line): Constify.
4799         * python/py-breakpoint.c (bppy_init): Constify.
4800         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4801         * location.h: (new_linespec_location)
4802         (string_to_event_location_basic, string_to_event_location):
4803         Constify.
4804         * location.c (new_linespec_location)
4805         (string_to_event_location_basic, string_to_event_location):
4806         Constify.
4807         * linespec.h (decode_line_with_current_source)
4808         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4809         * linespec.c (linespec_lex_to_end)
4810         (decode_line_with_current_source)
4811         (decode_line_with_last_displayed): Constify.
4812         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4813         Constify.
4814         * cli/cli-cmds.c (edit_command, list_command): Constify.
4815         * breakpoint.h (until_break_command, watch_command_wrapper)
4816         (awatch_command_wrapper, rwatch_command_wrapper)
4817         (init_ada_exception_breakpoint): Constify.
4818         * breakpoint.c (break_command_1, dprintf_command)
4819         (break_range_command, watch_command_wrapper)
4820         (rwatch_command_wrapper, awatch_command_wrapper)
4821         (until_break_command, init_ada_exception_breakpoint)
4822         (strace_marker_create_sals_from_location, trace_command)
4823         (ftrace_command, strace_command, struct tracepoint): Constify.
4824         * ax-gdb.c (agent_command_1): Constify.
4825         * ada-lang.c (ada_exception_sal): Constify.
4826
4827 2017-09-27  Tom Tromey  <tom@tromey.com>
4828
4829         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4830         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4831         (get_context_size, no_chunk, get_insn_history_modifiers)
4832         (cmd_record_insn_history, get_call_history_modifiers)
4833         (cmd_record_call_history): Constify.
4834
4835 2017-09-27  Tom Tromey  <tom@tromey.com>
4836
4837         * source.c (show_substitute_path_command)
4838         (unset_substitute_path_command, set_substitute_path_command):
4839         Constify.
4840
4841 2017-09-27  Tom Tromey  <tom@tromey.com>
4842
4843         * typeprint.c (maintenance_print_type): Constify.
4844         * maint.c (maintenance_dump_me, maintenance_demangle)
4845         (maintenance_time_display, maintenance_info_sections)
4846         (maintenance_print_statistics, maintenance_deprecate)
4847         (maintenance_undeprecate): Constify.
4848         (maintenance_do_deprecate): Constify.  Use std::string.
4849         (maintenance_selftest): Constify.
4850         * gdbtypes.h (maintenance_print_type): Constify.
4851
4852 2017-09-27  Tom Tromey  <tom@tromey.com>
4853
4854         * hppa-tdep.c (unwind_command): Constify.
4855
4856 2017-09-27  Tom Tromey  <tom@tromey.com>
4857
4858         * target-descriptions.c (unset_tdesc_filename_cmd)
4859         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4860         Constify.
4861
4862 2017-09-27  Tom Tromey  <tom@tromey.com>
4863
4864         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4865
4866 2017-09-27  Tom Tromey  <tom@tromey.com>
4867
4868         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4869
4870 2017-09-27  Tom Tromey  <tom@tromey.com>
4871
4872         * tui/tui-regs.c (tui_reg_command): Constify.
4873
4874 2017-09-27  Tom Tromey  <tom@tromey.com>
4875
4876         * skip.c (skip_file_command, skip_function_command)
4877         (skip_enable_command, skip_disable_command, skip_delete_command):
4878         Constify.
4879
4880 2017-09-27  Tom Tromey  <tom@tromey.com>
4881
4882         * record-btrace.c (cmd_record_btrace_bts_start)
4883         (cmd_record_btrace_pt_start): Constify.
4884
4885 2017-09-27  Tom Tromey  <tom@tromey.com>
4886
4887         * symmisc.c (maintenance_print_symbols)
4888         (maintenance_print_msymbols, maintenance_print_objfiles)
4889         (maintenance_info_symtabs, maintenance_check_symtabs)
4890         (maintenance_expand_symtabs, maintenance_info_line_tables):
4891         Constify.
4892
4893 2017-09-27  Tom Tromey  <tom@tromey.com>
4894
4895         * top.c (new_ui_command): Constify.
4896
4897 2017-09-27  Tom Tromey  <tom@tromey.com>
4898
4899         * symfile.c (add_symbol_file_command)
4900         (remove_symbol_file_command, list_overlays_command)
4901         (map_overlay_command, unmap_overlay_command)
4902         (overlay_auto_command, overlay_manual_command)
4903         (overlay_off_command, overlay_load_command): Constify.
4904
4905 2017-09-27  Tom Tromey  <tom@tromey.com>
4906
4907         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4908         (info_spu_mailbox_command, info_spu_dma_command)
4909         (info_spu_proxydma_command): Constify.
4910
4911 2017-09-27  Tom Tromey  <tom@tromey.com>
4912
4913         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4914
4915 2017-09-27  Tom Tromey  <tom@tromey.com>
4916
4917         * cli/cli-script.c (user_defined_command): Constify.
4918
4919 2017-09-27  Tom Tromey  <tom@tromey.com>
4920
4921         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4922         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4923         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4924         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4925         (dump_binary_value, append_binary_memory, append_binary_value):
4926         Constify.
4927         (struct dump_context) <func>: Constify.
4928         (add_dump_command): Update.
4929
4930 2017-09-27  Tom Tromey  <tom@tromey.com>
4931
4932         * cli/cli-cmds.c (show_version, show_configuration)
4933         (source_command, show_user): Constify.
4934
4935 2017-09-27  Tom Tromey  <tom@tromey.com>
4936
4937         * target.c (maintenance_print_target_stack): Constify.
4938
4939 2017-09-27  Tom Tromey  <tom@tromey.com>
4940
4941         * interps.c (interpreter_exec_cmd): Constify.
4942
4943 2017-09-27  Tom Tromey  <tom@tromey.com>
4944
4945         * record-full.c (cmd_record_full_restore): Constify.
4946
4947 2017-09-27  Tom Tromey  <tom@tromey.com>
4948
4949         * memattr.c (enable_mem_command, disable_mem_command)
4950         (delete_mem_command): Constify.
4951
4952 2017-09-27  Tom Tromey  <tom@tromey.com>
4953
4954         * value.c (show_convenience): Constify.
4955
4956 2017-09-27  Tom Tromey  <tom@tromey.com>
4957
4958         * gdbcore.h (core_file_command): Update.
4959         * corefile.c (core_file_command): Constify.
4960
4961 2017-09-27  Tom Tromey  <tom@tromey.com>
4962
4963         * user-regs.c (maintenance_print_user_registers): Constify.
4964
4965 2017-09-27  Tom Tromey  <tom@tromey.com>
4966
4967         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4968
4969 2017-09-27  Tom Tromey  <tom@tromey.com>
4970
4971         * cp-support.c (first_component_command): Constify.
4972
4973 2017-09-27  Tom Tromey  <tom@tromey.com>
4974
4975         * psymtab.c (maintenance_print_psymbols)
4976         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4977         Constify.
4978
4979 2017-09-27  Tom Tromey  <tom@tromey.com>
4980
4981         * windows-tdep.c (display_tib): Constify.
4982
4983 2017-09-27  Tom Tromey  <tom@tromey.com>
4984
4985         * linux-fork.c (delete_checkpoint_command)
4986         (detach_checkpoint_command): Constify.
4987
4988 2017-09-27  Tom Tromey  <tom@tromey.com>
4989
4990         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4991
4992 2017-09-27  Tom Tromey  <tom@tromey.com>
4993
4994         * arc-tdep.c (dump_arc_instruction_command): Constify.
4995
4996 2017-09-27  Tom Tromey  <tom@tromey.com>
4997
4998         * valprint.c (set_radix, show_radix): Constify.
4999
5000 2017-09-27  Tom Tromey  <tom@tromey.com>
5001
5002         * dtrace-probe.c (info_probes_dtrace_command): Constify.
5003
5004 2017-09-27  Tom Tromey  <tom@tromey.com>
5005
5006         * command.h (not_just_help_class_command): Update.
5007         * cli/cli-decode.h (not_just_help_class_command): Update.
5008         * cli/cli-decode.c (not_just_help_class_command): Constify.
5009
5010 2017-09-27  Tom Tromey  <tom@tromey.com>
5011
5012         * gdb_bfd.c (maintenance_info_bfds): Constify.
5013
5014 2017-09-27  Tom Tromey  <tom@tromey.com>
5015
5016         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5017         overloads.
5018         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
5019         (do_const_cfunc): New function.
5020         (cmd_cfunc_eq): New overload.
5021         (cli_user_command_p): Check do_const_cfunc.
5022         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5023         const_cfunc.
5024         * command.h (add_cmd): Add const overload and no-function
5025         overload.
5026         (set_cmd_cfunc): Add const overload.
5027         (cmd_const_cfunc_ftype): Declare.
5028         (cmd_cfunc_eq): Add const overload.
5029         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5030         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5031         overload.
5032
5033 2017-09-27  Tom Tromey  <tom@tromey.com>
5034
5035         * macroexp.c (get_next_token_for_substitution): New function.
5036         (substitute_args): Call it.  Check for __VA_OPT__.
5037
5038 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5039             Pedro Alves <palves@redhat.com>
5040
5041         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5042         producer_is_icc_lt_14.
5043         (producer_is_icc_lt_14): New function.
5044         (check_producer): Add code for checking version of ICC.
5045         (producer_is_icc): Move to producer.c.
5046         (read_structure_type): Restrict ICC workaround to ICC<14.
5047         * producer.c: Include selftest.h.
5048         (producer_is_icc, producer_parsing_tests, _initialize_producer):
5049         New functions.
5050         * producer.h (producer_is_icc): New declaration.
5051
5052 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5053
5054         * Makefile.in (SFILES): Add producer.c.
5055         (COMMON_OBS): Add producer.o
5056         * amd64-tdep.c (producer.h): Add new include.
5057         * dwarf2read.c (producer.h): Add new include.
5058         * producer.c: New file.
5059         * producer.h: New file.
5060         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5061         producer.c.
5062         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5063         producer.h.
5064
5065 2017-09-26  Matthias Klose  <doko@ubuntu.com>
5066
5067         * configure.ac: Search ncursesw before ncurses.
5068         Check ncursesw/ncurses.h before ncurses/ncurses.h.
5069         * gdb_curses.h: Include <ncursesw/ncurses.h>
5070         * config.in, configure: Regenerate.
5071
5072 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5073
5074         PR gdb/22185
5075         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5076         obsolete.
5077         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5078         Remove i386sol2 support.
5079         * configure.nat <i386sol2>: Remove.
5080         <sol2-64>: Fold into ...
5081         <sol2>: ... this.
5082         Move common settings to default section.
5083         Add sol-thread.o.
5084         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5085         x86_64-*-solaris2.1[0-9]*>: Rename to ...
5086         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5087         <i[34567]86-*-solaris*>: Remove.
5088         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5089
5090         * configure.ac: Remove wctype in libw check.
5091         (_MSE_INT_H): Don't define on Solaris 7-9.
5092         <solaris*>: Remove libthread_db.so.1 check.
5093         * configure: Regenerate.
5094         * config.in: Regenerate.
5095
5096         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5097         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5098         (gdb_ps_size_t): Remove.
5099         Use base types in users.
5100         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5101
5102         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5103
5104 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5105
5106         PR build/22206
5107         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5108         (adi_is_addr_mapped): Likewise.
5109         (PSR_ICC): Don't redefine.
5110         (PSR_IMPL): Likewise.
5111
5112 2017-09-25  Tom Tromey  <tom@tromey.com>
5113
5114         * regcache.c (regcache::dump): Use string_printf.
5115
5116 2017-09-25  Tom Tromey  <tom@tromey.com>
5117
5118         * regcache.c (class regcache_invalidator): New.
5119         (struct register_to_invalidate): Remove.
5120         (make_cleanup_regcache_invalidate): Remove.
5121         (regcache::raw_write): Use regcache_invalidator.
5122
5123 2017-09-25  Tom Tromey  <tom@tromey.com>
5124
5125         * spu-tdep.c (spu2ppu_sniffer): Update.
5126         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5127         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5128         Remove.
5129         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5130         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5131         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5132         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5133         (frame_pop): Update.
5134
5135 2017-09-25  Tom Tromey  <tom@tromey.com>
5136
5137         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5138         * regcache.h (regcache_xfree): Don't declare.
5139         * regcache.c (regcache_xfree): Remove.
5140         (do_regcache_xfree): Use delete.
5141         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5142         * linux-fork.c (free_fork): Use delete.
5143         (fork_save_infrun_state): Likewise.
5144         * jit.c (jit_dealloc_cache): Use delete.
5145         * infrun.c (discard_infcall_suspend_state): Use delete.
5146
5147 2017-09-25  Tom Tromey  <tom@tromey.com>
5148
5149         * regcache.h (regcache_xmalloc): Don't declare.
5150         (regcache_raw_set_cached_value): Update comment.
5151         * regcache.c (regcache_xmalloc): Remove.
5152         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5153         * jit.c (jit_frame_sniffer): Use new.
5154         * frame.c (frame_save_as_regcache): Use new.
5155
5156 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5157
5158         * NEWS: Advertise support for guarded-storage registers on IBM z.
5159
5160 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5161
5162         * s390-linux-nat.c (have_regset_gs): New static variable.
5163         (s390_linux_fetch_inferior_registers): Handle guarded-storage
5164         control block and guarded-storage broadcast control regsets.
5165         (s390_read_description): Detect whether the target has
5166         guarded-storage support, return appropriate tdesc.
5167         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5168         (features/s390x-gs-linux64.c): Likewise.
5169         (struct gdbarch_tdep) <have_gs>: New field.
5170         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5171         (s390_gsbc_regset): New variables.
5172         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5173         and s390_gsbc_regset, if applicable.
5174         (s390_core_read_description): Check whether core file was from a
5175         target with guarded-storage support; include appropriate regsets.
5176         (s390_gdbarch_init): Add registers for guarded-storage support.
5177         (_initialize_s390_tdep): Initialize new target descriptions that
5178         include registers for guarded-storage support.
5179         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5180         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5181         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5182         (S390_NUM_REGS): Adjust macro definition.
5183         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5184         (tdesc_s390x_gs_linux64): New declarations.
5185
5186 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5187
5188         * features/s390-gs-linux64.xml: New file.
5189         * features/s390-gs.xml: New file.
5190         * features/s390-gsbc.xml: New file.
5191         * features/s390x-gs-linux64.xml: New file.
5192         * features/Makefile (WHICH): Add s390-gs-linux64 and
5193         s390x-gs-linux64.
5194         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5195         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5196         * features/s390-gs-linux64.c: New generated file.
5197         * features/s390x-gs-linux64.c: New file.
5198         * regformats/s390-gs-linux64.dat: New file.
5199         * regformats/s390x-gs-linux64.dat: New file.
5200
5201 2017-09-23  Tom Tromey  <tom@tromey.com>
5202
5203         * defs.h (make_cleanup_override_quit_handler): Don't declare.
5204
5205 2017-09-22  Tom Tromey  <tom@tromey.com>
5206
5207         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5208         type to scoped_restore_tmpl.
5209         <scoped_input_handler>: Initialize m_quit_handler directly.
5210
5211 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5212
5213         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5214         (cd_command): Likewise.  Free "current_directory" before
5215         assigning to it.
5216         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5217         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5218         * top.c (gdb_dirbuf): Remove global declaration.
5219         * top.h (gdb_dirbuf): Likewise.
5220
5221 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5222
5223         * gnulib/aclocal.m4: Regenerate.
5224         * gnulib/config.in: Regenerate.
5225         * gnulib/configure: Regenerate.
5226         * gnulib/import/Makefile.am: Regenerate.
5227         * gnulib/import/Makefile.in: Regenerate.
5228         * gnulib/import/assure.h: New file.
5229         * gnulib/import/at-func.c: Likewise
5230         * gnulib/import/chdir-long.c: New file.
5231         * gnulib/import/chdir-long.h: New file.
5232         * gnulib/import/cloexec.c: New file.
5233         * gnulib/import/cloexec.h: New file.
5234         * gnulib/import/close.c: New file.
5235         * gnulib/import/closedir.c: New file.
5236         * gnulib/import/dirent-private.h: New file.
5237         * gnulib/import/dup-safer.c: New file.
5238         * gnulib/import/dup.c: New file.
5239         * gnulib/import/dup2.c: New file.
5240         * gnulib/import/error.c: New file.
5241         * gnulib/import/error.h: New file.
5242         * gnulib/import/exitfail.c: New file.
5243         * gnulib/import/exitfail.h: New file.
5244         * gnulib/import/fchdir.c: New file.
5245         * gnulib/import/fcntl.c: New file.
5246         * gnulib/import/fcntl.in.h: New file.
5247         * gnulib/import/fd-hook.c: New file.
5248         * gnulib/import/fd-hook.h: New file.
5249         * gnulib/import/fd-safer.c: New file.
5250         * gnulib/import/fdopendir.c: New file.
5251         * gnulib/import/filename.h: New file.
5252         * gnulib/import/filenamecat-lgpl.c: New file.
5253         * gnulib/import/filenamecat.h: New file.
5254         * gnulib/import/fstat.c: New file.
5255         * gnulib/import/fstatat.c: New file.
5256         * gnulib/import/getcwd-lgpl.c: New file.
5257         * gnulib/import/getcwd.c: New file.
5258         * gnulib/import/getdtablesize.c: New file.
5259         * gnulib/import/getlogin_r.c: New file.
5260         * gnulib/import/getprogname.c: New file.
5261         * gnulib/import/getprogname.h: New file.
5262         * gnulib/import/gettext.h: New file.
5263         * gnulib/import/glob-libc.h: New file.
5264         * gnulib/import/glob.c: New file.
5265         * gnulib/import/glob.in.h: New file.
5266         * gnulib/import/intprops.h: New file.
5267         * gnulib/import/m4/chdir-long.m4: New file.
5268         * gnulib/import/m4/close.m4: New file.
5269         * gnulib/import/m4/closedir.m4: New file.
5270         * gnulib/import/m4/d-ino.m4: New file.
5271         * gnulib/import/m4/d-type.m4: New file.
5272         * gnulib/import/m4/dup.m4: New file.
5273         * gnulib/import/m4/dup2.m4: New file.
5274         * gnulib/import/m4/error.m4: New file.
5275         * gnulib/import/m4/fchdir.m4: New file.
5276         * gnulib/import/m4/fcntl.m4: New file.
5277         * gnulib/import/m4/fcntl_h.m4: New file.
5278         * gnulib/import/m4/fdopendir.m4: New file.
5279         * gnulib/import/m4/filenamecat.m4: New file.
5280         * gnulib/import/m4/fstat.m4: New file.
5281         * gnulib/import/m4/fstatat.m4: New file.
5282         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5283         * gnulib/import/m4/getcwd-path-max.m4: New file.
5284         * gnulib/import/m4/getcwd.m4: New file.
5285         * gnulib/import/m4/getdtablesize.m4: New file.
5286         * gnulib/import/m4/getlogin_r.m4: New file.
5287         * gnulib/import/m4/getprogname.m4: New file.
5288         * gnulib/import/m4/glob.m4: New file.
5289         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5290         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5291         * gnulib/import/m4/mempcpy.m4: New file.
5292         * gnulib/import/m4/memrchr.m4: New file.
5293         * gnulib/import/m4/mode_t.m4: New file.
5294         * gnulib/import/m4/msvc-inval.m4: New file.
5295         * gnulib/import/m4/msvc-nothrow.m4: New file.
5296         * gnulib/import/m4/open.m4: New file.
5297         * gnulib/import/m4/openat.m4: New file.
5298         * gnulib/import/m4/opendir.m4: New file.
5299         * gnulib/import/m4/readdir.m4: New file.
5300         * gnulib/import/m4/realloc.m4: New file.
5301         * gnulib/import/m4/rewinddir.m4: New file.
5302         * gnulib/import/m4/save-cwd.m4: New file.
5303         * gnulib/import/m4/strdup.m4: New file.
5304         * gnulib/import/m4/strerror.m4: New file.
5305         * gnulib/import/m4/unistd-safer.m4: New file.
5306         * gnulib/import/mempcpy.c: New file.
5307         * gnulib/import/memrchr.c: New file.
5308         * gnulib/import/msvc-inval.c: New file.
5309         * gnulib/import/msvc-inval.h: New file.
5310         * gnulib/import/msvc-nothrow.c: New file.
5311         * gnulib/import/msvc-nothrow.h: New file.
5312         * gnulib/import/open.c: New file.
5313         * gnulib/import/openat-die.c: New file.
5314         * gnulib/import/openat-priv.h: New file.
5315         * gnulib/import/openat-proc.c: New file.
5316         * gnulib/import/openat.c: New file.
5317         * gnulib/import/openat.h: New file.
5318         * gnulib/import/opendir.c: New file.
5319         * gnulib/import/pipe-safer.c: New file.
5320         * gnulib/import/readdir.c: New file.
5321         * gnulib/import/realloc.c: New file.
5322         * gnulib/import/rewinddir.c: New file.
5323         * gnulib/import/save-cwd.c: New file.
5324         * gnulib/import/save-cwd.h: New file.
5325         * gnulib/import/strdup.c: New file.
5326         * gnulib/import/strerror-override.c: New file.
5327         * gnulib/import/strerror-override.h: New file.
5328         * gnulib/import/strerror.c: New file.
5329         * gnulib/import/unistd--.h: New file.
5330         * gnulib/import/unistd-safer.h: New file.
5331         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5332         "getcwd" and "glob".
5333         * ser-tcp.c: Undefine "close" before redefining it.
5334
5335 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5336
5337         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5338         get rid of res_val.
5339
5340 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5341
5342         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5343         <sol2,sparc>: Likewise.
5344         <sol2-64,i386>: Likewise.
5345
5346         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5347         -Wdeprecated-declarations on *-*-solaris*.
5348         * configure: Regenerate.
5349
5350         * procfs.c: Include "nat/inferior.h".
5351         (procfs_info_proc): Fix typo.
5352
5353 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5354
5355         * remote.c (vector): Include.
5356         (struct private_thread_info): Add field, thread_handle.
5357         (free_private_thread_info): Deallocate storage associated with
5358         thread handle.
5359         (get_private_info_thread): Initialize `thread_handle' field.
5360         (struct thread_item): Add field, thread_handle.
5361         (clear_threads_listing_context): Deallocate storage associated
5362         with thread handle.
5363         (start_thread): Add support for "handle" attribute.
5364         (thread_attributes): Add "handle".
5365         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5366         field.
5367         (remote_update_thread_list): Update thread_handle.
5368         (remote_thread_handle_to_thread_info): New function.
5369         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5370
5371 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5372
5373         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5374         function.
5375         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5376         * python/python-internal.h (thread_object_type): Declare.
5377
5378 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5379
5380         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5381         (target_thread_handle_to_thread_info): Declare.
5382         * target.c (target_thread_handle_to_thread_info): New function.
5383         * target-delegates.c: Regenerate.
5384         * gdbthread.h (find_thread_by_handle): Declare.
5385         * thread.c (find_thread_by_handle): New function.
5386         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5387         function.
5388         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5389
5390 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5393
5394 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5395
5396         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5397
5398 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5399
5400         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5401         to gdb_target_obs.
5402
5403 2017-09-20  Tom Tromey  <tom@tromey.com>
5404
5405         * breakpoint.c (struct counted_command_line): Remove.
5406         (breakpoint_commands): Update.
5407         (alloc_counted_command_line, incref_counted_command_line)
5408         (decref_counted_command_line, do_cleanup_counted_command_line)
5409         (make_cleanup_decref_counted_command_line): Remove.
5410         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5411         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5412         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5413         (save_breakpoints): Update.
5414         * breakpoint.h (counted_command_line): Now a typedef to
5415         shared_ptr.
5416         (struct breakpoint) <commands>: Now a counted_command_line.
5417         (struct bpstats) <command>: Likewise.
5418
5419 2017-09-20  Tom Tromey  <tom@tromey.com>
5420
5421         * breakpoint.c (struct commands_info, do_map_commands_command):
5422         Remove.
5423         (commands_command_1): Update.
5424         (iterate_over_related_breakpoints): Take a function_view.
5425         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5426         (delete_command): Update.
5427         (map_breakpoint_numbers): Take a function_view.
5428         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5429         (disable_command): Update.
5430         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5431         (enable_command): Update.
5432         (struct disp_data, do_enable_breakpoint_disp)
5433         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5434         (do_map_enable_delete_breakpoint): Remove.
5435         (enable_once_command, enable_count_command, enable_delete_command)
5436         (delete_trace_variable_command): Update.
5437
5438 2017-09-20  Tom Tromey  <tom@tromey.com>
5439
5440         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5441         (bpstat_clear): Use delete.
5442         (bpstats): New constructors.
5443         (bpstat_copy, bpstat_stop_status): Use new.
5444         (dprintf_after_condition_true): Update.
5445         * breakpoint.h (bpstats::bpstats): Add constructors.
5446         (bpstats::~bpstats): Add destructor.
5447
5448 2017-09-20  Pedro Alves  <palves@redhat.com>
5449
5450         * eval.c (make_params): Delete, refactored as ...
5451         (class fake_method): ... this new type's ctor.
5452         (fake_method::~fake_method): New.
5453         (evaluate_subexp_standard): Use 'fake_method'.
5454
5455 2017-09-20  Tom Tromey  <tom@tromey.com>
5456
5457         * windows-nat.c (get_windows_debug_event, windows_wait)
5458         (do_initial_windows_stuff, windows_attach): Update.
5459         * utils.c (vwarning, internal_vproblem): Update.
5460         (ui_unregister_input_event_handler_cleanup)
5461         (prepare_to_handle_input): Remove.
5462         (class scoped_input_handler): New.
5463         (defaulted_query, prompt_for_continue): Update.
5464         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5465         Update.
5466         * top.c (undo_terminal_modifications_before_exit): Update.
5467         * target/target.h (target_terminal_init, target_terminal_inferior)
5468         (target_terminal_ours): Don't declare.
5469         (class target_terminal): New.
5470         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5471         (target_terminal_ours_for_output)
5472         (make_cleanup_restore_target_terminal): Don't declare.
5473         (target_terminal_info): Remove.
5474         * target.c (enum terminal_state, terminal_state): Remove.
5475         (target_terminal::terminal_state): Define.
5476         (target_terminal::init): Rename from target_terminal_init.
5477         (target_terminal::inferior): Rename from
5478         target_terminal_inferior.
5479         (target_terminal::ours): Rename from target_terminal_ours.
5480         (target_terminal::ours_for_output): Rename from
5481         target_terminal_ours_for_output.
5482         (target_terminal::info): New method.
5483         (cleanup_restore_target_terminal)
5484         (make_cleanup_restore_target_terminal): Remove.
5485         * solib.c (handle_solib_event): Update.
5486         * remote.c (remote_serial_quit_handler): Update.
5487         (remote_terminal_inferior, remote_wait_as): Update.
5488         * record-full.c (record_full_wait_1): Update.
5489         * nto-procfs.c (procfs_create_inferior): Update.
5490         * nat/fork-inferior.c (startup_inferior): Update.
5491         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5492         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5493         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5494         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5495         (mi_breakpoint_created, mi_breakpoint_deleted)
5496         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5497         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5498         (mi_user_selected_context_changed, report_initial_inferior):
5499         Update.
5500         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5501         (linux_nat_terminal_inferior): Update.
5502         * infrun.c (follow_fork_inferior)
5503         (handle_vfork_child_exec_or_exit, do_target_resume)
5504         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5505         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5506         Update.
5507         * inflow.c (child_terminal_init, info_terminal_command): Update.
5508         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5509         (attach_command): Update.
5510         * infcall.c (call_thread_fsm_should_stop): Update.
5511         * gnu-nat.c (gnu_attach): Update.
5512         * extension.c (struct active_ext_lang_state)
5513         (restore_active_ext_lang): Update.
5514         * exceptions.c (print_flush): Update.
5515         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5516         (struct quit_handler_cleanup_data, restore_quit_handler)
5517         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5518         Remove.
5519         * cp-support.c (gdb_demangle): Update.
5520         * breakpoint.c (update_inserted_breakpoint_locations)
5521         (insert_breakpoint_locations, handle_jit_event)
5522         (disable_breakpoints_in_unloaded_shlib): Update.
5523         * annotate.c (annotate_breakpoints_invalid)
5524         (annotate_frames_invalid): Update.
5525
5526 2017-09-20  Tom Tromey  <tom@tromey.com>
5527
5528         * main.c (catch_command_errors): Rename from
5529         catch_command_errors_const.
5530         (captured_main_1): Update.
5531
5532 2017-09-20  Pedro Alves  <palves@redhat.com>
5533
5534         * cli/cli-cmds.c (list_command): Use print_sal_location.
5535         (print_sal_location): New function.
5536         (ambiguous_line_spec): Use print_sal_location.
5537         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5538         * symtab.c (find_function_start_sal): Likewise.
5539         * symtab.h (symtab_and_line::symbol): New field.
5540
5541 2017-09-20  Pedro Alves  <palves@redhat.com>
5542
5543         * linespec.c (minsym_found): Handle non-text minsyms.
5544         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5545
5546 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5547
5548         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5549         backslash.
5550
5551 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5552
5553         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5554         vmovups instead vmovaps.
5555         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5556
5557 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5558
5559         * NEWS (Changes since GDB 8.0): Add starti.
5560         * infcmd.c (enum run_break): New.
5561         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5562         case.
5563         (run_command): Use enum run_how.
5564         (start_command): Likewise.
5565         (starti_command): New function.
5566         (RUN_ARGS_HELP): New macro.
5567         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5568         commands.  Add starti command.
5569
5570 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5571
5572         * Makefile.in (monitor.o): Remove the rule.
5573
5574 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5575
5576         * annotate.h (struct annotate_arg_emitter): Use
5577         DISABLE_COPY_AND_ASSIGN.
5578         * common/refcounted-object.h (refcounted_object): Likewise.
5579         * completer.h (struct completion_result): Likewise.
5580         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5581         * filename-seen-cache.h (filename_seen_cache): Likewise.
5582         * gdbcore.h (thread_section_name): Likewise.
5583         * gdb_regex.h (compiled_regex): Likewise.
5584         * gdbthread.h (scoped_restore_current_thread): Likewise.
5585         * inferior.h (scoped_restore_current_inferior): Likewise.
5586         * jit.c (jit_reader): Likewise.
5587         * linespec.h (struct linespec_result): Likewise.
5588         * mi/mi-parse.h (struct mi_parse): Likewise.
5589         * nat/fork-inferior.c (execv_argv): Likewise.
5590         * progspace.h (scoped_restore_current_program_space): Likewise.
5591         * python/python-internal.h (class gdbpy_enter): Likewise.
5592         * regcache.h (regcache): Likewise.
5593         * target-descriptions.c (struct tdesc_reg): Likewise.
5594         (struct tdesc_type): Likewise.
5595         (struct tdesc_feature): Likewise.
5596         * ui-out.h (ui_out_emit_type): Likewise.
5597
5598 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5599
5600         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5601         label abort_expression.
5602
5603 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5604
5605         * common/buffer.c (buffer_xml_printf): Adjust.
5606         * common/xml-utils.c (xml_escape_text): Change return type to
5607         std::string, update code accordingly.
5608         * common/xml-utils.h (xml_escape_text): Change return type to
5609         std::string.
5610         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5611         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5612         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5613         Adjust.
5614
5615 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5616
5617         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5618         (SUBDIR_UNITTESTS_OBS): Add new object file.
5619         * unittests/xml-utils-selftests.c: New file.
5620
5621 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5622
5623         * common/selftest.h (selftest): New struct/interface.
5624         (register_test): Add name parameter, add new overload.
5625         (run_tests): Add filter parameter.
5626         (for_each_selftest_ftype): New typedef.
5627         (for_each_selftest): New declaration.
5628         * common/selftest.c (tests): Change type to
5629         map<string, unique_ptr<selftest>>.
5630         (simple_selftest): New struct.
5631         (register_test): New function.
5632         (register_test): Add name parameter and use it.
5633         (run_tests): Add filter parameter and use it.  Add prints.
5634         Adjust to vector -> map change.
5635         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5636         registering selftests.
5637         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5638         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5639         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5640         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5641         * findvar.c (_initialize_findvar): Likewise.
5642         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5643         * maint.c (maintenance_selftest): Update call to run_tests.
5644         (maintenance_info_selftests): New function.
5645         (_initialize_maint_cmds): Register "maintenance info selftests"
5646         command.  Update "maintenance selftest" doc.
5647         * regcache.c (_initialize_regcache): Add names when registering
5648         selftests.
5649         * rust-exp.y (_initialize_rust_exp): Likewise.
5650         * selftest-arch.c (gdbarch_selftest): New struct.
5651         (gdbarch_tests): Remove.
5652         (register_test_foreach_arch): Add name parameter.  Call
5653         register_test.
5654         (tests_with_arch): Remove, move most content to
5655         gdbarch_selftest::operator().
5656         (_initialize_selftests_foreach_arch): Remove.
5657         * selftest-arch.h (register_test_foreach_arch): Add name
5658         parameter.
5659         (run_tests_with_arch): New declaration.
5660         * utils-selftests.c (_initialize_utils_selftests): Add names
5661         when registering selftests.
5662         * utils.c (_initialize_utils): Likewise.
5663         * unittests/array-view-selftests.c
5664         (_initialize_array_view_selftests): Likewise.
5665         * unittests/environ-selftests.c (_initialize_environ_selftests):
5666         Likewise.
5667         * unittests/function-view-selftests.c
5668         (_initialize_function_view_selftests): Likewise.
5669         * unittests/offset-type-selftests.c
5670         (_initialize_offset_type_selftests): Likewise.
5671         * unittests/optional-selftests.c
5672         (_initialize_optional_selftests): Likewise.
5673         * unittests/scoped_restore-selftests.c
5674         (_initialize_scoped_restore_selftests): Likewise.
5675         * NEWS: Document "maintenance selftest" and "maint info
5676         selftests".
5677
5678 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5679
5680         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5681         scoped_restore.
5682
5683 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5684
5685         * mi/mi-main.c (mi_load_progress): Make uiout variable
5686         a unique_ptr.
5687
5688 2017-09-15  Pedro Alves  <palves@redhat.com>
5689
5690         * compile/compile-c-types.c (convert_enum, convert_int)
5691         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5692
5693 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5694
5695         * dwarf2read.c (copy_string): Remove.
5696         (parse_macro_definition): Replace copy_string with savestring.
5697
5698 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5699
5700         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5701         gdb_target_obs.
5702         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5703         Likewise.
5704         (i[34567]86-*-linux*): Likewise.
5705
5706 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5707
5708         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5709         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5710         <stack>: Change type to std::vector.
5711         <stack_len, stack_allocated>: Remove.
5712         <grow_stack>: Remove.
5713         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5714         (dwarf_expr_context::~dwarf_expr_context): Remove.
5715         (dwarf_expr_context::grow_stack): Remove.
5716         (dwarf_expr_context::push): Adjust.
5717         (dwarf_expr_context::pop): Adjust.
5718         (dwarf_expr_context::fetch): Adjust.
5719         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5720         (dwarf_expr_context::stack_empty_p): Adjust.
5721         (dwarf_expr_context::execute_stack_op): Adjust.
5722
5723 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5724
5725         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5726         return type to bool.
5727         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5728
5729 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5730
5731         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5732         Change type to bool.
5733         (dwarf_stack_value) <in_stack_memory>: Likewise.
5734         (dwarf_expr_context) <push_address>: Change parameter type to
5735         bool.
5736         <fetch_in_stack_memory>: Change return type to bool.
5737         <push>: Change parameter type to bool.
5738         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5739         to bool.
5740         (dwarf_expr_context::push_address): Likewise.
5741         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5742         to bool.
5743         (dwarf_expr_context::execute_stack_op): Adjust.
5744         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5745
5746 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5747
5748         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5749         (struct dwarf_expr_context) <n_pieces>: Remove.
5750         <pieces>: Change type to std::vector.
5751         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5752         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5753         pieces.
5754         (dwarf_expr_context::add_piece): Adjust.
5755         * dwarf2loc.c (struct piece_closure): Initialize fields.
5756         <n_pieces>: Remove.
5757         <pieces>: Change type to std::vector.
5758         (allocate_piece_closure): Adjust, change parameter to
5759         std::vector rvalue and std::move it to piece_closure.
5760         (rw_pieced_value): Adjust.
5761         (check_pieced_synthetic_pointer): Adjust.
5762         (indirect_synthetic_pointer): Adjust.
5763         (coerce_pieced_ref): Adjust.
5764         (free_pieced_value_closure):  Adjust.  Use delete to free
5765         piece_closure.
5766         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5767         to allocate_piece_closure.
5768         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5769
5770 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5771
5772         * probe.h (probe_ops_cp): Remove typedef.
5773         (DEF_VEC_P (probe_ops_cp)): Remove.
5774         (all_probe_ops): Change type to std::vector.
5775         * probe.c (info_probes_for_ops): Adjust to vector change.
5776         (probe_linespec_to_ops): Likewise.
5777         (all_probe_ops): Change type to std::vector.
5778         (_initialize_probe): Adjust to vector change.
5779         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5780         * elfread.c (elf_get_probes): Likewise.
5781         * stap-probe.c (_initialize_stap_probe): Likewise.
5782
5783 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5784
5785         * probe.h (struct bound_probe): Define constructors.
5786         * probe.c (bound_probe_s): Remove typedef.
5787         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5788         (collect_probes): Change return type to std::vector, remove
5789         cleanup.
5790         (compare_probes): Return bool, change parameter type.  Change
5791         semantic to "less than".
5792         (gen_ui_out_table_header_info): Change parameter to std::vector
5793         and update.
5794         (exists_probe_with_pops): Likewise.
5795         (info_probes_for_ops): Update to std::vector change.
5796         (enable_probes_command): Likewise.
5797         (disable_probes_command): Likewise.
5798
5799 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5800
5801         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5802         vec to std::vector.
5803         * probe.c (parse_probes_in_pspace): Update.
5804         (find_probes_in_objfile): Update.
5805         (find_probe_by_pc): Update.
5806         (collect_probes): Update.
5807         (probe_any_get_probes): Update.
5808         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5809         return type to reference to std::vector.
5810         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5811         std::vector and update.
5812         (dtrace_process_dof): Likewise.
5813         (dtrace_get_probes): Likewise.
5814         * elfread.c (elf_get_probes): Change return type to std::vector,
5815         store an std::vector in bfd_data.
5816         (probe_key_free): Update to std::vector.
5817         * stap-probe.c (handle_stap_probe): Change parameter to
5818         std::vector and update.
5819         (stap_get_probes): Likewise.
5820         * symfile-debug.c (debug_sym_get_probes): Change return type to
5821         std::vector and update.
5822
5823 2017-09-11  Tom Tromey  <tom@tromey.com>
5824
5825         * breakpoint.c (program_breakpoint_here_p): Update.
5826         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5827         from make_show_memory_breakpoints_cleanup.  Return a
5828         scoped_restore_tmpl<int>.
5829         (restore_show_memory_breakpoints): Remove.
5830         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5831         * mem-break.c (memory_validate_breakpoint): Update.
5832         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5833         (ia64_memory_remove_breakpoint): Update.
5834         (ia64_breakpoint_from_pc): Update.
5835         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5836         from make_show_memory_breakpoints_cleanup.
5837
5838 2017-09-11  Tom Tromey  <tom@tromey.com>
5839
5840         * d-namespace.c (d_lookup_symbol): Use std::string.
5841         (find_symbol_in_baseclass): Likewise.
5842
5843 2017-09-11  Tom Tromey  <tom@tromey.com>
5844
5845         * ctf.c (ctf_start): Use std::string.
5846
5847 2017-09-11  Tom Tromey  <tom@tromey.com>
5848
5849         * ada-lang.c (is_known_support_routine): Update.
5850         (ada_unhandled_exception_name_addr_from_raise): Update.
5851         * guile/scm-frame.c (gdbscm_frame_name): Update.
5852         * python/py-frame.c (frapy_name): Update.
5853         (frapy_function): Update.
5854         * stack.h (find_frame_funname): Update.
5855         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5856         (print_frame): Update.
5857
5858 2017-09-11  Tom Tromey  <tom@tromey.com>
5859
5860         * findcmd.c (put_bits): Take a gdb::byte_vector.
5861         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5862         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5863         cleanups.
5864         (find_command): Update.
5865
5866 2017-09-11  Tom Tromey  <tom@tromey.com>
5867
5868         * cli/cli-script.c (class scoped_restore_hook_in): New.
5869         (clear_hook_in_cleanup): Remove.
5870         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5871         scoped_restore_hook_in.
5872
5873 2017-09-11  Tom Tromey  <tom@tromey.com>
5874
5875         * cli/cli-script.c (restore_interp): Remove.
5876         (read_command_lines): Use scoped_restore_interp.
5877         * interps.c (scoped_restore_interp::set_temp): Rename from
5878         interp_set_temp.
5879         * interps.h (class scoped_restore_interp): New.
5880         (interp_set_temp): Remove.
5881
5882 2017-09-11  Tom Tromey  <tom@tromey.com>
5883
5884         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5885         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5886         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5887         scoped_restore.
5888         (mi_cmd_break_insert_1): Update.
5889         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5890         scoped_restore.
5891
5892 2017-09-11  Tom Tromey  <tom@tromey.com>
5893
5894         * demangle.c (demangle_command): Update.
5895         * breakpoint.c (disable_command): Update.
5896         (enable_command): Update.
5897         (find_location_by_number): Make "number" const.  Use
5898         get_number_trailer.
5899         * cli/cli-utils.c (extract_arg): Return std::string.
5900         * probe.c (parse_probe_linespec): Update.  Change types.
5901         (collect_probes): Take string arguments.
5902         (parse_probe_linespec): Likewise.
5903         (info_probes_for_ops): Update.
5904         (enable_probes_command): Update.
5905         (disable_probes_command): Update.
5906         * break-catch-sig.c (catch_signal_split_args): Update.
5907         * mi/mi-parse.c (mi_parse): Update.
5908
5909 2017-09-11  Tom Tromey  <tom@tromey.com>
5910
5911         * language.h (language_enum): Make argument const.
5912         * language.c (language_enum): Make argument const.
5913
5914 2017-09-11  Tom Tromey  <tom@tromey.com>
5915
5916         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5917         as function.
5918         (skip_to_space): Rename from skip_to_space_const.
5919         * common/common-utils.c (skip_to_space): New function.
5920         (skip_to_space): Rename from skip_to_space_const.
5921         * cli/cli-utils.h (get_number): Rename from get_number_const.
5922         (extract_arg): Rename from extract_arg_const.
5923         * cli/cli-utils.c (get_number): Rename from get_number_const.
5924         (extract_arg): Rename from extract_arg_const.
5925         (number_or_range_parser::get_number): Use ::get_number.
5926         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5927         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5928         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5929         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5930         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5931         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5932         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5933         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5934
5935 2017-09-11  Tom Tromey  <tom@tromey.com>
5936
5937         * python/python.c (do_start_initialization): Use
5938         py-event-types.def to initialize types.
5939         Define all object type structures.
5940         * python/python-internal.h: Don't declare event initialization
5941         functions.
5942         * python/py-threadevent.c (thread_event_object_type): Don't
5943         define.
5944         * python/py-stopevent.c (stop_event_object_type): Don't define.
5945         * python/py-signalevent.c (signal_event_object_type): Don't
5946         declare or define.
5947         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5948         (clear_objfiles_event_object_type): Don't declare or define.
5949         * python/py-infevents.c (inferior_call_pre_event_object_type)
5950         (inferior_call_post_event_object_type)
5951         (register_changed_event_object_type)
5952         (memory_changed_event_object_type): Don't declare or define.
5953         * python/py-inferior.c (new_thread_event_object_type)
5954         (new_inferior_event_object_type)
5955         (inferior_deleted_event_object_type): Don't declare or define.
5956         * python/py-exitedevent.c (exited_event_object_type): Don't
5957         declare or define.
5958         * python/py-evts.c (gdbpy_initialize_py_events): Use
5959         py-all-events.def.
5960         * python/py-events.h (thread_event_object_type): Don't declare.
5961         (events_object): Use py-all-events.def.
5962         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5963         py-event-types.def.
5964         * python/py-event-types.def: New file.
5965         * python/py-continueevent.c (create_continue_event_object): Don't
5966         declare or define.
5967         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5968         declare or define.
5969         * python/py-all-events.def: New file.
5970
5971 2017-09-11  Tom Tromey  <tom@tromey.com>
5972
5973         * python/py-threadevent.c (create_thread_event_object): Return
5974         gdbpy_ref.
5975         * python/py-stopevent.h (create_stop_event_object)
5976         (create_breakpoint_event_object, create_signal_event_object):
5977         Update.
5978         * python/py-stopevent.c (create_stop_event_object): Return
5979         gdbpy_ref.
5980         (emit_stop_event): Update.
5981         * python/py-signalevent.c (create_signal_event_object): Return
5982         gdbpy_ref.
5983         * python/py-infevents.c (create_inferior_call_event_object):
5984         Update.
5985         * python/py-event.h (create_event_object)
5986         (create_thread_event_object): Update.
5987         * python/py-event.c (create_event_object): Return gdbpy_ref.
5988         * python/py-continueevent.c: Return gdbpy_ref.
5989         * python/py-bpevent.c (create_breakpoint_event_object): Return
5990         gdbpy_ref.
5991
5992 2017-09-11  Tom Tromey  <tom@tromey.com>
5993
5994         PR python/15622:
5995         * NEWS: Add entry.
5996         * python/python.c (do_start_initialization): Initialize new event
5997         types.
5998         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5999         (gdbpy_initialize_inferior_deleted_event)
6000         (gdbpy_initialize_new_thread_event): Declare.
6001         * python/py-threadevent.c (create_thread_event_object): Add option
6002         "thread" parameter.
6003         * python/py-inferior.c (new_thread_event_object_type)
6004         (new_inferior_event_object_type)
6005         (inferior_deleted_event_object_type): Declare.
6006         (python_new_inferior, python_inferior_deleted): New functions.
6007         (add_thread_object): Emit new_thread event.
6008         (gdbpy_initialize_inferior): Attach new functions to corresponding
6009         observers.
6010         (new_thread, new_inferior, inferior_deleted): Define new event
6011         types.
6012         * python/py-evts.c (gdbpy_initialize_py_events): Add new
6013         registries.
6014         * python/py-events.h (events_object) <new_inferior,
6015         inferior_deleted, new_thread>: New fields.
6016         * python/py-event.h (create_thread_event_breakpoint): Add optional
6017         "thread" parameter.
6018
6019 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6020
6021         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6022         check current_ui instead.
6023         (internal_vproblem): Likewise.
6024
6025 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
6026
6027         * thread.c (print_thread_info_1): Remove unnecessary calls to
6028         uiout->is_mi_like_p.
6029
6030 2017-09-09  Tom Tromey  <tom@tromey.com>
6031
6032         * namespace.h (add_using_directive): Update.
6033         * namespace.c (add_using_directive): Change type of excludes to
6034         std::vector.
6035         * dwarf2read.c (read_import_statement): Use std::vector.
6036         (read_namespace): Update.
6037         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6038
6039 2017-09-09  Tom Tromey  <tom@tromey.com>
6040
6041         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6042
6043 2017-09-09  Tom Tromey  <tom@tromey.com>
6044
6045         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6046
6047 2017-09-09  Tom Tromey  <tom@tromey.com>
6048
6049         * stack.c (func_command): Use gdb::def_vector.
6050
6051 2017-09-09  Tom Tromey  <tom@tromey.com>
6052
6053         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6054         ui_out_emit_list, ui_out_emit_tuple.
6055         (mi_cmd_var_update): Likewise.
6056
6057 2017-09-09  Tom Tromey  <tom@tromey.com>
6058
6059         * mi/mi-interp.c (mi_user_selected_context_changed): Use
6060         ui_out_redirect_pop.
6061         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6062         ui_out_redirect_pop.
6063         * utils.c (do_ui_out_redirect_pop)
6064         (make_cleanup_ui_out_redirect_pop): Remove.
6065         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6066         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6067         * ui-out.h (ui_out_redirect_pop): New class.
6068
6069 2017-09-09  Tom Tromey  <tom@tromey.com>
6070
6071         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6072         (list_available_thread_groups, mi_cmd_list_thread_groups)
6073         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6074         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6075         Likewise.
6076
6077 2017-09-09  Tom Tromey  <tom@tromey.com>
6078
6079         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6080         ui_out_emit_tuple.
6081
6082 2017-09-09  Tom Tromey  <tom@tromey.com>
6083
6084         * target.c (flash_erase_command): Use ui_out_emit_tuple.
6085         * stack.c (print_frame): Use ui_out_emit_tuple.
6086         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6087         (info_spu_mailbox_command, info_spu_dma_command)
6088         (info_spu_proxydma_command): Likewise.
6089         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6090         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6091         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6092         ui_out_emit_tuple.
6093         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6094
6095 2017-09-09  Tom Tromey  <tom@tromey.com>
6096
6097         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6098         (class ui_out_emit_table): Update comment.
6099         * ui-out.c (do_cleanup_table_end)
6100         (make_cleanup_ui_out_table_begin_end): Remove.
6101         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6102         (info_spu_dma_cmdlist): Likewise.
6103         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6104         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6105         ui_out_emit_table.
6106
6107 2017-09-09  Tom Tromey  <tom@tromey.com>
6108
6109         * thread.c (print_thread_info_1): Use ui_out_emit_table,
6110         ui_out_emit_list, gdb::optional.
6111
6112 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
6113
6114         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6115         prototype.
6116         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6117         prototype.
6118         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6119         prototype.
6120         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6121         * ada-exp.y: Remove _initialize_ada_exp prototype.
6122         * ada-lang.c: Remove _initialize_ada_language prototype.
6123         * ada-tasks.c: Remove _initialize_tasks prototype.
6124         * addrmap.c: Remove _initialize_addrmap prototype.
6125         * agent.c: Remove _initialize_agent prototype.
6126         * aix-thread.c: Remove _initialize_aix_thread prototype.
6127         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6128         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6129         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6130         prototype.
6131         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6132         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6133         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6134         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6135         prototype.
6136         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6137         prototype.
6138         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6139         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6140         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6141         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6142         prototype.
6143         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6144         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6145         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6146         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6147         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6148         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6149         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6150         prototype.
6151         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6152         prototype.
6153         * annotate.c: Remove _initialize_annotate prototype.
6154         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6155         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6156         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6157         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6158         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6159         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6160         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6161         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6162         prototype.
6163         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6164         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6165         * auto-load.c: Remove _initialize_auto_load prototype.
6166         * auxv.c: Remove _initialize_auxv prototype.
6167         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6168         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6169         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6170         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6171         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6172         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6173         prototype.
6174         * break-catch-throw.c: Remove _initialize_break_catch_throw
6175         prototype.
6176         * breakpoint.c: Remove _initialize_breakpoint prototype.
6177         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6178         * btrace.c: Remove _initialize_btrace prototype.
6179         * charset.c: Remove _initialize_charset prototype.
6180         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6181         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6182         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6183         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6184         * cli/cli-script.c: Remove _initialize_cli_script prototype.
6185         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6186         * coffread.c: Remove _initialize_coffread prototype.
6187         * compile/compile.c: Remove _initialize_compile prototype.
6188         * complaints.c: Remove _initialize_complaints prototype.
6189         * completer.c: Remove _initialize_completer prototype.
6190         * copying.awk: Remove _initialize_copying prototype.
6191         * copying.c: Regenerate.
6192         * core-regset.c: Remove _initialize_core_regset prototype.
6193         * corefile.c: Remove _initialize_core prototype.
6194         * corelow.c: Remove _initialize_corelow prototype.
6195         * cp-abi.c: Remove _initialize_cp_abi prototype.
6196         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6197         * cp-support.c: Remove _initialize_cp_support prototype.
6198         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6199         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6200         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6201         * ctf.c: Remove _initialize_ctf prototype.
6202         * d-lang.c: Remove _initialize_d_language prototype.
6203         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6204         prototype.
6205         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6206         * dbxread.c: Remove _initialize_dbxread prototype.
6207         * dcache.c: Remove _initialize_dcache prototype.
6208         * demangle.c: Remove _initialize_demangler prototype.
6209         * disasm-selftests.c: Remove _initialize_disasm_selftests
6210         prototype.
6211         * disasm.c: Remove _initialize_disasm prototype.
6212         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6213         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6214         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6215         prototype.
6216         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6217         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6218         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6219         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6220         * elfread.c: Remove _initialize_elfread prototype.
6221         * exec.c: Remove _initialize_exec prototype.
6222         * extension.c: Remove _initialize_extension prototype.
6223         * f-lang.c: Remove _initialize_f_language prototype.
6224         * f-valprint.c: Remove _initialize_f_valprint prototype.
6225         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6226         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6227         * filesystem.c: Remove _initialize_filesystem prototype.
6228         * findcmd.c: Remove _initialize_mem_search prototype.
6229         * fork-child.c: Remove _initialize_fork_child prototype.
6230         * frame-base.c: Remove _initialize_frame_base prototype.
6231         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6232         * frame.c: Remove _initialize_frame prototype.
6233         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6234         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6235         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6236         * gcore.c: Remove _initialize_gcore prototype.
6237         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6238         * gdbarch.c: Regenerate.
6239         * gdbarch.sh: Remove _initialize_gdbarch prototype.
6240         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6241         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6242         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6243         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6244         * go-lang.c: Remove _initialize_go_language prototype.
6245         * go32-nat.c: Remove _initialize_go32_nat prototype.
6246         * guile/guile.c: Remove _initialize_guile prototype.
6247         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6248         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6249         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6250         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6251         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6252         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6253         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6254         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6255         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6256         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6257         prototype.
6258         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6259         prototype.
6260         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6261         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6262         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6263         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6264         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6265         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6266         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6267         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6268         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6269         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6270         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6271         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6272         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6273         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6274         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6275         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6276         prototype.
6277         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6278         prototype.
6279         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6280         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6281         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6282         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6283         * infcall.c: Remove _initialize_infcall prototype.
6284         * infcmd.c: Remove _initialize_infcmd prototype.
6285         * inferior.c: Remove _initialize_inferiors prototype.
6286         * inflow.c: Remove _initialize_inflow prototype.
6287         * infrun.c: Remove _initialize_infrun prototype.
6288         * interps.c: Remove _initialize_interpreter prototype.
6289         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6290         * jit.c: Remove _initialize_jit prototype.
6291         * language.c: Remove _initialize_language prototype.
6292         * linux-fork.c: Remove _initialize_linux_fork prototype.
6293         * linux-nat.c: Remove _initialize_linux_nat prototype.
6294         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6295         * linux-thread-db.c: Remove _initialize_thread_db prototype.
6296         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6297         * m2-lang.c: Remove _initialize_m2_language prototype.
6298         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6299         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6300         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6301         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6302         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6303         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6304         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6305         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6306         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6307         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6308         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6309         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6310         * machoread.c: Remove _initialize_machoread prototype.
6311         * macrocmd.c: Remove _initialize_macrocmd prototype.
6312         * macroscope.c: Remove _initialize_macroscope prototype.
6313         * maint.c: Remove _initialize_maint_cmds prototype.
6314         * mdebugread.c: Remove _initialize_mdebugread prototype.
6315         * memattr.c: Remove _initialize_mem prototype.
6316         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6317         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6318         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6319         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6320         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6321         * microblaze-linux-tdep.c: Remove
6322         _initialize_microblaze_linux_tdep prototype.
6323         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6324         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6325         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6326         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6327         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6328         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6329         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6330         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6331         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6332         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6333         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6334         prototype.
6335         * mipsread.c: Remove _initialize_mipsread prototype.
6336         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6337         prototype.
6338         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6339         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6340         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6341         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6342         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6343         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6344         prototype.
6345         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6346         * nto-procfs.c: Remove _initialize_procfs prototype.
6347         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6348         * objc-lang.c: Remove _initialize_objc_language prototype.
6349         * objfiles.c: Remove _initialize_objfiles prototype.
6350         * observer.c: Remove observer_test_first_notification_function,
6351         observer_test_second_notification_function,
6352         observer_test_third_notification_function, and
6353         _initialize_observer prototypes.
6354         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6355         * osabi.c: Remove _initialize_gdb_osabi prototype.
6356         * osdata.c: Remove _initialize_osdata prototype.
6357         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6358         * parse.c: Remove _initialize_parse prototype.
6359         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6360         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6361         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6362         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6363         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6364         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6365         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6366         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6367         * printcmd.c: Remove _initialize_printcmd prototype.
6368         * probe.c: Remove _initialize_probe prototype.
6369         * proc-api.c: Remove _initialize_proc_api prototype.
6370         * proc-events.c: Remove _initialize_proc_events prototype.
6371         * proc-service.c: Remove _initialize_proc_service prototype.
6372         * procfs.c: Remove _initialize_procfs prototype.
6373         * psymtab.c: Remove _initialize_psymtab prototype.
6374         * python/python.c: Remove _initialize_python prototype.
6375         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6376         * record-btrace.c: Remove _initialize_record_btrace prototype.
6377         * record-full.c: Remove _initialize_record_full prototype.
6378         * record.c: Remove _initialize_record prototype.
6379         * regcache.c: Remove _initialize_regcache prototype.
6380         * reggroups.c: Remove _initialize_reggroup prototype.
6381         * remote-notif.c: Remove _initialize_notif prototype.
6382         * remote-sim.c: Remove _initialize_remote_sim prototype.
6383         * remote.c: Remove _initialize_remote prototype.
6384         * reverse.c: Remove _initialize_reverse prototype.
6385         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6386         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6387         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6388         prototype.
6389         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6390         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6391         * rust-exp.y: Remove _initialize_rust_exp prototype.
6392         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6393         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6394         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6395         * score-tdep.c: Remove _initialize_score_tdep prototype.
6396         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6397         prototype.
6398         * ser-go32.c: Remove _initialize_ser_dos prototype.
6399         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6400         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6401         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6402         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6403         * serial.c: Remove _initialize_serial prototype.
6404         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6405         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6406         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6407         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6408         * skip.c: Remove _initialize_step_skip prototype.
6409         * sol-thread.c: Remove _initialize_sol_thread prototype.
6410         * solib-aix.c: Remove _initialize_solib_aix prototype.
6411         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6412         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6413         * solib-frv.c: Remove _initialize_frv_solib prototype.
6414         * solib-spu.c: Remove _initialize_spu_solib prototype.
6415         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6416         * solib-target.c: Remove _initialize_solib_target prototype.
6417         * solib.c: Remove _initialize_solib prototype.
6418         * source.c: Remove _initialize_source prototype.
6419         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6420         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6421         prototype.
6422         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6423         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6424         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6425         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6426         prototype.
6427         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6428         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6429         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6430         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6431         prototype.
6432         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6433         prototype.
6434         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6435         prototype.
6436         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6437         prototype.
6438         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6439         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6440         prototype.
6441         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6442         prototype.
6443         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6444         prototype.
6445         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6446         prototype.
6447         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6448         prototype.
6449         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6450         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6451         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6452         * stabsread.c: Remove _initialize_stabsread prototype.
6453         * stack.c: Remove _initialize_stack prototype.
6454         * stap-probe.c: Remove _initialize_stap_probe prototype.
6455         * std-regs.c: Remove _initialize_frame_reg prototype.
6456         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6457         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6458         * symfile.c: Remove _initialize_symfile prototype.
6459         * symmisc.c: Remove _initialize_symmisc prototype.
6460         * symtab.c: Remove _initialize_symtab prototype.
6461         * target-dcache.c: Remove _initialize_target_dcache prototype.
6462         * target-descriptions.c: Remove _initialize_target_descriptions
6463         prototype.
6464         * thread.c: Remove _initialize_thread prototype.
6465         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6466         prototype.
6467         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6468         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6469         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6470         prototype.
6471         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6472         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6473         * tracefile.c: Remove _initialize_tracefile prototype.
6474         * tracepoint.c: Remove _initialize_tracepoint prototype.
6475         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6476         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6477         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6478         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6479         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6480         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6481         * tui/tui.c: Remove _initialize_tui prototype.
6482         * typeprint.c: Remove _initialize_typeprint prototype.
6483         * user-regs.c: Remove _initialize_user_regs prototype.
6484         * utils.c: Remove _initialize_utils prototype.
6485         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6486         * valarith.c: Remove _initialize_valarith prototype.
6487         * valops.c: Remove _initialize_valops prototype.
6488         * valprint.c: Remove _initialize_valprint prototype.
6489         * value.c: Remove _initialize_values prototype.
6490         * varobj.c: Remove _initialize_varobj prototype.
6491         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6492         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6493         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6494         * windows-nat.c: Remove _initialize_windows_nat,
6495         _initialize_check_for_gdb_ini, and _initialize_loadable
6496         prototypes.
6497         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6498         * xcoffread.c: Remove _initialize_xcoffread prototype.
6499         * xml-support.c: Remove _initialize_xml_support prototype.
6500         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6501         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6502         prototype.
6503         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6504         prototype.
6505         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6506
6507 2017-09-08  Keith Seitz  <keiths@redhat.com>
6508
6509         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6510         field.
6511
6512 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6513
6514         * f-valprint.c (f_val_print): Remove check for one byte
6515         sized integers. Remove printing of character type.
6516
6517 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6518             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6519             Bernhard Heckel  <bernhard.heckel@intel.com>
6520
6521         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6522         to maintain proper indentation when printing pointers/refs.
6523
6524 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6525
6526         GDB 8.0.1 released.
6527
6528 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6529
6530         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6531
6532 2017-09-05  Tom Tromey  <tom@tromey.com>
6533
6534         * parse.c (funcall_chain): Now a std::vector.
6535         (start_arglist, end_arglist): Simplify.
6536         (free_funcalls): Remove.
6537         (parse_exp_in_context_1): Remove cleanup.
6538
6539 2017-09-05  Tom Tromey  <tom@tromey.com>
6540
6541         * go-exp.y (go_parse): Don't create a cleanup.
6542
6543 2017-09-05  Tom Tromey  <tom@tromey.com>
6544
6545         * d-exp.y (PrimaryExpression): Use std::string.
6546         (d_parse): Don't create a cleanup.
6547
6548 2017-09-05  Tom Tromey  <tom@tromey.com>
6549
6550         * utils.c (do_clear_parser_state): Remove.
6551         (make_cleanup_clear_parser_state): Remove.
6552         * p-exp.y (pascal_parse): Use scoped_restore.
6553         * m2-exp.y (m2_parse): Use scoped_restore.
6554         * f-exp.y (f_parse): Use scoped_restore.
6555         * d-exp.y (d_parse): Use scoped_restore.
6556         * c-exp.y (c_parse): Use scoped_restore.
6557         * ada-exp.y (ada_parse): Use scoped_restore.
6558         * utils.h (make_cleanup_clear_parser_state): Remove.
6559
6560 2017-09-06  Keith Seitz  <keiths@redhat.com>
6561
6562         * dwarf2read.c (dw2_linkage_name_attr): New function.
6563         (dw2_linkage_name): New function.
6564         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6565         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6566         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6567
6568 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6569
6570         * config/djgpp/djconfig.sh: Correct shell portability issue.
6571
6572 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6573
6574         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6575
6576 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6577
6578         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6579         * NEWS: Mention new FreeBSD/mips native configuration.
6580         * configure.host: Add aarch64*-*-freebsd*.
6581         * configure.nat: Likewise.
6582         * aarch64-fbsd-nat.c: New file.
6583
6584 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6585
6586         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6587         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6588         * NEWS: Mention new FreeBSD/aarch64 target.
6589         * configure.tgt: Add aarch64*-*-freebsd*.
6590         * aarch64-fbsd-tdep.c: New file.
6591         * aarch64-fbsd-tdep.h: New file.
6592
6593 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6594
6595         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6596
6597 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6598
6599         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6600         of TLS symbols.
6601
6602 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6603
6604         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6605         call.
6606
6607 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6608
6609         * infrun.c (follow_exec): Call add_thread after
6610         target_find_description.
6611
6612 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6613
6614         * infrun.c (handle_inferior_event_1): When exec'ing, read
6615         stop_pc after follow_exec.
6616
6617 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6618
6619         * remote.c (process_g_packet): Update error message.
6620
6621 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6622
6623         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6624         targets.
6625
6626 2017-09-05  Pedro Alves  <palves@redhat.com>
6627
6628         * eval.c (eval_call, evaluate_funcall): New functions, factored
6629         out from ...
6630         (evaluate_subexp_standard): ... this.
6631
6632 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6633
6634         * amd64-tdep.c (amd64_target_description): Create target
6635         descriptions.
6636         (_initialize_amd64_tdep): Don't call functions
6637         initialize_tdesc_amd64_*.  Add self tests.
6638         * arch/amd64.c (amd64_create_target_description): Add parameter
6639         is_linux.  Call set_tdesc_osabi if is_linux is true.
6640         * arch/amd64.h (amd64_create_target_description): Update the
6641         declaration.
6642         * arch/i386.c (i386_create_target_description): Add parameter
6643         is_linux.  Call set_tdesc_osabi if is_linux is true.
6644         * arch/i386.h (i386_create_target_description): Update
6645         declaration.
6646         * configure.tgt: Add i386.o to gdb_target_obs.
6647         * features/Makefile (XMLTOC): Remove i386/*.xml.
6648         * features/i386/amd64-avx-avx512.c: Remove.
6649         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6650         * features/i386/amd64-avx-mpx.c: Remove.
6651         * features/i386/amd64-avx.c: Remove.
6652         * features/i386/amd64-mpx.c: Remove.
6653         * features/i386/amd64.c: Remove.
6654         * features/i386/i386-avx-avx512.c: Remove.
6655         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6656         * features/i386/i386-avx-mpx.c: Remove.
6657         * features/i386/i386-avx.c: Remove.
6658         * features/i386/i386-mmx.c: Remove.
6659         * features/i386/i386-mpx.c: Remove.
6660         * features/i386/i386.c: Remove.
6661         * i386-tdep.c: Don't include features/i386/i386*.c., include
6662         target-descriptions.h and arch/i386.h.
6663         (i386_target_description): Create target descriptions.
6664         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6665         functions.  Do self tests.
6666
6667 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6668
6669         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6670         * features/i386/amd64-avx-avx512-linux.c: Removed.
6671         * features/i386/amd64-avx-linux.c: Removed.
6672         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6673         * features/i386/amd64-avx-mpx-linux.c: Removed.
6674         * features/i386/amd64-linux.c: Removed.
6675         * features/i386/amd64-mpx-linux.c: Removed.
6676         * features/i386/x32-avx-avx512-linux.c: Removed.
6677         * features/i386/x32-avx-linux.c: Removed.
6678         * features/i386/x32-linux.c: Removed.
6679
6680 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6681
6682         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6683         features/i386/*.c.
6684         (amd64_linux_read_description): Call
6685         amd64_create_target_description.
6686         * arch/amd64.c: New file.
6687         * arch/amd64.h: New file.
6688         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6689         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6690
6691 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6692
6693         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6694         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6695         (amd64_linux_read_description): Create target descriptions.
6696         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6697         functions.  Add unit tests.
6698         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6699         x32-core.xml.
6700         * features/i386/64bit-avx.c: Generated.
6701         * features/i386/64bit-avx512.c: Generated.
6702         * features/i386/64bit-core.c: Generated.
6703         * features/i386/64bit-linux.c: Generated.
6704         * features/i386/64bit-mpx.c: Generated.
6705         * features/i386/64bit-pkeys.c: Generated.
6706         * features/i386/64bit-segments.c: Generated.
6707         * features/i386/64bit-sse.c: Generated.
6708         * features/i386/x32-core.c: Generated.
6709         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6710         c files for amd64-linux and x32-linux.
6711
6712 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6713
6714         * amd64-linux-tdep.c (amd64_linux_read_description): New
6715         function.
6716         (amd64_linux_core_read_description): Call
6717         amd64_linux_read_description.
6718         (amd64_linux_init_abi): Likewise.
6719         (amd64_x32_linux_init_abi): Likewise.
6720         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6721         * x86-linux-nat.c (x86_linux_read_description): Call
6722         amd64_linux_read_description.
6723
6724 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6725
6726         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6727         comments.
6728
6729 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6730
6731         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6732         * features/i386/i386-avx-avx512-linux.c: Remove.
6733         * features/i386/i386-avx-linux.c: Remove.
6734         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6735         * features/i386/i386-avx-mpx-linux.c: Remove.
6736         * features/i386/i386-linux.c: Remove.
6737         * features/i386/i386-mmx-linux.c: Remove.
6738         * features/i386/i386-mpx-linux.c: Remove.
6739
6740 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6741
6742         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6743         (SFILES): Add arch/i386.c.
6744         (HFILES_NO_SRCDIR): Add arch/i386.h.
6745         * arch/i386.c: New file.
6746         * arch/i386.h: New file.
6747         * arch/tdesc.h (allocate_target_description): Declare.
6748         (set_tdesc_architecture): Declare.
6749         (set_tdesc_osabi): Declare.
6750         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6751         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6752         include arch/i386.h.
6753         (i386_linux_read_description): Remove code and call
6754         i386_create_target_description.
6755         (set_tdesc_architecture): New function.
6756         (set_tdesc_osabi): New function.
6757         * target-descriptions.h (allocate_target_description): Remove.
6758
6759 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6760
6761         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6762         * target-descriptions.c (tdesc_create_feature): Likewise, and
6763         adjust code.
6764         * features/i386/32bit-avx.c: Re-generated.
6765         * features/i386/32bit-avx512.c: Re-generated.
6766         * features/i386/32bit-core.c: Re-generated.
6767         * features/i386/32bit-linux.c: Re-generated.
6768         * features/i386/32bit-mpx.c: Re-generated.
6769         * features/i386/32bit-pkeys.c: Re-generated.
6770         * features/i386/32bit-sse.c: Re-generated.
6771
6772 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6773
6774         * regformats/regdef.h (struct reg): Override operator == and !=.
6775
6776 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6777
6778         * arch/tdesc.h: New file.
6779         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6780         * target-descriptions.c: Update comments.
6781         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6782         declarations.
6783         * features/i386/32bit-avx.c: Re-generated.
6784         * features/i386/32bit-avx512.c: Re-generated.
6785         * features/i386/32bit-core.c: Re-generated.
6786         * features/i386/32bit-linux.c: Re-generated.
6787         * features/i386/32bit-mpx.c: Re-generated.
6788         * features/i386/32bit-pkeys.c: Re-generated.
6789         * features/i386/32bit-sse.c: Re-generated.
6790
6791 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6792
6793         * regformats/regdat.sh: Update generated code.
6794
6795 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6796
6797         * regformats/regdat.sh: Adjust code order.
6798
6799 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6800
6801         * expprint.c (dump_subexp_body_standard): Use constant format
6802         string in fprintf_filtered call.
6803
6804 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6805
6806         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6807         NetBSD/i386.
6808         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6809
6810 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6811
6812         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6813
6814 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6815
6816         * bsd-kvm.o: Define _KMEMUSER.
6817         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6818         * configure: Regenerate.
6819
6820 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6821
6822         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6823         * i386-fbsd-nat.c: Likewise.
6824
6825 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6826
6827         * unittests/array-view-selftests.c: Add include of <array>.
6828
6829 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6830
6831         * spu-tdep.c (flush_ea_cache): Add missing argument to
6832         call_function_by_hand.
6833
6834 2017-09-04  Pedro Alves  <palves@redhat.com>
6835
6836         * NEWS (Safer support for debugging with no debug info): New.
6837
6838 2017-09-04  Pedro Alves  <palves@redhat.com>
6839
6840         * c-exp.y (function_method, function_method_void): Add current
6841         instance flags to TYPE_INSTANCE.
6842         * dwarf2read.c (check_modifier): New.
6843         (compute_delayed_physnames): Assert that only C++ adds delayed
6844         physnames.  Mark fn_fields as const/volatile depending on
6845         physname.
6846         * eval.c (make_params): New type_instance_flags parameter.  Use
6847         it as the new type's instance flags.
6848         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6849         flags element and pass it to make_params.
6850         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6851         instance flags element.
6852         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6853         * gdbtypes.h: Include "enum-flags.h".
6854         (type_instance_flags): New enum-flags type.
6855         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6856         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6857         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6858         (follow_type_instance_flags): New function.
6859         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6860         * parser-defs.h (follow_type_instance_flags): Declare.
6861         * valops.c (value_struct_elt_for_reference): const/volatile must
6862         match too.
6863
6864 2017-09-04  Pedro Alves  <palves@redhat.com>
6865
6866         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6867         function/method scopes; lookup the nested name as a function local
6868         static variable.
6869
6870 2017-09-04  Pedro Alves  <palves@redhat.com>
6871
6872         (%type <voidval>): Add function_method.
6873         * c-exp.y (exp): New production for calls with no arguments.
6874         (function_method, function_method_void_or_typelist): New
6875         productions.
6876         (exp): New production for "method()::static_var".
6877         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6878         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6879         Handle OP_FUNC_STATIC_VAR.
6880         * parse.c (operator_length_standard):
6881         Handle OP_FUNC_STATIC_VAR.
6882
6883 2017-09-04  Pedro Alves  <palves@redhat.com>
6884
6885         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6886         handling.
6887         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6888         Ditto.
6889         * parse.c (operator_length_standard, operator_check_standard):
6890         Ditto.
6891         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6892
6893 2017-09-04  Pedro Alves  <palves@redhat.com>
6894
6895         * ax-gdb.c: Include "typeprint.h".
6896         (gen_expr_for_cast): New function.
6897         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6898         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6899         type is unknown.
6900         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6901         nodebug_data_symbol.
6902         * eval.c: Include "typeprint.h".
6903         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6904         Error out if symbol has unknown type.
6905         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6906         evaluate_subexp_for_cast.
6907         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6908         OP_VAR_MSYM_VALUE.
6909         (evaluate_subexp_for_cast): New function.
6910         * gdbtypes.c (init_nodebug_var_type): New function.
6911         (objfile_type): Use it to initialize types of variables with no
6912         debug info.
6913         * typeprint.c (error_unknown_type): New.
6914         * typeprint.h (error_unknown_type): New declaration.
6915         * compile/compile-c-types.c (convert_type_basic): Handle
6916         TYPE_CODE_ERROR; warn and fallback to int for variables with
6917         unknown type.
6918
6919 2017-09-04  Pedro Alves  <palves@redhat.com>
6920
6921         * eval.c (evaluate_var_value): New function, factored out from ...
6922         (evaluate_subexp_standard): ... here.
6923
6924 2017-09-04  Pedro Alves  <palves@redhat.com>
6925
6926         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6927         Remove useless assignments to 'op'.
6928
6929 2017-09-04  Pedro Alves  <palves@redhat.com>
6930
6931         * eval.c (eval_skip_value): New function.
6932         (evaluate_subexp_standard): Use it.
6933
6934 2017-09-04  Pedro Alves  <palves@redhat.com>
6935
6936         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6937         function name from symbol/minsym and pass it to
6938         error_call_unknown_return_type.
6939
6940 2017-09-04  Pedro Alves  <palves@redhat.com>
6941
6942         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6943         * ax-gdb.c (gen_msym_var_ref): New function.
6944         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6945         * eval.c (evaluate_var_msym_value): New function.
6946         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6947         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6948         to call_function_by_hand.
6949         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6950         Handle OP_VAR_MSYM_VALUE.
6951         (union exp_element) <msymbol>: New field.
6952         * minsyms.h (struct type): Forward declare.
6953         (find_minsym_type_and_address): Declare.
6954         * parse.c (write_exp_elt_msym): New function.
6955         (write_exp_msymbol): Delete, refactored as ...
6956         (find_minsym_type_and_address): ... this new function.
6957         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6958         (operator_length_standard, operator_check_standard): Handle
6959         OP_VAR_MSYM_VALUE.
6960         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6961
6962 2017-09-04  Pedro Alves  <palves@redhat.com>
6963
6964         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6965         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6966         unknown.
6967         * ada-typeprint.c (print_func_type): Handle functions with unknown
6968         return type.
6969         * c-typeprint.c (c_type_print_base): Handle functions and methods
6970         with unknown return type.
6971         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6972         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6973         * compile/compile-c-types.c: Include "objfiles.h".
6974         (convert_func): For functions with unknown return type, warn and
6975         default to int.
6976         * compile/compile-object-run.c (compile_object_run): Adjust call
6977         to call_function_by_hand_dummy.
6978         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6979         call_function_by_hand.
6980         * eval.c (evaluate_subexp_standard): Adjust calls to
6981         call_function_by_hand.  Handle functions and methods with unknown
6982         return type.  Pass expect_type to call_function_by_hand.
6983         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6984         return type.
6985         * gcore.c (call_target_sbrk): Adjust call to
6986         call_function_by_hand.
6987         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6988         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6989         an integer address type instead of nodebug.
6990         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6991         call_function_by_hand.
6992         * infcall.c (error_call_unknown_return_type): New function.
6993         (call_function_by_hand): New "default_return_type" parameter.
6994         Pass it down.
6995         (call_function_by_hand_dummy): New "default_return_type"
6996         parameter.  Use it instead of defaulting to int.  If there's no
6997         default and the return type is unknown, throw an error.  If
6998         there's a default return type, and the called function has no
6999         debug info, then assume the function is prototyped.
7000         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7001         New "default_return_type" parameter.
7002         (error_call_unknown_return_type): New declaration.
7003         * linux-fork.c (call_lseek): Cast return type of lseek.
7004         (inferior_call_waitpid, checkpoint_command): Adjust calls to
7005         call_function_by_hand.
7006         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7007         calls to call_function_by_hand.
7008         * m2-typeprint.c (m2_procedure): Handle functions with unknown
7009         return type.
7010         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7011         (value_nsstring, print_object_command): Adjust calls to
7012         call_function_by_hand.
7013         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7014         functions with unknown return type.
7015         (pascal_type_print_func_varspec_suffix): New function.
7016         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7017         TYPE_CODE_METHOD>: Use it.
7018         * python/py-value.c (valpy_call): Adjust call to
7019         call_function_by_hand.
7020         * rust-lang.c (rust_evaluate_funcall): Adjust call to
7021         call_function_by_hand.
7022         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7023         call_function_by_hand.
7024         * valops.c (value_allocate_space_in_inferior): Adjust call to
7025         call_function_by_hand.
7026         * typeprint.c (type_print_unknown_return_type): New function.
7027         * typeprint.h (type_print_unknown_return_type): New declaration.
7028
7029 2017-09-04  Pedro Alves  <palves@redhat.com>
7030
7031         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7032         types with more than one parameter as prototyped.
7033
7034 2017-09-04  Pedro Alves  <palves@redhat.com>
7035
7036         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7037         (disassemble_command): Use gdb_disassembly_flags instead of bare
7038         int.
7039         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7040         (dump_insns, do_mixed_source_and_assembly_deprecated)
7041         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7042         Use gdb_disassembly_flags instead of bare int.
7043         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7044         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7045         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7046         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
7047         (enum gdb_disassembly_flag): ... values of this new enumeration.
7048         (gdb_disassembly_flags): Define.
7049         (gdb_disassembly)
7050         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7051         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7052         gdb_disassembly_flags instead of bare int.
7053         * record-btrace.c (btrace_insn_history)
7054         (record_btrace_insn_history, record_btrace_insn_history_range)
7055         (record_btrace_insn_history_from): Use gdb_disassembly_flags
7056         instead of bare int.
7057         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7058         Use gdb_disassembly_flags instead of bare int.
7059         * target-debug.h (target_debug_print_gdb_disassembly_flags):
7060         Define.
7061         * target-delegates.c: Regenerate.
7062         * target.c (target_insn_history, target_insn_history_from)
7063         (target_insn_history_range): Use gdb_disassembly_flags instead of
7064         bare int.
7065         * target.h: Include "disasm.h".
7066         (struct target_ops) <to_insn_history, to_insn_history_from,
7067         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7068         int.
7069         (target_insn_history, target_insn_history_from)
7070         (target_insn_history_range): Use gdb_disassembly_flags instead of
7071         bare int.
7072
7073 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7074
7075         * cli/cli-script.c (build_command_line): For if/while commands,
7076         check whether args is empty.
7077
7078 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7079
7080         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7081         (enum command_control_type): Likewise.
7082         (struct command_line): Likewise.
7083         (free_command_lines): Likewise.
7084         (struct command_lines_deleter): Likewise.
7085         (command_line_up): Likewise.
7086         (read_command_lines): Likewise.
7087         (read_command_lines_1): Likewise.
7088         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7089         (enum command_control_type): Likewise.
7090         (struct command_line): Likewise.
7091         (free_command_lines): Likewise.
7092         (struct command_lines_deleter): Likewise.
7093         (command_line_up): Likewise.
7094         (read_command_lines): Likewise.
7095         (read_command_lines_1): Likewise.
7096         * breakpoint.h: Include cli/cli-script.h.
7097         * extension-priv.h: Likewise.
7098         * gdbcmd.h: Likewise.
7099
7100 2017-09-04  Pedro Alves  <palves@redhat.com>
7101
7102         * ada-lang.c (is_known_support_routine): Move sal declaration to
7103         where it is initialized.
7104         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7105         (parse_breakpoint_sals, decode_static_tracepoint_spec)
7106         (clear_command, update_static_tracepoint): Remove init_sal
7107         references.  Move declarations closer to initializations.
7108         * cli/cli-cmds.c (list_command): Move sal declarations closer to
7109         initializations.
7110         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7111         references.  Move sal declarations closer to initializations.
7112         * frame.c (find_frame_sal): Return a symtab_and_line via function
7113         return instead of output parameter.  Remove init_sal references.
7114         * frame.h (find_frame_sal): Return a symtab_and_line via function
7115         return instead of output parameter.
7116         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7117         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7118         instead of memset.
7119         (gdbscm_find_pc_line): Remove init_sal reference.
7120         * infcall.c (call_function_by_hand_dummy): Remove init_sal
7121         references.  Move declarations closer to initializations.
7122         * infcmd.c (set_step_frame): Update.  Move declarations closer to
7123         initializations.
7124         (finish_backward): Remove init_sal references.  Move declarations
7125         closer to initializations.
7126         * infrun.c (process_event_stop_test, handle_step_into_function)
7127         (insert_hp_step_resume_breakpoint_at_frame)
7128         (insert_step_resume_breakpoint_at_caller): Likewise.
7129         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7130         (symbol_to_sal): Likewise.
7131         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7132         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7133         to its initialization.
7134         * reverse.c (save_bookmark_command): Use new/delete.  Remove
7135         init_sal references.  Move declarations closer to initializations.
7136         * source.c (get_current_source_symtab_and_line): Remove brace
7137         initialization.
7138         (set_current_source_symtab_and_line): Now takes the sal by const
7139         reference.  Remove brace initialization.
7140         (line_info): Remove init_sal reference.
7141         * source.h (set_current_source_symtab_and_line): Now takes a
7142         symtab_and_line via const reference.
7143         * stack.c (set_current_sal_from_frame): Adjust.
7144         (print_frame_info): Adjust.
7145         (get_last_displayed_sal): Return the sal via function return
7146         instead of via output parameter.  Simplify.
7147         (frame_info): Adjust.
7148         * stack.h (get_last_displayed_sal): Return the sal via function
7149         return instead of via output parameter.
7150         * symtab.c (init_sal): Delete.
7151         (find_pc_sect_line): Remove init_sal references.  Move
7152         declarations closer to initializations.
7153         (find_function_start_sal): Remove init_sal references.  Move
7154         declarations closer to initializations.
7155         * symtab.h (struct symtab_and_line): In-class initialize all
7156         fields.
7157         * tracepoint.c (set_traceframe_context)
7158         (print_one_static_tracepoint_marker): Remove init_sal references.
7159         Move declarations closer to initializations.
7160         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7161         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
7162         declarations closer to initializations.
7163         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7164         init_sal references.  Adjust.
7165
7166 2017-09-04  Pedro Alves  <palves@redhat.com>
7167
7168         * ax-gdb.c (agent_command_1): Use range-for.
7169         * break-catch-throw.c (re_set_exception_catchpoint): Update.
7170         * breakpoint.c: Include "common/array-view.h".
7171         (init_breakpoint_sal, create_breakpoint_sal): Change sals
7172         parameter from struct symtabs_and_lines to
7173         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
7174         (breakpoint_sals_to_pc): Change sals parameter from struct
7175         symtabs_and_lines to std::vector reference.
7176         (check_fast_tracepoint_sals): Change sals parameter from struct
7177         symtabs_and_lines to std::array_view.  Use range-for.
7178         (decode_static_tracepoint_spec): Return a std::vector instead of
7179         symtabs_and_lines.  Update.
7180         (create_breakpoint): Update.
7181         (break_range_command, until_break_command, clear_command): Update.
7182         (base_breakpoint_decode_location, bkpt_decode_location)
7183         (bkpt_probe_create_sals_from_location)
7184         (bkpt_probe_decode_location, tracepoint_decode_location)
7185         (tracepoint_probe_decode_location)
7186         (strace_marker_create_sals_from_location): Return a std::vector
7187         instead of symtabs_and_lines.
7188         (strace_marker_create_breakpoints_sal): Update.
7189         (strace_marker_decode_location): Return a std::vector instead of
7190         symtabs_and_lines.  Update.
7191         (update_breakpoint_locations): Change struct symtabs_and_lines
7192         parameters to gdb::array_view.  Adjust.
7193         (location_to_sals): Return a std::vector instead of
7194         symtabs_and_lines.  Update.
7195         (breakpoint_re_set_default): Use std::vector instead of struct
7196         symtabs_and_lines.
7197         (decode_location_default): Return a std::vector instead of
7198         symtabs_and_lines.  Update.
7199         * breakpoint.h: Include "common/array-view.h".
7200         (struct breakpoint_ops) <decode_location>: Now returns a
7201         std::vector instead of returning a symtabs_and_lines via output
7202         parameter.
7203         (update_breakpoint_locations): Change sals parameters to use
7204         gdb::array_view.
7205         * cli/cli-cmds.c (edit_command, list_command): Update to use
7206         std::vector and gdb::array_view.
7207         (ambiguous_line_spec): Adjust to use gdb::array_view and
7208         range-for.
7209         (compare_symtabs): Rename to ...
7210         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
7211         const reference and adjust.
7212         (filter_sals): Rewrite using std::vector and standard algorithms.
7213         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7214         (jump_command): Update to use std::vector.
7215         * linespec.c (struct linespec_state) <canonical_names>: Update
7216         comment.
7217         (add_sal_to_sals_basic): Delete.
7218         (add_sal_to_sals, filter_results, convert_results_to_lsals)
7219         (decode_line_2, create_sals_line_offset)
7220         (convert_address_location_to_sals, convert_linespec_to_sals)
7221         (convert_explicit_location_to_sals, parse_linespec)
7222         (event_location_to_sals, decode_line_full, decode_line_1)
7223         (decode_line_with_current_source)
7224         (decode_line_with_last_displayed, decode_objc)
7225         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7226         (linespec_result::~linespec_result): Adjust to use std::vector
7227         instead of symtabs_and_lines.
7228         * linespec.h (linespec_sals::sals): Now a std::vector.
7229         (struct linespec_result): Use std::vector, bool, and in-class
7230         initialization.
7231         (decode_line_1, decode_line_with_current_source)
7232         (decode_line_with_last_displayed): Return std::vector.
7233         * macrocmd.c (info_macros_command): Use std::vector.
7234         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7235         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7236         std::vector.
7237         * probe.h (parse_probes): Return a std::vector.
7238         * python/python.c (gdbpy_decode_line): Use std::vector and
7239         gdb::array_view.
7240         * source.c (select_source_symtab, line_info): Use std::vector.
7241         * stack.c (func_command): Use std::vector.
7242         * symtab.h (struct symtabs_and_lines): Delete.
7243         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7244
7245 2017-09-04  Pedro Alves  <palves@redhat.com>
7246
7247         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7248         unittests/array-view-selftests.c.
7249         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7250         * common/array-view.h: New file.
7251         * unittests/array-view-selftests.c: New file.
7252
7253 2017-09-04  Pedro Alves  <palves@redhat.com>
7254
7255         * cli/cli-cmds.c (edit_command): Pass message to
7256         ambiguous_line_spec.
7257         (list_command): Pass message to ambiguous_line_spec.  Say
7258         "first"/"last" instead of "start" and "end" to be consistent with
7259         the manual.
7260         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
7261         them to print formatted message.
7262
7263 2017-09-04  Pedro Alves  <palves@redhat.com>
7264
7265         * btrace.c (ftrace_add_pt): Pass btrace_insn to
7266         ftrace_update_insns by reference instead of pointer.
7267
7268 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7269
7270         * i386-go32-tdep.c: Include x86-xstate.h.
7271         (i386_go32_init_abi): Call i386_target_description.
7272         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7273         if xcr0 is X86_XSTATE_X87_MASK.
7274         * i386-tdep.h (tdesc_i386): Remove the declaration.
7275         (tdesc_i386_mmx): Likewise.
7276
7277 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7278
7279         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7280         X86_XSTATE_SSE_MASK instead of 0.
7281
7282 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7283
7284         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7285         i386_target_description.
7286         * i386-fbsd-nat.c (i386fbsd_read_description): Call
7287         i386_target_description.
7288         * i386-tdep.c (i386_gdbarch_init): Likewise.
7289
7290 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7291
7292         * amd64-darwin-tdep.c: Include "x86-xstate.h".
7293         (x86_darwin_init_abi_64): Call amd64_target_description.
7294         * amd64-dicos-tdep.c: Likewise.
7295         * amd64-fbsd-nat.c: Likewise.
7296         * amd64-fbsd-tdep.c: Likewise.
7297         * amd64-nbsd-tdep.c: Likewise.
7298         * amd64-obsd-tdep.c: Likewise.
7299         * amd64-sol2-tdep.c: Likewise.
7300         * amd64-windows-tdep.c: Likewise.
7301         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7302
7303 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7304
7305         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7306         (btrace_function) <insn>: Change type to use std::vector.
7307         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7308         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7309         ftrace_update_insns, ftrace_compute_global_level_offset,
7310         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7311         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7312         change to std::vector.
7313         (ftrace_update_insns): Adjust to change to std::vector, change
7314         type of INSN parameter.
7315         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7316         * record-btrace.c (btrace_call_history_insn_range,
7317         btrace_compute_src_line_range,
7318         record_btrace_frame_prev_register): Adjust to change to
7319         std::vector.
7320         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7321         to change to std::vector.
7322
7323 2017-09-03  Tom Tromey  <tom@tromey.com>
7324
7325         * corefile.c (reopen_exec_file): Use std::string.
7326
7327 2017-09-03  Tom Tromey  <tom@tromey.com>
7328
7329         * compile/compile.c (compile_register_name_mangled): Return
7330         std::string.
7331         * compile/compile-loc2c.c (pushf_register_address): Update.
7332         (pushf_register): Update.
7333         * compile/compile-c-types.c (convert_array): Update.
7334         * compile/compile-c-symbols.c (generate_vla_size): Update.
7335         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7336         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7337         (convert_one_symbol): Update.
7338         (generate_c_for_for_one_variable): Update.
7339         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7340         std::string.
7341         (generate_register_struct): Update.
7342         * compile/compile-internal.h (c_get_range_decl_name): Return a
7343         std::string.
7344         (compile_register_name_mangled): Return std::string.
7345
7346 2017-09-03  Tom Tromey  <tom@tromey.com>
7347
7348         * utils.c (perror_string): Return a std::string.
7349         (throw_perror_with_name, perror_warning_with_name): Update.
7350
7351 2017-09-03  Tom Tromey  <tom@tromey.com>
7352
7353         * demangle.c (demangle_command): Use std::string,
7354         unique_xmalloc_ptr.
7355
7356 2017-09-03  Tom Tromey  <tom@tromey.com>
7357
7358         * cli/cli-setshow.c (do_set_command): Use std::string.
7359
7360 2017-09-03  Tom Tromey  <tom@tromey.com>
7361
7362         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7363
7364 2017-09-03  Tom Tromey  <tom@tromey.com>
7365
7366         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7367
7368 2017-09-03  Tom Tromey  <tom@tromey.com>
7369
7370         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7371         gdb::unique_xmalloc_ptr.
7372
7373 2017-09-03  Tom Tromey  <tom@tromey.com>
7374
7375         * thread.c (print_thread_info_1): Use string_printf.
7376         (thread_apply_command, thread_apply_all_command): Use
7377         std::string.
7378
7379 2017-09-03  Tom Tromey  <tom@tromey.com>
7380
7381         * valprint.c (val_print_string): Update.
7382         * gdbcore.h (memory_error_message): Return std::string.
7383         * corefile.c (memory_error_message): Return std::string.
7384         (memory_error): Update.
7385         * breakpoint.c (insert_bp_location): Update.
7386
7387 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7388
7389         * target/waitstatus.h (target_waitstatus_to_string): Change
7390         return type to std::string.
7391         * target/waitstatus.c (target_waitstatus_to_string): Return
7392         std::string.
7393         * target.h (target_waitstatus_to_string): Remove declaration.
7394         * infrun.c (resume, clear_proceed_status_thread,
7395         print_target_wait_results, do_target_wait, save_waitstatus,
7396         stop_all_threads): Adjust.
7397         * record-btrace.c (record_btrace_wait): Adjust.
7398         * target-debug.h
7399         (target_debug_print_struct_target_waitstatus_p): Adjust.
7400
7401 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7402
7403         PR gdb/22046
7404         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7405         detection.
7406
7407 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7408
7409         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7410         for setting/unsetting environment variables on the remote target.
7411         (New remote packets): Add entries for QEnvironmentHexEncoded,
7412         QEnvironmentUnset and QEnvironmentReset.
7413         * common/environ.c (gdb_environ::operator=): Extend method to
7414         handle m_user_set_env_list and m_user_unset_env_list.
7415         (gdb_environ::clear): Likewise.
7416         (match_var_in_string): Change type of first parameter from 'char
7417         *' to 'const char *'.
7418         (gdb_environ::set): Extend method to handle
7419         m_user_set_env_list and m_user_unset_env_list.
7420         (gdb_environ::unset): Likewise.
7421         (gdb_environ::clear_user_set_env): New method.
7422         (gdb_environ::user_set_envp): Likewise.
7423         (gdb_environ::user_unset_envp): Likewise.
7424         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7425         m_user_unset_env_list on move constructor/assignment.
7426         (unset): Add new default parameter 'update_unset_list = true'.
7427         (clear_user_set_env): New method.
7428         (user_set_envp): Likewise.
7429         (user_unset_envp): Likewise.
7430         (m_user_set_env_list): New std::set.
7431         (m_user_unset_env_list): Likewise.
7432         * common/rsp-low.c (hex2str): New function.
7433         (bin2hex): New overload for bin2hex function.
7434         * common/rsp-low.c (hex2str): New prototype.
7435         (str2hex): New overload prototype.
7436         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7437         QEnvironmentUnset and QEnvironmentReset.
7438         (remote_protocol_features): Add QEnvironmentHexEncoded,
7439         QEnvironmentUnset and QEnvironmentReset packets.
7440         (send_environment_packet): New function.
7441         (extended_remote_environment_support): Likewise.
7442         (extended_remote_create_inferior): Call
7443         extended_remote_environment_support.
7444         (_initialize_remote): Add QEnvironmentHexEncoded,
7445         QEnvironmentUnset and QEnvironmentReset packet configs.
7446         * unittests/environ-selftests.c (gdb_selftest_env_var):
7447         New variable.
7448         (test_vector_initialization): New function.
7449         (test_init_from_host_environ): Likewise.
7450         (test_reinit_from_host_environ): Likewise.
7451         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7452         Likewise.
7453         (test_unset_set_empty_vector): Likewise.
7454         (test_vector_clear): Likewise.
7455         (test_std_move): Likewise.
7456         (test_move_constructor):
7457         (test_self_move): Likewise.
7458         (test_set_unset_reset): Likewise.
7459         (run_tests): Rewrite in terms of the functions above.
7460
7461 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7462
7463         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7464         (adi_available): Use a temp variable of type CORE_ADDR as argument
7465         3 when calling target_auxv_search.
7466         (adi_normalize_address): Use masks and xor operators to calculate
7467         normalized address.
7468         (adi_read_versions, adi_write_versions, adi_print_versions)
7469         (do_examine, do_assign): Use paddress.
7470
7471 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7472
7473         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7474         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7475         out of loop and add supply of FIR.
7476         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7477         add collect of FIR.
7478
7479 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7480
7481         PR gdb/21827
7482         * cli/cli-script.c (define_command): Don't convert command name
7483         to lower case.
7484
7485 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7486
7487         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7488         Update all callers accordingly. Remove all code blocks handling
7489         the case where DISPP is not NULL.
7490
7491 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7492
7493         PR symtab/22003
7494         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7495         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7496         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7497
7498 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7499
7500         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7501         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7502         (read_comp_units_from_section): New parameter abbrev_section, use
7503         read_and_check_comp_unit_head, allocate signatured_type if needed.
7504         (create_all_comp_units): Update read_comp_units_from_section caller.
7505
7506 2017-08-23  Pedro Alves  <palves@redhat.com>
7507
7508         PR remote/21852
7509         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7510         to null_ptid and switch to thread without reading the registers
7511         after adding the inferior.
7512
7513 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7514
7515         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7516         compile-gcc.
7517         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7518         (compile_to_object): Implement compile_gcc.
7519         (_initialize_compile): Install "set compile-gcc".  Initialize
7520         compile_gcc.
7521
7522 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7523
7524         * compile/compile.c (compile_to_object): Conditionally call
7525         set_verbose.  Conditionally call compile or compile_v0.
7526
7527 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7528
7529         * sparc64-tdep.h: (adi_normalize_address): New export.
7530         * sparc-nat.h: (open_adi_tag_fd): New export.
7531         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7532         * sparc64-linux-tdep.c:
7533         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7534         (sparc64_linux_handle_segmentation_fault): New function.
7535         (sparc64_linux_init_abi): Register
7536         sparc64_linux_handle_segmentation_fault
7537         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7538         (sparc64_addr_bits_remove): New function.
7539         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7540         (MAX_PROC_NAME_SIZE): New macro.
7541         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7542         (sparc64adilist): New variable.
7543         (adi_proc_list): New variable.
7544         (find_adi_info): New function.
7545         (add_adi_info): New function.
7546         (get_adi_info_proc): New function.
7547         (get_adi_info): New function.
7548         (info_adi_command): New function.
7549         (read_maps_entry): New function.
7550         (adi_available): New function.
7551         (adi_normalize_address): New function.
7552         (adi_align_address): New function.
7553         (adi_convert_byte_count): New function.
7554         (adi_tag_fd): New function.
7555         (adi_is_addr_mapped): New function.
7556         (adi_read_versions): New function.
7557         (adi_write_versions): New function.
7558         (adi_print_versions): New function.
7559         (do_examine): New function.
7560         (do_assign): New function.
7561         (adi_examine_command): New function.
7562         (adi_assign_command): New function.
7563         (_initialize_sparc64_adi_tdep): New function.
7564
7565 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * breakpoint.c (breakpoints_info): Rename to ...
7568         (info_breakpoints_command): ... this.
7569         (watchpoints_info): Rename to ...
7570         (info_watchpoints_command): ... this.
7571         (tracepoints_info): Rename to ...
7572         (info_tracepoints_command): ... this.
7573         (_initialize_breakpoint): Adjust.
7574         * dcache.c (dcache_info): Rename to ...
7575         (info_display_command): ... this.
7576         (_initialize_dcache): Adjust.
7577         * frame.h (args_info): Rename to ...
7578         (info_args_command): ... this.
7579         (locals_info): Rename to ...
7580         (info_locals_command): ... this.
7581         * infcmd.c (nofp_registers_info): Rename to ...
7582         (info_registers_command): ... this.
7583         (float_info): Rename to ...
7584         (info_float_command): ... this.
7585         (program_info): Rename to ...
7586         (info_program_command): ... this.
7587         (all_registers_info): Rename to ...
7588         (info_all_registers_command): ... this.
7589         (vector_info): Rename to ...
7590         (info_vector_command): ... this.
7591         (float_info): Rename to ...
7592         (info_float_command): ... this.
7593         (_initialize_infcmd): Adjust.
7594         * inferior.h (term_info): Rename to ...
7595         (info_terminal_command): ... this.
7596         * inflow.c (term_info): Rename to ...
7597         (info_terminal_command): ... this.
7598         (_initialize_inflow): Adjust.
7599         * infrun.c (signals_info): Rename to ...
7600         (info_signals_command): ... this.
7601         (_initialize_infrun): Adjust.
7602         * objc-lang.c (classes_info): Rename to ...
7603         (info_classes_command): ... this.
7604         (selectors_info): Rename to ...
7605         (info_selectors_command): ... this.
7606         (_initialize_objc_language): Adjust.
7607         * printcmd.c (sym_info): Rename to ...
7608         (info_symbol_command): ... this.
7609         (address_info): Rename to ...
7610         (info_address_command): ... this.
7611         (display_info): Rename to ...
7612         (info_display_command): ... this.
7613         (_initialize_printcmd): Adjust.
7614         * reverse.c (bookmarks_info): Rename to ...
7615         (info_breakpoints_command): ... this.
7616         (_initialize_reverse): Adjust.
7617         * ser-go32.c (dos_info): Rename to ...
7618         (info_serial_command): ... this.
7619         (_initialize_ser_dos): Adjust.
7620         * skip.c (skip_info): Rename to ...
7621         (info_skip_command): ... this.
7622         (_initialize_step_skip): Adjust.
7623         * source.c (line_info): Rename to ...
7624         (info_line_command): ... this.
7625         (source_info): Rename to ...
7626         (info_source_command)
7627         * stack.c (frame_info): Rename to ...
7628         (info_frame_command): ... this.
7629         (locals_info): Rename to ...
7630         (info_locals_command): ... this.
7631         (args_info): Rename to ...
7632         (info_args_command): ... this.
7633         (_initialize_stack): Adjust.
7634         * symtab.c (sources_info): Rename to ...
7635         (info_sources_command): ... this.
7636         (variables_info): Rename to ...
7637         (info_variables_command): ... this.
7638         (functions_info): Rename to ...
7639         (info_functions_command): ... this.
7640         (types_info): Rename to ...
7641         (info_types_command): ... this.
7642         (_initialize_symtab): Adjust.
7643         * target.c (target_info): Rename to ...
7644         (info_target_command): ... this.
7645         (initialize_targets): Adjust.
7646         * tracepoint.c (tvariables_info): Rename to ...
7647         (info_tvariables_command): ... this.
7648         (scope_info): Rename to ...
7649         (info_scope_command): ... this.
7650         (trace_dump_actions): Adjust.
7651         (_initialize_tracepoint): Adjust.
7652
7653 2017-08-22  Tom Tromey  <tom@tromey.com>
7654
7655         * breakpoint.h (install_breakpoint): Update.
7656         * breakpoint.c (add_solib_catchpoint): Update.
7657         (install_breakpoint): Change argument to a std::unique_ptr.
7658         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7659         (create_breakpoint_sal, create_breakpoint): Update.
7660         (watch_command_1, catch_exec_command_1)
7661         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7662         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7663         Return the breakpoint.
7664         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7665         (new_single_step_breakpoint): Update.
7666         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7667         std::unique_ptr.
7668         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7669         std::unique_ptr.
7670         * break-catch-sig.c (create_signal_catchpoint): Use
7671         std::unique_ptr.
7672         * ada-lang.c (create_ada_exception_catchpoint): Use
7673         std::unique_ptr.
7674
7675 2017-08-22  Tom Tromey  <tom@tromey.com>
7676
7677         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7678
7679 2017-08-22  Tom Tromey  <tom@tromey.com>
7680
7681         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7682         (lookup_partial_symbol): Update.
7683
7684 2017-08-22  Tom Tromey  <tom@tromey.com>
7685
7686         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7687         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7688         (find_and_open_source, symtab_to_fullname): Update.
7689         * psymtab.c (psymtab_to_fullname): Update.
7690
7691 2017-08-22  Tom Tromey  <tom@tromey.com>
7692
7693         * exec.c (exec_file_attach): Update.
7694         * linux-thread-db.c (try_thread_db_load): Update.
7695         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7696         * utils.c (gdb_realpath): Change return type.
7697         (gdb_realpath_keepfile): Update.
7698         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7699         (_initialize_utils): Register the new self test.
7700         * source.c (openp): Update.
7701         (find_and_open_source): Update.
7702         * nto-tdep.c (nto_find_and_open_solib): Update.
7703         * main.c (set_gdb_data_directory): Update.
7704         (captured_main_1): Update.
7705         * dwarf2read.c (dwarf2_get_dwz_file): Update
7706         (dw2_map_symbol_filenames): Update.
7707         * auto-load.c (auto_load_safe_path_vec_update): Update.
7708         (filename_is_in_auto_load_safe_path_vec): Change type of
7709         "filename_realp".
7710         (auto_load_objfile_script): Update.
7711         (file_is_auto_load_safe): Update.  Use std::string.
7712         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7713
7714 2017-08-22  Tom Tromey  <tom@tromey.com>
7715
7716         * utils.c (gdb_realpath_keepfile): Return a
7717         gdb::unique_xmalloc_ptr.
7718         * exec.c (exec_file_attach): Update.
7719         * utils.h (gdb_realpath_keepfile): Return a
7720         gdb::unique_xmalloc_ptr.
7721
7722 2017-08-22  Tom Tromey  <tom@tromey.com>
7723
7724         * compile/compile.c (compile_file_command): Use
7725         gdb::unique_xmalloc_ptr, std::string.
7726         * utils.c (gdb_abspath): Change return type.
7727         * source.c (openp): Update.
7728         * objfiles.c (allocate_objfile): Update.
7729         * main.c (set_gdb_data_directory): Update.
7730         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7731
7732 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7733
7734         * cli-cmds.c (list_commands): List actual code around more than
7735         one location.
7736
7737 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7738
7739         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7740
7741 2017-08-21  Pedro Alves  <palves@redhat.com>
7742
7743         PR gdb/19487
7744         * c-exp.y (variable production): Handle function aliases.
7745         * minsyms.c (msymbol_is_text): New function.
7746         * minsyms.h (msymbol_is_text): Declare.
7747         * symtab.c (find_function_alias_target): New function.
7748         * symtab.h (find_function_alias_target): Declare.
7749
7750 2017-08-21  Pedro Alves  <palves@redhat.com>
7751
7752         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7753         typedefs.
7754         * typeprint.c (whatis_exp): If handling "whatis", and expression
7755         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7756         typedefs here.
7757         * valops.c (value_cast): Save "to" type before resolving
7758         stubs/typedefs.  Use that type as resulting value's type.
7759
7760 2017-08-18  Tom Tromey  <tom@tromey.com>
7761             Pedro Alves  <palves@redhat.com>
7762
7763         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7764         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7765         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7766         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7767         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7768         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7769         (linux_get_siginfo_data): Add "thread" argument.  Use
7770         scoped_restore.
7771         * linux-nat.c (linux_child_follow_fork)
7772         (check_stopped_by_watchpoint): Use scoped_restore.
7773         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7774         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7775         (restore_inferior_ptid, save_inferior_ptid): Remove.
7776         * btrace.c (btrace_fetch): Use scoped_restore.
7777         * bsd-uthread.c (bsd_uthread_fetch_registers)
7778         (bsd_uthread_store_registers): Use scoped_restore.
7779         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7780         scoped_restore.
7781         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7782         (aix_thread_xfer_partial): Use scoped_restore.
7783         * inferior.h (save_inferior_ptid): Remove.
7784
7785 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7786
7787         PR tdep/21818
7788         * arm-tdep.c (gdb_print_insn_arm): Mark
7789         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7790
7791 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7792
7793         * NEWS: Mention GDBserver's new option "--selftest".
7794         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7795         * selftest.c: Move it to common/selftest.c.
7796         * selftest.h: Move it to common/selftest.h.
7797         * selftest-arch.c (reset): New function.
7798         (tests_with_arch): Call reset.
7799
7800 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7801
7802         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7803         instead of exception_fprintf and printf_filtered.
7804
7805 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7806
7807         * selftest.c (register_self_test): Rename it to
7808         selftests::register_test.
7809         (run_self_tests): selftest::run_tests.
7810         * selftest.h: Update declarations.
7811         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7812         selftests::register_test_foreach_arch.
7813         * selftest-arch.h: Update declaration.
7814         * aarch64-tdep.c: Update.
7815         * arm-tdep.c: Likewise.
7816         * disasm-selftests.c: Likewise.
7817         * dwarf2loc.c: Likewise.
7818         * dwarf2-frame.c: Likewise.
7819         * findvar.c: Likewise.
7820         * gdbarch-selftests.c: Likewise.
7821         * maint.c (maintenance_selftest): Likewise.
7822         * regcache.c: Likewise.
7823         * rust-exp.y: Likewise.
7824         * selftest-arch.c: Likewise.
7825         * unittests/environ-selftests.c: Likewise.
7826         * unittests/function-view-selftests.c: Likewise.
7827         * unittests/offset-type-selftests.c: Likewise.
7828         * unittests/optional-selftests.c: Likewise.
7829         * unittests/scoped_restore-selftests.c: Likewise.
7830         * utils-selftests.c: Likewise.
7831
7832 2017-08-17  Pedro Alves  <palves@redhat.com>
7833
7834         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7835         local.
7836
7837 2017-08-17  Pedro Alves  <palves@redhat.com>
7838
7839         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7840         field.
7841         (reset_die_in_process): Delete, replaced by ...
7842         (process_die_scope): ... this new class.  Make it responsible for
7843         freeing cu->line_header too.
7844         (process_die): Use process_die_scope.
7845         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7846         cu->line_header_die_owner.  Don't release the line header if it's
7847         owned by the CU.
7848         (setup_type_unit_groups): Make the CU/DIE own the line header.
7849         Don't release the line header here.
7850
7851 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7852
7853         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7854
7855 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7856
7857         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7858         Single-Key mode
7859
7860 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7861
7862         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7863         mode command list.
7864
7865 2017-08-15  Stafford Horne  <shorne@gmail.com>
7866
7867         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7868
7869 2017-08-15  Stafford Horne  <shorne@gmail.com>
7870
7871         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7872
7873 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7874
7875         PR gdb/21954
7876         * infcmd.c (unset_environment_command): Use the 'clear' method on
7877         the environment instead of resetting it.
7878
7879 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7880
7881         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7882         platforms.
7883
7884 2017-08-14  Tom Tromey  <tom@tromey.com>
7885
7886         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7887         (print_binary_chars): Likewise.
7888         (BITS_IN_BYTES): Remove.
7889
7890 2017-08-14  Tom Tromey  <tom@tromey.com>
7891
7892         PR gdb/21675
7893         * valprint.c (LOW_ZERO): Change value to 034.
7894         (print_octal_chars): Add static_asserts for octal constants.
7895         * printcmd.c (print_scalar_formatted): Add 'd' case.
7896
7897 2017-08-11  Tom Tromey  <tom@tromey.com>
7898
7899         * symfile.c (add_symbol_file_command): Use std::vector.
7900
7901 2017-08-14  Tom Tromey  <tom@tromey.com>
7902
7903         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7904         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7905         std::move.
7906         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7907
7908 2017-08-11  Pedro Alves  <palves@redhat.com>
7909
7910         * infrun.c (process_event_stop_test): Adjust
7911         function_name_is_marked_for_skip call.
7912         * skip.c: Include <list>.
7913         (skiplist_entry): Make it a class with private fields, and
7914         getters/setters.
7915         (skiplist_entry_chain): Delete.
7916         (skiplist_entries): New.
7917         (skiplist_entry_count): Delete.
7918         (highest_skiplist_entry_num): New.
7919         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7920         (add_skiplist_entry): Delete.
7921         (skiplist_entry::skiplist_entry): New.
7922         (skiplist_entry::add_entry): New.
7923         (skip_file_command, skip_function): Adjust.
7924         (compile_skip_regexp): Delete.
7925         (skip_command): Don't compile regexp here.  Adjust to use
7926         skiplist_entry::add_entry.
7927         (skip_info): Adjust to use range-for and getters.
7928         (skip_enable_command, skip_disable_command): Adjust to use
7929         range-for and setters.
7930         (skip_delete_command): Adjust to use std::list.
7931         (add_skiplist_entry): Delete.
7932         (skip_file_p): Delete, refactored as ...
7933         (skiplist_entry::do_skip_file_p): ... this new method.
7934         (skip_gfile_p): Delete, refactored as ...
7935         (skiplist_entry::do_gskip_file_p): ... this new method.
7936         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7937         (skiplist_entry::skip_function_p): ... this new method.
7938         (function_name_is_marked_for_skip): Now returns bool, and takes
7939         the function sal by const reference.  Adjust to use range-for and
7940         skiplist_entry methods.
7941         (_initialize_step_skip): Remove references to
7942         skiplist_entry_chain, skiplist_entry_count.
7943         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7944         takes the function sal by const reference.
7945
7946 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7947
7948         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7949         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7950         (dwarf2_frame_cache):
7951         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7952         RETURN_MASK_ALL and set *this_case to NULL.
7953         * frame-unwind.h: Update comments.
7954
7955 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7956
7957         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7958         (dwarf2_frame_state_copy_regs): Remove.
7959         (dwarf2_frame_state_free_regs): Remove.
7960         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7961         (dwarf2_restore_rule): Call method .alloc_regs instead of
7962         dwarf2_frame_state_alloc_regs.
7963         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7964         constructor.  Call std::move.
7965         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7966         (dwarf2_frame_cache): Likewise.
7967
7968         [GDB_SELF_TEST]: Include selftest.h and
7969         selftest-arch.h.
7970         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7971         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7972         execute_cfa_program_test.
7973
7974         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7975         copy ctor, assignment operator, move assignment.
7976         <alloc_regs>: New method.
7977         <swap>: New method.
7978         (struct dwarf2_frame_state): Delete dtor.
7979         (dwarf2_frame_state_alloc_regs): Remove declaration.
7980         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7981         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7982
7983 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7984
7985         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7986         (dwarf2_frame_state::dwarf2_frame_state): New.
7987         (dwarf2_frame_state::~dwarf2_frame_state): New.
7988         (dwarf2_fetch_cfa_info): Update.
7989         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7990         rather than a pointer.  Update code.
7991         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7992         dtor.
7993         <data_align, code_align, retaddr_column>: Change them to const.
7994         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7995         to bool.
7996
7997 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7998
7999         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8000         <loc.exp>: New field.
8001         * dwarf2-frame.c (execute_cfa_program): Update.
8002         (dwarf2_frame_prev_register): Update.
8003
8004 2017-08-10  Pedro Alves  <palves@redhat.com>
8005
8006         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8007
8008 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8009
8010         * fbsd-nat.c (struct fbsd_fork_info): Remove.
8011         (fbsd_pending_children): Use std::list.
8012         (fbsd_remember_child): Likewise.
8013         (fbsd_is_child_pending): Likewise.
8014         (fbsd_pending_vfork_done): Use std::forward_list.
8015         (fbsd_add_vfork_done): Likewise.
8016         (fbsd_is_vfork_done_pending): Likewise.
8017         (fbsd_next_vfork_done): Likewise.
8018
8019 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8020
8021         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8022         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8023         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8024         for `mapfilename'.
8025         (fbsd_xfer_partial): Use gdb::byte_vector.
8026         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8027
8028 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8029
8030         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8031         "filestuff.h".
8032         (fbsd_find_memory_regions): Fix `mapfile' initialization.
8033
8034 2017-08-09  Tom Tromey  <tom@tromey.com>
8035
8036         * skip.c (skiplist_entry): New constructor.
8037         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8038         (skiplist_entry::file_is_glob): Now bool.
8039         (skiplist_entry::file, skiplist_entry::function): Now
8040         std::string.
8041         (make_skip_entry): Return a unique_ptr.  Use new.
8042         (free_skiplist_entry, free_skiplist_entry_cleanup)
8043         (make_free_skiplist_entry_cleanup): Remove.
8044         (skip_command, skip_disable_command, add_skiplist_entry)
8045         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8046         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8047         (function_name_is_marked_for_skip): Update.
8048         (skip_delete_command): Update.  Use delete.
8049
8050 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
8051
8052         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8053         (aarch64_linux_core_read_description): New function.
8054         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8055
8056 2017-08-09  Pedro Alves  <palves@redhat.com>
8057
8058         * cp-name-parser.y (cp_comp_to_string): Return a
8059         gdb::unique_xmalloc_ptr<char>.
8060         * cp-support.c (replace_typedefs_qualified_name)
8061         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8062         (cp_canonicalize_string_full): Use op= instead of explicit
8063         convertion.
8064         (cp_class_name_from_physname, method_name_from_physname)
8065         (cp_func_name, cp_remove_params): Adjust to use
8066         gdb::unique_xmalloc_ptr<char>.
8067         * cp-support.h (cp_comp_to_string): Return a
8068         gdb::unique_xmalloc_ptr<char>.
8069         * python/py-type.c (typy_lookup_type): Adjust to use
8070         gdb::unique_xmalloc_ptr<char>.
8071
8072 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
8073
8074         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8075
8076 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
8077             Yao Qi  <yao.qi@linaro.org>
8078
8079         * cp-support.c (cp_canonicalize_string_full): Use
8080         gdb::unique_xmalloc_ptr<char>.
8081         (cp_canonicalize_string): Likewise.
8082
8083 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8084
8085         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8086         * regformats/i386/amd64-avx-avx512.dat: Remove.
8087         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8088         * regformats/i386/amd64-avx-mpx.dat:Remove.
8089         * regformats/i386/amd64-avx.dat: Remove.
8090         * regformats/i386/amd64-mpx.dat: Remove.
8091         * regformats/i386/i386-avx-avx512.dat: Remove.
8092         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8093         * regformats/i386/i386-avx-mpx.dat: Remove.
8094         * regformats/i386/i386-mmx.dat: Remove.
8095         * regformats/i386/i386-mpx.dat: Remove.
8096
8097 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8098
8099         * amd64-tdep.h (tdesc_x32): Remove the declaration.
8100         * amd64-tdep.c: Don't include features/i386/x32*.c.
8101         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8102         functions.
8103         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8104         and i386/x32-avx-avx512.
8105         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8106         and i386/x32.xml.
8107         * features/i386/x32-avx-avx512.c: Removed.
8108         * features/i386/x32-avx-avx512.xml: Removed.
8109         * features/i386/x32-avx.c: Removed.
8110         * features/i386/x32-avx.xml: Removed.
8111         * features/i386/x32.c: Removed.
8112         * features/i386/x32.xml: Removed.
8113         * regformats/i386/x32-avx-avx512.dat: Removed.
8114         * regformats/i386/x32-avx.dat: Removed.
8115         * regformats/i386/x32.dat: Removed.
8116
8117 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8118
8119         PR breakpoints/21886
8120         * mem-break.c (default_memory_insert_breakpoint): Use
8121         `->placed_address' rather than `->reqstd_address' for the
8122         breakpoint location.
8123
8124 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8125
8126         * arch-utils.c (default_print_insn): Remove arch/mach/endian
8127         assertions.
8128
8129 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8130
8131         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8132         a union of `tdep_info', `tdesc_data' and `id'.
8133         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8134         rather than `info.tdep_info'.
8135         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8136         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8137         * i386-tdep.c (i386_gdbarch_init): Likewise.
8138         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8139         * mips-tdep.c (mips_gdbarch_init): Likewise.
8140         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8141         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8142         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8143         `info.tdep_info'.
8144         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8145         `info.tdep_info'.
8146         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8147         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8148         `info.tdep_info'.
8149         * spu-tdep.c (spu_gdbarch_init): Likewise.
8150         * gdbarch.h: Regenerate.
8151
8152 2017-08-07  Leszek Swirski  <leszeks@google.com>
8153
8154         PR symtab/20899
8155         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8156
8157 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
8158
8159         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8160         (gdbsim_open): Rename gdb_argv args object to argv.
8161
8162 2017-08-05  Tom Tromey  <tom@tromey.com>
8163
8164         * compile/compile-object-load.c (compile_object_load): Use
8165         gdb::unique_xmalloc_ptr.
8166         * cli/cli-dump.c (scan_filename): Rename from
8167         scan_filename_with_cleanup.  Change return type.
8168         (scan_expression): Rename from scan_expression_with_cleanup.
8169         Change return type.
8170         (dump_memory_to_file, dump_value_to_file, restore_command):
8171         Use gdb::unique_xmalloc_ptr.  Update.
8172         * cli/cli-cmds.c (find_and_open_script): Use
8173         gdb::unique_xmalloc_ptr.
8174         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8175         * symmisc.c (maintenance_print_symbols)
8176         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8177         * symfile.c (symfile_bfd_open, generic_load)
8178         (add_symbol_file_command, remove_symbol_file_command): Use
8179         gdb::unique_xmalloc_ptr.
8180         * source.c (openp): Use gdb::unique_xmalloc_ptr.
8181         * psymtab.c (maintenance_print_psymbols): Use
8182         gdb::unique_xmalloc_ptr.
8183         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8184         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8185         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8186         (reload_shared_libraries_1): Likewise.
8187
8188 2017-08-05  Tom Tromey  <tom@tromey.com>
8189
8190         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8191         (rust_op_vector, rust_set_vector): New typedefs.
8192         (current_parser): New global.
8193         (work_obstack): Change to pointer type.  Update all users.
8194         (rust_ast, pstate): Remove globals.
8195         (struct rust_parser): New.
8196         (%union) <params, field_inits>: Change type.
8197         (start, tuple_expr, unit_expr, struct_expr_list, literal)
8198         (field_expr, expr_list, maybe_expr_list, type_list): Update.
8199         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8200         (convert_params_to_types, convert_params_to_expression): Change
8201         type of "params".
8202         (ast_string): Change type of "fields".
8203         (rust_parse): Make a rust_parser.  Remove cleanups.
8204         (rust_lex_tests): Make and install an auto_obstack.
8205
8206 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8207
8208         * configure.srv (ipa_x32_linux_regobj): New.
8209         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8210         instead of X86_TDESC_AVX512.
8211         (initialize_low_tracepoint): Call
8212         init_registers_x32_avx_avx512_linux.
8213
8214 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8215
8216         * utils.h (gdb_argv): Add namespace std for nullptr_t.
8217
8218 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8219
8220         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8221
8222 2017-08-03  Tom Tromey  <tom@tromey.com>
8223
8224         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8225         Remove.
8226         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8227
8228 2017-08-03  Tom Tromey  <tom@tromey.com>
8229
8230         * python/py-param.c (compute_enum_values): Use gdb_argv.
8231
8232 2017-08-03  Tom Tromey  <tom@tromey.com>
8233
8234         * utils.h (struct gdb_argv_deleter): New.
8235         (gdb_argv): New class.
8236         * utils.c (gdb_argv::reset): New method.
8237         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8238         * tracefile.c (tsave_command): Use gdb_argv.
8239         * top.c (new_ui_command): Use gdb_argv.
8240         * symmisc.c (maintenance_print_symbols)
8241         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8242         * symfile.c (symbol_file_command, generic_load)
8243         (remove_symbol_file_command): Use gdb_argv.
8244         * stack.c (backtrace_command): Use gdb_argv.
8245         * source.c (add_path, show_substitute_path_command)
8246         (unset_substitute_path_command, set_substitute_path_command):
8247         Use gdb_argv.
8248         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
8249         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8250         * remote.c (extended_remote_run, remote_put_command)
8251         (remote_get_command, remote_delete_command): Use gdb_argv.
8252         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8253         (gdbsim_open): Use gdb_argv.
8254         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8255         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8256         * procfs.c (procfs_info_proc): Use gdb_argv.
8257         * interps.c (interpreter_exec_cmd): Use gdb_argv.
8258         * infrun.c (handle_command): Use gdb_argv.
8259         * inferior.c (add_inferior_command, clone_inferior_command):
8260         Use gdb_argv.
8261         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8262         * exec.c (exec_file_command): Use gdb_argv.
8263         * cli/cli-cmds.c (alias_command): Use gdb_argv.
8264         * compile/compile.c (build_argc_argv): Use gdb_argv.
8265
8266 2017-08-03  Tom Tromey  <tom@tromey.com>
8267
8268         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8269
8270 2017-08-03  Tom Tromey  <tom@tromey.com>
8271
8272         * python/python.c (compute_python_string): Return std::string.
8273         (gdbpy_eval_from_control_command): Update.
8274         (do_start_initialization): Use std::string.
8275         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8276         xstrprintf.
8277         * python/py-breakpoint.c (local_setattro): Use string_printf, not
8278         xstrprintf.
8279
8280 2017-08-03  Tom Tromey  <tom@tromey.com>
8281
8282         * top.h (do_restore_instream_cleanup): Remove.
8283         * top.c (do_restore_instream_cleanup): Remove.
8284         (read_command_file): Use scoped_restore.
8285         * cli/cli-script.c (execute_user_command): Use scoped_restore.
8286
8287 2017-08-03  Tom Tromey  <tom@tromey.com>
8288
8289         * cli/cli-script.c (execute_user_command)
8290         (execute_control_command): Use scoped_restore.
8291
8292 2017-08-03  Tom Tromey  <tom@tromey.com>
8293
8294         * cli/cli-script.c (do_restore_user_call_depth): Remove.
8295         (execute_user_command): Remove user_call_depth; use
8296         user_args_stack's size instead.
8297
8298 2017-08-03  Tom Tromey  <tom@tromey.com>
8299
8300         * top.h (in_user_command): Remove.
8301         * top.c (in_user_command): Remove.
8302         * cli/cli-script.c (do_restore_user_call_depth)
8303         (execute_user_command): Update.
8304
8305 2017-08-03  Tom Tromey  <tom@tromey.com>
8306
8307         * valops.c (search_struct_method): Use gdb::byte_vector.
8308         * valarith.c (value_concat): Use std::vector.
8309         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8310         (simple_search_memory): Likewise.
8311         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8312         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8313         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8314         * elfread.c (elf_rel_plt_read): Use std::string.
8315         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8316         * cli/cli-dump.c (restore_section_callback): Use
8317         gdb::byte_vector.
8318
8319 2017-08-03  Tom Tromey  <tom@tromey.com>
8320
8321         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8322
8323 2017-08-03  Tom Tromey  <tom@tromey.com>
8324
8325         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8326         (tui_register_format): Use scoped_restore.
8327
8328 2017-08-03  Tom Tromey  <tom@tromey.com>
8329
8330         * reverse.c (exec_direction_default): Remove.
8331         (exec_reverse_once): Use scoped_restore.
8332         * remote.c (restore_remote_timeout): Remove.
8333         (remote_flash_erase, remote_flash_write, remote_flash_done)
8334         (readchar, remote_serial_write): Use scoped_restore.
8335         * cli/cli-script.c (struct source_cleanup_lines_args)
8336         (source_cleanup_lines): Remove.
8337         (script_from_file): Use scoped_restore.
8338         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8339         (source_command): Use scoped_restore.
8340
8341 2017-08-03  Tom Tromey  <tom@tromey.com>
8342
8343         * utils.h (make_cleanup_free_so): Remove.
8344         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8345         * solist.h (struct so_deleter): New.
8346         (so_list_up): New typedef.
8347         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8348
8349 2017-08-03  Tom Tromey  <tom@tromey.com>
8350
8351         * utils.h (make_cleanup_restore_current_language): Remove.
8352         * utils.c (do_restore_current_language)
8353         (make_cleanup_restore_current_language): Remove.
8354         * parse.c (parse_exp_in_context_1)
8355         (parse_expression_with_language): Use
8356         scoped_restore_current_language.
8357         * mi/mi-main.c (mi_cmd_execute): Use
8358         scoped_restore_current_language.
8359         * language.h (scoped_restore_current_language): New class.
8360
8361 2017-08-03  Tom Tromey  <tom@tromey.com>
8362
8363         * compile/compile.c (cleanup_unlink_file): Remove.
8364         (compile_to_object): Use gdb::unlinker.
8365         (eval_compile_command): Likewise.
8366
8367 2017-08-03  Tom Tromey  <tom@tromey.com>
8368
8369         * utils.h (make_cleanup_fclose): Remove.
8370         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8371
8372 2017-08-03  Tom Tromey  <tom@tromey.com>
8373
8374         * top.c (open_terminal_stream): Return gdb_file_up.
8375         (new_ui_command): Update.
8376
8377 2017-08-03  Tom Tromey  <tom@tromey.com>
8378
8379         * source.c (print_source_lines_base, forward_search_command)
8380         (reverse_search_command): Use gdb_file_up.
8381
8382 2017-08-03  Tom Tromey  <tom@tromey.com>
8383
8384         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8385
8386 2017-08-03  Tom Tromey  <tom@tromey.com>
8387
8388         * cli/cli-cmds.c (find_and_open_script): Change return type.
8389         Remove "streamp" and "full_path" parameters.
8390         (source_script_with_search): Update.
8391         * auto-load.c (source_script_file): Update.
8392         * cli/cli-cmds.h (find_and_open_script): Change type.
8393         (open_script): New struct.
8394
8395 2017-08-03  Tom Tromey  <tom@tromey.com>
8396
8397         * xml-support.c (xml_fetch_content_from_file): Update.
8398         * ui-file.c (stdio_file::open): Update.
8399         * tracefile-tfile.c (tfile_start): Update.
8400         * remote.c (remote_file_put, remote_file_get): Update.
8401         * nat/linux-procfs.c (linux_proc_get_int)
8402         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8403         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8404         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8405         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8406         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8407         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8408         * linux-nat.c (linux_proc_pending_signals): Update.
8409         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8410         (file_closer): Remove.
8411         * compile/compile.c (compile_to_object): Update.
8412         * common/filestuff.h (struct gdb_file_deleter): New.
8413         (gdb_file_up): New typedef.
8414         (gdb_fopen_cloexec): Change return type.
8415         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8416         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8417         (dump_binary_file, restore_binary_file): Update.
8418         * auto-load.c (auto_load_objfile_script_1): Update.
8419
8420 2017-08-03  Tom Tromey  <tom@tromey.com>
8421
8422         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8423         (info_static_tracepoint_markers_command): Likewise.
8424         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8425         * skip.c (skip_info): Use ui_out_emit_table.
8426         * progspace.c (print_program_space): Use ui_out_emit_table.
8427         * osdata.c (info_osdata): Use ui_out_emit_table.
8428         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8429         ui_out_emit_table.
8430         * linux-thread-db.c (info_auto_load_libthread_db): Use
8431         ui_out_emit_table.
8432         * inferior.c (print_inferior): Use ui_out_emit_table.
8433         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8434         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8435         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8436         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8437         * ui-out.h (class ui_out_emit_table): New.
8438
8439 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8440
8441         * mips-tdep.c (mips_fpu_type_str): New function.
8442         (mips_dump_tdep): Call it.
8443
8444 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8445
8446         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8447         `->mips_fpu_type'.
8448
8449 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8450
8451         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8452
8453 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8454
8455         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8456
8457 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8458
8459         * cli/cli-cmds.c (maintenancechecklist): New variable.
8460         * gdbcmd.h (maintenancechecklist): Declare it.
8461         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8462         Call i386_linux_read_description with different masks.
8463         * maint.c (maintenance_check_command): New function.
8464         (_initialize_maint_cmds): Call add_prefix_cmd.
8465         * target-descriptions.c (tdesc_reg): override operator != and ==.
8466         (tdesc_type): Likewise.
8467         (tdesc_feature): Likewise.
8468         (target_desc): Likewise.
8469         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8470         (maintenance_check_xml_descriptions): New function.
8471         (_initialize_target_descriptions) Add command "xml-descriptions".
8472         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8473
8474 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8475
8476         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8477         Include features/i386/32bit-*.c.
8478         (i386_linux_read_description): Generate target description if it
8479         doesn't exist.
8480         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8481         functions.
8482         * features/i386/32bit-linux.c: Re-generated.
8483         * features/i386/32bit-sse.c: Likewise.
8484         * target-descriptions.c (print_c_feature::visit): Print code to
8485         set register number if needed.
8486         (print_c_feature) <m_next_regnum>: New field.
8487
8488 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8489
8490         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8491         (FEATURE_XMLFILES): New.
8492         (FEATURE_CFILES): New.
8493         New rules.
8494         (clean-cfiles): Remove generated c files.
8495         * features/i386/32bit-avx.c: Generated.
8496         * features/i386/32bit-avx512.c: Generated.
8497         * features/i386/32bit-core.c: Generated.
8498         * features/i386/32bit-linux.c: Generated.
8499         * features/i386/32bit-mpx.c: Generated.
8500         * features/i386/32bit-pkeys.c: Generated.
8501         * features/i386/32bit-sse.c: Generated.
8502         * target-descriptions.c: Include algorithm.
8503         (tdesc_element_visitor): Add method visit_end.
8504         (print_c_tdesc): Implement visit_end.
8505         (print_c_tdesc:: m_filename_after_features): Move it to
8506         protected.
8507         (print_c_feature): New class.
8508         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8509         name starts with "i386/32bit-".
8510
8511 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8512
8513         * target-descriptions.c (tdesc_element_visitor): New class.
8514         (tdesc_element): New class.
8515         (tdesc_reg): Inherit from tdesc_element.
8516         (tdesc_reg::accept): New function.
8517         (tdesc_type): Inherit from tdesc_element.
8518         (tdesc_type::accept): New function.
8519         (tdesc_feature): Inherit from tdesc_element.
8520         (tdesc_feature::accept): New function.
8521         (target_desc): Inherit from tdesc_element.
8522         (target_desc::target_desc): New.
8523         (target_desc::~target_desc): New.
8524         (target_desc::accept): New.
8525         (allocate_target_description): Use new.
8526         (free_target_description): Use delete.
8527         (print_c_tdesc): New class.
8528         (maint_print_c_tdesc_cmd): Adjust.
8529
8530         * features/aarch64.c: Re-generated.
8531         * features/arc-arcompact.c: Re-generated.
8532         * features/arc-v2.c: Re-generated.
8533         * features/arm/arm-with-iwmmxt.c: Re-generated.
8534         * features/arm/arm-with-m.c: Re-generated.
8535         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8536         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8537         * features/arm/arm-with-neon.c: Re-generated.
8538         * features/arm/arm-with-vfpv2.c: Re-generated.
8539         * features/arm/arm-with-vfpv3.c: Re-generated.
8540         * features/i386/amd64-avx-avx512.c: Re-generated.
8541         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8542         * features/i386/amd64-avx.c: Re-generated.
8543         * features/i386/amd64-avx-linux.c: Re-generated.
8544         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8545         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8546         * features/i386/amd64-avx-mpx.c: Re-generated.
8547         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8548         * features/i386/amd64.c: Re-generated.
8549         * features/i386/amd64-linux.c: Re-generated.
8550         * features/i386/amd64-mpx.c: Re-generated.
8551         * features/i386/amd64-mpx-linux.c: Re-generated.
8552         * features/i386/i386-avx-avx512.c: Re-generated.
8553         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8554         * features/i386/i386-avx.c: Re-generated.
8555         * features/i386/i386-avx-linux.c: Re-generated.
8556         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8557         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8558         * features/i386/i386-avx-mpx.c: Re-generated.
8559         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8560         * features/i386/i386.c: Re-generated.
8561         * features/i386/i386-linux.c: Re-generated.
8562         * features/i386/i386-mmx.c: Re-generated.
8563         * features/i386/i386-mmx-linux.c: Re-generated.
8564         * features/i386/i386-mpx.c: Re-generated.
8565         * features/i386/i386-mpx-linux.c: Re-generated.
8566         * features/i386/x32-avx-avx512.c: Re-generated.
8567         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8568         * features/i386/x32-avx.c: Re-generated.
8569         * features/i386/x32-avx-linux.c: Re-generated.
8570         * features/i386/x32.c: Re-generated.
8571         * features/i386/x32-linux.c: Re-generated.
8572         * features/microblaze.c: Re-generated.
8573         * features/microblaze-with-stack-protect.c: Re-generated.
8574         * features/mips64-dsp-linux.c: Re-generated.
8575         * features/mips64-linux.c: Re-generated.
8576         * features/mips-dsp-linux.c: Re-generated.
8577         * features/mips-linux.c: Re-generated.
8578         * features/nds32.c: Re-generated.
8579         * features/nios2.c: Re-generated.
8580         * features/nios2-linux.c: Re-generated.
8581         * features/rs6000/powerpc-32.c: Re-generated.
8582         * features/rs6000/powerpc-32l.c: Re-generated.
8583         * features/rs6000/powerpc-403.c: Re-generated.
8584         * features/rs6000/powerpc-403gc.c : Re-generated.
8585         * features/rs6000/powerpc-405.c: Re-generated.
8586         * features/rs6000/powerpc-505.c: Re-generated.
8587         * features/rs6000/powerpc-601.c: Re-generated.
8588         * features/rs6000/powerpc-602.c: Re-generated.
8589         * features/rs6000/powerpc-603.c: Re-generated.
8590         * features/rs6000/powerpc-604.c: Re-generated.
8591         * features/rs6000/powerpc-64.c: Re-generated.
8592         * features/rs6000/powerpc-64l.c: Re-generated.
8593         * features/rs6000/powerpc-7400.c: Re-generated.
8594         * features/rs6000/powerpc-750.c: Re-generated.
8595         * features/rs6000/powerpc-860.c: Re-generated.
8596         * features/rs6000/powerpc-altivec32.c: Re-generated.
8597         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8598         * features/rs6000/powerpc-altivec64.c: Re-generated.
8599         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8600         * features/rs6000/powerpc-cell32l.c: Re-generated.
8601         * features/rs6000/powerpc-cell64l.c: Re-generated.
8602         * features/rs6000/powerpc-e500.c: Re-generated.
8603         * features/rs6000/powerpc-e500l.c: Re-generated.
8604         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8605         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8606         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8607         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8608         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8609         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8610         * features/rs6000/powerpc-vsx32.c: Re-generated.
8611         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8612         * features/rs6000/powerpc-vsx64.c: Re-generated.
8613         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8614         * features/rs6000/rs6000.c: Re-generated.
8615         * features/s390-linux32.c: Re-generated.
8616         * features/s390-linux32v1.c: Re-generated.
8617         * features/s390-linux32v2.c: Re-generated.
8618         * features/s390-linux64.c: Re-generated.
8619         * features/s390-linux64v1.c: Re-generated.
8620         * features/s390-linux64v2.c: Re-generated.
8621         * features/s390-te-linux64.c: Re-generated.
8622         * features/s390-tevx-linux64.c: Re-generated.
8623         * features/s390-vx-linux64.c: Re-generated.
8624         * features/s390x-linux64.c: Re-generated.
8625         * features/s390x-linux64v1.c: Re-generated.
8626         * features/s390x-linux64v2.c: Re-generated.
8627         * features/s390x-te-linux64.c: Re-generated.
8628         * features/s390x-tevx-linux64.c: Re-generated.
8629         * features/s390x-vx-linux64.c: Re-generated.
8630         * features/sparc/sparc32-solaris.c: Re-generated.
8631         * features/sparc/sparc64-solaris.c: Re-generated.
8632         * features/tic6x-c62x.c: Re-generated.
8633         * features/tic6x-c62x-linux.c: Re-generated.
8634         * features/tic6x-c64x.c: Re-generated.
8635         * features/tic6x-c64x-linux.c: Re-generated.
8636         * features/tic6x-c64xp.c: Re-generated.
8637         * features/tic6x-c64xp-linux.c: Re-generated.
8638
8639 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8640
8641         * i386-linux-tdep.c (i386_linux_read_description): New function.
8642         (i386_linux_core_read_description): Call
8643         i386_linux_read_description.
8644         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8645         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8646         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8647         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8648         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8649         * x86-linux-nat.c (x86_linux_read_description): Call
8650         i386_linux_read_description.
8651
8652 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8653
8654         * NEWS: Mention it.
8655         * features/Makefile (%.c: %.xml): Pass the xml file name to
8656         command "maint print c-tdesc".
8657         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8658         name from 'arg'.
8659
8660 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8661
8662         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8663         in-class initialization.
8664         (tdesc_create_feature): Call new instead of XCNEW.
8665         (free_target_description): Ue delete.
8666
8667 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8668
8669         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8670
8671 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8672
8673         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8674         constant.
8675         (amd64_x32_init_abi): Likewise.
8676         * amd64-tdep.h (amd64_init_abi): Update declaration.
8677         (amd64_x32_init_abi): Likewise.
8678
8679 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8680
8681         PR tdep/21717
8682         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8683         condition for FPSCR.
8684         (arm_linux_store_inferior_registers): Likewise.
8685
8686 2017-07-22  Tom Tromey  <tom@tromey.com>
8687
8688         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8689         <syscalls_counts>: Now a std::vector.
8690         (get_catch_syscall_inferior_data): Use "new".
8691         (catch_syscall_inferior_data_cleanup): Use "delete".
8692         (insert_catch_syscall, remove_catch_syscall)
8693         (clear_syscall_counts): Update.
8694
8695 2017-07-22  Tom Tromey  <tom@tromey.com>
8696
8697         * break-catch-syscall.c (syscall_catchpoint)
8698         <syscalls_to_be_caught>: Now a std::vector<int>
8699         (~syscall_catchpoint): Remove.
8700         (insert_catch_syscall, remove_catch_syscall)
8701         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8702         (print_mention_catch_syscall, print_recreate_catch_syscall):
8703         Update.
8704         (create_syscall_event_catchpoint): Change type of "filter"
8705         parameter.
8706         (catch_syscall_split_args): Return a std::vector.
8707         (catch_syscall_command_1, catching_syscall_number_1): Update.
8708
8709 2017-07-22  Tom Tromey  <tom@tromey.com>
8710
8711         * break-catch-throw.c (struct exception_catchpoint)
8712         <exception_rx>: Now a std::string.
8713         (~exception_catchpoint): Remove.
8714         (print_one_detail_exception_catchpoint): Update.
8715         (handle_gnu_v3_exceptions): Change type of except_rx.
8716         (extract_exception_regexp): Return a std::string.
8717         (catch_exception_command_1): Update.
8718
8719 2017-07-22  Tom Tromey  <tom@tromey.com>
8720
8721         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8722         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8723         std::vector.
8724         <catch_all>: Now a bool.
8725         (~signal_catchpoint): Remove.
8726         (signal_catchpoint_insert_location)
8727         (signal_catchpoint_remove_location)
8728         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8729         (signal_catchpoint_print_mention)
8730         (signal_catchpoint_print_recreate)
8731         (signal_catchpoint_explains_signal): Update.
8732         (create_signal_catchpoint): Change type of "filter" and
8733         "catch_all".
8734         (catch_signal_split_args): Return a std::vector.  Change type of
8735         "catch_all".
8736         (catch_signal_command): Update.
8737
8738 2017-07-20  Pedro Alves  <palves@redhat.com>
8739
8740         * ada-lang.c (ada_language_defn): Make extern.
8741         (_initialize_ada_language): Remove add_language call.
8742         * c-lang.c (c_language_defn, cplus_language_defn)
8743         (asm_language_defn, minimal_language_defn): Make extern.
8744         (_initialize_c_language): Delete.
8745         * completer.c (compare_cstrings): Delete, moved to utils.h.
8746         * d-lang.c (d_language_defn): Make extern.
8747         (_initialize_d_language): Remove add_language calls.
8748         * defs.h (enum language): Add comment.
8749         * f-lang.c (f_language_defn): Make extern.
8750         (_initialize_f_language): Remove add_language call.
8751         * go-lang.c (go_language_defn): Make extern.
8752         (_initialize_go_language): Remove add_language call.
8753         * language.c: Include <algorithm>.
8754         (languages): Redefine as const array.
8755         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8756         (set_language_command): Handle "local".  Use for-range loop.
8757         (set_language): Remove loop.
8758         (language_enum): Rewrite.
8759         (language_def, language_str): Remove loops.
8760         (add_language): Delete.
8761         (add_set_language_command): New, based on add_languages.
8762         (skip_language_trampoline): Adjust.
8763         (local_language_defn): Delete.
8764         (language_gdbarch_post_init): Adjust.
8765         (_initialize_language): Remove add_language calls.  Call
8766         add_set_language_command.
8767         * language.h (add_language): Delete.
8768         (auto_language_defn)
8769         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8770         (asm_language_defn, c_language_defn, cplus_language_defn)
8771         (d_language_defn, f_language_defn, go_language_defn)
8772         (m2_language_defn, objc_language_defn, opencl_language_defn)
8773         (pascal_language_defn, rust_language_defn): Declare.
8774         * m2-lang.c (m2_language_defn): Make extern.
8775         (_initialize_m2_language): Remove add_language call.
8776         * objc-lang.c (objc_language_defn): Make extern.
8777         (_initialize_objc_language): Remove add_language call.
8778         * opencl-lang.c (opencl_language_defn): Make extern.
8779         (_initialize_opencl_language): Remove add_language call.
8780         * p-lang.c (pascal_language_defn): Make extern.
8781         (_initialize_pascal_language): Delete.
8782         * rust-lang.c (rust_language_defn): Make extern.
8783         (_initialize_rust_language): Delete.
8784         * utils.h (compare_cstrings): New static inline function.
8785
8786 2017-07-20  Pedro Alves  <palves@redhat.com>
8787
8788         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8789         (get_var_value): Constify parameters.
8790         (get_int_var_value): Change prototype.
8791         (to_fixed_range_type): Adjust.
8792         * ada-lang.h (get_int_var_value): Change prototype.
8793
8794 2017-07-20  Pedro Alves  <palves@redhat.com>
8795
8796         * dwarf2read.c (dw2_lookup_symbol): Use
8797         SYMBOL_MATCHES_SEARCH_NAME.
8798         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8799
8800 2017-07-20  Pedro Alves  <palves@redhat.com>
8801
8802         * block.c (block_iter_name_step, block_iter_name_first)
8803         (block_iter_name_next): Delete.
8804         (block_lookup_symbol_primary): Adjust to use
8805         dict_iter_match_first/dict_iter_match_next.
8806         * block.h (block_iter_name_first, block_iter_name_next): Delete
8807         declarations.
8808         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8809         dict_iter_match_first/dict_iter_match_next.
8810
8811 2017-07-20  Pedro Alves  <palves@redhat.com>
8812
8813         * cp-support.c (cp_find_first_component_aux): Add missing case for
8814         end of string.
8815
8816 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8817
8818         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8819         of dwo_cu's dwo_file.
8820
8821 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8822
8823         * remote.c (store_registers_using_G): Remove one line comment.
8824
8825 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8826
8827         * regcache.c (regcache_cpy): Simplify it.
8828         (regcache::cpy_no_passthrough): Remove it.
8829         * regcache.h (cpy_no_passthrough): Remove it.
8830         (regcache_dup, regcache_cpy): Update comments.
8831
8832 2017-07-18  Pedro Alves  <palves@redhat.com>
8833
8834         * remote-sim.c (sim_command_completer): Adjust to work with a
8835         completion_tracker instead of a VEC.
8836
8837 2017-07-17  Pedro Alves  <palves@redhat.com>
8838
8839         * completer.c (complete_source_filenames): New function.
8840         (complete_address_and_linespec_locations): New function.
8841         (location_completer): Use complete_address_and_linespec_locations.
8842         (completion_tracker::build_completion_result): Honor the tracker's
8843         request to suppress append.
8844         * completer.h (completion_tracker::suppress_append_ws)
8845         (completion_tracker::set_suppress_append_ws): New methods.
8846         (completion_tracker::m_suppress_append_ws): New field.
8847         (complete_source_filenames): New declaration.
8848         * linespec.c (linespec_complete_what): New.
8849         (struct ls_parser) <complete_what, completion_word,
8850         completion_quote_char, completion_quote_end, completion_tracker>:
8851         New fields.
8852         (string_find_incomplete_keyword_at_end): New.
8853         (linespec_lexer_lex_string): Record quote char.  If in completion
8854         mode, don't throw.
8855         (linespec_lexer_consume_token): Advance the completion word point.
8856         (linespec_lexer_peek_token): Save/restore completion info.
8857         (save_stream_and_consume_token): New.
8858         (set_completion_after_number): New.
8859         (linespec_parse_basic): Set what to complete next depending on
8860         token.  Handle function and label completions specially.
8861         (parse_linespec): Disable objc shortcut in completion mode.  Set
8862         what to complete next depending on token type.  Skip keyword if in
8863         completion mode.
8864         (complete_linespec_component, linespec_complete): New.
8865         * linespec.h (linespec_complete): Declare.
8866
8867 2017-07-17  Pedro Alves  <palves@redhat.com>
8868
8869         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8870         Handle 'operator<' / 'operator<<'.
8871
8872 2017-07-17  Pedro Alves  <palves@redhat.com>
8873
8874         * completer.c (collect_explicit_location_matches): Handle
8875         MATCH_LABEL.
8876         (convert_explicit_location_to_linespec): New, factored out from
8877         ...
8878         (convert_explicit_location_to_sals): ... this.
8879         (complete_label): New.
8880         (linespec_complete_label, find_label_symbols_in_block): New.
8881         (find_label_symbols): Add completion_mode parameter and adjust to
8882         call find_label_symbols_in_block.
8883         * linespec.h (linespec_complete_label): Declare.
8884
8885 2017-07-17  Pedro Alves  <palves@redhat.com>
8886
8887         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8888         complete_symbol_mode parameter.
8889         * cli/cli-cmds.c (complete_command): Get the completion result out
8890         of the handle_brkchars tracker if used a custom word point.
8891         * completer.c: Include "linespec.h".
8892         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8893         (advance_to_expression_complete_word_point): New.
8894         (completion_tracker::completes_to_completion_word): New.
8895         (complete_files_symbols): Pass down
8896         complete_symbol_mode::EXPRESSION.
8897         (explicit_options, probe_options): New.
8898         (collect_explicit_location_matches): Complete on the
8899         explictit_loc->foo instead of word.  Use
8900         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8901         keyword and options completions.
8902         (backup_text_ptr): Delete.
8903         (skip_keyword): New.
8904         (complete_explicit_location): Remove 'word' parameter.  Add
8905         language, quoted_arg_start and quoted_arg_end parameters.
8906         Rewrite, parsing left to right.
8907         (location_completer): Rewrite.
8908         (location_completer_handle_brkchars): New function.
8909         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8910         (enum complete_line_internal_reason): Adjust comments.
8911         (completion_tracker::discard_completions): New.
8912         (completer_handle_brkchars_func_for_completer): Handle
8913         location_completer.
8914         (gdb_custom_word_point_brkchars)
8915         (gdb_org_rl_basic_quote_characters): New.
8916         (gdb_completion_word_break_characters_throw)
8917         (completion_find_completion_word): Handle trackers that use a
8918         custom word point.
8919         (completion_tracker::advance_custom_word_point_by): New.
8920         (completion_tracker::build_completion_result): Don't rely on
8921         readline appending the quote char.
8922         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8923         use a custom word point.
8924         (gdb_rl_attempted_completion_function): Restore
8925         rl_basic_quote_characters.
8926         * completer.h (class completion_tracker): Extend intro comment.
8927         (completion_tracker::set_quote_char)
8928         (completion_tracker::quote_char)
8929         (completion_tracker::set_use_custom_word_point)
8930         (completion_tracker::use_custom_word_point)
8931         (completion_tracker::custom_word_point)
8932         (completion_tracker::set_custom_word_point)
8933         (completion_tracker::advance_custom_word_point_by)
8934         (completion_tracker::completes_to_completion_word)
8935         (completion_tracker::discard_completions): New methods.
8936         (completion_tracker::m_quote_char)
8937         (completion_tracker::m_use_custom_word_point)
8938         (completion_tracker::m_custom_word_point): New fields.
8939         (advance_to_expression_complete_word_point): Declare.
8940         * f-lang.c (f_collect_symbol_completion_matches): Add
8941         complete_symbol_mode parameter.
8942         * language.h (struct language_defn)
8943         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8944         parameter.
8945         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8946         (linespec_complete_function): New function.
8947         (linespec_lexer_lex_keyword): Adjust.
8948         * linespec.h (linespec_keywords, linespec_complete_function): New
8949         declarations.
8950         * location.c (find_end_quote): New function.
8951         (explicit_location_lex_one): Add explicit_completion_info
8952         parameter.  Save quoting info.  Don't throw if being called for
8953         completion.  Don't handle Ada operators here.
8954         (is_cp_operator, skip_op_false_positives, first_of)
8955         (explicit_location_lex_one_function): New function.
8956         (string_to_explicit_location): Replace 'dont_throw' parameter with
8957         an explicit_completion_info pointer parameter.  Handle it.  Don't
8958         use explicit_location_lex_one to lex function names.  Use
8959         explicit_location_lex_one_function instead.
8960         * location.h (struct explicit_completion_info): New.
8961         (string_to_explicit_location): Replace 'dont_throw' parameter with
8962         an explicit_completion_info pointer parameter.
8963         * symtab.c (default_collect_symbol_completion_matches_break_on):
8964         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8965         (default_collect_symbol_completion_matches)
8966         (collect_symbol_completion_matches): Add complete_symbol_mode
8967         parameter.
8968         (collect_symbol_completion_matches_type): Pass down
8969         complete_symbol_mode::EXPRESSION.
8970         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8971         parameter.  Handle LINESPEC mode.
8972         * symtab.h (complete_symbol_mode): New.
8973         (default_collect_symbol_completion_matches_break_on)
8974         (default_collect_symbol_completion_matches)
8975         (collect_symbol_completion_matches)
8976         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8977         parameter.
8978
8979 2017-07-17  Pedro Alves  <palves@redhat.com>
8980
8981         * utils.c (enum class strncmp_iw_mode): New.
8982         (strcmp_iw): Rename to ...
8983         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8984         parameters.  Handle them.
8985         (strncmp_iw): New.
8986         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8987         * utils.h (strncmp_iw): Declare.
8988         (strcmp_iw): Move describing comments here.
8989
8990 2017-07-17  Pedro Alves  <palves@redhat.com>
8991
8992         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8993         CP_OPERATOR_STR.
8994         * c-typeprint.c (is_type_conversion_operator): Use
8995         CP_OPERATOR_STR.
8996         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8997         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8998         CP_OPERATOR_LEN.
8999         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9000         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9001         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9002         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9003         CP_OPERATOR_STR.
9004         * location.c: Include "cp-support.h".
9005         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9006         CP_OPERATOR_STR.
9007         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9008         CP_OPERATOR_LEN.
9009
9010 2017-07-17  Pedro Alves  <palves@redhat.com>
9011
9012         * cli/cli-cmds.c (complete_command): Use a completion tracker
9013         along with completion_find_completion_word for handle_brkchars
9014         phase.
9015         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9016         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9017         (struct gdb_rl_completion_word_info): New.
9018         (gdb_rl_find_completion_word): New.
9019         (completion_find_completion_word): New.
9020         * completer.h (completion_find_completion_word): Declare.
9021
9022 2017-07-17  Pedro Alves  <palves@redhat.com>
9023
9024         * ada-lang.c (symbol_completion_match): Adjust comments.
9025         (symbol_completion_add): Replace vector parameter with
9026         completion_tracker parameter.  Use it.
9027         (ada_make_symbol_completion_list): Rename to...
9028         (ada_collect_symbol_completion_matches): ... this.  Add
9029         completion_tracker parameter and use it.
9030         (ada_language_defn): Adjust.
9031         * break-catch-syscall.c (catch_syscall_completer): Adjust
9032         prototype and work with completion_tracker instead of VEC.
9033         * breakpoint.c (condition_completer): Adjust prototype and work
9034         with completion_tracker instead of VEC.
9035         * c-lang.c (c_language_defn, cplus_language_defn)
9036         (asm_language_defn, minimal_language_defn): Adjust to renames.
9037         * cli/cli-cmds.c (complete_command): Rework using
9038         completion_tracker.  Catch exceptions when completing.
9039         * cli/cli-decode.c (integer_unlimited_completer)
9040         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9041         with completion_tracker instead of VEC.
9042         * command.h (struct completion_tracker): Forward declare.
9043         (completer_ftype, completer_handle_brkchars_ftype): Change
9044         types.
9045         (complete_on_cmdlist, complete_on_enum): Adjust.
9046         * completer.c: Include <algorithm>.
9047         (struct gdb_completer_state): New.
9048         (current_completion): New global.
9049         (readline_line_completion_function): Delete.
9050         (noop_completer, filename_completer)
9051         (filename_completer_handle_brkchars, complete_files_symbols)
9052         (linespec_location_completer): Adjust to work with a
9053         completion_tracker instead of a VEC.
9054         (string_or_empty): New.
9055         (collect_explicit_location_matches): Adjust to work with a
9056         completion_tracker instead of a VEC.
9057         (explicit_location_completer): Rename to ...
9058         (complete_explicit_location): ... this and adjust to work with a
9059         completion_tracker instead of a VEC.
9060         (location_completer): Adjust to work with a completion_tracker
9061         instead of a VEC.
9062         (add_struct_fields): Adjust to work with a completion_list instead
9063         of VEC.
9064         (expression_completer): Rename to ...
9065         (complete_expression): ... this and adjust to work with a
9066         completion_tracker instead of a VEC.  Use complete_files_symbols.
9067         (expression_completer): Reimplement on top of complete_expression.
9068         (symbol_completer): Adjust to work with a completion_tracker
9069         instead of a VEC.
9070         (enum complete_line_internal_reason): Add describing comments.
9071         (complete_line_internal_normal_command): Adjust to work with a
9072         completion_tracker instead of a VEC.
9073         (complete_line_internal): Rename to ...
9074         (complete_line_internal_1): ... this and adjust to work with a
9075         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
9076         handle_brkchars phase.
9077         (new_completion_tracker): Delete.
9078         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9079         complete_line_internal_1.
9080         (free_completion_tracker): Delete.
9081         (INITIAL_COMPLETION_HTAB_SIZE): New.
9082         (completion_tracker::completion_tracker)
9083         (completion_tracker::~completion_tracker): New.
9084         (maybe_add_completion): Delete.
9085         (completion_tracker::maybe_add_completion)
9086         (completion_tracker::add_completion)
9087         (completion_tracker::add_completions): New.
9088         (throw_max_completions_reached_error): Delete.
9089         (complete_line): Adjust to work with a completion_tracker instead
9090         of a VEC.  Don't create a completion_tracker_t or check for max
9091         completions here.
9092         (command_completer, command_completer_handle_brkchars)
9093         (signal_completer, reg_or_group_completer_1)
9094         (reg_or_group_completer, default_completer_handle_brkchars):
9095         Adjust to work with a completion_tracker.
9096         (gdb_completion_word_break_characters_throw): New.
9097         (gdb_completion_word_break_characters): Reimplement.
9098         (line_completion_function): Delete.
9099         (completion_tracker::recompute_lowest_common_denominator)
9100         (expand_preserving_ws)
9101         (completion_tracker::build_completion_result)
9102         (completion_result::completion_result)
9103         (completion_result::completion_result)
9104         (completion_result::~completion_result)
9105         (completion_result::completion_result)
9106         (completion_result::release_match_list, compare_cstrings)
9107         (completion_result::sort_match_list)
9108         (completion_result::reset_match_list)
9109         (gdb_rl_attempted_completion_function_throw)
9110         (gdb_rl_attempted_completion_function): New.
9111         * completer.h (completion_list, struct completion_result)
9112         (class completion_tracker): New.
9113         (complete_line): Add completion_tracker parameter.
9114         (readline_line_completion_function): Delete.
9115         (gdb_rl_attempted_completion_function): New.
9116         (noop_completer, filename_completer, expression_completer)
9117         (location_completer, symbol_completer, command_completer)
9118         (signal_completer, reg_or_group_completer): Update prototypes.
9119         (completion_tracker_t, new_completion_tracker)
9120         (make_cleanup_free_completion_tracker): Delete.
9121         (enum maybe_add_completion_enum): Delete.
9122         (maybe_add_completion): Delete.
9123         (throw_max_completions_reached_error): Delete.
9124         * corefile.c (complete_set_gnutarget): Adjust to work with a
9125         completion_tracker instead of a VEC.
9126         * cp-abi.c (cp_abi_completer): Adjust to work with a
9127         completion_tracker instead of a VEC.
9128         * d-lang.c (d_language_defn): Adjust.
9129         * disasm.c (disassembler_options_completer): Adjust to work with a
9130         completion_tracker instead of a VEC.
9131         * f-lang.c (f_make_symbol_completion_list): Rename to ...
9132         (f_collect_symbol_completion_matches): ... this.  Adjust to work
9133         with a completion_tracker instead of a VEC.
9134         (f_language_defn): Adjust.
9135         * go-lang.c (go_language_defn): Adjust.
9136         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9137         Adjust to work with a completion_tracker instead of a VEC.
9138         * infrun.c (handle_completer): Likewise.
9139         * interps.c (interpreter_completer): Likewise.
9140         * interps.h (interpreter_completer): Likewise.
9141         * language.c (unknown_language_defn, auto_language_defn)
9142         (local_language_defn): Adjust.
9143         * language.h (language_defn::la_make_symbol_completion_list):
9144         Rename to ...
9145         (language_defn::la_collect_symbol_completion_matches): ... this
9146         and adjust to work with a completion_tracker instead of a VEC.
9147         * m2-lang.c (m2_language_defn): Adjust.
9148         * objc-lang.c (objc_language_defn): Adjust.
9149         * opencl-lang.c (opencl_language_defn): Adjust.
9150         * p-lang.c (pascal_language_defn): Adjust.
9151         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9152         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9153         with a completion_tracker.
9154         * rust-lang.c (rust_language_defn): Adjust.
9155         * symtab.c (free_completion_list, do_free_completion_list)
9156         (return_val, completion_tracker): Delete.
9157         (completion_list_add_name, completion_list_add_symbol)
9158         (completion_list_add_msymbol, completion_list_objc_symbol)
9159         (completion_list_add_fields, add_symtab_completions): Add
9160         completion_tracker parameter and use it.
9161         (default_make_symbol_completion_list_break_on_1): Rename to...
9162         (default_collect_symbol_completion_matches_break_on): ... this.
9163         Add completion_tracker parameter and use it instead of allocating
9164         a completion tracker here.
9165         (default_make_symbol_completion_list_break_on): Delete old
9166         implementation.
9167         (default_make_symbol_completion_list): Delete.
9168         (default_collect_symbol_completion_matches): New.
9169         (make_symbol_completion_list): Delete.
9170         (collect_symbol_completion_matches): New.
9171         (make_symbol_completion_type): Rename to ...
9172         (collect_symbol_completion_matches_type): ... this.  Add
9173         completion_tracker parameter and use it instead of VEC.
9174         (make_file_symbol_completion_list_1): Rename to...
9175         (collect_file_symbol_completion_matches): ... this.  Add
9176         completion_tracker parameter and use it instead of VEC.
9177         (make_file_symbol_completion_list): Delete.
9178         (add_filename_to_list): Use completion_list instead of a VEC.
9179         (add_partial_filename_data::list): Now a completion_list.
9180         (make_source_files_completion_list): Work with a completion_list
9181         instead of a VEC.
9182         * symtab.h: Include "completer.h".
9183         (default_make_symbol_completion_list_break_on)
9184         (default_make_symbol_completion_list, make_symbol_completion_list)
9185         (make_symbol_completion_type, make_file_symbol_completion_list)
9186         (make_source_files_completion_list): Delete.
9187         (default_collect_symbol_completion_matches_break_on)
9188         (default_collect_symbol_completion_matches)
9189         (collect_symbol_completion_matches)
9190         (collect_symbol_completion_matches_type)
9191         (collect_file_symbol_completion_matches)
9192         (make_source_files_completion_list): New.
9193         * top.c (init_main): Don't install a rl_completion_entry_function
9194         hook.  Install a rl_attempted_completion_function hook instead.
9195         * tui/tui-layout.c (layout_completer): Adjust to work with a
9196         completion_tracker.
9197         * tui/tui-regs.c (tui_reggroup_completer):
9198         * tui/tui-win.c (window_name_completer, focus_completer)
9199         (winheight_completer): Adjust to work with a completion_tracker.
9200         * value.c: Include "completer.h".
9201         (complete_internalvar): Adjust to work with a completion_tracker.
9202         * value.h (complete_internalvar): Likewise.
9203
9204 2017-07-17  Pedro Alves  <palves@redhat.com>
9205
9206         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9207         renames.
9208         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9209         comments to completer_ftype's declaration.
9210         <completer_handle_brkchars>: Change type to
9211         completer_handle_brkchars_ftype.
9212         * command.h (completer_ftype): Add describing comment and give
9213         names to parameters.
9214         (completer_ftype_void): Rename to ...
9215         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
9216         (set_cmd_completer_handle_brkchars): Adjust.
9217         * completer.c (filename_completer_handle_brkchars): New function.
9218         (complete_line_internal_normal_command): New function, factored
9219         out from ...
9220         (complete_line_internal): ... here.
9221         (command_completer_handle_brkchars)
9222         (default_completer_handle_brkchars)
9223         (completer_handle_brkchars_func_for_completer): New functions.
9224         * completer.h (set_gdb_completion_word_break_characters): Delete
9225         declaration.
9226         (completer_handle_brkchars_func_for_completer): New declaration.
9227         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9228         completer_handle_brkchars_func_for_completer.
9229
9230 2017-07-17  Pedro Alves  <palves@redhat.com>
9231
9232         * completer.c (symbol_completer): New function, based on
9233         make_symbol_completion_list_fn.
9234         * completer.h (symbol_completer): New declaration.
9235         * guile/scm-cmd.c (cmdscm_completers): Adjust.
9236         * python/py-cmd.c (completers): Adjust.
9237         * symtab.c (make_symbol_completion_list_fn): Delete.
9238         * symtab.h (make_symbol_completion_list_fn): Delete.
9239         * cli/cli-decode.c (add_cmd): Adjust.
9240
9241 2017-07-17  Pedro Alves  <palves@redhat.com>
9242
9243         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9244         * dwarf2read.c: Include "filename-seen-cache.h".
9245         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9246         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9247         * filename-seen-cache.c: New file.
9248         * filename-seen-cache.h: New file.
9249         * symtab.c: Include "filename-seen-cache.h".
9250         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9251         (create_filename_seen_cache, clear_filename_seen_cache)
9252         (delete_filename_seen_cache, filename_seen): Delete, parts moved
9253         to filename-seen-cache.h/filename-seen-cache.c.
9254         (output_source_filename, sources_info)
9255         (maybe_add_partial_symtab_filename)
9256         (make_source_files_completion_list): Adjust to use
9257         filename_seen_cache.
9258
9259 2017-07-17  Pedro Alves  <palves@redhat.com>
9260
9261         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9262         fields.
9263         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9264         dwarf2_debug_sections*)): New.
9265         (dwarf2_per_objfile::dwarf2_per_objfile(const
9266         dwarf2_per_objfile&)): Declare as deleted.
9267         (dwarf2_per_objfile::operator=): Declare as deleted.
9268         (dwarf2_per_objfile::dwarf2_per_objfile)
9269         (dwarf2_per_objfile::~dwarf2_per_objfile)
9270         (dwarf2_per_objfile::free_cached_comp_units): New.
9271         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9272         ctor.  Call dwarf2_per_objfile's ctor manually.
9273         (dwarf2_locate_sections): Deleted/refactored as ...
9274         (dwarf2_per_objfile::locate_sections): ... this new method.
9275         (free_cached_comp_units): Defer to
9276         dwarf2_per_objfile::free_cached_comp_units.
9277         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9278
9279 2017-07-14  Tom Tromey  <tom@tromey.com>
9280
9281         PR rust/21764:
9282         * rust-exp.y (convert_ast_to_expression): Add "want_type"
9283         parameter.
9284         <UNOP_SIZEOF>: Split into separate case.
9285         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
9286
9287 2017-07-14  Tom Tromey  <tom@tromey.com>
9288
9289         PR rust/21763:
9290         * symtab.c (symbol_matches_domain): Add language_rust to special
9291         case.
9292         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9293         treat LOC_TYPEDEF symbols as variables.
9294
9295 2017-07-14  Pedro Alves  <palves@redhat.com>
9296
9297         * symtab.c (make_file_symbol_completion_list_1): Iterate over
9298         symtabs matching all symtabs with SRCFILE as file name instead of
9299         only considering the first hit, with lookup_symtab.
9300
9301 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9302
9303         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9304         operator_name parameters.
9305         (gen_expr): Update function call.
9306
9307 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9308
9309         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9310         parameter.
9311         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9312         Likewise.
9313         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9314         parameter, use agent_expr::gdbarch instead, update function
9315         calls.
9316         (locexpr_tracepoint_var_ref): Likewise.
9317         (loclist_tracepoint_var_ref): Likewise.
9318         * ax-gdb.c (gen_trace_static_fields): Likewise.
9319         (gen_traced_pop): Likewise.
9320         (gen_frame_args_address): Likewise.
9321         (gen_frame_locals_address): Likewise.
9322         (gen_var_ref): Likewise.
9323         (gen_struct_ref_recursive): Likewise.
9324         (gen_static_field): Likewise.
9325         (gen_maybe_namespace_elt): Likewise.
9326         (gen_expr): Likewise.
9327         (gen_trace_for_var): Likewise.
9328         (gen_trace_for_expr): Likewise.
9329         (gen_trace_for_return_address): Likewise.
9330
9331 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9332
9333         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9334         parameter.
9335         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9336
9337 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9338
9339         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9340         from ax, update calls.
9341         (gen_usual_arithmetic): Likewise.
9342         (gen_integral_promotions): Likewise.
9343         (gen_bitfield_ref): Likewise.
9344         (gen_primitive_field): Likewise.
9345         (gen_struct_ref_recursive): Likewise.
9346         (gen_struct_ref): Likewise.
9347         (gen_maybe_namespace_elt): Likewise.
9348         (gen_struct_elt_for_reference): Likewise.
9349         (gen_namespace_elt): Likewise.
9350         (gen_aggregate_elt_ref): Likewise.
9351         (gen_expr): Get gdbarch from ax, update calls.
9352         (gen_expr_binop_rest): Likewise.
9353
9354 2017-07-13  Pedro Alves  <palves@redhat.com>
9355
9356         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9357         as default tdesc.
9358         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9359         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9360         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9361         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9362         tdep.
9363         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9364         Get final tdesc from the tdep.
9365         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9366         default tdesc.
9367         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9368         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9369         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9370         Use it as default tdesc.
9371         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9372         down to amd_init_abi.  No longer handle fallback tdesc here.
9373         * amd64-tdep.h (tdesc_x32): Declare.
9374         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9375         parameter.
9376         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9377         as default tdesc.
9378
9379 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9380
9381         * s390-linux-tdep.c (s390_process_record): Add support for
9382         instructions new in arch12.
9383
9384 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9385
9386         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9387         PT_GETFSBASE and PT_GETGSBASE.
9388         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9389         PT_SETGSBASE.
9390
9391 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9392
9393         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9394         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9395         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9396         those rules.
9397         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9398         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9399         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9400         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9401         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9402         * features/i386/amd64.xml: Add 64bit-segments.xml.
9403         * features/i386/amd64-avx-avx512.c: Regenerated.
9404         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9405         * features/i386/amd64-avx-mpx.c: Regenerated.
9406         * features/i386/amd64-avx.c: Regenerated.
9407         * features/i386/amd64-mpx.c: Regenerated.
9408         * features/i386/amd64.c: Regenerated.
9409         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9410         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9411         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9412         * regformats/i386/amd64-avx.dat: Regenerated.
9413         * regformats/i386/amd64-mpx.dat: Regenerated.
9414         * regformats/i386/amd64.dat: Regenerated.
9415
9416 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9417
9418         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9419         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9420
9421 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9422
9423         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9424         unsetenv.
9425         * gnulib/aclocal.m4: Regenerate.
9426         * gnulib/config.in: Regenerate.
9427         * gnulib/configure: Regenerate.
9428         * gnulib/import/Makefile.am: Regenerate.
9429         * gnulib/import/Makefile.in: Regenerate.
9430         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9431         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9432         * gnulib/import/m4/environ.m4: New file.
9433         * gnulib/import/m4/setenv.m4: New file.
9434         * gnulib/import/setenv.c: New file.
9435         * gnulib/import/unsetenv.c: New file.
9436
9437 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9438
9439         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9440         address when op is DW_OP_addr.
9441
9442 2017-07-09  Tom Tromey  <tom@tromey.com>
9443
9444         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9445         check and apply to outer type.
9446
9447 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9448
9449         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9450         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9451         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9452         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9453
9454 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9455
9456         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9457
9458 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9459
9460         * corelow.c (get_core_siginfo): Remove.
9461         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9462         instead of get_core_siginfo.
9463         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9464         * gdbarch.h: Re-generate.
9465         * gdbarch.c: Re-generate.
9466         * linux-tdep.c (linux_core_xfer_siginfo): New.
9467         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9468
9469 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9470
9471         * corelow.c (thread_section_name): Move to ...
9472         * gdbcore.h (thread_section_name): ... here.
9473
9474 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9475
9476         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9477         (struct siginfo32): New.
9478         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9479         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9480         via ptrace(PT_LWPINFO).
9481
9482 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9483
9484         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9485         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9486         (fbsd_get_siginfo_type): New.
9487         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9488         (_initialize_fbsd_tdep): New.
9489
9490 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9491
9492         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9493         a singular dwo_unit*) to support multiple CUs in the same way that
9494         multiple TUs are supported.
9495         (create_cus_hash_table): Replace create_dwo_cu with a function for
9496         parsing multiple CUs from a DWO file.
9497         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9498         create_dwo_cu.
9499         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9500         htab_find, rather than comparing the signature to a singleton CU in
9501         the dwo_file.
9502
9503 2017-07-06  Pedro Alves  <palves@redhat.com>
9504
9505         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9506
9507 2017-07-04  Pedro Alves  <palves@redhat.com>
9508
9509         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9510         * gdbtypes.h (TYPE_STATIC): Delete.
9511         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9512         is_synchronized, is_native>: Delete.
9513         <dummy>: Bump.
9514         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9515         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9516         (TYPE_FN_FIELD_ABSTRACT): Delete.
9517
9518 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9519
9520         * buffer.h (buffer_finish): Fix spelling mistakes.
9521
9522 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9523
9524         * .dir-locals.el: Automatically switch to C-style comments in
9525         versions of Emacs that support the feature.
9526
9527 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9528             Pedro Alves  <palves@redhat.com>
9529
9530         PR cli/21688
9531         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9532         (process_next_line): New variable 'inline_cmd'.
9533         Adjust 'if' clauses for "python", "compile" and "guile" to use
9534         'command_name_equals' and check for '!inline_cmd'.
9535
9536 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9537
9538         PR cli/21688
9539         * cli/cli-script.c (command_name_equals_not_inline): New function.
9540         (process_next_line): Adjust 'if' clauses for "python", "compile"
9541         and "guile" to use command_name_equals_not_inline.
9542
9543 2017-06-29  Pedro Alves  <palves@redhat.com>
9544
9545         * completer.c (expression_completer): Call
9546         linespec_location_completer instead of location_completer.
9547
9548 2017-06-29  Pedro Alves  <palves@redhat.com>
9549
9550         * completer.c (expression_completer): Remove code that recomputes
9551         'text' from 'word'.
9552
9553 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9554
9555         * regformats/regdat.sh: Generate code with
9556         "ifndef IN_PROCESS_AGENT".
9557
9558 2017-06-28  Pedro Alves  <palves@redhat.com>
9559
9560         * command.h: Include "common/scoped_restore.h".
9561
9562 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9563
9564         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9565         instead of obstack_grow.
9566
9567 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9568
9569         PR gdb/21337
9570         * symfile.c (reread_symbols): Call objfiles_changed just before
9571         read_symbols.
9572
9573 2017-06-27  Pedro Alves  <palves@redhat.com>
9574
9575         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9576         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9577         (completion_list_add_symbol, completion_list_add_msymbol):
9578         ... these new functions.
9579         (add_symtab_completions)
9580         (default_make_symbol_completion_list_break_on_1): Adjust.
9581
9582 2017-06-27  Pedro Alves  <palves@redhat.com>
9583
9584         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9585         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9586         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9587         dtor.
9588         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9589         'storage_obstack' field an auto_obstack.  In-class initialize all
9590         non-bitfield fields.  Make minsyms_read bool.
9591         * symfile.c (read_symbols): Adjust.
9592
9593 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9594
9595         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9596         (gdbsim_store_register): Likewise.
9597
9598 2017-06-27  Pedro Alves  <palves@redhat.com>
9599
9600         * c-exp.y (name_obstack): Now an auto_obstack.
9601         (yylex): Use auto_obstack::clear.
9602         (c_parse): Use auto_obstack::clear instead of reinitializing and
9603         freeing the obstack.
9604         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9605         * d-exp.y (name_obstack): Now an auto_obstack.
9606         (yylex): Use auto_obstack::clear.
9607         (d_parse): Use auto_obstack::clear instead of reinitializing and
9608         freeing the obstack.
9609         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9610         auto_obstack.
9611         * dwarf2read.c (create_addrmap_from_index)
9612         (dwarf2_build_psymtabs_hard)
9613         (update_enumeration_type_from_children): Likewise.
9614         * gdb_obstack.h (auto_obstack): New type.
9615         * go-exp.y (name_obstack): Now an auto_obstack.
9616         (build_packaged_name): Use auto_obstack::clear.
9617         (go_parse): Use auto_obstack::clear instead of reinitializing and
9618         freeing the obstack.
9619         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9620         auto_obstack.
9621         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9622         * rust-exp.y (work_obstack): Now an auto_obstack.
9623         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9624         reinitializing and freeing the obstack.
9625         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9626         (host_char_to_target): Use auto_obstack.
9627         * utils.h (make_cleanup_obstack_free): Delete declaration.
9628         * valprint.c (generic_emit_char, generic_printstr): Use
9629         auto_obstack.
9630
9631 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9632
9633         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9634         thread.
9635         (darwin_init_thread_list): Don't update dummy thread.
9636         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9637
9638 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9639
9640         * record-full.c (netorder16): Remove.
9641
9642 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9643
9644         * common/diagnostics.h: Define macros for GCC.
9645         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9646         * common/vec.h: Include diagnostics.h.
9647         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9648         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9649         warning.
9650
9651 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9652
9653         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9654         New macro.
9655         * ada-lex.l: Ignore deprecated register warnings.
9656
9657 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9658
9659         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9660         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9661
9662 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9663
9664         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9665         its own line.
9666
9667 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9668
9669         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9670
9671 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9672
9673         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9674         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9675         (xtensa_register_read_masked): Likewise.
9676
9677 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9678
9679         * common/environ.c (gdb_environ::unset): Update comment.
9680
9681 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9682
9683         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9684         registers.
9685
9686 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9687
9688         * record-full.c (record_full_exec_insn): Use byte_vector.
9689
9690 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9691
9692         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9693         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9694
9695 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9696
9697         * remote.c (cached_reg): Move from here...
9698         * regcache.h (cached_reg): ...to here.
9699         * python/py-unwind.c (struct reg_info): Remove.
9700         (cached_frame_info): Use cached_reg_t.
9701         (pyuw_prev_register): Likewise.
9702         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9703         (pyuw_dealloc_cache): Free all registers.
9704
9705 2017-06-22  Pedro Alves  <palves@redhat.com>
9706             Simon Marchi  <simon.marchi@ericsson.com>
9707
9708         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9709         warning.
9710         * common/diagnostics.h: New file.
9711
9712 2017-06-22  Pedro Alves  <palves@redhat.com>
9713
9714         * common/agent.h: Add include guards.
9715
9716 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9717
9718         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9719         talk about addressable units instead of bytes.
9720
9721 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9722
9723         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9724         of '::const_iterator'.
9725
9726 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9727
9728         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9729         'unittests/environ-selftests.c'.
9730         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9731         * charset.c (find_charset_names): Declare object 'iconv_env'.
9732         Update code to use 'iconv_env' object.  Remove call to
9733         'free_environ'.
9734         * common/environ.c: Include <utility>.
9735         (make_environ): Delete function.
9736         (free_environ): Delete function.
9737         (gdb_environ::clear): New function.
9738         (gdb_environ::operator=): New function.
9739         (gdb_environ::get): Likewise.
9740         (environ_vector): Delete function.
9741         (set_in_environ): Delete function.
9742         (gdb_environ::set): New function.
9743         (unset_in_environ): Delete function.
9744         (gdb_environ::unset): New function.
9745         (gdb_environ::envp): Likewise.
9746         * common/environ.h: Include <vector>.
9747         (struct gdb_environ): Delete; transform into...
9748         (class gdb_environ): ... this class.
9749         (free_environ): Delete prototype.
9750         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9751         environ_vector): Likewise.
9752         * infcmd.c (run_command_1): Update code to call
9753         'envp' from 'gdb_environ' class.
9754         (environment_info): Update code to call methods from 'gdb_environ'
9755         class.
9756         (unset_environment_command): Likewise.
9757         (path_info): Likewise.
9758         (path_command): Likewise.
9759         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9760         (inferior::inferior): Initialize 'environment' using the host's
9761         information.
9762         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9763         Include "environ.h".
9764         (class inferior) <environment>: Change type from 'struct
9765         gdb_environ' to 'gdb_environ'.
9766         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9767         methods from 'gdb_environ' class.
9768         * solib.c (solib_find_1): Likewise
9769         * unittests/environ-selftests.c: New file.
9770
9771 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9772
9773         * features/i386/i386-linux.xml: Exchange the order of including
9774         32bit-linux.xml and 32bit-sse.xml.
9775         * features/i386/i386-linux.c: Regenerated.
9776
9777 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9778
9779         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9780         Delete copy ctor and assignment operator.
9781         (tdesc_type): Likewise.
9782         (tdesc_feature): Likewise.
9783         (tdesc_free_reg): Remove.
9784         (tdesc_create_reg): Use new.
9785         (tdesc_free_type): Remove.
9786         (tdesc_create_vector): Use new.
9787         (tdesc_create_union): Likewise.
9788         (tdesc_create_flags): Likewise.
9789         (tdesc_create_enum): Likewise.
9790         (tdesc_free_feature): Delete.
9791         (free_target_description): Use delete.
9792
9793 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9794
9795         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9796         registers.
9797
9798 2017-06-19  Pedro Alves  <palves@redhat.com>
9799
9800         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9801         after gdb::unlinker.
9802
9803 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9804
9805         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9806         gdb_environ to access an environment variable.
9807
9808 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9809
9810         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9811         gdb_byte*.
9812
9813 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9814
9815         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9816
9817 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9818
9819         * configure: Re-generate.
9820         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9821
9822 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9823
9824         * configure: Re-generate.
9825         * warning.m4: Pass -Werror to compiler when checking for
9826         supported warning flags.
9827
9828 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9829
9830         * Makefile.in (COMPILE.pre): Add "-x c++".
9831
9832 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9833             Pedro Alves  <palves@redhat.com>
9834             Yao Qi  <yao.qi@linaro.org>
9835
9836         * defs.h (RequireLongest): New.
9837         (extract_integer): Declare function template.
9838         (extract_signed_integer): Remove the declaration, but define it
9839         static inline.
9840         (extract_unsigned_integer): Likewise.
9841         (store_integer): Declare function template.
9842         (store_signed_integer): Remove the declaration, but define it
9843         static inline.
9844         (store_unsigned_integer): Likewise.
9845         * findvar.c (extract_integer): New function template.
9846         (extract_signed_integer): Remove.
9847         (extract_unsigned_integer): Remove.
9848         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9849         instantiations.
9850         (store_integer): New function template.
9851         (store_signed_integer): Remove.
9852         (store_unsigned_integer): Remove.
9853         (store_integer): Explicit instantiations.
9854         * regcache.c (regcache_raw_read_signed): Update.
9855         (regcache::raw_read): New function.
9856         (regcache::raw_read_signed): Remove.
9857         (regcache::raw_read_unsigned): Remove.
9858         (regcache_raw_read_unsigned): Update.
9859         (regcache_raw_write_unsigned): Update.
9860         (regcache::raw_write_signed): Remove.
9861         (regcache::raw_write): New function.
9862         (regcache_cooked_read_signed): Update.
9863         (regcache::raw_write_unsigned): Remove.
9864         (regcache::cooked_read_signed): Remove.
9865         (regcache_cooked_read_unsigned): Update.
9866         (regcache::cooked_read_unsigned): Remove.
9867         (regcache_cooked_write_signed): Update.
9868         (regcache_cooked_write_unsigned): Update.
9869         * regcache.h (regcache) <raw_read_signed>: Remove.
9870         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9871         <raw_read, raw_write>: New.
9872         <cooked_read_signed, cooked_write_signed>: Remove.
9873         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9874         <cooked_read, cooked_write>: New.
9875         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9876         (sh64_pseudo_register_write): Update.
9877
9878 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9879
9880         * arc-tdep.c (arc_disassembler_options): New variable.
9881         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9882         of default_print_insn.
9883         (arc_delayed_print_insn): Set info->section when needed,
9884         use default_print_insn to retrieve a disassembler.
9885
9886 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9887
9888         PR gdb/21574
9889         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9890         to mention $SHELL and startup-with-shell.
9891
9892 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9893
9894         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9895
9896 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9897
9898         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9899         default_print_insn instead of print_insn_aarch64.
9900         * arm-tdep.c (gdb_print_insn_arm): Call
9901         default_print_insn instead of print_insn_big_arm
9902         and print_insn_little_arm.
9903         * i386-tdep.c (i386_print_insn): Call default_print_insn
9904         instead of print_insn_i386.
9905         * ia64-tdep.c (ia64_print_insn): Call
9906         default_print_insn instead of print_insn_ia64.
9907         * mips-tdep.c (gdb_print_insn_mips): Call
9908         default_print_insn instead of print_insn_big_mips
9909         and print_insn_little_mips.
9910         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9911         instead of print_insn_spu.
9912
9913 2017-06-14  Pedro Alves  <palves@redhat.com>
9914
9915         * ada-lang.c: Include "common/byte-vector.h".
9916         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9917         * charset.c (wchar_iterator::iterate): Resize the vector instead
9918         of reserving it.
9919         * common/byte-vector.h: Include "common/def-vector.h".
9920         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9921         * cli/cli-dump.c: Include "common/byte-vector.h".
9922         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9923         * common/byte-vector.h: New file.
9924         * common/def-vector.h: New file.
9925         * common/default-init-alloc.h: New file.
9926         * dwarf2loc.c: Include "common/byte-vector.h".
9927         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9928         instead of reserving it.
9929         * dwarf2read.c: Include "common/byte-vector.h".
9930         (data_buf::m_vec): Now a gdb::byte_vector.
9931         * gdb_regex.c: Include "common/def-vector.h".
9932         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9933         * mi/mi-main.c: Include "common/byte-vector.h".
9934         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9935         * printcmd.c: Include "common/byte-vector.h".
9936         (print_scalar_formatted): Use gdb::byte_vector.
9937         * valprint.c: Include "common/byte-vector.h".
9938         (maybe_negate_by_bytes, print_decimal_chars): Use
9939         gdb::byte_vector.
9940
9941 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9942
9943         * darwin-nat.c: Include "nat/fork-inferior.h".
9944
9945 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9946
9947         * configure.nat: Factor out Darwin bits that are not
9948         architecture-specific.  Add fork-inferior.o.
9949
9950 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9951
9952         * configure.nat: Factor out AIX bits that are not
9953         architecture-specific.  Add fork-inferior.o.
9954
9955 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9956
9957         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9958         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9959         wrappers that just call rw_pieced_value.
9960
9961 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9962
9963         * dwarf2loc.c (write_pieced_value): When writing the data for a
9964         memory piece, use write_memory_with_notification instead of
9965         write_memory.
9966
9967 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9968
9969         * valops.c (read_value_memory): Change embedded_offset to
9970         represent a bit offset instead of a byte offset.
9971         * value.h (read_value_memory): Adjust comment.
9972
9973 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9974
9975         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9976         dest_offset_bits and source_offset_bits.
9977         (write_pieced_value): Likewise.
9978
9979 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9980
9981         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9982         given by DW_OP_bit_piece.
9983         (write_pieced_value): Likewise.
9984
9985 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9986
9987         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9988         some other preparations to the places where sufficient information
9989         is available.
9990         (write_pieced_value): Likewise.
9991
9992 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9993
9994         * dwarf2loc.c (bits_to_bytes): New function.
9995         (read_pieced_value): Fix offset calculations for register pieces
9996         on big-endian targets.
9997         (write_pieced_value): Likewise.
9998
9999 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10000
10001         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10002         (write_pieced_value): Likewise.
10003
10004 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10005
10006         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10007         transfer the source value's least significant bits, instead of its
10008         lowest-addressed ones.  Rename type_len to max_offset.
10009         (read_pieced_value): Mirror above changes to write_pieced_value as
10010         applicable.
10011
10012 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10013
10014         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10015         truncate full bytes from dest_offset_bits before using it as an
10016         offset into the buffer.
10017
10018 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10019
10020         * dwarf2loc.c (write_pieced_value): Include transfer size in
10021         byte-wise check.
10022
10023 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10024
10025         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10026         calculation of this_size.
10027
10028 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10029
10030         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10031         when targeting a bit-field.
10032         (write_pieced_value): Likewise.
10033
10034 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10035
10036         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10037         (allocate_piece_closure): Drop addr_size parameter.
10038         (dwarf2_evaluate_loc_desc_full): Adjust call to
10039         allocate_piece_closure.
10040
10041 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10042
10043         PR gdb/21226
10044         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10045         the LSB end, independent of endianness.
10046
10047 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10048
10049         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10050         size capping.
10051
10052 2017-06-13  Yao Qi  <yao.qi@linaro.org>
10053
10054         * mips-linux-nat.c: Move include features/mips*-linux.c to
10055         mips-linux-tdep.c.
10056         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10057         to mips-linux-tdep.c.
10058         * mips-linux-tdep.c: Include features/mips*-linux.c
10059         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10060         functions.
10061         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10062         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10063         (tdesc_mips64_dsp_linux): Declare.
10064
10065 2017-06-12  Tom Tromey  <tom@tromey.com>
10066
10067         * valprint.h (val_print_type_code_int): Remove.
10068         * valprint.c (generic_val_print_int): Always call
10069         val_print_scalar_formatted.
10070         (val_print_type_code_int): Remove.
10071         * printcmd.c (print_scalar_formatted): Handle options->format==0.
10072         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10073         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10074         * ada-valprint.c (ada_val_print_num): Use
10075         val_print_scalar_formatted.
10076
10077 2017-06-12  Tom Tromey  <tom@tromey.com>
10078
10079         * printcmd.c (print_scalar_formatted): Unify the two switches.
10080         Don't convert scalars to LONGEST.
10081
10082 2017-06-12  Tom Tromey  <tom@tromey.com>
10083
10084         PR exp/16225:
10085         * valprint.h (print_decimal_chars): Update.
10086         * valprint.c (maybe_negate_by_bytes): New function.
10087         (print_decimal_chars): Add "is_signed" argument.
10088         * printcmd.c (print_scalar_formatted): Update.
10089
10090 2017-06-12  Tom Tromey  <tom@tromey.com>
10091
10092         PR exp/16225:
10093         * valprint.h (print_binary_chars, print_hex_chars): Update.
10094         * valprint.c (val_print_type_code_int): Update.
10095         (print_binary_chars): Add "zero_pad" argument.
10096         (emit_octal_digit): New function.
10097         (print_octal_chars): Don't zero-pad.
10098         (print_decimal_chars): Likewise.
10099         (print_hex_chars): Add "zero_pad" argument.
10100         * sh64-tdep.c (sh64_do_fp_register): Update.
10101         * regcache.c (regcache::dump): Update.
10102         * printcmd.c (print_scalar_formatted): Update.
10103         * infcmd.c (default_print_one_register_info): Update.
10104
10105 2017-06-12  Pedro Alves  <palves@redhat.com>
10106             Alan Hayward  <alan.hayward@arm.com>
10107
10108         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10109         (mips_eabi_push_dummy_call): Rename local 'regsize' to
10110         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
10111         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10112         Assert that abi_regsize bytes fit in 'ref_valbuf'.
10113
10114 2017-06-12  Pedro Alves  <palves@redhat.com>
10115
10116         * dwarf2read.c (mapped_symtab::data): Now a vector of
10117         symtab_index_entry instead of vector of
10118         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
10119         whether an element's name is NULL instead of checking whether the
10120         element itself is NULL.
10121         (find_slot): Change return type.  Adjust.
10122         (hash_expand, , add_index_entry, uniquify_cu_indices)
10123         (write_hash_table): Adjust.
10124
10125 2017-06-12  Pedro Alves  <palves@redhat.com>
10126
10127         * dwarf2read.c (recursively_count_psymbols): New function.
10128         (write_psymtabs_to_index): Call it to compute number of psyms and
10129         pass estimate size of psyms_seen to unordered_set's ctor.
10130
10131 2017-06-12  Pedro Alves  <palves@redhat.com>
10132
10133         * dwarf2read.c (write_hash_table): Check if key already exists
10134         before emplacing.
10135
10136 2017-06-12  Pedro Alves  <palves@redhat.com>
10137
10138         * dwarf2read.c (data_buf::append_space): Rename to...
10139         (data_buf::grow): ... this, and make private.  Adjust all callers.
10140         (data_buf::append_uint): New method.
10141         (add_address_entry, write_one_signatured_type)
10142         (write_psymtabs_to_index): Use it.
10143
10144 2017-06-12  Pedro Alves  <palves@redhat.com>
10145
10146         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10147         (file_write (FILE *, const std::vector<Elem>&)): Delete.
10148         (data_buf::file_write): Call ::fwrite directly.
10149
10150 2017-06-12  Pedro Alves  <palves@redhat.com>
10151
10152         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10153         std::vector::erase.
10154
10155 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10156
10157         Code cleanup: C++ify .gdb_index producer.
10158         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10159         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10160         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10161         (create_strtab, add_string): Remove.
10162         (file_write, data_buf): New.
10163         (struct symtab_index_entry): Use std::vector for cu_indices.
10164         (struct mapped_symtab): Use std::vector for data.
10165         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10166         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10167         Remove.
10168         (find_slot): Change return type.  Update it to the new data structures.
10169         (hash_expand, add_index_entry): Update it to the new data structures.
10170         (offset_type_compare): Remove.
10171         (uniquify_cu_indices): Update it to the new data structures.
10172         (c_str_view, c_str_view_hasher, vector_hasher): New.
10173         (add_indices_to_cpool): Remove.
10174         (write_hash_table): Update it to the new data structures.
10175         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10176         (eq_psymtab_cu_index): Remove.
10177         (psym_index_map): New typedef.
10178         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10179         reference and std::unordered_map for cu_index_htab.
10180         (add_address_entry, add_address_entry_worker, write_address_map)
10181         (write_psymbols): Update it to the new data structures.
10182         (write_obstack): Remove.
10183         (struct signatured_type_index_data): Change types_list to a data_buf
10184         reference and psyms_seen to a std::unordered_set reference.
10185         (write_one_signatured_type, recursively_write_psymbols)
10186         (write_psymtabs_to_index): Update it to the new data structures.
10187
10188 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
10189
10190         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10191         separate-debug-file commands.
10192         * symfile.h (separate_debug_file_debug): New global.
10193         * symfile.c (separate_debug_file_debug): New global.
10194         (separate_debug_file_exists, find_separate_debug_file): Add
10195         debug output.
10196         (_initialize_symfile): Add "set debug separate-debug-file"
10197         command.
10198         * build-id.c (build_id_to_debug_bfd,
10199         find_separate_debug_file_by_buildid): Add debug output.
10200
10201 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
10202
10203         * gdbarch.sh (displaced_step_free_closure): Remove.
10204         * gdbarch.h, gdbarch.c: Re-generate.
10205         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10206         displaced_step_free_closure.
10207         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10208         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10209         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10210         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10211         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10212         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10213         * arch-utils.h (simple_displaced_step_free_closure): Remove.
10214         * arch-utils.c (simple_displaced_step_free_closure): Remove.
10215         * infrun.c (displaced_step_clear): Call xfree instead of
10216         gdbarch_displaced_step_free_closure.
10217
10218 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
10219
10220         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10221         NULL".
10222
10223 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
10224
10225         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10226         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10227         (mn10300_push_dummy_call): Likewise.
10228
10229 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10230
10231         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10232
10233 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10234
10235         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10236
10237 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10238
10239         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10240         able to start inferiors using a shell.
10241         (New remote packets): Announce new packet "QStartupWithShell".
10242         * remote.c: Add PACKET_QStartupWithShell.
10243         (extended_remote_create_inferior): Handle new
10244         PACKET_QStartupWithShell.
10245         (remote_protocol_features) <QStartupWithShell>: New entry for
10246         PACKET_QStartupWithShell.
10247         (_initialize_remote): Call "add_packet_config_cmd" for
10248         QStartupShell.
10249
10250 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10251             Pedro Alves  <palves@redhat.com>
10252
10253         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10254         and "nat/fork-inferior.h".
10255         * common/common-inferior.h: New file, with contents from
10256         "gdb/inferior.h".
10257         * commom/common-utils.c: Include "common-utils.h".
10258         (stringify_argv): New function.
10259         * common/common-utils.h (stringify_argv): New prototype.
10260         * configure.nat: Add "fork-inferior.o" as a dependency for
10261         "*linux*", "fbsd*" and "nbsd*" hosts.
10262         * corefile.c (get_exec_file): Update comment.
10263         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10264         instead of "startup_inferior".
10265         (darwin_create_inferior): Call "add_thread_silent" after
10266         "fork_inferior".
10267         * fork-child.c: Cleanup unnecessary includes.
10268         (SHELL_FILE): Move to "common/common-fork-child.c".
10269         (environ): Likewise.
10270         (exec_wrapper): Initialize.
10271         (get_exec_wrapper): New function.
10272         (breakup_args): Move to "common/common-fork-child.c"; rename to
10273         "breakup_args_for_exec".
10274         (escape_bang_in_quoted_argument): Move to
10275         "common/common-fork-child.c".
10276         (saved_ui): New variable.
10277         (prefork_hook): New function.
10278         (postfork_hook): Likewise.
10279         (postfork_child_hook): Likewise.
10280         (gdb_startup_inferior): Likewise.
10281         (fork_inferior): Move to "common/common-fork-child.c".  Update
10282         function to support gdbserver.
10283         (startup_inferior): Likewise.
10284         * gdbcore.h (get_exec_file): Remove declaration.
10285         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10286         instead of "startup_inferior".  Call "add_thread_silent" after
10287         "fork_inferior".
10288         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10289         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10290         instead of "startup_inferior".  Call "add_thread_silent" after
10291         "fork_inferior".
10292         * inferior.h: Include "common-inferior.h".
10293         (trace_start_error): Move to "common/common-utils.h".
10294         (trace_start_error_with_name): Likewise.
10295         (fork_inferior): Move prototype to "nat/fork-inferior.h".
10296         (startup_inferior): Likewise.
10297         (gdb_startup_inferior): New prototype.
10298         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10299         * nat/fork-inferior.h: New file.
10300         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10301         instead of "startup_inferior".  Call "add_thread_silent" after
10302         "fork_inferior".
10303         * target.h (target_terminal_init): Move prototype to
10304         "target/target.h".
10305         (target_terminal_inferior): Likewise.
10306         (target_terminal_ours): Likewise.
10307         * target/target.h (target_terminal_init): New prototype, moved
10308         from "target.h".
10309         (target_terminal_inferior): Likewise.
10310         (target_terminal_ours): Likewise.
10311         * utils.c (gdb_flush_out_err): New function.
10312
10313 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10314
10315         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10316         * common/common-gdbthread.h: New file, with parts from
10317         "gdb/gdbthread.h".
10318         * gdbthread.h: Include "common-gdbthread.h".
10319         (switch_to_thread): Moved to "common/common-gdbthread.h".
10320
10321 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10322
10323         * Makefile.in (SFILES): Add "common/job-control.c".
10324         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10325         (COMMON_OBS): Add "job-control.o".
10326         * common/job-control.c: New file, with contents from
10327         "gdb/inflow.c".
10328         * common/job-control.h: New file, with contents from "terminal.h".
10329         * fork-child.c: Include "job-control.h".
10330         * inflow.c: Include "job-control.h".
10331         (gdb_setpgid): Move to "common/common-inflow.c".
10332         (_initialize_inflow): Move setting of "job_control" to
10333         "handle_job_control".
10334         * terminal.h (job_control): Moved to "common/common-terminal.h".
10335         (gdb_setpgid): Likewise.
10336         * top.c: Include "job_control.h".
10337         * utils.c: Likewise.
10338         (job_control): Moved to "job-control.c".
10339
10340 2017-06-07  Pedro Alves  <palves@redhat.com>
10341
10342         * Makefile.in (SFILES): Add gdb_regex.c.
10343         (COMMON_OBS): Add gdb_regex.o.
10344         * ada-lang.c (ada_add_standard_exceptions)
10345         (ada_add_exceptions_from_frame, name_matches_regex)
10346         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10347         parameter type to compiled_regex.  Adjust.
10348         (ada_exceptions_list): Use compiled_regex.
10349         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10350         std::unique_ptr<compiled_regex>.
10351         (exception_catchpoint::~exception_catchpoint): Remove regfree
10352         call.
10353         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10354         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10355         * breakpoint.c (solib_catchpoint::compiled): Now a
10356         std::unique_ptr<compiled_regex>.
10357         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10358         (check_status_catch_solib): Adjust to use compiled_regex.
10359         (add_solib_catchpoint): Adjust to use compiled_regex.
10360         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10361         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10362         compiled_regex reference.  Adjust to use it.
10363         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10364         declaration.  Include "gdb_regex.h".
10365         (apropos_cmd): Change regex parameter to compiled_regex reference.
10366         * gdb_regex.c: New file.
10367         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10368         declarations.
10369         (class compiled_regex): New.
10370         * linux-tdep.c: Include "common/gdb_optional.h".
10371         (struct mapping_regexes): New, factored out from
10372         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10373         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10374         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10375         * probe.c: Include "common/gdb_optional.h".
10376         (collect_probes): Use compiled_regex and gdb::optional and remove
10377         cleanups.
10378         * skip.c: Include "common/gdb_optional.h".
10379         (skiplist_entry::compiled_function_regexp): Now a
10380         gdb::optional<compiled_regex>.
10381         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10382         (free_skiplist_entry): Remove regfree call.
10383         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10384         compiled_regex and gdb::optional.
10385         * symtab.c: Include "common/gdb_optional.h".
10386         (search_symbols): Use compiled_regex and gdb::optional.
10387         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10388         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10389         to gdb_regex.c.
10390
10391 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10392
10393         * regcache.c (regcache::save): Avoid buffer use.
10394         (regcache::dump): Likewise.
10395
10396 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10397
10398         * sh-tdep.c (sh_pseudo_register_read): Remove
10399         MAX_REGISTER_SIZE.
10400         (sh_pseudo_register_write): Likewise.
10401         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10402         (sh64_pseudo_register_write): Likewise
10403
10404 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10405
10406         * aarch64-tdep.c (aarch64_store_return_value): Use
10407         V_REGISTER_SIZE.
10408         (aarch64_pseudo_read_value): Likewise.
10409         (aarch64_pseudo_write): Likewise.
10410
10411 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10412
10413         * regformats/regdef.h (set_register_cache): Remove the
10414         declaration.
10415
10416 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10417
10418         * frame.c (frame_unwind_register_signed): Use
10419         frame_unwind_register_value.
10420
10421 2017-06-06  Pedro Alves  <palves@redhat.com>
10422
10423         PR breakpoints/21553
10424         * breakpoint.c (create_breakpoints_sal_default)
10425         (init_breakpoint_sal, create_breakpoint_sal): Use
10426         gdb::unique_xmalloc_ptr for string parameters.
10427         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10428         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10429         (base_breakpoint_create_breakpoints_sal)
10430         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10431         (strace_marker_create_breakpoints_sal)
10432         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10433         string parameters.
10434         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10435         gdb::unique_xmalloc_ptr for string parameters.
10436         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10437         parameters.
10438
10439 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10440
10441         * alpha-tdep.c (alpha_register_to_value): Use
10442         get_frame_register_value.
10443         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10444
10445 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10446
10447         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10448         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10449         (ia64_value_to_register): Likewise.
10450         (ia64_extract_return_value): Likewise.
10451         (ia64_store_return_value): Likewise.
10452         (ia64_push_dummy_call): Likewise.
10453
10454 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10455
10456         GDB 8.0 released.
10457
10458 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10459
10460         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10461
10462 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10463
10464         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10465         parameter.
10466         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10467
10468 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10469
10470         * event-loop.c (poll_timers): Unallocate timer using delete
10471         instead of xfree.
10472
10473 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10474
10475         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10476         (struct breakpoint) <~breakpoint>: New.
10477         (struct watchpoint): Inherit from breakpoint.
10478         <~watchpoint>: New.
10479         <base>: Remove.
10480         (struct tracepoint): Inherit from breakpoint.
10481         <base>: Remove.
10482         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10483         (struct longjmp_breakpoint): Inherit from breakpoint.
10484         <~longjmp_breakpoint>: New.
10485         <base>: Remove.
10486         (new_breakpoint_from_type): Remove casts.
10487         (watchpoint_in_thread_scope): Remove reference to base field.
10488         (watchpoint_del_at_next_stop): Likewise.
10489         (update_watchpoint): Likewise.
10490         (watchpoint_check): Likewise.
10491         (bpstat_check_watchpoint): Likewise.
10492         (set_longjmp_breakpoint): Likewise.
10493         (struct fork_catchpoint): Inherit from breakpoint.
10494         <base>: Remove.
10495         (struct solib_catchpoint): Inherit from breakpoint.
10496         <~solib_catchpoint>: New.
10497         <base>: Remove.
10498         (dtor_catch_solib): Change to ...
10499         (solib_catchpoint::~solib_catchpoint): ... this.
10500         (breakpoint_hit_catch_solib): Remove reference to base field.
10501         (add_solib_catchpoint): Likewise.
10502         (create_fork_vfork_event_catchpoint): Likewise.
10503         (struct exec_catchpoint): Inherit from breakpoint.
10504         <~exec_catchpoint>: New.
10505         <base>: Remove.
10506         (dtor_catch_exec): Change to ...
10507         (exec_catchpoint::~exec_catchpoint): ... this.
10508         (dtor_watchpoint): Change to ...
10509         (watchpoint::~watchpoint): ... this.
10510         (watch_command_1): Remove reference to base field.
10511         (catch_exec_command_1): Likewise.
10512         (base_breakpoint_dtor): Change to ...
10513         (breakpoint::~breakpoint): ... this.
10514         (base_breakpoint_ops): Remove dtor field value.
10515         (longjmp_bkpt_dtor): Change to ...
10516         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10517         (strace_marker_create_breakpoints_sal): Remove reference to base
10518         field.
10519         (delete_breakpoint): Don't manually call breakpoint destructor.
10520         (create_tracepoint_from_upload): Remove reference to base field.
10521         (trace_pass_set_count): Likewise.
10522         (initialize_breakpoint_ops): Don't initialize
10523         momentary_breakpoint_ops, don't set dtors.
10524         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10525         <~ada_catchpoint>: New.
10526         <base>: Remove.
10527         (create_excep_cond_exprs): Remove reference to base field.
10528         (dtor_exception): Change to ...
10529         (ada_catchpoint::~ada_catchpoint): ... this.
10530         (dtor_catch_exception): Remove.
10531         (dtor_catch_exception_unhandled): Remove.
10532         (dtor_catch_assert): Remove.
10533         (create_ada_exception_catchpoint): Remove reference to base
10534         field.
10535         (initialize_ada_catchpoint_ops): Don't set dtors.
10536         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10537         breakpoint.
10538         <~signal_catchpoint>: New.
10539         <base>: Remove.
10540         (signal_catchpoint_dtor): Change to ...
10541         (signal_catchpoint::~signal_catchpoint): ... this.
10542         (create_signal_catchpoint): Remove reference to base field.
10543         (initialize_signal_catchpoint_ops): Don't set dtor.
10544         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10545         from breakpoint.
10546         <~syscall_catchpoint>: New.
10547         <base>: Remove.
10548         (dtor_catch_syscall): Change to ...
10549         (syscall_catchpoint::~syscall_catchpoint): ... this.
10550         (create_syscall_event_catchpoint): Remove reference to base
10551         field.
10552         (initialize_syscall_catchpoint_ops): Don't set dtor.
10553         * break-catch-throw.c (struct exception_catchpoint): Inherit
10554         from breakpoint.
10555         <~exception_catchpoint>: New.
10556         <base>: Remove.
10557         (dtor_exception_catchpoint): Change to ...
10558         (exception_catchpoint::~exception_catchpoint): ... this.
10559         (handle_gnu_v3_exceptions): Remove reference to base field.
10560         (initialize_throw_catchpoint_ops): Don't set dtor.
10561         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10562         field.
10563         * remote.c (remote_get_tracepoint_status): Likewise.
10564         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10565         * tracefile.c (tracefile_fetch_registers): Likewise.
10566         * tracepoint.c (actions_command): Likewise.
10567         (validate_actionline): Likewise.
10568         (tfind_1): Likewise.
10569         (get_traceframe_location): Likewise.
10570         (find_matching_tracepoint_location): Likewise.
10571         (parse_tracepoint_status): Likewise.
10572         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10573
10574 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10575
10576         * breakpoint.c (struct longjmp_breakpoint): New struct.
10577         (is_tracepoint_type): Change return type to bool.
10578         (is_longjmp_type): New function.
10579         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10580         (set_raw_breakpoint_without_location): Use
10581         new_breakpoint_from_type.
10582         (set_raw_breakpoint): Likewise.
10583
10584 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10585
10586         * breakpoint.c (new_breakpoint_from_type): New function.
10587         (create_breakpoint_sal): Use new_breakpoint_from_type and
10588         unique_ptr.
10589         (create_breakpoint): Likewise.
10590
10591 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10592
10593         * memattr.c (mem_info_command): Rename to ...
10594         (info_mem_command): ... this.
10595         (mem_enable_command): Rename to ...
10596         (enable_mem_command): ... this.
10597         (mem_disable_command): Rename to ...
10598         (disable_mem_command): ... this.
10599         (mem_delete_command): Rename to ...
10600         (delete_mem_command): ... this.
10601         (_initialize_mem): Adjust function names.
10602
10603 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10604
10605         * btrace.c (handle_pt_insn_events): New.
10606         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10607         STATUS.  Split into this and ...
10608         (handle_pt_insn_event_flags): ... this.
10609
10610 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10611
10612         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10613         and struct pt_insn.resynced.
10614         * configure: Regenerated.
10615         * config.in: Regenerated.
10616
10617 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10618
10619         * btrace.c (ftrace_find_call_by_number): New function.
10620         (ftrace_new_function): Store objects, not pointers.
10621         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10622         ftrace_new_gap, ftrace_update_function,
10623         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10624         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10625         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10626         btrace_ends_with_single_insn, btrace_call_get): Account for
10627         btrace_thread_info::functions now storing objects.
10628         * btrace.h (struct btrace_thread_info): Add constructor.
10629         (struct btrace_thread_info) <functions>: Make std::vector.
10630         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10631         Initialize with default values.
10632         * record-btrace.c (record_btrace_frame_sniffer): Account for
10633         btrace_thread_info::functions now storing objects.
10634
10635 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10636
10637         * btrace.c: Remove typedef bfun_s.
10638         (ftrace_new_gap): Directly add gaps to the list of gaps.
10639         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10640         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10641         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10642         instead of gdb VEC.
10643
10644 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10645
10646         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10647         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10648         with btrace_thread_info::next_segment and
10649         btrace_thread_info::prev_segment.
10650         * btrace.h: Remove struct btrace_func_link.
10651         (struct btrace_function): Replace pair of function segment pointers
10652         with pair of indices.
10653         * python/py-record-btrace.c (btpy_call_prev_sibling,
10654         btpy_call_next_sibling): Replace references to
10655         btrace_thread_info::segment with btrace_thread_info::next_segment and
10656         btrace_thread_info::prev_segment.
10657         * record-btrace.c (record_btrace_frame_this_id): Use
10658         btrace_find_call_by_number.
10659
10660 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10661
10662         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10663         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10664         btrace_insn_next, btrace_insn_prev): Remove references to
10665         btrace_thread_info::flow.
10666         * btrace.h (struct btrace_function): Remove FLOW.
10667
10668 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10669
10670         * btrace.c (ftrace_find_call_by_number): New function.
10671         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10672         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10673         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10674         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10675         index.
10676         * btrace.h (struct btrace_function): Turn UP into an index.
10677         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10678         as an index.
10679         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10680         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10681         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10682
10683 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10684
10685         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10686         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10687         ftrace_update_function, ftrace_compute_global_level_offset,
10688         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10689         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10690         btrace_insn_end, btrace_is_empty): Remove references to
10691         btrace_thread_info::begin and btrace_thread_info::end.
10692         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10693         (struct btrace_thread_info) <functions>: Adjust comment.
10694         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10695         btrace_thread_info::begin.
10696
10697 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10698
10699         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10700         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10701         ftrace_update_function): Remove arguments that implicitly were always
10702         BTINFO->END.
10703         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10704         Don't pass BTINFO->END.
10705
10706 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10707
10708         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10709         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10710         btrace_find_insn_by_number): Replace function segment pointer with
10711         index.
10712         (btrace_insn_cmp): Simplify.
10713         * btrace.h: (struct btrace_insn_iterator) Rename index to
10714         insn_index.  Replace function segment pointer with index into function
10715         segment vector.
10716         * record-btrace.c (record_btrace_call_history): Replace function
10717         segment pointer use with index.
10718         (record_btrace_frame_sniffer): Retrieve function call segment through
10719         vector.
10720         (record_btrace_set_replay): Remove defunc't safety check.
10721
10722 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10723
10724         * btrace.c (btrace_ends_with_single_insn): New function.
10725         (btrace_call_get, btrace_call_number, btrace_call_begin,
10726         btrace_call_end, btrace_call_next, btrace_call_prev,
10727         btrace_find_call_by_number): Use index into call segment vector
10728         instead of pointer.
10729         (btrace_call_cmp): Simplify.
10730         * btrace.h (struct btrace_call_iterator): Replace function call segment
10731         pointer with index into vector.
10732         * record-btrace.c (record_btrace_call_history): Use index instead of
10733         pointer.
10734
10735 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10736
10737         * btrace.c (btrace_insn_begin, btrace_insn_end,
10738         btrace_find_insn_by_number): Add btinfo to iterator.
10739         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10740
10741 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10742
10743         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10744         and save pointers directly.
10745         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10746         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10747         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10748         changed signature of functions.
10749         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10750         (btrace_fetch): Remove code that adds btrace_function pointers to
10751         vector of btrace_functions.
10752         (btrace_clear): Simplify freeing vector of btrace_functions.
10753
10754 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10755
10756         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10757         Replace VEC_* with std::vector functions.
10758         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10759         (struct btrace_thread_info)<functions>: Change type to std::vector.
10760
10761 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10762
10763         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10764         "Removed targets and native configurations" up.  Merge duplicate
10765         "New commands" sub-sections.  Add "New options" sub-sections.
10766
10767 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10768
10769         * defs.h (copy_integer_to_size): New declaration.
10770         * findvar.c (copy_integer_to_size): New function.
10771         (do_cint_test): New selftest function.
10772         (copy_integer_to_size_test): Likewise.
10773         (_initialize_findvar): Likewise.
10774         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10775         (mips_fbsd_collect_reg): Use raw_collect_integer.
10776         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10777         (mips64_fill_gregset): Use raw_collect_integer
10778         (mips64_fill_fpregset): Use raw_supply_integer.
10779         * regcache.c (regcache::raw_supply_integer): New function.
10780         (regcache::raw_collect_integer): Likewise.
10781         * regcache.h: (regcache::raw_supply_integer): New declaration.
10782         (regcache::raw_collect_integer): Likewise.
10783
10784 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10785
10786         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10787         (COMMON_OBS): Add gdbarch-selftests.o.
10788         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10789         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10790         * gdbarch-selftests.c: New file.
10791         * regcache.h (regcache) <~regcache>: Mark it virtual if
10792         GDB_SELF_TEST.
10793         <raw_write>: Likewise.
10794
10795 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10796
10797         * regcache.c (current_regcache): Change it to
10798         regcache::current_regcache.
10799         (regcache_observer_target_changed): Update.
10800         (regcache_thread_ptid_changed): Make it a regcache static
10801         method.
10802         (regcache_thread_ptid_changed): Update.
10803         (class regcache_access): New.
10804         (current_regcache_test): Update.
10805         (_initialize_regcache): Update.
10806         * regcache.h: Include forward_list.
10807         (regcache): Declare regcache_thread_ptid_changed and declare
10808         registers_changed_ptid as friend.
10809
10810 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10811
10812         * i387-tdep.c (i387_register_to_value): Use register_size
10813         instead of TYPE_LENGTH.
10814         * m68k-tdep.c (m68k_register_to_value): Likewise.
10815
10816 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10817
10818         * i387-tdep.c (i387_convert_register_p): Return false if type
10819         code isn't TYPE_CODE_FLT.
10820
10821 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10822
10823         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10824         length is 4.
10825         (alpha_register_to_value): Remove type length check.
10826         (alpha_value_to_register): Likewise.
10827
10828 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10829
10830         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10831         TYPE_CODE_FLT.
10832
10833 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10834
10835         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10836         TYPE_CODE_FLT or not.
10837
10838 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10839
10840         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10841         * avr-tdep.c (avr_gdbarch_init): Likewise.
10842         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10843         * cris-tdep.c (cris_gdbarch_init): Likewise.
10844         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10845         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10846         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10847         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10848         * mep-tdep.c (mep_gdbarch_init): Likewise.
10849         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10850         * mips-tdep.c (mips_gdbarch_init): Likewise.
10851         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10852         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10853         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10854         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10855         * v850-tdep.c (v850_gdbarch_init): Likewise.
10856
10857 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10858
10859         * selftest-arch.c (tests_with_arch): Call registers_changed
10860         and reinit_frame_cache.
10861         * selftest.c (run_self_tests): Likewise.
10862
10863 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10864
10865         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10866         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10867
10868 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10869
10870         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10871         set_gdbarch_print_insn.
10872
10873 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10874
10875         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10876         set_gdbarch_print_insn.
10877
10878 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10879
10880         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10881         set_gdbarch_print_insn.
10882         * arc-tdep.c (arc_gdbarch_init): Likewise.
10883         * arch-utils.c: include dis-asm.h.
10884         (default_print_insn): New function.
10885         * arch-utils.h (default_print_insn): Declare.
10886         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10887         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10888         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10889         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10890         * frv-tdep.c (frv_gdbarch_init): Likewise.
10891         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10892         * gdbarch.sh (print_insn): Use default_print_insn.
10893         * gdbarch.c: Regenerated.
10894         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10895         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10896         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10897         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10898         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10899         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10900         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10901         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10902         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10903         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10904         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10905         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10906         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10907         * mt-tdep.c (mt_gdbarch_init): Likewise.
10908         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10909         * nios2-tdep.c (nios2_print_insn): Remove.
10910         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10911         * rx-tdep.c (rx_gdbarch_init): Likewise.
10912         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10913         * score-tdep.c (score_print_insn): Remove.
10914         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10915         * sh-tdep.c (sh_gdbarch_init): Likewise.
10916         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10917         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10918         * tic6x-tdep.c (tic6x_print_insn): Remove.
10919         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10920         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10921         * v850-tdep.c (v850_gdbarch_init): Likewise.
10922         * vax-tdep.c (vax_gdbarch_init): Likewise.
10923         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10924         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10925
10926 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10927
10928         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10929         (MIPS_FP0_REGNUM): Remove.
10930         (MIPS_FSR_REGNUM): Remove.
10931         (mips_fbsd_supply_fpregs): Use mips_regnum.
10932         (mips_fbsd_supply_gregs): Likewise.
10933         (mips_fbsd_collect_fpregs): Likewise.
10934         (mips_fbsd_collect_gregs): Likewise.
10935
10936 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10937
10938         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10939         (getpfpregs_supplies): New function.
10940         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10941         getfpregs_supplies.
10942         (mips_fbsd_store_inferior_registers): Likewise.
10943
10944 2017-05-22  Pedro Alves <palves@redhat.com>
10945
10946         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10947         maintainer.
10948
10949 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10950
10951         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10952         (store_register): Likewise.
10953         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10954         (get_decimal_float_return_value): Likewise.
10955         (do_ppc_sysv_return_value): Likewise.
10956         (ppc64_sysv_abi_push_integer): Likewise.
10957         (ppc64_sysv_abi_push_freg): Likewise.
10958         (ppc64_sysv_abi_return_value_base): Likewise.
10959         (ppc64_sysv_abi_return_value): Likewise.
10960         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10961         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10962         * rs6000-nat.c: Likewise.
10963         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10964         (rs6000_value_to_register): Likewise.
10965         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10966
10967 2017-05-21  Tom Tromey  <tom@tromey.com>
10968
10969         PR rust/21466:
10970         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10971         arrays as "[T]", not "[T; ]".
10972
10973 2017-05-19  Tom Tromey  <tom@tromey.com>
10974
10975         PR rust/21484:
10976         * rust-lang.c (exp_descriptor_rust): New function.
10977         (rust_language_defn): Use it.
10978         * p-lang.c (pascal_language_defn): Update.
10979         * opencl-lang.c (opencl_language_defn): Update.
10980         * objc-lang.c (objc_language_defn): Update.
10981         * m2-lang.c (m2_language_defn): Update.
10982         * language.h (struct language_defn)
10983         <la_watch_location_expression>: New member.
10984         * language.c (unknown_language_defn, auto_language_defn)
10985         (local_language_defn): Update.
10986         * go-lang.c (go_language_defn): Update.
10987         * f-lang.c (f_language_defn): Update.
10988         * d-lang.c (d_language_defn): Update.
10989         * c-lang.h (c_watch_location_expression): Declare.
10990         * c-lang.c (c_watch_location_expression): New function.
10991         (c_language_defn, cplus_language_defn, asm_language_defn)
10992         (minimal_language_defn): Use it.
10993         * breakpoint.c (watch_command_1): Call
10994         la_watch_location_expression.
10995         * ada-lang.c (ada_language_defn): Update.
10996
10997 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10998
10999         PR tui/21482
11000         * gdb_curses.h (NOMACROS): Define.
11001         (NCURSES_NOMACROS): Define.
11002
11003 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11004
11005         PR tui/21482
11006         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11007         arg to char *.
11008         * tui/tui-wingeneral.c (box_win): Likewise.
11009         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11010         (tui_show_source_line): Likewise.
11011         (tui_show_exec_info_content): Likewise.
11012
11013 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11014
11015         * sparc-tdep.c (sparc_structure_return_p)
11016         (sparc_arg_on_registers_p): New functions.
11017         (sparc32_store_arguments): Use them.
11018         * sparc64-tdep.c (sparc64_16_byte_align_p)
11019         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11020         Handle TYPE_CODE_ARRAY.
11021
11022 2017-05-17  Yao Qi  <yao.qi@linaro.org>
11023
11024         * cli/cli-decode.c (add_alias_cmd): New function.
11025         * command.h (add_alias_cmd): Declare.
11026         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11027         instead call add_alias_cmd.
11028
11029 2017-05-17  Pedro Alves  <palves@redhat.com>
11030
11031         * Makefile.in (nat_extra_makefile_frag): Rename to ...
11032         (nat_makefile_frag): ... this.  All references updated.
11033         * configure.ac: Likewise.
11034         * configure.nat: Likewise.  Enhance comments.
11035         * configure: Regenerate.
11036
11037 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11038
11039         * procfs.c (procfs_create_inferior): Change prototype to match
11040         definition.
11041
11042 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
11043
11044         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11045         C++ compiler warning.
11046
11047 2017-05-12  Tom Tromey  <tom@tromey.com>
11048
11049         PR rust/21483:
11050         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11051         recurse, just call value_struct_elt directly.
11052
11053 2017-05-12  Tom Tromey  <tom@tromey.com>
11054
11055         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11056         OP_RUST_ARRAY>: Fix.
11057
11058 2017-05-12  Tom Tromey  <tom@tromey.com>
11059
11060         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11061
11062 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11063
11064         * regcache.c: Include <forward_list>.
11065         (struct regcache_list): Remove.
11066         (current_regcache): Update.
11067         (get_thread_arch_aspace_regcache): Update for std::forward_list.
11068         (regcache_thread_ptid_changed): Likewise.
11069         (registers_changed_ptid): Likewise.
11070         (current_regcache_size): Likewise.
11071
11072 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11073
11074         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11075         (current_regcache_size): New function.
11076         (current_regcache_test): New function.
11077         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11078
11079 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11080
11081         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11082         (print_gp_register_row): Use get_frame_register_value.
11083
11084 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11085
11086         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11087         (mips_supply_fpregset): Likewise.
11088         (mips64_supply_gregset): Likewise.
11089
11090 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11091
11092         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
11093         regcache->raw_supply_zeroed.
11094
11095 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11096
11097         * configure.nat: Rearrange 'case' statements to match
11098         host before cpu.
11099
11100 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11101
11102         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
11103         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11104         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
11105         "@nat_extra_makefile_frag@".
11106         (Makefile): Remove dependency on "@frags@".
11107         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11108         (data-directory/Makefile): Likewise.
11109         * config/aarch64/linux.mh: Deleted; moved contents to
11110         "gdb/configure.nat".
11111         * config/alpha/alpha-linux.mh: Likewise.
11112         * config/alpha/nbsd.mh: Likewise.
11113         * config/arm/linux.mh: Likewise.
11114         * config/arm/nbsdelf.mh: Likewise.
11115         * config/i386/cygwin.mh: Likewise.
11116         * config/i386/cygwin64.mh: Likewise.
11117         * config/i386/darwin.mh: Likewise.
11118         * config/i386/fbsd.mh: Likewise.
11119         * config/i386/fbsd64.mh: Likewise.
11120         * config/i386/go32.mh: Likewise.
11121         * config/i386/i386gnu.mh: Likewise.
11122         * config/i386/i386sol2.mh: Likewise.
11123         * config/i386/linux.mh: Likewise.
11124         * config/i386/linux64.mh: Likewise.
11125         * config/i386/mingw.mh: Likewise.
11126         * config/i386/mingw64.mh: Likewise.
11127         * config/i386/nbsd64.mh: Likewise.
11128         * config/i386/nbsdelf.mh: Likewise.
11129         * config/i386/nto.mh: Likewise.
11130         * config/i386/obsd.mh: Likewise.
11131         * config/i386/obsd64.mh: Likewise.
11132         * config/i386/sol2-64.mh: Likewise.
11133         * config/ia64/linux.mh: Likewise.
11134         * config/m32r/linux.mh: Likewise.
11135         * config/m68k/linux.mh: Likewise.
11136         * config/m68k/nbsdelf.mh: Likewise.
11137         * config/m68k/obsd.mh: Likewise.
11138         * config/m88k/obsd.mh: Likewise.
11139         * config/mips/fbsd.mh: Likewise.
11140         * config/mips/linux.mh: Likewise.
11141         * config/mips/nbsd.mh: Likewise.
11142         * config/mips/obsd64.mh: Likewise.
11143         * config/pa/linux.mh: Likewise.
11144         * config/pa/nbsd.mh: Likewise.
11145         * config/pa/obsd.mh: Likewise.
11146         * config/powerpc/aix.mh: Likewise.
11147         * config/powerpc/fbsd.mh: Likewise.
11148         * config/powerpc/linux.mh: Likewise.
11149         * config/powerpc/nbsd.mh: Likewise.
11150         * config/powerpc/obsd.mh: Likewise.
11151         * config/powerpc/ppc64-linux.mh: Likewise.
11152         * config/powerpc/spu-linux.mh: Likewise.
11153         * config/s390/linux.mh: Likewise.
11154         * config/sh/nbsd.mh: Likewise.
11155         * config/sparc/fbsd.mh: Likewise.
11156         * config/sparc/linux.mh: Likewise.
11157         * config/sparc/linux64.mh: Likewise.
11158         * config/sparc/nbsd64.mh: Likewise.
11159         * config/sparc/nbsdelf.mh: Likewise.
11160         * config/sparc/obsd64.mh: Likewise.
11161         * config/sparc/sol2.mh: Likewise.
11162         * config/tilegx/linux.mh: Likewise.
11163         * config/vax/nbsdelf.mh: Likewise.
11164         * config/vax/obsd.mh: Likewise.
11165         * config/xtensa/linux.mh: Likewise.
11166         * config/i386/i386gnu.mn: New file, with excerpts from
11167         "config/i386/i386gnu.mh".
11168         * configure: Regenerate.
11169         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11170         *.mh files under "gdb/config".
11171         * configure.nat: New file, with contents from the
11172         "gdb/config/*/*.mh" files.
11173
11174 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
11175
11176         * btrace.c (btrace_clear): Free insn vector.
11177
11178 2017-05-05  Pedro Alves  <palves@redhat.com>
11179
11180         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11181         * configure: Regenerate.
11182
11183 2017-05-04  Pedro Alves  <palves@redhat.com>
11184
11185         * Makefile.in (SFILES): Add progspace-and-thread.c.
11186         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11187         (COMMON_OBS): Add progspace-and-thread.o.
11188         * breakpoint.c: Include "progspace-and-thread.h".
11189         (update_inserted_breakpoint_locations)
11190         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11191         Use scoped_restore_current_pspace_and_thread.
11192         (create_std_terminate_master_breakpoint): Use
11193         scoped_restore_current_program_space.
11194         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11195         (print_breakpoint_location): Use
11196         scoped_restore_current_program_space.
11197         (bp_loc_is_permanent): Use
11198         scoped_restore_current_pspace_and_thread.
11199         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11200         (download_tracepoint_locations): Use
11201         scoped_restore_current_pspace_and_thread.
11202         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11203         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11204         (enum step_over_calls_kind): Moved from inferior.h.
11205         (class scoped_restore_current_thread): New class.
11206         * gdbthread.h (make_cleanup_restore_current_thread): Delete
11207         declaration.
11208         (scoped_restore_current_thread): New class.
11209         * infcmd.c: Include "common/gdb_optional.h".
11210         (continue_1, proceed_after_attach): Use
11211         scoped_restore_current_thread.
11212         (notice_new_inferior): Use scoped_restore_current_thread.
11213         * inferior.c: Include "progspace-and-thread.h".
11214         (restore_inferior, save_current_inferior): Delete.
11215         (add_inferior_command, clone_inferior_command): Use
11216         scoped_restore_current_pspace_and_thread.
11217         * inferior.h (scoped_restore_current_inferior): New class.
11218         * infrun.c: Include "progspace-and-thread.h" and
11219         "common/gdb_optional.h".
11220         (follow_fork_inferior): Use
11221         scoped_restore_current_pspace_and_thread.
11222         (scoped_restore_exited_inferior): New class.
11223         (handle_vfork_child_exec_or_exit): Use
11224         scoped_restore_exited_inferior,
11225         scoped_restore_current_pspace_and_thread,
11226         scoped_restore_current_thread and scoped_restore.
11227         (fetch_inferior_event): Use scoped_restore_current_thread.
11228         * linespec.c (decode_line_full, decode_line_1): Use
11229         scoped_restore_current_program_space.
11230         * mi/mi-main.c: Include "progspace-and-thread.h".
11231         (exec_continue): Use scoped_restore_current_thread.
11232         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11233         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11234         * proc-service.c (ps_pglobal_lookup): Use
11235         scoped_restore_current_program_space.
11236         * progspace-and-thread.c: New file.
11237         * progspace-and-thread.h: New file.
11238         * progspace.c (release_program_space, clone_program_space): Use
11239         scoped_restore_current_program_space.
11240         (restore_program_space, save_current_program_space)
11241         (save_current_space_and_thread): Delete.
11242         (switch_to_program_space_and_thread): Moved to
11243         progspace-and-thread.c.
11244         * progspace.h (save_current_program_space)
11245         (save_current_space_and_thread): Delete declarations.
11246         (scoped_restore_current_program_space): New class.
11247         * remote.c (remote_btrace_maybe_reopen): Use
11248         scoped_restore_current_thread.
11249         * symtab.c: Include "progspace-and-thread.h".
11250         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11251         * thread.c (print_thread_info_1): Use
11252         scoped_restore_current_thread.
11253         (struct current_thread_cleanup): Delete.
11254         (do_restore_current_thread_cleanup)
11255         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11256         (scoped_restore_current_thread::~scoped_restore_current_thread):
11257         ... this new dtor.
11258         (make_cleanup_restore_current_thread): Rename/convert to ...
11259         (scoped_restore_current_thread::scoped_restore_current_thread):
11260         ... this new ctor.
11261         (thread_apply_all_command): Use scoped_restore_current_thread.
11262         (thread_apply_command): Use scoped_restore_current_thread.
11263         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11264         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11265
11266 2017-05-04  Pedro Alves  <palves@redhat.com>
11267
11268         * thread.c (make_cleanup_restore_current_thread): Move
11269         find_thread_ptid call before the is_stopped call.  Assert that the
11270         thread is found.  Replace is_stopped call by checking the thread's
11271         state directly.  Remove unnecessary NULL-thread check.
11272
11273 2017-05-04  Pedro Alves  <palves@redhat.com>
11274
11275         * corelow.c (thread_section_name): New class.
11276         (get_core_register_section, get_core_siginfo): Use it.
11277
11278 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11279
11280         * corelow.c (sniff_core_bfd): Remove extra semicolon.
11281         (get_core_register_section): Remove xfree of NULL pointer.
11282
11283 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
11284
11285         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11286         * regcache.c (regcache::raw_supply_zeroed): New function.
11287         * regcache.h (regcache::raw_supply_zeroed): New declaration.
11288
11289 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
11290
11291         * gdbarch.sh: Remove commented out definition of
11292         TARGET_CHAR_BIT.
11293         * gdbarch.h: Re-generate.
11294
11295 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
11296
11297         * configure: Regenerate.
11298
11299 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11300
11301         * solib-target.c (solib_target_relocate_section_addresses):
11302         Remove num_section_bases, num_bases, segment_bases variables.
11303
11304 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11305
11306         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11307
11308 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11309
11310         * solib-target.c: Include <vector>
11311         (struct lm_info_target) <~lm_info_target>: Remove.
11312         <segment_bases, section_bases>: Change type to
11313         std::vector<CORE_ADDR>.
11314         (library_list_start_segment, library_list_start_section,
11315         library_list_end_library,
11316         solib_target_relocate_section_addresses): Adjust.
11317
11318 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11319
11320         * gdbarch.sh (software_single_step): Change return type to
11321         std::vector<CORE_ADDR>.
11322         * gdbarch.c, gdbarch.h: Re-generate.
11323         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11324         Adjust.
11325         (arm_deal_with_atomic_sequence_raw): Adjust.
11326         (thumb_get_next_pcs_raw): Adjust.
11327         (arm_get_next_pcs_raw): Adjust.
11328         (arm_get_next_pcs): Adjust.
11329         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11330         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11331         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11332         (alpha_software_single_step): Adjust.
11333         * alpha-tdep.h (alpha_software_single_step): Adjust.
11334         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11335         * arm-tdep.c (arm_software_single_step): Adjust.
11336         (arm_breakpoint_kind_from_current_state): Adjust.
11337         * arm-tdep.h (arm_software_single_step): Adjust.
11338         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11339         * cris-tdep.c (cris_software_single_step): Adjust.
11340         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11341         (micromips_deal_with_atomic_sequence): Adjust.
11342         (deal_with_atomic_sequence): Adjust.
11343         (mips_software_single_step): Adjust.
11344         * mips-tdep.h (mips_software_single_step): Adjust.
11345         * moxie-tdep.c (moxie_software_single_step): Adjust.
11346         * nios2-tdep.c (nios2_software_single_step): Adjust.
11347         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11348         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11349         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11350         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11351         * sparc-tdep.c (sparc_software_single_step): Adjust.
11352         * spu-tdep.c (spu_software_single_step): Adjust.
11353         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11354
11355 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11356
11357         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11358         * gdbarch.h: Re-generate.
11359
11360 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11361
11362         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11363         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11364         * python/py-instruction.c, python/py-instruction.h: New file.
11365         * python/py-record.c: Add py-instruction.h include.
11366         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11367         gdb.RecordInstruction.
11368         * python/python-internal.h: Add gdbpy_initialize_instruction
11369         declaration.
11370         * python/python.c (do_start_initialization): Add
11371         gdbpy_initialize_instruction.
11372
11373 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11374
11375         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11376         Remove.
11377         (btrace_func_from_recpy_func): New function.
11378         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11379         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11380         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11381         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11382         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11383         Also, use new helper functions.
11384         (btpy_list_item): Use new helper functions.
11385         (recpy_bt_function_call_history): Use new type name.
11386         (btpy_call_getset): Remove.
11387         (gdbpy_initialize_btrace): Remove code to initialize
11388         gdb.BtraceFunctionCall.
11389         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11390         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11391         recpy_bt_func_prev, recpy_bt_func_next): New export.
11392         * python/py-record.c (recpy_func_type): New static object.
11393         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11394         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11395         recpy_func_next): New function.
11396         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11397         (recpy_func_getset): New static object.
11398         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11399         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11400
11401 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11402
11403         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11404         (btpy_object, btpy_insn_type, btpy_new): Remove.
11405         (btpy_list_object): Use gdb.RecordInstruction type instead of
11406         gdb.BtraceInstruction type.
11407         (btrace_insn_from_recpy_insn): New function.
11408         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11409         btpy_new.
11410         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11411         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11412         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11413         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11414         instead of btpy_object.
11415         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11416         btpy_insn_data, btpy_insn_decode): Rename to ...
11417         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11418         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11419         recpy_bt_insn_decode): This.  Also, use new helper functions.
11420         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11421         recpy_insn_type.
11422         (btpy_insn_getset): Remove.
11423         (gdbpy_initialize_btrace): Remove code to initialize
11424         gdb.BtraceInstruction.  Use recpy_element_object.
11425         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11426         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11427         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11428         * python/py-record.c (recpy_insn_type): New static object.
11429         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11430         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11431         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11432         New function.
11433         (recpy_insn_getset): New static object.
11434         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11435         * python/py-record.h (recpy_element_object): New typedef.
11436         (recpy_insn_type, recpy_insn_new): New export.
11437
11438 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11439
11440         * py-record-btrace.c (btpy_insn_new): Removed.
11441         (btpy_insn_or_gap_new): New function.
11442         (btpy_insn_error): Removed.
11443         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11444         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11445         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11446         btpy_insn_or_gap_new instead of btpy_insn_new.
11447         (btpy_insn_getset): Remove btpy_insn_error.
11448         * py-record.c (recpy_gap_type): New static object.
11449         (recpy_gap_object): New typedef.
11450         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11451         recpy_gap_reason_string): New function.
11452         (recpy_gap_getset): New static object.
11453         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11454         * py-record.h (recpy_gap_new): New export.
11455
11456 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11457
11458         * python/py-record.c (recpy_ptid): Remove.
11459         (recpy_record_getset): Remove recpy_ptid.
11460
11461 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11462
11463         * btrace.c (btrace_fetch): Set inferior_ptid.
11464         * python/py-record-btrace.c: Add "py-record.h" include.
11465         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11466         recpy_bt_end, recpy_bt_instruction_history,
11467         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11468         in gdb.Record object instead of current ptid.
11469         * python/py-record.c: Include new "py-record.h" file.
11470         (recpy_record_object): Moved to py-record.h.
11471         * python/py-record.h: New file.
11472
11473 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11474
11475         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11476         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11477         indentation.
11478
11479 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11480
11481         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11482         the past maintainers section.
11483
11484 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11485
11486         * infcmd.c (get_return_value): Use regcache ctor, and remove
11487         cleanup.
11488
11489 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11490             Pedro Alves  <palves@redhat.com>
11491
11492         * regcache.c (regcache::regcache): New tag dispatch ctor.
11493         (do_cooked_read): Moved above.
11494         (regcache_dup): Use the tag dispatch ctor..
11495         * regcache.h (regcache): Declare ctor, delete copy ctor and
11496         assignment operator, remove friend regcache_dup.
11497
11498 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11499
11500         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11501         call method save instead of regcache_cpy.
11502         * regcache.h (struct regcache): Make regcache_dup a friend.
11503
11504 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11505
11506         * regcache.c (struct regcache): Move to regcache.h
11507         (regcache::arch): New method.
11508         (regcache_get_ptid): Update.
11509         (get_regcache_arch): Call arch method.
11510         (get_regcache_aspace): Call method aspace.
11511         (register_buffer): Change it to method.
11512         (regcache_save): Change it to regcache::save.
11513         (regcache_restore): Likewise.
11514         (regcache_cpy_no_passthrough): Remove the declaration.
11515         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11516         (regcache_cpy_no_passthrough): Change it to method
11517         cpy_no_passthrough.
11518         (regcache_register_status): Change it to method
11519         get_register_status.
11520         (regcache_invalidate): Change it to method invalidate.
11521         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11522         (regcache_raw_update): Change it to method raw_update.
11523         (regcache_raw_read): Likewise.
11524         (regcache_raw_read_signed): Likewise.
11525         (regcache_raw_read_unsigned): Likewise.
11526         (regcache_raw_write_signed): Likewise.
11527         (regcache_raw_write_unsigned): Likewise.
11528         (regcache_cooked_read): Likewise.
11529         (regcache_cooked_read_value): Likewise.
11530         (regcache_cooked_read_signed): Likewise.
11531         (regcache_cooked_read_unsigned): Likewise.
11532         (regcache_cooked_write_signed): Likewise.
11533         (regcache_cooked_write_unsigned): Likewise.
11534         (regcache_raw_set_cached_value): Likewise.
11535         (regcache_raw_write): Likewise.
11536         (regcache_cooked_write): Likewise.
11537         (regcache_xfer_part): Likewise.
11538         (regcache_raw_read_part): Likewise.
11539         (regcache_raw_write_part): Likewise.
11540         (regcache_cooked_read_part): Likewise.
11541         (regcache_cooked_write_part): Likewise.
11542         (regcache_raw_supply): Likewise.
11543         (regcache_raw_collect): Likewise.
11544         (regcache_transfer_regset): Likewise.
11545         (regcache_supply_regset): Likewise.
11546         (regcache_collect_regset): Likewise.
11547         (regcache_debug_print_register): Likewise.
11548         (enum regcache_dump_what): Move it to regcache.h.
11549         (regcache_dump): Change it to method dump.
11550         * regcache.h (enum regcache_dump_what): New.
11551         (class regcache): New.
11552         * target.c (target_fetch_registers): Call method
11553         debug_print_register.
11554         (target_store_registers): Likewise.
11555
11556 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11557
11558         * windows-nat.c (struct lm_info_windows): Initialize field.
11559         (windows_make_so): Allocate lm_info_windows with new.
11560         (windows_free_so): Free lm_info_windows with delete.
11561
11562 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11563
11564         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11565         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11566         cleanup.
11567         (darwin_free_so): Free lm_info_darwin with delete.
11568
11569 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11570
11571         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11572         <l_addr_p>: Change type to bool.
11573         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11574         (svr4_free_so): Free lm_info_svr4 with delete.
11575         (svr4_copy_library_list): Replace memcpy with call to copy
11576         constructor.
11577         (library_list_start_library, svr4_default_sos): Allocate
11578         lm_info_svr4 with new.
11579
11580 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11581
11582         * solib-target.c (struct lm_info_target): Add destructor,
11583         initialize fields.
11584         <name>: Change type to std::string.
11585         (library_list_start_library): Allocate lm_info_target with new.
11586         (solib_target_free_library_list): Free lm_info_target with
11587         delete.
11588         (solib_target_current_sos): Adapt to std::string.
11589         (solib_target_free_so): Free lm_info_target with delete.
11590
11591 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11592
11593         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11594         fields.
11595         (frv_current_sos): Allocate lm_info_frv with new.
11596         (frv_relocate_main_executable): Free lm_info_frv with delete,
11597         allocate with new.
11598         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11599
11600 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11601
11602         * solib-frv.c (struct lm_info_frv): Fix indentation.
11603
11604 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11605
11606         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11607         map field.
11608         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11609         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11610         and allocate with new.
11611         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11612
11613 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11614
11615         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11616         <filename, member_name>: Change type to std::string.
11617         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11618         (library_list_start_library): Allocate lm_info_aix with new.
11619         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11620         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11621         with copy constructor.
11622
11623 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11624
11625         * solist.h (struct lm_info): Remove.
11626         (struct lm_info_base): New class.
11627         (struct so_list) <lm_info>: Change type to lm_info_base *.
11628         * nto-tdep.c (struct lm_info): Remove.
11629         (lm_addr): Adjust.
11630         * solib-aix.c (struct lm_info): Rename to ...
11631         (struct lm_info_aix): ... this.  Extend lm_info_base.
11632         (lm_info_p): Rename to ...
11633         (lm_info_aix_p): ... this, and adjust.
11634         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11635         solib_aix_parse_libraries, library_list_start_library,
11636         solib_aix_free_library_list, solib_aix_parse_libraries,
11637         solib_aix_get_library_list,
11638         solib_aix_relocate_section_addresses, solib_aix_free_so,
11639         solib_aix_get_section_offsets,
11640         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11641         Adjust.
11642         (struct solib_aix_inferior_data) <library_list>: Adjust.
11643         * solib-darwin.c (struct lm_info): Rename to ...
11644         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11645         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11646         * solib-dsbt.c (struct lm_info): Rename to ...
11647         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11648         (struct dsbt_info) <main_executable_lm_info): Adjust.
11649         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11650         dsbt_relocate_section_addresses): Adjust.
11651         * solib-frv.c (struct lm_info): Rename to ...
11652         (struct lm_info_frv): ... this.  Extend lm_info_base.
11653         (main_executable_lm_info): Adjust.
11654         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11655         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11656         find_canonical_descriptor_in_load_object,
11657         frv_fdpic_find_canonical_descriptor): Adjust.
11658         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11659         to lm_info_svr4.
11660         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11661         svr4_clear_so, svr4_copy_library_list,
11662         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11663         svr4_current_sos, svr4_fetch_objfile_link_map,
11664         solist_update_incremental): Adjust.
11665         * solib-svr4.h (struct lm_info_svr4): Move here from
11666         solib-svr4.c.
11667         * solib-target.c (struct lm_info): Rename to ...
11668         (struct lm_info_target): ... this.  Extend lm_info_base.
11669         (lm_info_p): Rename to ...
11670         (lm_info_target_p): ... this.
11671         (solib_target_parse_libraries, library_list_start_segment,
11672         library_list_start_section, library_list_start_library,
11673         library_list_end_library, solib_target_free_library_list,
11674         solib_target_current_sos, solib_target_free_so,
11675         solib_target_relocate_section_addresses): Adjust.
11676         * windows-nat.c (struct lm_info): Rename to ...
11677         (struct lm_info_windows): ... this.  Extend lm_info_base.
11678         (windows_make_so, handle_load_dll, handle_unload_dll,
11679         windows_xfer_shared_libraries): Adjust.
11680
11681 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11682
11683         * solib-darwin.c (struct darwin_so_list): Remove.
11684         (darwin_current_sos): Allocate an so_list object instead of a
11685         darwin_so_list, separately allocate an lm_info object.
11686         (darwin_free_so): Free lm_info.
11687
11688 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11689
11690         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11691         with fprintf_filtered.
11692
11693 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11694
11695         * regcache.c (regcache::regcache): New function.
11696         (regcache::~regcache): New function.
11697         (regcache_xmalloc_1): Remove.
11698         (regcache_xmalloc): Call new regcache.
11699         (regcache_xfree): Call delete regcache.
11700         (get_thread_arch_aspace_regcache): Call new regcache.
11701
11702 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11703
11704         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11705         lwp instead of ptid_get_lwp.
11706
11707 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11708
11709         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11710         lwp_info instead of getting from inferior_ptid.
11711
11712 2017-04-27  Keith Seitz  <keiths@redhat.com>
11713
11714         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11715         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11716         (CV_CONVERSION_BADNESS): Define.
11717         (rank_one_type): Remove overly restrictive rvalue reference
11718         rank checks.
11719         Add cv-qualifier checks and subranks for type equality.
11720         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11721         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11722         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11723
11724 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11725
11726         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11727         count when creating the object.
11728
11729 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11730             Ulrich Weigand  <uweigand@de.ibm.com>
11731
11732         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11733         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11734         is used in AIX.
11735         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11736         (process_xcoff_symbol): Likewise.
11737         (scan_xcoff_symtab): Likewise.
11738
11739 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11740
11741         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11742         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11743         (ia64_access_reg): Use get_frame_register_unsigned.
11744         (ia64_access_rse_reg): Likewise.
11745         (ia64_libunwind_frame_prev_register): Likewise.
11746
11747 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11748
11749         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11750         * gdbarch.c: Regenerated.
11751         * gdbarch.h: Regenerated.
11752         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11753         visibility external.
11754         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11755         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11756         (enum cfa_how_kind): Move to ...
11757         (struct dwarf2_frame_state_reg_info): Likewise.
11758         (struct dwarf2_frame_state): Likewise.
11759         * dwarf2-frame.h: ... here.
11760         (dwarf2_frame_state_alloc_regs): New declaration.
11761         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11762         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11763
11764 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11765
11766         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11767         regcache_raw_read_unsigned.
11768         (xtensa_pseudo_register_write): Likewise.
11769
11770 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11771
11772         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11773         (nds32_pseudo_register_write): Likewise.
11774
11775 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11776
11777         * regcache.c (struct regcache) <readonly_p>: Change its type
11778         to bool.
11779         (regcache_xmalloc_1): Update parameter type and callers update.
11780
11781 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11782
11783         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11784         set_gdbarch_wchar_bit.
11785         * arm-tdep.c (arm_gdbarch_init): Likewise.
11786
11787 2017-04-25  Pedro Alves  <palves@redhat.com>
11788
11789         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11790         (BothAreRelocatable, memcopy, memmove): Don't define.
11791         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11792         macros.
11793
11794 2017-04-25  Pedro Alves  <palves@redhat.com>
11795
11796         * common/common-defs.h: Include "common/poison.h".
11797         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11798         and adjust.
11799         * common/poison.h: New file.
11800         * common/traits.h: Include <type_traits>.
11801         (Not, Or, Requires): New, moved from common/function-view.h.
11802
11803 2017-04-25  Pedro Alves  <palves@redhat.com>
11804
11805         * breakpoint.h (struct breakpoint): In-class initialize all
11806         fields.  Make boolean fields "bool".
11807         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11808         memset call and initializations no longer necessary.
11809
11810 2017-04-25  Pedro Alves  <palves@redhat.com>
11811
11812         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11813         reference.
11814         (pt_btrace_insn): New function.
11815         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11816
11817 2017-04-25  Pedro Alves  <palves@redhat.com>
11818
11819         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11820         "base" field and inherit from "bp_location" instead.  Add
11821         non-default ctor.
11822         (allocate_location_exception): Use new non-default ctor.
11823         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11824         (init_bp_location): Convert to ...
11825         (bp_location::bp_location): ... this new ctor, and remove memset
11826         call.
11827         (base_breakpoint_allocate_location): Use the new non-default ctor.
11828         * breakpoint.h (bp_location): Now a class.  Declare default and
11829         non-default ctors.  In-class initialize all members.
11830         (init_bp_location): Remove declaration.
11831
11832 2017-04-25  Pedro Alves  <palves@redhat.com>
11833
11834         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11835         assignment operator.
11836
11837 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11838
11839         * doublest.c (convert_doublest_to_floatformat): Call
11840         floatformat_totalsize_bytes.
11841
11842 2017-04-22  Tom Tromey  <tom@tromey.com>
11843
11844         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11845         ui_out_emit_list.
11846         * stack.c (print_frame): Use ui_out_emit_list.
11847         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11848         ui_out_emit_list.
11849         * mi/mi-main.c (print_one_inferior)
11850         (mi_cmd_data_list_register_names)
11851         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11852         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11853         ui_out_emit_list.
11854         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11855         (mi_output_solib_attribs): Use ui_out_emit_list,
11856         ui_out_emit_tuple.
11857         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11858         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11859         (mi_cmd_stack_list_args, list_args_or_locals): Use
11860         ui_out_emit_list.
11861         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11862         * breakpoint.c (print_solib_event, output_thread_groups): Use
11863         ui_out_emit_list.
11864
11865 2017-04-22  Tom Tromey  <tom@tromey.com>
11866
11867         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11868         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11869         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11870
11871 2017-04-22  Tom Tromey  <tom@tromey.com>
11872
11873         * tracepoint.c (tvariables_info_1)
11874         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11875
11876 2017-04-22  Tom Tromey  <tom@tromey.com>
11877
11878         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11879         annotate_arg_emitter.
11880         * breakpoint.c (print_mention_watchpoint)
11881         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11882         * annotate.h (struct annotate_arg_emitter): New.
11883
11884 2017-04-22  Tom Tromey  <tom@tromey.com>
11885
11886         * record-btrace.c (record_btrace_insn_history)
11887         (record_btrace_insn_history_range, record_btrace_call_history)
11888         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11889         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11890         ui_out_emit_tuple.
11891         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11892         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11893         * skip.c (skip_info): Use ui_out_emit_tuple.
11894         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11895         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11896         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11897         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11898         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11899         ui_out_emit_tuple.
11900         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11901         (output_register, mi_cmd_data_read_memory)
11902         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11903         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11904         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11905         Use ui_out_emit_tuple.
11906         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11907         ui_out_emit_tuple.
11908         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11909         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11910         * linux-thread-db.c (info_auto_load_libthread_db): Use
11911         ui_out_emit_tuple.
11912         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11913         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11914         * disasm.c (do_mixed_source_and_assembly_deprecated)
11915         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11916         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11917         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11918         * breakpoint.c (print_one_breakpoint_location)
11919         (print_one_breakpoint): Use ui_out_emit_tuple.
11920         * auto-load.c (print_script, info_auto_load_cmd): Use
11921         ui_out_emit_tuple.
11922         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11923
11924 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11925
11926         * thread.c (print_thread_info_1): Remove dead code.
11927
11928 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11929
11930         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11931         GDB_SELF_TEST.
11932         * arm-tdep.c (selftests::arm_record_test): Likewise.
11933
11934 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11935
11936         * regcache.c (regcache_restore): Remove argument 2.  Replace
11937         argument 3 with regcache.  Get register status from
11938         src->register_status and get register contents from
11939         register_buffer (src, regnum).
11940         (regcache_cpy): Update.
11941
11942 2017-04-19  Pedro Alves  <palves@redhat.com>
11943
11944         * gdbthread.h (thread): Add missing closing parenthesis in
11945         comment.
11946
11947 2017-04-19  Pedro Alves  <palves@redhat.com>
11948
11949         * common/refcounted-object.h: New file.
11950         * gdbthread.h: Include "common/refcounted-object.h".
11951         (thread_info): Inherit from refcounted_object and add comments.
11952         (thread_info::incref, thread_info::decref)
11953         (thread_info::m_refcount): Delete.
11954         (thread_info::deletable): Use the refcounted_object::refcount()
11955         method.
11956         * inferior.c (current_inferior_): Add comment.
11957         (set_current_inferior): Increment/decrement refcounts.
11958         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11959         not-deletable instead of comparing with the current inferior.
11960         (initialize_inferiors): Increment the initial inferior's refcount.
11961         * inferior.h (struct inferior): Forward declare.
11962         Include "common/refcounted-object.h".
11963         (current_inferior, set_current_inferior): Move declaration to
11964         before struct inferior's definition, and fix comment.
11965         (inferior): Inherit from refcounted_object.  Add comments.
11966         * thread.c (switch_to_thread_no_regs): Reference the thread's
11967         inferior pointer directly instead of doing a ptid lookup.
11968         (switch_to_no_thread): New function.
11969         (switch_to_thread(thread_info *)): New function, factored out
11970         from ...
11971         (switch_to_thread(ptid_t)): ... this.
11972         (restore_current_thread): Delete.
11973         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11974         fields, and add 'inf' field.
11975         (do_restore_current_thread_cleanup): Check whether old->inf is
11976         alive instead of looking up an inferior by ptid.  Use
11977         switch_to_thread and switch_to_no_thread.
11978         (restore_current_thread_cleanup_dtor): Use old->inf directly
11979         instead of lookup up an inferior by id.  Decref the inferior.
11980         Don't restore 'removable'.
11981         (make_cleanup_restore_current_thread): Same the inferior pointer
11982         in old, instead of the inferior number.  Incref the inferior.
11983         Don't save/clear 'removable'.
11984
11985 2017-04-19  Pedro Alves  <palves@redhat.com>
11986
11987         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11988         unittests/scoped_restore-selftests.c.
11989         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11990         * common/scoped_restore.h (scoped_restore_base): Make "class".
11991         (scoped_restore_base::release): New public method.
11992         (scoped_restore_base::scoped_restore_base): New protected ctor.
11993         (scoped_restore_base::m_saved_var): New protected field.
11994         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11995         scoped_restore_base base class instead of m_saved_var directly.
11996         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11997         (scoped_restore_tmpl::scoped_restore_tmpl(const
11998         scoped_restore_tmpl<T>&)): Likewise.
11999         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12000         method.
12001         (scoped_restore_tmpl::saved_var): New method.
12002         (scoped_restore_tmpl::m_saved_var): Delete.
12003         * inferior.h (inferior::detaching): Now a bool.
12004         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12005         cleanup.
12006         * unittests/scoped_restore-selftests.c: New file.
12007
12008 2017-04-19  Pedro Alves  <palves@redhat.com>
12009
12010         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12011         Re-sort in alphabetic order.
12012
12013 2017-04-18  Pedro Alves  <palves@redhat.com>
12014
12015         * xml-support.c (obstack_xml_printf): Delete.
12016         * xml-support.h (obstack_xml_printf): Delete.
12017
12018 2017-04-18  Pedro Alves  <palves@redhat.com>
12019
12020         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12021         vdebug, verror, body_text, start_element, end_element, name,
12022         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12023         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12024         is_xinclude>: Make private and add m_ prefix.
12025         (gdb_xml_parser::body_text): New method, based on ...
12026         (gdb_xml_body_text): ... this.  Adjust.
12027         (gdb_xml_parser::vdebug): New method, based on ...
12028         (gdb_xml_debug): ... this.  Adjust.
12029         (gdb_xml_parser::verror): New method, based on ...
12030         (gdb_xml_error): ... this.  Adjust.
12031         (gdb_xml_parser::start_element): New method, based on ...
12032         (gdb_xml_start_element): ... this.  Adjust.
12033         (gdb_xml_start_element_wrapper): Defer to
12034         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12035         (gdb_xml_parser::end_element): New method, based on ...
12036         (gdb_xml_end_element_wrapper): ... this.  Adjust.
12037         (gdb_xml_parser::~gdb_xml_parser): Adjust.
12038         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12039         (gdb_xml_parser::use_dtd): New method, based on ...
12040         (gdb_xml_use_dtd): ... this.  Adjust.
12041         (gdb_xml_parser::parse): New method, based on ...
12042         (gdb_xml_parse): ... this.  Adjust.
12043         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12044         (xinclude_start_include): Adjust to call the parser's name method.
12045         (xml_xinclude_default, xml_xinclude_start_doctype)
12046         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12047         method.
12048         (xml_process_xincludes): Adjust to call parser methods.
12049         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12050         declarations.
12051
12052 2017-04-18  Pedro Alves  <palves@redhat.com>
12053
12054         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12055         gdb::optional<std::string>.
12056         * xml-support.c: Include <string>.
12057         (scope_level::scope_level(scope_level &&))
12058         (scope_level::~scope_level): Delete.
12059         (scope_level::body): Now a std::string.
12060         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12061         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12062         parameter.
12063         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12064         (xinclude_parsing_data::output): Now a std::string reference.
12065         (xinclude_start_include): Adjust.
12066         (xml_xinclude_default): Adjust.
12067         (xml_process_xincludes): Add 'output' parameter, and return bool.
12068         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12069         and return bool.
12070         * xml-tdesc.c: Include <unordered_map> and <string>.
12071         (tdesc_xml_cache): Delete.
12072         (tdesc_xml_cache_s): Delete.
12073         (xml_cache): Now an std::unordered_map.
12074         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12075         (target_fetch_description_xml): Change return type to
12076         gdb::optional<std::string>, and adjust.
12077         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12078         (target_fetch_description_xml): Change return type to
12079         gdb::optional<std::string>.
12080
12081 2017-04-18  Pedro Alves  <palves@redhat.com>
12082
12083         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12084         unittests/optional-selftests.c.
12085         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12086         * unittests/optional-selftests.c: New file.
12087         * unittests/optional/assignment/1.cc: New file.
12088         * unittests/optional/assignment/2.cc: New file.
12089         * unittests/optional/assignment/3.cc: New file.
12090         * unittests/optional/assignment/4.cc: New file.
12091         * unittests/optional/assignment/5.cc: New file.
12092         * unittests/optional/assignment/6.cc: New file.
12093         * unittests/optional/assignment/7.cc: New file.
12094         * unittests/optional/cons/copy.cc: New file.
12095         * unittests/optional/cons/default.cc: New file.
12096         * unittests/optional/cons/move.cc: New file.
12097         * unittests/optional/cons/value.cc: New file.
12098         * unittests/optional/in_place.cc: New file.
12099         * unittests/optional/observers/1.cc: New file.
12100         * unittests/optional/observers/2.cc: New file.
12101
12102 2017-04-18  Pedro Alves  <palves@redhat.com>
12103
12104         * common/gdb_optional.h: Include common/traits.h.
12105         (in_place_t): New type.
12106         (in_place): New constexpr variable.
12107         (optional::optional): Remove member initialization of
12108         m_instantiated.
12109         (optional::optional(in_place_t...)): New constructor.
12110         (optional::~optional): Use reset.
12111         (optional::optional(const optional&)): New.
12112         (optional::optional(const optional&&)): New.
12113         (optional::optional(T &)): New.
12114         (optional::optional(T &&)): New.
12115         (operator::operator=(const optional &)): New.
12116         (operator::operator=(optional &&)): New.
12117         (operator::operator= (const T &))
12118         (operator::operator= (T &&))
12119         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
12120         (operator::reset): New.
12121         (operator::m_instantiated):: Add in-class initializer.
12122         * common/traits.h: Include <type_traits>.
12123         (struct And): New types.
12124
12125 2017-04-18  Pedro Alves  <palves@redhat.com>
12126
12127         * xml-support.c: Include <vector>.
12128         (scope_level::scope_level(const gdb_xml_element *))
12129         (scope_level::scope_level(scope_level&&)): New.
12130         (scope_level::~scope_level): New.
12131         (scope_level_s): Delete.
12132         (gdb_xml_parser::scopes): Now a std::vector.
12133         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12134         Use std::vector.
12135         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12136         scope cleanup code.
12137         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12138         of the scopes member.  Use std::vector::emplace_back.
12139
12140 2017-04-18  Pedro Alves  <palves@redhat.com>
12141
12142         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
12143         a bool.
12144         (gdb_xml_end_element): Change type of first parameter.
12145         (gdb_xml_cleanup): Rename to ...
12146         (gdb_xml_parser::~gdb_xml_parser): ... this.
12147         (gdb_xml_create_parser_and_cleanup): Delete with ...
12148         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12149         to this new ctor.
12150         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12151         using gdb_xml_create_parser_and_cleanup.
12152         (xinclude_parsing_data): Add ctor/dtor.
12153         (xml_xinclude_cleanup): Delete.
12154         (xml_process_xincludes): Create a local xinclude_parsing_data
12155         instead of heap-allocating one.  Create a local gdb_xml_parser
12156         instead of heap-allocating one with
12157         gdb_xml_create_parser_and_cleanup.
12158
12159 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
12160
12161         PR threads/20743
12162         * fbsd-nat.c (resume_one_thread_cb): Remove.
12163         (resume_all_threads_cb): Remove.
12164         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12165         iterate_over_threads.
12166
12167 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12168
12169         * NEWS: Create a new section for the next release branch.
12170         Rename the section of the current branch, now that it has
12171         been cut.
12172
12173 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12174
12175         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12176         * version.in: Bump version to 8.0.50.DATE-git.
12177
12178 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
12179
12180         PR gdb/21385
12181         * windows-nat.c (windows_create_inferior): Declare 'allargs'
12182         independently of the host, and fix build breakage on Cygwin.
12183
12184 2017-04-13  Pedro Alves  <palves@redhat.com>
12185
12186         * inferior.c (free_inferior): Convert to ...
12187         (inferior::~inferior): ... this dtor.
12188         (inferior::inferior): New ctor, factored out from ...
12189         (add_inferior_silent): ... here.  Allocate the inferior with a new
12190         expression.
12191         (delete_inferior): Call delete instead of free_inferior.
12192         * inferior.h (gdb_environ, continuation): Forward declare.
12193         (inferior): Now a class.  Add in-class initialization to all
12194         members.  Make boolean fields bool, except 'detaching'.
12195         (inferior::inferior): New explicit ctor.
12196         (inferior::~inferior): New.
12197
12198 2017-04-13  Pedro Alves  <palves@redhat.com>
12199
12200         * inferior.c (init_inferior_list): Delete.
12201         * inferior.h (init_inferior_list): Delete.
12202
12203 2017-04-13  Pedro Alves  <palves@redhat.com>
12204
12205         PR threads/13217
12206         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12207         (top level): Call it twice, with different thread sets.
12208
12209 2017-04-13  Pedro Alves  <palves@redhat.com>
12210
12211         * thread.c: Include <algorithm>.
12212         (thread_array_cleanup): Delete.
12213         (scoped_inc_dec_ref): New class.
12214         (live_threads_count): New function.
12215         (set_thread_refcount): Delete.
12216         (tp_array_compar_ascending): Now a bool.
12217         (tp_array_compar): Convert to a std::sort comparison function.
12218         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12219         and live_threads_count.
12220
12221 2017-04-13  Pedro Alves  <palves@redhat.com>
12222
12223         * infrun.c (follow_fork_inferior): Also switch the current
12224         inferior.
12225
12226 2017-04-13  Pedro Alves  <palves@redhat.com>
12227
12228         * breakpoint.c (watch_command_1): Save watchpoint-frame info
12229         before calling create_internal_breakpoint.
12230
12231 2017-04-13  Pedro Alves  <palves@redhat.com>
12232
12233         * fork-child.c (execv_argv): New class.
12234         (breakup_args): Refactored as ...
12235         (execv_argv::init_for_no_shell): .. this method of execv_argv.
12236         Copy arguments to storage and replace separators with NULL
12237         terminators in place.
12238         (escape_bang_in_quoted_argument): Adjust to return bool.
12239         (execv_argv::execv_argv): New ctor.
12240         (execv_argv::init_for_shell): New method, factored out from
12241         fork_inferior.  Don't strdup strings into the vector.
12242         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
12243         Remove free_vector_argv call.
12244
12245 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12246
12247         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12248         tdep->rx_psw_type.
12249
12250 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12251
12252         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12253         * rx-tdep.c (rx_gdbarch_init): Likewise.
12254
12255 2017-04-13  Pedro Alves  <palves@redhat.com>
12256
12257         * breakpoint.h (struct breakpoint): Reindent.
12258
12259 2017-04-13  Pedro Alves  <palves@redhat.com>
12260
12261         * breakpoint.c (bp_location): Rename to ...
12262         (bp_locations): ... this.  All references updated.
12263         (bp_location_count): Rename to ...
12264         (bp_locations_count): ... this.  All references updated.
12265         (bp_location_placed_address_before_address_max): Rename to ...
12266         (bp_locations_placed_address_before_address_max): ... this.  All
12267         references updated.
12268         (bp_location_shadow_len_after_address_max): Rename to ...
12269         (bp_locations_shadow_len_after_address_max): ... this.  All
12270         references updated.
12271         (bp_location_compare_addrs): Rename to ...
12272         (bp_locations_compare_addrs): ... this.  All references updated.
12273         (bp_location_compare):Rename to ...
12274         (bp_locations_compare): ... this.  All references updated.
12275         (bp_location_target_extensions_update): Rename to ...
12276         (bp_locations_target_extensions_update): ... this.  All references
12277         updated.
12278
12279 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12280
12281         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12282         * common/common.m4: Check headers 'termios.h', 'termio.h' and
12283         'sgtty.h'.
12284         * common/gdb_termios.h: New file, with parts of "terminal.h".
12285         * inflow.c: Include "gdb_termios.h".
12286         * ser-unix.c: Include "gdb_termios.h".
12287         * terminal.h: Move terminal-related defines to
12288         "common/gdb_termios.h".
12289
12290 2017-04-12  Tom Tromey  <tom@tromey.com>
12291
12292         * probe.c (parse_probes): Update.
12293         * location.h (delete_event_location): Don't declare.
12294         (event_location_deleter::operator()): Update.
12295         * location.c (event_location_deleter::operator()): Rename from
12296         delete_event_location.
12297         * linespec.h (linespec_result) <location>: Change type to
12298         event_location_up.
12299         * linespec.c (canonicalize_linespec, event_location_to_sals)
12300         (decode_objc): Update.
12301         (linespec_result): Don't call delete_event_location.
12302         * breakpoint.c (create_breakpoints_sal)
12303         (bkpt_probe_create_sals_from_location)
12304         (strace_marker_create_sals_from_location): Update.
12305
12306 2017-04-12  Tom Tromey  <tom@tromey.com>
12307
12308         * linespec.h (struct linespec_result): Add constructor and
12309         destructor.
12310         (init_linespec_result, destroy_linespec_result)
12311         (make_cleanup_destroy_linespec_result): Don't declare.
12312         * linespec.c (init_linespec_result): Remove.
12313         (linespec_result::~linespec_result): Rename from
12314         destroy_linespec_result.  Update.
12315         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12316         Remove.
12317         * breakpoint.c (create_breakpoint, break_range_command)
12318         (decode_location_default): Update.
12319         * ax-gdb.c (agent_command_1): Update.
12320
12321 2017-04-12  Tom Tromey  <tom@tromey.com>
12322
12323         * remote.c (remote_download_tracepoint): Update.
12324         * python/py-breakpoint.c (bppy_get_location): Update.
12325         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12326         (gdbscm_breakpoint_location): Update.
12327         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12328         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12329         Change type to event_location_up.
12330         * breakpoint.c (create_overlay_event_breakpoint)
12331         (create_longjmp_master_breakpoint)
12332         (create_std_terminate_master_breakpoint)
12333         (create_exception_master_breakpoint)
12334         (breakpoint_event_location_empty_p, print_breakpoint_location)
12335         (print_one_breakpoint_location, create_thread_event_breakpoint)
12336         (init_breakpoint_sal, create_breakpoint)
12337         (print_recreate_ranged_breakpoint, break_range_command)
12338         (init_ada_exception_breakpoint, say_where): Update.
12339         (base_breakpoint_dtor): Don't call delete_event_location.
12340         (bkpt_print_recreate, tracepoint_print_recreate)
12341         (dprintf_print_recreate, update_static_tracepoint)
12342         (breakpoint_re_set_default): Update.
12343
12344 2017-04-12  Tom Tromey  <tom@tromey.com>
12345
12346         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12347         type of "to_do".  Update.
12348         (compute_stack_depth): Use std::vector.
12349
12350 2017-04-12  Tom Tromey  <tom@tromey.com>
12351
12352         * printcmd.c (find_instruction_backward): Use std::vector.
12353
12354 2017-04-12  Tom Tromey  <tom@tromey.com>
12355
12356         * symfile.c (objfilep): Remove typedef.
12357         (reread_symbols): Use a std::vector.
12358
12359 2017-04-12  Tom Tromey  <tom@tromey.com>
12360
12361         * mi/mi-main.c (exec_direction_forward): Remove.
12362         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12363         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12364         scoped_restore.
12365         * guile/guile.c (guile_repl_command, guile_command)
12366         (gdbscm_execute_gdb_command): Use scoped_restore.
12367         * go-exp.y (go_parse): Use scoped_restore.
12368         * d-exp.y (d_parse): Use scoped_restore.
12369         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12370         * c-exp.y (c_parse): Use scoped_restore.
12371
12372 2017-04-12  Tom Tromey  <tom@tromey.com>
12373
12374         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12375         (mi_parse): Update return type.
12376         (mi_parse_free): Remove.
12377         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12378         (mi_parse::~mi_parse): Rename from mi_parse_free.
12379         (mi_parse_cleanup): Remove.
12380         (mi_parse): Return a unique_ptr.  Use new.
12381         * mi/mi-main.c (mi_execute_command): Update.
12382
12383 2017-04-12  Tom Tromey  <tom@tromey.com>
12384
12385         * location.c (explicit_location_lex_one): Return a
12386         unique_xmalloc_ptr.
12387         (string_to_explicit_location): Update.  Remove cleanups.
12388
12389 2017-04-12  Tom Tromey  <tom@tromey.com>
12390
12391         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12392         (compare_value_and_voffset): Change type.  Update.
12393         (compute_vtable_size): Change type of "offset_vec".
12394         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12395         (gnuv3_get_typeid): Remove extraneous declaration.
12396
12397 2017-04-12  Tom Tromey  <tom@tromey.com>
12398
12399         * charset.h (wchar_iterator): Fix comment.
12400
12401 2017-04-12  Tom Tromey  <tom@tromey.com>
12402
12403         * charset.c (iconv_wrapper): New class.
12404         (cleanup_iconv): Remove.
12405         (convert_between_encodings): Use it.
12406
12407 2017-04-12  Tom Tromey  <tom@tromey.com>
12408
12409         * symfile.h (increment_reading_symtab): Update type.
12410         * symfile.c (decrement_reading_symtab): Remove.
12411         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12412         * psymtab.c (psymtab_to_symtab): Update.
12413         * dwarf2read.c (dw2_instantiate_symtab): Update.
12414
12415 2017-04-12  Tom Tromey  <tom@tromey.com>
12416
12417         * jit.c (struct jit_reader): Declare separately.  Add constructor
12418         and destructor.  Change type of "handle".
12419         (loaded_jit_reader): Define separately.
12420         (jit_reader_load): Update.  New "new".
12421         (jit_reader_unload_command): Use "delete".
12422         * gdb-dlfcn.h (struct dlclose_deleter): New.
12423         (gdb_dlhandle_up): New typedef.
12424         (gdb_dlopen, gdb_dlsym): Update types.
12425         (gdb_dlclose): Remove.
12426         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12427         (gdb_dlsym): Change type of "handle".
12428         (make_cleanup_dlclose): Remove.
12429         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12430         * compile/compile-c-support.c (load_libcc): Update.
12431
12432 2017-04-12  Tom Tromey  <tom@tromey.com>
12433
12434         * symtab.h (find_pcs_for_symtab_line): Change return type.
12435         * symtab.c (find_pcs_for_symtab_line): Change return type.
12436         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12437         type of "vec".  Update.
12438         (ltpy_get_pcs_for_line): Update.
12439         * linespec.c (decode_digits_ordinary): Update.
12440
12441 2017-04-12  Tom Tromey  <tom@tromey.com>
12442
12443         * tracepoint.c (actions_command): Update.
12444         * python/python.c (python_command, python_interactive_command):
12445         Update.
12446         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12447         * guile/guile.c (guile_command): Update.
12448         * defs.h (read_command_lines, read_command_lines_1): Return
12449         command_line_up.
12450         (command_lines_deleter): New struct.
12451         (command_line_up): New typedef.
12452         * compile/compile.c (compile_code_command)
12453         (compile_print_command): Update.
12454         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12455         command_line_up.
12456         (make_cleanup_free_command_lines): Remove.
12457         * cli/cli-script.c (get_command_line, read_command_lines_1)
12458         (copy_command_lines): Return command_line_up.
12459         (while_command, if_command, read_command_lines, define_command)
12460         (document_command): Update.
12461         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12462         Remove.
12463         * breakpoint.h (breakpoint_set_commands): Change type of
12464         "commands".
12465         * breakpoint.c (breakpoint_set_commands): Change type of
12466         "commands".  Update.
12467         (do_map_commands_command, update_dprintf_command_list)
12468         (create_tracepoint_from_upload): Update.
12469
12470 2017-04-12  Tom Tromey  <tom@tromey.com>
12471
12472         * tracepoint.c (scope_info): Update.
12473         * spu-tdep.c (spu_catch_start): Update.
12474         * python/python.c (gdbpy_decode_line): Update.
12475         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12476         * python/py-breakpoint.c (bppy_init): Update.
12477         * probe.c (parse_probes): Update.
12478         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12479         * location.h (event_location_deleter): New struct.
12480         (event_location_up): New typedef.
12481         (new_linespec_location, new_address_location, new_probe_location)
12482         (new_explicit_location, copy_event_location)
12483         (string_to_event_location, string_to_event_location_basic)
12484         (string_to_explicit_location): Update return type.
12485         (make_cleanup_delete_event_location): Remove.
12486         * location.c (new_linespec_location, new_address_location)
12487         (new_probe_location, new_explicit_location, copy_event_location):
12488         Return event_location_up.
12489         (delete_event_location_cleanup)
12490         (make_cleanup_delete_event_location): Remove.
12491         (string_to_explicit_location, string_to_event_location_basic)
12492         (string_to_event_location): Return event_location_up.
12493         * linespec.c (canonicalize_linespec, event_location_to_sals)
12494         (decode_line_with_current_source)
12495         (decode_line_with_last_displayed, decode_objc): Update.
12496         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12497         * completer.c (location_completer): Update.
12498         * cli/cli-cmds.c (edit_command, list_command): Update.
12499         * breakpoint.c (create_overlay_event_breakpoint)
12500         (create_longjmp_master_breakpoint)
12501         (create_std_terminate_master_breakpoint)
12502         (create_exception_master_breakpoint)
12503         (create_thread_event_breakpoint): Update.
12504         (init_breakpoint_sal): Update.  Remove some dead code.
12505         (create_breakpoint_sal): Change type of "location".  Update.
12506         (create_breakpoints_sal, create_breakpoint, break_command_1)
12507         (dprintf_command, break_range_command, until_break_command)
12508         (init_ada_exception_breakpoint)
12509         (strace_marker_create_sals_from_location)
12510         (update_static_tracepoint, trace_command, ftrace_command)
12511         (strace_command, create_tracepoint_from_upload): Update.
12512         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12513         * ax-gdb.c (agent_command_1): Update.
12514
12515 2017-04-12  Pedro Alves  <palves@redhat.com>
12516
12517         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12518         * configure.tgt: Handle i[34567]86-*-go32* and
12519         i[34567]86-*-msdosdjgpp*.
12520         * i386-tdep.c (i386_svr4_reg_to_regnum):
12521         Make extern.
12522         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12523         i386-go32-tdep.c.
12524         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12525         * i386-go32-tdep.c: New file.
12526         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12527         declarations.
12528
12529 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12530
12531         * aix-thread.c (pd_status2str): Change return type to const char *.
12532
12533 2017-04-12  Pedro Alves  <palves@redhat.com>
12534
12535         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12536         calls to set_gdbarch_gnu_triplet_regexp.
12537
12538 2017-04-12  Pedro Alves  <palves@redhat.com>
12539
12540         PR gdb/21323
12541         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12542         New enum value.
12543         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12544         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12545         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12546         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12547         * gdbarch.h, gdbarch.c: Regenerate.
12548         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12549         gdbarch_wchar_bit and gdbarch_wchar_signed.
12550         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12551         * arm-tdep.c (arm_gdbarch_init): Likewise.
12552         * avr-tdep.c (avr_gdbarch_init): Likewise.
12553         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12554         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12555         * i386-tdep.c (i386_go32_init_abi): Likewise.
12556         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12557         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12558         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12559         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12560         * sh-tdep.c (sh_gdbarch_init): Likewise.
12561         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12562         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12563         * windows-tdep.c (windows_init_abi): Likewise.
12564         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12565
12566 2017-04-12  Pedro Alves  <palves@redhat.com>
12567
12568         PR c++/21323
12569         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12570         cplus_primitive_type_char32_t>: New enum values.
12571         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12572         and cplus_primitive_type_char32_t.
12573         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12574         32, use the archtecture's built-in type for char16_t and char32_t,
12575         respectively.  Otherwise, fallback to init_integer_type as before,
12576         but make the type unsigned, and issue a complaint.
12577         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12578
12579 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12580
12581         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12582         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12583
12584 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12585
12586         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12587         'const char *'.
12588
12589 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12590
12591         * common/common-utils.c (free_vector_argv): New function.
12592         * common/common-utils.h: Include <vector>.
12593         (free_vector_argv): New prototype.
12594         * darwin-nat.c (darwin_create_inferior): Rewrite function
12595         prototype in order to constify "exec_file" and accept a
12596         "std::string" for "allargs".
12597         * fork-child.c: Include <vector>.
12598         (breakup_args): Rewrite function, using C++.
12599         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12600         and accept "std::string" for "allargs".  Update the code to
12601         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12602         and "execvp".
12603         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12604         order to constify "exec_file" and accept a "std::string" for
12605         "allargs".
12606         * go32-nat.c (go32_create_inferior): Likewise.
12607         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12608         * infcmd.c (run_command_1): Constify "exec_file".  Use
12609         "std::string" for inferior arguments.
12610         * inferior.h (fork_inferior): Update prototype.
12611         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12612         prototype in order to constify "exec_file" and accept a
12613         "std::string" for "allargs".
12614         * nto-procfs.c (procfs_create_inferior): Likewise.
12615         * procfs.c (procfs_create_inferior): Likewise.
12616         * remote-sim.c (gdbsim_create_inferior): Likewise.
12617         * remote.c (extended_remote_run): Update code to accept
12618         "std::string" as argument.
12619         (extended_remote_create_inferior): Rewrite function prototype in
12620         order to constify "exec_file" and accept a "std::string" for
12621         "allargs".
12622         * rs6000-nat.c (super_create_inferior): Likewise.
12623         (rs6000_create_inferior): Likewise.
12624         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12625         * windows-nat.c (windows_create_inferior): Likewise.
12626
12627 2017-04-11  Pedro Alves  <palves@redhat.com>
12628
12629         * thread.c: Fix whitespace throughout.
12630
12631 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12632
12633         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12634
12635 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12636
12637         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12638
12639 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12640
12641         PR gdb/21364
12642         * osdata.c (info_osdata): Check if 'type' is an empty string
12643         instead of NULL.
12644
12645 2017-04-10  Pedro Alves  <palves@redhat.com>
12646
12647         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12648         (ptid_to_global_thread_id, in_thread_list)
12649         (do_captured_list_thread_ids, set_resumed, set_running)
12650         (set_executing, set_stop_requested, finish_thread_state)
12651         (validate_registers_access, can_access_registers_ptid)
12652         (print_thread_info_1, switch_to_thread)
12653         (do_restore_current_thread_cleanup)
12654         (make_cleanup_restore_current_thread, thread_command)
12655         (thread_name_command): Use operator== instead of ptid_equal.
12656
12657 2017-04-10  Pedro Alves  <palves@redhat.com>
12658
12659         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12660         (current_thread_cleanup_chain): Delete.
12661         (restore_current_thread_cleanup_dtor)
12662         (make_cleanup_restore_current_thread): Remove references to
12663         current_thread_cleanup_chain.
12664
12665 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12666
12667         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12668         REG_UNKNOWN.
12669
12670 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12671
12672         PR gdb/19942
12673         * gdbthread.h (thread_info::deletable): New method.
12674         (thread_info::incref): New method.
12675         (thread_info::decref): New method.
12676         (thread_info::refcount): Move it to private.
12677         * infrun.c (save_stop_context): Call inc_refcount.
12678         (release_stop_context_cleanup): Likewise.
12679         * thread.c (set_thread_exited): New function.
12680         (init_thread_list): Delete "tp" only it is deletable, otherwise
12681         call set_thread_exited.
12682         (delete_thread_1): Call set_thread_exited.
12683         (current_thread_cleanup) <inferior_pid>: Remove.
12684         <thread>: New field.
12685         (restore_current_thread_ptid_changed): Removed.
12686         (do_restore_current_thread_cleanup): Adjust.
12687         (restore_current_thread_cleanup_dtor): Don't call
12688         find_thread_ptid.
12689         (set_thread_refcount): Use dec_refcount.
12690         (make_cleanup_restore_current_thread): Adjust.
12691         (thread_apply_all_command): Call inc_refcount.
12692         (_initialize_thread): Don't call
12693         observer_attach_thread_ptid_changed.
12694
12695 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12696
12697         * thread.c (delete_thread_1): Hoist code on marking thread as
12698         exited.
12699
12700 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12701
12702         * windows-nat.c (windows_detach): Initialize ptid with
12703         minus_one_ptid.
12704
12705 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12706
12707         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12708
12709 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12710
12711         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12712         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12713         (bfin_pseudo_register_write): Likewise
12714
12715 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12716
12717         * common/ptid.h (struct ptid): Change to...
12718         (class ptid_t): ... this.
12719         <ptid_t>: New constructors.
12720         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12721         matches>: New methods.
12722         <make_null, make_minus_one>: New static methods.
12723         <pid>: Rename to...
12724         <m_pid>: ...this.
12725         <lwp>: Rename to...
12726         <m_lwp>: ...this.
12727         <tid>: Rename to...
12728         <m_tid>: ...this.
12729         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12730         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12731         as references, move comment to class ptid_t.
12732         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12733         ptid_t static methods.
12734         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12735         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12736         Take ptid arguments as references, implement using ptid_t methods.
12737         * unittests/ptid-selftests.c: New file.
12738         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12739         unittests/ptid-selftests.c.
12740         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12741
12742 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12743
12744         * python/python.c (python_run_simple_file): Cast mode literal to
12745         non-const char pointer as expected by PyFile_FromString.
12746
12747 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12748
12749         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12750         minus_one_ptid and null_ptid.
12751
12752 2017-04-05  Pedro Alves  <palves@redhat.com>
12753
12754         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12755         * configure: Regenerate.
12756
12757 2017-04-05  Pedro Alves  <palves@redhat.com>
12758
12759         * ada-exp.y (yyerror): Constify.
12760         * ada-lang.c (bound_name, get_selections)
12761         (ada_variant_discrim_type)
12762         (ada_variant_discrim_name, ada_value_struct_elt)
12763         (ada_lookup_struct_elt_type, is_unchecked_variant)
12764         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12765         (catch_ada_exception_command_split)
12766         (catch_ada_assert_command_split, catch_assert_command)
12767         (ada_op_name): Constify.
12768         * ada-lang.h (ada_yyerror, get_selections)
12769         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12770         * arc-tdep.c (arc_print_frame_cache): Constify.
12771         * arm-tdep.c (arm_skip_stub): Constify.
12772         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12773         (gen_aggregate_elt_ref): Constify.
12774         * bcache.c (print_bcache_statistics): Constify.
12775         * bcache.h (print_bcache_statistics): Constify.
12776         * break-catch-throw.c (catch_exception_command_1):
12777         * breakpoint.c (struct ep_type_description::description):
12778         Constify.
12779         (add_solib_catchpoint): Constify.
12780         (catch_fork_command_1): Add cast.
12781         (add_catch_command): Constify.
12782         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12783         Constify.
12784         * bsd-uthread.c (bsd_uthread_state): Constify.
12785         * buildsym.c (patch_subfile_names): Constify.
12786         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12787         Constify.
12788         * c-exp.y (yyerror): Constify.
12789         (token::oper): Constify.
12790         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12791         * c-varobj.c (cplus_describe_child): Constify.
12792         * charset.c (find_charset_names): Add cast.
12793         (find_charset_names): Constify array and add const_cast.
12794         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12795         (edit_command): Constify.
12796         * cli/cli-decode.c (lookup_cmd): Constify.
12797         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12798         Constify.
12799         (struct dump_context): Constify.
12800         (add_dump_command, restore_command): Constify.
12801         * cli/cli-script.c (get_command_line): Constify.
12802         * cli/cli-script.h (get_command_line): Constify.
12803         * cli/cli-utils.c (check_for_argument): Constify.
12804         * cli/cli-utils.h (check_for_argument): Constify.
12805         * coff-pe-read.c (struct read_pe_section_data): Constify.
12806         * command.h (lookup_cmd): Constify.
12807         * common/print-utils.c (decimal2str): Constify.
12808         * completer.c (gdb_print_filename): Constify.
12809         * corefile.c (set_gnutarget): Constify.
12810         * cp-name-parser.y (yyerror): Constify.
12811         * cp-valprint.c (cp_print_class_member): Constify.
12812         * cris-tdep.c (cris_register_name, crisv32_register_name):
12813         Constify.
12814         * d-exp.y (yyerror): Constify.
12815         (struct token::oper): Constify.
12816         * d-lang.h (d_yyerror): Constify.
12817         * dbxread.c (struct header_file_location::name): Constify.
12818         (add_old_header_file, add_new_header_file, last_function_name)
12819         (dbx_next_symbol_text, add_bincl_to_list)
12820         (find_corresponding_bincl_psymtab, set_namestring)
12821         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12822         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12823         * defs.h (command_line_input, print_address_symbolic)
12824         (deprecated_readline_begin_hook): Constify.
12825         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12826         Constify.
12827         * event-top.c (handle_line_of_input): Constify and add cast.
12828         * exceptions.c (catch_errors): Constify.
12829         * exceptions.h (catch_errors): Constify.
12830         * expprint.c (print_subexp_standard, op_string, op_name)
12831         (op_name_standard, dump_raw_expression, dump_raw_expression):
12832         * expression.h (op_name, op_string, dump_raw_expression):
12833         Constify.
12834         * f-exp.y (yyerror): Constify.
12835         (struct token::oper): Constify.
12836         (struct f77_boolean_val::name): Constify.
12837         * f-lang.c (f_word_break_characters): Constify.
12838         * f-lang.h (f_yyerror): Constify.
12839         * fork-child.c (fork_inferior): Add cast.
12840         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12841         (new_variant): Constify.
12842         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12843         * gdbarch.c: Regenerate.
12844         * gdbcore.h (set_gnutarget): Constify.
12845         * go-exp.y (yyerror): Constify.
12846         (token::oper): Constify.
12847         * go-lang.h (go_yyerror): Constify.
12848         * go32-nat.c (go32_sysinfo): Constify.
12849         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12850         * guile/scm-cmd.c (cmdscm_function): Constify.
12851         * guile/scm-param.c (pascm_param_value): Constify.
12852         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12853         (h8300sx_register_name): Constify.
12854         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12855         Constify.
12856         * ia64-tdep.c (ia64_register_names): Constify.
12857         * infcmd.c (construct_inferior_arguments): Constify.
12858         (path_command, attach_post_wait): Constify.
12859         * language.c (show_range_command, show_case_command)
12860         (unk_lang_error): Constify.
12861         * language.h (language_defn::la_error)
12862         (language_defn::la_name_of_this): Constify.
12863         * linespec.c (decode_line_2): Constify.
12864         * linux-thread-db.c (thread_db_err_str): Constify.
12865         * lm32-tdep.c (lm32_register_name): Constify.
12866         * m2-exp.y (yyerror): Constify.
12867         * m2-lang.h (m2_yyerror): Constify.
12868         * m32r-tdep.c (m32r_register_names): Constify and make static.
12869         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12870         * m88k-tdep.c (m88k_register_name): Constify.
12871         * macroexp.c (appendmem): Constify.
12872         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12873         (upgrade_type, parse_external, parse_partial_symbols)
12874         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12875         (new_symbol): Constify.
12876         * memattr.c (mem_info_command): Constify.
12877         * mep-tdep.c (register_name_from_keyword): Constify.
12878         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12879         Constify.
12880         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12881         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12882         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12883         cast.
12884         (mi_execute_async_cli_command): Constify.
12885         * mips-tdep.c (mips_register_name): Constify.
12886         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12887         (am33_register_name, am33_2_register_name)
12888         * moxie-tdep.c (moxie_register_names): Constify.
12889         * nat/linux-osdata.c (osdata_type): Constify fields.
12890         * nto-tdep.c (nto_parse_redirection): Constify.
12891         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12892         (lookup_child_selector): Constify.
12893         (objc_methcall::name): Constify.
12894         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12895         (lookup_struct_typedef): Constify.
12896         * objfiles.c (pc_in_section): Constify.
12897         * objfiles.h (pc_in_section): Constify.
12898         * p-exp.y (struct token::oper): Constify.
12899         (yyerror): Constify.
12900         * p-lang.h (pascal_yyerror): Constify.
12901         * parser-defs.h (op_name_standard): Constify.
12902         (op_print::string): Constify.
12903         (exp_descriptor::op_name): Constify.
12904         * printcmd.c (print_address_symbolic): Constify.
12905         * psymtab.c (print_partial_symbols): Constify.
12906         * python/py-breakpoint.c (stop_func): Constify.
12907         (bppy_get_expression): Constify.
12908         * python/py-cmd.c (cmdpy_completer::name): Constify.
12909         (cmdpy_function): Constify.
12910         * python/py-event.c (evpy_add_attribute)
12911         (gdbpy_initialize_event_generic): Constify.
12912         * python/py-event.h (evpy_add_attribute)
12913         (gdbpy_initialize_event_generic): Constify.
12914         * python/py-evts.c (add_new_registry): Constify.
12915         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12916         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12917         * python/py-inferior.c (get_buffer): Add cast.
12918         * python/py-param.c (parm_constant::name): Constify.
12919         * python/py-unwind.c (fprint_frame_id): Constify.
12920         * python/python.c (gdbpy_parameter_value): Constify.
12921         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12922         * remote.c (memory_packet_config::name): Constify.
12923         (show_packet_config_cmd, remote_write_bytes)
12924         (remote_buffer_add_string):
12925         * reverse.c (exec_reverse_once): Constify.
12926         * rs6000-tdep.c (variant::name, variant::description): Constify.
12927         * rust-exp.y (rustyyerror): Constify.
12928         * rust-lang.c (rust_op_name): Constify.
12929         * rust-lang.h (rustyyerror): Constify.
12930         * serial.h (serial_ops::name): Constify.
12931         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12932         (sh_sh3e_register_name, sh_sh2e_register_name)
12933         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12934         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12935         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12936         (sh_sh4al_dsp_register_name): Constify.
12937         * sh64-tdep.c (sh64_register_name): Constify.
12938         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12939         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12940         * stabsread.c (patch_block_stabs, read_type_number)
12941         (ref_map::stabs, ref_add, process_reference)
12942         (symbol_reference_defined, define_symbol, define_symbol)
12943         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12944         (read_one_struct_field, read_struct_fields, read_baseclasses)
12945         (read_tilde_fields, read_struct_type, read_array_type)
12946         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12947         (read_huge_number, read_range_type, read_args, common_block_start)
12948         (find_name_end): Constify.
12949         * stabsread.h (common_block_start, define_symbol)
12950         (process_one_symbol, symbol_reference_defined, ref_add):
12951         * symfile.c (get_section_index, add_symbol_file_command):
12952         * symfile.h (get_section_index): Constify.
12953         * target-descriptions.c (tdesc_type::name): Constify.
12954         (tdesc_free_type): Add cast.
12955         * target.c (find_default_run_target):
12956         (add_deprecated_target_alias, find_default_run_target)
12957         (target_announce_detach): Constify.
12958         (do_option): Constify.
12959         * target.h (add_deprecated_target_alias): Constify.
12960         * thread.c (print_thread_info_1): Constify.
12961         * top.c (deprecated_readline_begin_hook, command_line_input):
12962         Constify.
12963         (init_main): Add casts.
12964         * top.h (handle_line_of_input): Constify.
12965         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12966         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12967         (tfind_command): Rename to ...
12968         (tfind_command_1): ... this and constify.
12969         (tfind_command): New function.
12970         (tfind_end_command, tfind_start_command): Adjust.
12971         (encode_source_string): Constify.
12972         * tracepoint.h (encode_source_string): Constify.
12973         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12974         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12975         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12976         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12977         * tui/tui-win.c (parse_scrolling_args): Constify.
12978         * tui/tui-windata.c (tui_erase_data_content): Constify.
12979         * tui/tui-windata.h (tui_erase_data_content): Constify.
12980         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12981         * tui/tui.c (tui_enable): Add cast.
12982         * utils.c (defaulted_query): Constify.
12983         (init_page_info): Add cast.
12984         (puts_debug, subset_compare): Constify.
12985         * utils.h (subset_compare): Constify.
12986         * varobj.c (varobj_format_string): Constify.
12987         * varobj.h (varobj_format_string): Constify.
12988         * vax-tdep.c (vax_register_name): Constify.
12989         * windows-nat.c (windows_detach): Constify.
12990         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12991         * xml-support.c (gdb_xml_end_element): Constify.
12992         * xml-tdesc.c (tdesc_start_reg): Constify.
12993         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12994         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12995         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12996
12997 2017-04-05  Pedro Alves  <palves@redhat.com>
12998
12999         * proc-api.c (struct trans): Constify.
13000         (procfs_note): Constify.
13001         * proc-events.c (struct trans, syscall_table):
13002         * proc-flags.c (struct trans): Constify.
13003         * proc-utils.h (procfs_note): Constify.
13004         * proc-why.c (struct trans): Constify.
13005         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13006         (procfs_detach): Constify.
13007         * sol-thread.c (struct string_map): Constify.
13008         (td_err_string, td_state_string): Constify.
13009
13010 2017-04-05  Pedro Alves  <palves@redhat.com>
13011
13012         * proc-api.c (procfs_filename): Don't initialize
13013         procfs_filename.
13014         (prepare_to_trace): Assume procfs_filename is non-NULL.
13015         (_initialize_proc_api): Give procfs_filename a default value here.
13016
13017 2017-04-05  Pedro Alves  <palves@redhat.com>
13018
13019         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13020         'cond_string' parameter.
13021         (extract_exception_regexp): Constify 'string' parameter.
13022         (catch_exception_command_1): Constify.
13023         * breakpoint.c (init_catchpoint)
13024         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13025         parameter.
13026         (ep_parse_optional_if_clause, catch_fork_command_1)
13027         (catch_exec_command_1): Constify.
13028         * breakpoint.h (init_catchpoint): Constify 'cond_string'
13029         parameter.
13030         (ep_parse_optional_if_clause): Constify.
13031         * cli/cli-utils.c (remove_trailing_whitespace)
13032         (check_for_argument): Constify.
13033         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13034         non-const overload.
13035         (check_for_argument): Likewise.
13036
13037 2017-04-05  Pedro Alves  <palves@redhat.com>
13038
13039         * event-top.c (command_line_handler): Add cast to execute_command
13040         call.
13041         * record-btrace.c (cmd_record_btrace_bts_start)
13042         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13043         (cmd_record_btrace_start): Add cast to execute_command call.
13044         * record-full.c (record_full_goto_insn):
13045         * record.c (record_start, record_stop): Add cast to
13046         execute_command_to_string calls.
13047         (cmd_record_start): Add cast to execute_command calls.
13048
13049 2017-04-05  Pedro Alves  <palves@redhat.com>
13050
13051         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13052         static inline function.
13053         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13054         array and use gdb_PyArg_ParseTupleAndKeywords.
13055         * python/py-cmd.c (cmdpy_init): Likewise.
13056         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13057         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13058         (infpy_search_memory): Likewise.
13059         * python/py-objfile.c (objfpy_add_separate_debug_file)
13060         (gdbpy_lookup_objfile): Likewise.
13061         * python/py-symbol.c (gdbpy_lookup_symbol)
13062         (gdbpy_lookup_global_symbol): Likewise.
13063         * python/py-type.c (gdbpy_lookup_type): Likewise.
13064         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13065         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13066         Likewise.
13067
13068 2017-04-05  Pedro Alves  <palves@redhat.com>
13069
13070         * python/python-internal.h (gdb_PyGetSetDef): New type.
13071         * python/py-block.c (block_object_getset)
13072         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13073         * python/py-event.c (event_object_getset)
13074         (finish_breakpoint_object_getset): Likewise.
13075         * python/py-inferior.c (inferior_object_getset): Likewise.
13076         * python/py-infthread.c (thread_object_getset): Likewise.
13077         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13078         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13079         * python/py-objfile.c (objfile_getset): Likewise.
13080         * python/py-progspace.c (pspace_getset): Likewise.
13081         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13082         Likewise.
13083         * python/py-record.c (recpy_record_getset): Likewise.
13084         * python/py-symbol.c (symbol_object_getset): Likewise.
13085         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13086         Likewise.
13087         * python/py-type.c (type_object_getset, field_object_getset):
13088         Likewise.
13089         * python/py-value.c (value_object_getset): Likewise.
13090
13091 2017-04-05  Pedro Alves  <palves@redhat.com>
13092
13093         * python/python-internal.h (gdb_PyObject_CallMethod)
13094         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13095         New functions.
13096         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13097         (PySys_GetObject, PySys_SetPath): New macros.
13098
13099 2017-04-05  Pedro Alves  <palves@redhat.com>
13100
13101         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13102         info_osdata_command.
13103         * osdata.c (info_osdata_command): Rename to ...
13104         (info_osdata): ... this.  Constify 'type' parameter, and remove
13105         the 'from_tty' parameter.  Accept NULL TYPE.
13106         (info_osdata_command): New function.
13107         * osdata.h (info_osdata_command): Remove declaration.
13108         (info_osdata): New declaration.
13109
13110 2017-04-05  Pedro Alves  <palves@redhat.com>
13111
13112         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13113         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13114         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13115         parameter.
13116         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13117         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13118         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13119         parameter.
13120         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13121         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13122         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13123         (mi_cmd_file_list_exec_source_files)
13124         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13125         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13126         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13127         parameter.
13128         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13129         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13130         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13131         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13132         (mi_cmd_stack_info_frame): Constify 'command' parameter.
13133         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13134         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13135         'command' parameter.
13136         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13137         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13138         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13139         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13140         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13141         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13142         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13143         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13144         (mi_cmd_var_set_update_range): Constify 'command' parameter.
13145         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13146         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13147         parameter.
13148         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13149         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13150         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13151         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13152         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13153         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13154         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13155         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13156         (mi_cmd_data_list_changed_registers)
13157         (mi_cmd_data_write_register_values)
13158         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13159         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13160         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13161         (mi_cmd_list_features, mi_cmd_list_target_features)
13162         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13163         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13164         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13165         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13166         (mi_cmd_trace_frame_collected): Constify 'command'
13167         parameter.
13168         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13169         'command' parameter.
13170
13171 2017-04-05  Pedro Alves  <palves@redhat.com>
13172
13173         * ada-lang.c (ada_completer_word_break_characters): Now a const
13174         array.
13175         (ada_get_gdb_completer_word_break_characters): Constify.
13176         * completer.c (gdb_completer_command_word_break_characters)
13177         (gdb_completer_file_name_break_characters)
13178         (gdb_completer_quote_characters): Now const arrays.
13179         (get_gdb_completer_quote_characters): Constify.
13180         (set_rl_completer_word_break_characters): New function.
13181         (set_gdb_completion_word_break_characters)
13182         (complete_line_internal): Use it.
13183         * completer.h (get_gdb_completer_quote_characters): Constify.
13184         (set_rl_completer_word_break_characters): Declare.
13185         * f-lang.c (f_word_break_characters): Constify.
13186         * language.c (default_word_break_characters): Constify.
13187         * language.h (language_defn::la_word_break_characters): Constify.
13188         (default_word_break_characters): Constify.
13189         * top.c (init_main): Use set_rl_completer_word_break_characters.
13190
13191 2017-04-05  Pedro Alves  <palves@redhat.com>
13192
13193         * aix-thread.c (aix_thread_pid_to_str)
13194         (aix_thread_extra_thread_info): Constify.
13195         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13196         * bsd-uthread.c (bsd_uthread_extra_thread_info)
13197         (bsd_uthread_pid_to_str): Constify.
13198         * corelow.c (core_pid_to_str): Constify.
13199         * darwin-nat.c (darwin_pid_to_str): Constify.
13200         * fbsd-nat.c (fbsd_pid_to_str): Constify.
13201         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13202         Constify.
13203         * gnu-nat.c (gnu_pid_to_str): Constify.
13204         * go32-nat.c (go32_pid_to_str): Constify.
13205         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13206         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13207         * inferior.c (inferior_pid_to_str): Constify.
13208         * linux-nat.c (linux_nat_pid_to_str): Constify.
13209         * linux-tdep.c (linux_core_pid_to_str): Constify.
13210         * linux-thread-db.c (thread_db_pid_to_str)
13211         (thread_db_extra_thread_info): Constify.
13212         * nto-tdep.c (nto_extra_thread_info): Constify.
13213         * nto-tdep.h (nto_extra_thread_info): Constify.
13214         * obsd-nat.c (obsd_pid_to_str): Constify.
13215         * procfs.c (procfs_pid_to_str): Constify.
13216         * ravenscar-thread.c (ravenscar_extra_thread_info)
13217         (ravenscar_pid_to_str): Constify.
13218         * remote-sim.c (gdbsim_pid_to_str): Constify.
13219         * remote.c (remote_threads_extra_info, remote_pid_to_str):
13220         Constify.
13221         * sol-thread.c (solaris_pid_to_str): Constify.
13222         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13223         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13224         * target.c (default_pid_to_str, target_pid_to_str)
13225         (normal_pid_to_str, default_pid_to_str): Constify.
13226         * target.h (target_ops::to_pid_to_str)
13227         (target_ops::to_extra_thread_info): Constify.
13228         (target_pid_to_str, normal_pid_to_str): Constify.
13229         * windows-nat.c (windows_pid_to_str): Constify.
13230         * gdbarch.sh (core_pid_to_str): Constify.
13231         * target-delegates.c: Regenerate.
13232         * gdbarch.h, gdbarch.c: Regenerate.
13233
13234 2017-04-05  Pedro Alves  <palves@redhat.com>
13235
13236         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13237         the memory of the temporary warning_pre_print override.
13238         * utils.c (warning_pre_print): Constify.
13239         * utils.h (warning_pre_print): Constify.
13240
13241 2017-04-05  Pedro Alves  <palves@redhat.com>
13242
13243         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13244         (shell_command): New function.
13245         (make_command): Use std::string.
13246         (init_cli_cmds): Register shell_command instead of shell_escape.
13247
13248 2017-04-05  Pedro Alves  <palves@redhat.com>
13249
13250         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13251         * tracepoint.c (default_collect): Don't initialize.
13252
13253 2017-04-05  Pedro Alves  <palves@redhat.com>
13254
13255         * macroexp.c (macro_buffer::shared): Now a bool.
13256         (init_buffer): Update.
13257         (init_shared_buffer): Constify 'addr' parameter.
13258         (substitute_args, expand, macro_expand, macro_expand_next): Remove
13259         casts.
13260
13261 2017-04-05  Pedro Alves  <palves@redhat.com>
13262
13263         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13264         * disasm.c (set_disassembler_options): Constify local.
13265         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13266
13267 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
13268
13269         PR gdb/21352
13270         * tracefile.c (tsave_command): Fix argument parsing for '-r'
13271         option.
13272
13273 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13274
13275         * frame.c (frame_unwind_register_unsigned): Call
13276         frame_unwind_register_value.
13277
13278 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13279
13280         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13281         Use gdb_test_multiple, and don't match anchor.
13282
13283 2017-04-05  Pedro Alves  <palves@redhat.com>
13284
13285         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13286         (Write After Approval): Remove Simon Marchi.
13287
13288 2017-04-05  Pedro Alves  <palves@redhat.com>
13289
13290         * common/gdb_optional.h (optional::optional): Make constexpr and
13291         initialize m_dummy.
13292
13293 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13294
13295         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13296         (amd64fbsd_jmp_buf_reg_offset): Remove.
13297         (amd64fbsd_supply_uthread): Remove function.
13298         (amd64fbsd_collect_uthread): Remove function.
13299         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13300         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13301         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13302         (fbsd-nat.c): Update comment.
13303         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13304         (i386fbsd_jmp_buf_reg_offset): Remove.
13305         (i386fbsd_supply_uthread): Remove function.
13306         (i386fbsd_collect_uthread): Remove function.
13307         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13308
13309 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13310
13311         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13312         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13313         * NEWS: Mention that support for FreeBSD/alpha was removed.
13314         * alpha-fbsd-tdep.c: Delete file.
13315         * config/alpha/fbsd.mh: Delete file.
13316         * configure.host: Delete alpha*-*-freebsd* and
13317         alpha*-*-kfreebsd*-gnu.
13318         * configure.tgt: Delete alpha*-*-freebsd* and
13319         alpha*-*-kfreebsd*-gnu.
13320
13321 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13322
13323         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13324         amd64bsd_store_inferior_registers): Use ptid from regcache.
13325
13326 2017-04-04  Pedro Alves  <palves@redhat.com>
13327
13328         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13329         data fields, make them private and add "m_" prefixes.
13330         (lnp_state_machine::lnp_state_machine): New ctor.
13331         (record_line, check_line_address, handle_set_discriminator)
13332         (handle_set_address, handle_advance_pc, handle_special_opcode)
13333         (handle_advance_line, handle_set_file, handle_negate_stmt)
13334         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13335         (end_sequence, advance_line): New methods.
13336         (m_gdbarch, m_record_lines_p): New fields.
13337         (lnp_reader_state): Delete.
13338         (dwarf_record_line): Rename to ...
13339         (lnp_state_machine::record_line): ... adjust.
13340         (init_lnp_state_machine): Delete.
13341         (lnp_state_machine::lnp_state_machine): New.
13342         (check_line_address): Rename to ...
13343         (lnp_state_machine::check_line_address): This.
13344         (dwarf_decode_lines_1): Remove reference to "reader_state".
13345         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13346         State machine internal state manipulation moved to
13347         lnp_state_machine methods.
13348
13349 2017-04-04  Pedro Alves  <palves@redhat.com>
13350
13351         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13352         unittests/offset-type-selftests.c.
13353         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13354         * common/offset-type.h: New file.
13355         * common/preprocessor.h: New file.
13356         * common/traits.h: New file.
13357         * common/valid-expr.h: New file.
13358         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13359         sect_offset and cu_offset strong typedefs throughout.
13360         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13361         typedefs throughout.
13362         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13363         sect_offset and cu_offset strong typedefs throughout.
13364         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13365         typedefs throughout.
13366         * gdbtypes.h: Include "common/offset-type.h".
13367         (cu_offset): Now an offset type (strong typedef) instead of a
13368         struct.
13369         (sect_offset): Likewise.
13370         (union call_site_parameter_u): Rename "param_offset" field to
13371         "param_cu_off".
13372         * unittests/offset-type-selftests.c: New file.
13373
13374 2017-04-04  Pedro Alves  <palves@redhat.com>
13375
13376         * common/underlying.h: New file.
13377         * dwarf2read.c: Include "common/gdb_optional.h" and
13378         "common/underlying.h".
13379         (dir_index, file_name_index): New types.
13380         (file_entry): Use them.
13381         (file_entry::include): Use to_underlying.
13382         (line_header::add_file_name): Use dir_index.
13383         (read_formatted_entries): Use gdb::optional.  Read form before
13384         writting to file_entry.
13385         (dwarf_decode_line_header): Use dir_index.
13386         (lnp_state_machine::current_file): Use to_underlying.
13387         (lnp_state_machine::file): Change type to file_name_index.
13388         (dwarf_record_line): Use to_underlying.
13389         (init_lnp_state_machine): Use file_name_index.
13390         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13391
13392 2017-04-04  Pedro Alves  <palves@redhat.com>
13393
13394         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13395         operator bool, has_value and get methods.
13396
13397 2017-04-04  Pedro Alves  <palves@redhat.com>
13398
13399         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13400         fields.
13401         (line_header): Initialize all data fields.  Change type of
13402         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13403         Change type of include_dirs to std::vector<const char *>.  Remove
13404         num_include_dirs, include_dirs_size.  Change type of file_names to
13405         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13406         (line_header::line_header): New.
13407         (line_header::add_include_dir, line_header::add_file_name): New
13408         methods.
13409         (line_header::include_dir_at): Remove NULL check.
13410         (line_header::file_name_at): Add const overload.
13411         (line_header_up): New unique_ptr typedef.
13412         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13413         std::vector.  Remove free_line_header call.
13414         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13415         free_line_header call.
13416         (free_cu_line_header): Delete.
13417         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13418         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13419         Adjust to use std::vector.
13420         (free_line_header): Delete.
13421         (free_line_header_voidp): Use delete.
13422         (add_include_dir): Replace with ...
13423         (line_header::add_include_dir): ... this method.  Use std::vector.
13424         (add_file_name): Replace with ...
13425         (line_header::add_file_name): ... this method.  Use std::vector.
13426         (add_include_dir_stub): Delete.
13427         (read_formatted_entries): Remove memset.
13428         (dwarf_decode_line_header): Return a line_header_up instead of a
13429         raw pointer.  Remove cleanup handling.  Pass lambdas to
13430         read_formatted_entries.  Adjust to use line_header methods.
13431         (dwarf_decode_lines_1): Adjust to use line_header methods.
13432         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13433         use std::vector.
13434
13435 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13436
13437         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13438         instead of struct ptid.
13439
13440 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13441
13442         * frame.c (get_frame_register_bytes): Unwind using value.
13443         (put_frame_register_bytes): Likewise.
13444
13445 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13446
13447         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13448         aggregate-like.
13449
13450 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13451
13452         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13453
13454 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13455
13456         * gdbthread.h (struct thread_info): Declare constructor and
13457         destructor.  Add some in-class member initializers.
13458         * thread.c (free_thread): Remove.
13459         (init_thread_list): Call delete instead of free_thread.
13460         (new_thread): Call thread_info constructor.
13461         (thread_info::thread_info): New function.
13462         (thread_info::~thread_info): New function.
13463         (delete_thread_1): Call delete instead of free_thread.
13464         (make_cleanup_restore_current_thread): Move tp and frame to
13465         inner block.
13466
13467 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13468
13469         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13470         (arc_skip_prologue): Likewise.
13471         (arc_make_frame_cache): Likewise.
13472         (arc_pv_get_operand): New function.
13473         (arc_is_in_prologue): Likewise.
13474         (arc_analyze_prologue): Likewise.
13475         (arc_print_frame_cache): Likewise.
13476         (MAX_PROLOGUE_LENGTH): New constant.
13477
13478 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13479
13480         * configure.tgt: Add arc-insn.o.
13481         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13482         (dump_arc_instruction_command): New function.
13483         (arc_fprintf_disasm): Likewise.
13484         (arc_disassemble_info): Likewise.
13485         (arc_insn_get_operand_value): Likewise.
13486         (arc_insn_get_operand_value_signed): Likewise.
13487         (arc_insn_get_memory_base_reg): Likewise.
13488         (arc_insn_get_memory_offset): Likewise.
13489         (arc_insn_get_branch_target): Likewise.
13490         (arc_insn_dump): Likewise.
13491         (arc_insn_get_linear_next_pc): Likewise.
13492         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13493         (arc_disassemble_info): Likewise.
13494         (arc_insn_get_branch_target): Likewise.
13495         (arc_insn_get_linear_next_pc): Likewise.
13496         * NEWS: Mention new "maint print arc arc-instruction".
13497
13498 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13499
13500         * arc-tdep (maintenance_print_arc_list): New variable.
13501         (maintenance_print_arc_command): New function.
13502
13503 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13504
13505         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13506         Add "limm" and "reserved".
13507         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13508         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13509         * arc-tdep.h (arc_regnum): Likewise.
13510
13511 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13512
13513         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13514         for THREADPTR register.
13515         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13516         register.
13517         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13518         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13519         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13520
13521 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13522
13523         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13524         registers above gdbarch_num_regs (gdbarch) as privileged in
13525         call0 ABI.
13526
13527 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13528
13529         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13530         for a single specified register or for all registers in
13531         a0_base..a0_base + C0_NREGS range.
13532         (supply_gregset_reg): Call regcache_raw_supply for a single
13533         specified register or for all registers in a0_base..a0_base +
13534         C0_NREGS range.
13535
13536 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13537
13538         * arch/xtensa.h (C0_NREGS): Add definition.
13539         * xtensa-tdep.c (C0_NREGS): Remove definition.
13540
13541 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13542
13543         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13544         Drop xtensa_default_isa initialization.
13545         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13546
13547 2017-03-27  Pedro Alves  <palves@redhat.com>
13548
13549         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13550         (file_entry::include_dir): New method.
13551         (line_header::include_dir_at, line_header::file_name_at): New
13552         methods.
13553         (setup_type_unit_groups, setup_type_unit_groups)
13554         (psymtab_include_file_name): Simplify using the new methods.
13555         (lnp_state_machine) <the_line_header>: New field.
13556         <file>: Add comment.
13557         (lnp_state_machine::current_file): New method.
13558         (dwarf_record_line): Simplify using the new methods.
13559         (init_lnp_state_machine): Initialize the "the_line_header" field.
13560         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13561         Simplify using the new methods.
13562
13563 2017-03-27  Pedro Alves  <palves@redhat.com>
13564
13565         * cp-name-parser.y (make_empty): Delete.
13566         (demangler_special, nested_name, ptr_operator, array_indicator)
13567         (direct_declarator, declarator_1): Use fill_comp instead of
13568         make_empty.
13569
13570 2017-03-27  Pedro Alves  <palves@redhat.com>
13571
13572         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13573         to ATTRIBUTE_PRINTF.
13574         * solib-target.c (library_list_start_list): Print "string" not
13575         "version".
13576         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13577         gdb_xml_error call.
13578
13579 2017-03-27  Pedro Alves  <palves@redhat.com>
13580
13581         * dwarf2read.c (struct file_and_directory): New.
13582         (dwarf2_get_dwz_file): Adjust to use std::string.
13583         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13584         (find_file_and_directory): Adjust to return a file_and_directory
13585         object.
13586         (read_file_scope): Adjust to use file_and_directory.  Remove
13587         make_cleanup/do_cleanups calls.
13588         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13589         make_cleanup/do_cleanups calls.
13590         * python/python.c (do_start_initialization): Adjust to ldirname
13591         returning a std::string.
13592         * utils.c (ldirname): Now returns a std::string.
13593         * utils.h (ldirname): Change return type to std::string.
13594         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13595         returning a std::string.
13596         * xml-tdesc.c (file_read_description_xml): Likewise.
13597
13598 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13599
13600         * regcache.c (regcache_debug_print_register): New function.
13601         * regcache.h (regcache_debug_print_register): New declaration.
13602         * target.c (debug_print_register): Remove.
13603         (target_fetch_registers): Call regcache_debug_print_register.
13604         (target_store_registers): Likewise.
13605
13606 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13607
13608         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13609         reference beyond the 'lh->include_dirs' array before accessing to
13610         it.
13611         (psymtab_include_file_name): Likewise.
13612         (dwarf_decode_lines_1): Likewise.
13613         (dwarf_decode_lines): Likewise.
13614         (file_file_name): Likewise.
13615
13616 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13617
13618         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13619         inferior_ptid.
13620         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13621         ps_lsetfpregs): Likewise.
13622         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13623         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13624         ps_lsetfpregs): Likewise.
13625         * target.c (target_fetch_registers, target_store_registers):
13626         Remove asserts.
13627
13628 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13629
13630         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13631
13632 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13633
13634         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13635         (_initialize_aarch64_tdep): Register it.
13636         (aarch64_record_load_store): Handle PRFM instruction.
13637         (aarch64_process_record_test): New function.
13638
13639 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13640
13641         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13642         indentation.
13643
13644 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13645
13646         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13647
13648 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13649
13650         python/python.c (do_start_initialization): Fix memory leak.
13651
13652 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13653
13654         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13655         using get_ptrace_pid.
13656         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13657         inferior_ptid.
13658         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13659         inferior_ptid instead of pid.
13660
13661 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13662
13663         * aarch64-tdep.c: Wrap locally used classes in anonymous
13664         namespace.
13665         * arm-tdep.c: Likewise.
13666         * linespec.c: Likewise.
13667         * ui-out.c: Likewise.
13668
13669 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13670
13671         PR gdb/19637
13672         * python/lib/gdb/printer/bound_registers.py: Import sys.
13673
13674 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13675
13676         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13677         windows_thread_info parameter and use it instead of
13678         current_thread.
13679         (windows_fetch_inferior_registers): Don't set current_thread,
13680         pass the thread to do_windows_fetch_inferior_registers.  Use
13681         ptid from regcache instead of inferior_ptid.
13682         (do_windows_store_inferior_registers): Add windows_thread_info
13683         parameter and use it instead of current_thread.
13684         (windows_store_inferior_registers): Don't set current_thread,
13685         pass the thread to do_windows_store_inferior_registers.  Use
13686         ptid from regcache instead of inferior_ptid.
13687
13688 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13689
13690         * ser-mingw.c (ser_windows_raw): Remove reference to
13691         struct serial::current_timeout.
13692
13693 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13694
13695         PR tdep/20928
13696         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13697         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13698         (sparc64_fsr_type): Fix %fsr decoding.
13699
13700 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13701
13702         * python/py-record-btrace.c (btpy_insn_data): Change return type
13703         for Python 2.
13704
13705 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13706
13707         * spu-linux-nat.c (spu_fetch_inferior_registers,
13708         spu_store_inferior_registers): Use ptid from regcache, set and
13709         restore inferior_ptid.
13710         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13711         Likewise.
13712
13713 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13714
13715         * i386-linux-nat.c (fetch_register, store_register,
13716         i386_linux_fetch_inferior_registers,
13717         i386_linux_store_inferior_registers): Use ptid from regcache.
13718         * ia64-linux-nat.c (ia64_linux_fetch_register,
13719         ia64_linux_store_register): Likewise.
13720         * inf-ptrace.c (inf_ptrace_fetch_register,
13721         inf_ptrace_store_register): Likewise.
13722         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13723         m32r_linux_store_inferior_registers): Likewise.
13724         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13725         m68kbsd_store_inferior_registers): Likewise.
13726         * m68k-linux-nat.c (fetch_register, store_register,
13727         m68k_linux_fetch_inferior_registers,
13728         m68k_linux_store_inferior_registers): Likewise.
13729         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13730         m88kbsd_store_inferior_registers): Likewise.
13731         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13732         mips_fbsd_store_inferior_registers): Likewise.
13733         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13734         mips64_linux_regsets_store_registers): Likewise.
13735         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13736         mipsnbsd_store_inferior_registers): Likewise.
13737         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13738         mips64obsd_store_inferior_registers): Likewise.
13739         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13740         Likewise.
13741         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13742         ppcfbsd_store_inferior_registers): Likewise.
13743         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13744         ppc_linux_store_inferior_registers): Likewise.
13745         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13746         ppcnbsd_store_inferior_registers): Likewise.
13747         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13748         ppcobsd_store_registers): Likewise.
13749         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13750         Likewise.
13751         * ravenscar-thread.c (ravenscar_fetch_registers,
13752         ravenscar_store_registers, ravenscar_prepare_to_store):
13753         Likewise.
13754         * record-btrace.c (record_btrace_fetch_registers,
13755         record_btrace_store_registers, record_btrace_prepare_to_store):
13756         Likewise.
13757         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13758         Lookup inferior using ptid from regcache, instead of
13759         current_inferior.
13760         * remote.c (remote_fetch_registers, remote_store_registers): Use
13761         ptid from regcache.
13762         * rs6000-nat.c (fetch_register, store_register): Likewise.
13763         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13764         s390_linux_store_inferior_registers): Likewise.
13765         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13766         shnbsd_store_inferior_registers): Likewise.
13767         * sol-thread.c (sol_thread_fetch_registers,
13768         sol_thread_store_registers): Likewise.
13769         * sparc-nat.c (sparc_fetch_inferior_registers,
13770         sparc_store_inferior_registers): Likewise.
13771         * tilegx-linux-nat.c (fetch_inferior_registers,
13772         store_inferior_registers): Likewise.
13773         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13774         vaxbsd_store_inferior_registers): Likewise.
13775         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13776         store_xtregs): Likewise.
13777
13778 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13779
13780         PR gdb/14441
13781         * NEWS: Mention support for rvalue references in GDB and python.
13782         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13783         supports both lvalue and rvalue references.
13784
13785 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13786
13787         PR gdb/14441
13788         * gdbtypes.c (rank_one_type): Implement overloading
13789         resolution rules regarding rvalue references.
13790
13791 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13792
13793         PR gdb/14441
13794         * aarch64-tdep.c (aarch64_type_align)
13795         (aarch64_extract_return_value, aarch64_store_return_value): Change
13796         lvalue reference type checks to general reference type checks.
13797         * amd64-tdep.c (amd64_classify): Likewise.
13798         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13799         Likewise.
13800         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13801         (arm_store_return_value): Likewise.
13802         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13803         * c-typeprint.c (c_print_type): Likewise.
13804         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13805         (cplus_number_of_children, cplus_describe_child): Likewise.
13806         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13807         * completer.c (expression_completer): Likewise.
13808         * cp-support.c (make_symbol_overload_list_adl_namespace):
13809         Likewise.
13810         * darwin-nat-info.c (info_mach_region_command): Likewise.
13811         * dwarf2loc.c (entry_data_value_coerce_ref)
13812         (value_of_dwarf_reg_entry): Likewise.
13813         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13814         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13815         Likewise.
13816         * findvar.c (extract_typed_address, store_typed_address):
13817         Likewise.
13818         * gdbtypes.c (rank_one_type): Likewise.
13819         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13820         * infcall.c (value_arg_coerce): Likewise.
13821         * language.c (pointer_type): Likewise.
13822         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13823         Likewise.
13824         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13825         * mn10300-tdep.c (mn10300_type_align): Likewise.
13826         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13827         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13828         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13829         Likewise.
13830         * printcmd.c (print_formatted, x_command): Likewise.
13831         * python/py-type.c (typy_get_composite, typy_template_argument):
13832         Likewise.
13833         * python/py-value.c (valpy_referenced_value)
13834         (valpy_get_dynamic_type, value_has_field): Likewise.
13835         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13836         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13837         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13838         * spu-tdep.c (spu_scalar_value_p): Likewise.
13839         * symtab.c (lookup_symbol_aux): Likewise.
13840         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13841         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13842         Likewise.
13843         * valops.c (value_cast_pointers, value_cast)
13844         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13845         (value_struct_elt, value_struct_elt_bitpos)
13846         (value_find_oload_method_list, find_overload_match)
13847         (value_rtti_indirect_type): Likewise.
13848         * valprint.c (val_print_scalar_type_p, generic_val_print):
13849         Likewise.
13850         * value.c (value_actual_type, value_as_address, unpack_long)
13851         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13852         (coerce_ref): Likewise.
13853         * varobj.c (varobj_get_value_type): Likewise.
13854
13855 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13856
13857         PR gdb/14441
13858         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13859         table of constants.
13860         * python/lib/gdb/command/explore.py: Support exploring values
13861         of rvalue reference types.
13862         * python/lib/gdb/types.py: Implement get_basic_type() for
13863         rvalue reference types.
13864         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13865         constant.
13866         * python/py-value.c (valpy_getitem): Add an rvalue reference
13867         check.
13868         (valpy_reference_value): Add new parameter "refcode".
13869         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13870         New wrappers for valpy_reference_value().
13871         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13872         (gdbpy_invoke_xmethod): Likewise.
13873
13874 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13875
13876         PR gdb/14441
13877         * dwarf2read.c (process_die, read_type_die_1): Handle the
13878         DW_TAG_rvalue_reference_type DIE.
13879         (read_tag_reference_type): Add new parameter "refcode".
13880
13881 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13882
13883         PR gdb/14441
13884         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13885         (c_type_print_modifier, c_type_print_varspec_suffix)
13886         (c_type_print_base): Support printing rvalue reference types.
13887         * c-valprint.c (c_val_print, c_value_print): Support printing
13888         rvalue reference values.
13889
13890 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13891
13892         PR gdb/14441
13893         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13894         typename.
13895         * cp-support.c (replace_typedefs): Handle
13896         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13897         * python/py-type.c (typy_lookup_type): Likewise.
13898
13899 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13900
13901         PR gdb/14441
13902         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13903         * parse.c (insert_type): Change assert statement.
13904         (follow_types): Handle rvalue reference types.
13905         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13906         constant.
13907
13908 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13909
13910         PR gdb/14441
13911         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13912         value_ref() interface.
13913         * c-valprint.c (c_value_print): Likewise.
13914         * infcall.c (value_arg_coerce): Likewise.
13915         * python/py-value.c (valpy_reference_value): Likewise.
13916         * valops.c (value_cast, value_reinterpret_cast)
13917         (value_dynamic_cast, typecmp): Likewise.
13918         (value_ref): Parameterize by kind of return value reference type.
13919         * value.h (value_ref): Add new parameter "refcode".
13920
13921 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13922
13923         PR gdb/14441
13924         * dwarf2read.c (read_tag_reference_type): Use
13925         lookup_lvalue_reference_type() instead of lookup_reference_type().
13926         * eval.c (evaluate_subexp_standard): Likewise.
13927         * f-exp.y: Likewise.
13928         * gdbtypes.c (make_reference_type, lookup_reference_type):
13929         Generalize with rvalue reference types.
13930         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13931         convenience wrappers for lookup_reference_type().
13932         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13933         reference kind parameter.
13934         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13935         wrappers for lookup_reference_type().
13936         * guile/scm-type.c (gdbscm_type_reference): Use
13937         lookup_lvalue_reference_type() instead of lookup_reference_type().
13938         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13939         * parse.c (follow_types): Likewise.
13940         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13941         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13942         Likewise.
13943         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13944         (gdbpy_invoke_xmethod): Likewise.
13945         * stabsread.c: Provide extra argument to make_reference_type()
13946         call.
13947         * valops.c (value_ref, value_rtti_indirect_type): Use
13948         lookup_lvalue_reference_type() instead of lookup_reference_type().
13949
13950 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13951
13952         PR gdb/14441
13953         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13954         (TYPE_IS_REFERENCE): New macro.
13955         (struct type): Add rvalue_reference_type field.
13956         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13957
13958 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13959
13960         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13961         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13962         New function definition.
13963         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13964         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13965         New function declaration.
13966         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13967         * mi/mi-interp.h: New file.
13968         * solib.c (info_sharedlibrary_command): Replace for loop with
13969         ALL_SO_LIBS macro
13970         * solib.h (update_solib_list): New function declaration.
13971         (so_list_head): Move macro.
13972         * solist.h (ALL_SO_LIBS): New macro.
13973
13974 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13975
13976         * infcmd.c (post_create_inferior): Remove unused argument in
13977         call to solib_add.
13978         * remote.c (remote_start_remote): Likewise.
13979         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13980         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13981         (enable_break): Likewise.
13982         * solib.c (update_solib_list): Remove unused target argument
13983         and its documentation.
13984         (solib_add): Remove unused target argument.  Remove unused
13985         argument in call to update_solib_list.
13986         (info_sharedlibrary_command): Remove unused argument in call
13987         to update_solib_list.
13988         (sharedlibrary_command): Remove unused argument in call to
13989         solib_add.
13990         (handle_solib_event): Likewise.
13991         (reload_shared_libraries): Likewise.
13992         * solib.h (solib_add): Remove unused target argument.
13993
13994 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13995
13996         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13997         (s390_displaced_step_fixup): Cover relative branches with the
13998         default fixup handling.  This fixes lack of support for some
13999         relative branch instructions.
14000
14001 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14002
14003         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14004         ptid from regcache.
14005
14006 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14007
14008         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14009         i386_darwin_store_inferior_registers): Use ptid from regcache.
14010
14011 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14012
14013         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14014         i386bsd_store_inferior_registers): Use ptid from regcache.
14015
14016 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14017
14018         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14019         hppaobsd_store_registers): Use ptid from regcache.
14020
14021 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14022
14023         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14024         hppanbsd_store_registers): Use ptid from regcache.
14025
14026 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14027
14028         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14029         from regcache.  Use get_ptrace_pid.
14030
14031 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14032
14033         * corelow.c (get_core_register_section): Use ptid from regcache,
14034         update doc.
14035
14036 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14037
14038         * bsd-uthread.c (bsd_uthread_fetch_registers,
14039         bsd_uthread_store_registers): Use ptid from regcache, set and
14040         restore inferior_ptid.
14041
14042 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14043
14044         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14045         fetch_fp_regs, store_register, store_regs, store_fp_register,
14046         store_fp_regs): Use ptid from regcache.
14047
14048 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14049
14050         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14051         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14052         store_vfp_regs): Use ptid from regcache.
14053
14054 2017-03-17  Pedro Alves  <palves@redhat.com>
14055
14056         PR remote/21188
14057         * ser-base.c (ser_base_wait_for): Add comment.
14058         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14059         version.
14060         * ser-unix.c (hardwire_raw): Remove reference to
14061         scb->current_timeout.
14062         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14063         (hardwire_ops): Install ser_base_readchar instead of
14064         hardwire_readchar.
14065         * serial.h (struct serial) <current_timeout, timeout_remaining>:
14066         Remove fields.
14067
14068 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
14069
14070         PR gdb/19637
14071         * python/lib/gdb/printer/bound_registers.py: Add support for
14072         Python 3.
14073
14074 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14075
14076         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14077         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14078         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14079         byte_offset to subobj_byte_offset.  Fix the handling of
14080         DWARF_VALUE_STACK on big-endian targets when coming via an
14081         implicit pointer.
14082         (dwarf2_evaluate_loc_desc): Adjust call to
14083         dwarf2_evaluate_loc_desc_full.
14084         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14085         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14086
14087 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14088
14089         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14090         and REVSH instructions.
14091
14092 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14093
14094         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14095         (arm_record_test): Declare.
14096         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14097         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14098         align with the manual.
14099         (thumb_record_misc): Adjust the code order to align with the
14100         manual.
14101         (thumb2_record_decode_insn_handler): Fix instruction matching.
14102         (instruction_reader_thumb): New class.
14103         (arm_record_test): New function.
14104
14105 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14106
14107         * arm-tdep.c (abstract_memory_reader): New class.
14108         (instruction_reader): New class.
14109         (extract_arm_insn): Add argument 'reader'.  Callers updated.
14110         (decode_insn): Likewise.
14111
14112 2017-03-16  Doug Evans  <dje@google.com>
14113
14114         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14115         member.  Change type of TYPE member to SCM.  All uses updated.
14116         (lsscm_make_lazy_string_smob): Add assert.
14117         (lsscm_make_lazy_string): Flag bad length values.
14118         (lsscm_elt_type): New function.
14119         (gdbscm_lazy_string_to_value): Rewrite to use
14120         lsscm_safe_lazy_string_to_value.
14121         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14122         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14123         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
14124         in incoming type.
14125         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14126         * guile/scm-type.c (tyscm_scm_to_type): New function.
14127
14128 2017-03-15  Doug Evans  <dje@google.com>
14129
14130         PR python/17728, python/18439, python/18779
14131         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14132         member.  Change type of TYPE member to PyObject *.  All uses updated.
14133         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14134         (gdbpy_create_lazy_string_object): Flag bad length values.
14135         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14136         Handle typedefs in incoming type.
14137         (stpy_lazy_string_elt_type): New function.
14138         (gdbpy_extract_lazy_string): Call it.
14139         * python/py-value.c (valpy_lazy_string): Flag bad length values.
14140         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
14141         typedefs in incoming type.
14142
14143 2017-03-16  Doug Evans  <dje@google.com>
14144
14145         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14146         * guile/scm-type.c (tyscm_scm_to_type): New function.
14147
14148 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
14149
14150         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14151         "ULONGEST" for "skip".
14152
14153 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14154
14155         PR gdb/21220
14156         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14157         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14158         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
14159         over ptrace peek/poke until end of buffer or error.
14160
14161 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
14162
14163         * parse.c (length_of_subexp): Make static.
14164         * parser-defs.h (length_of_subexp): Remove.
14165
14166 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14167
14168         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14169         as well.
14170
14171 2017-03-14  Pedro Alves  <palves@redhat.com>
14172
14173         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14174         (main): Use std::unique_ptr.  Remove calls to
14175         cp_demangled_name_parse_free.
14176
14177 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14178
14179         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14180         alphabsd_store_inferior_registers): Use regcache->ptid instead
14181         of inferior_ptid.
14182
14183 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14184
14185         * aix-thread.c (aix_thread_fetch_registers,
14186         aix_thread_store_registers): Use regcache->ptid instead of
14187         inferior_ptid.
14188
14189 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14190
14191         * aarch64-linux-nat.c (fetch_gregs_from_thread,
14192         store_gregs_to_thread, fetch_fpregs_from_thread,
14193         store_fpregs_to_thread): Use regcache->ptid instead of
14194         inferior_ptid.
14195
14196 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14197
14198         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14199         amd64_linux_fetch_inferior_registers): Use regcache->ptid
14200         instead of inferior_ptid.
14201
14202 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14203
14204         * target.c (target_fetch_registers, target_store_registers): Add
14205         assert.
14206
14207 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14208
14209         * regcache.h (regcache_get_ptid): New function.
14210         * regcache.c (regcache_get_ptid): New function.
14211
14212 2017-03-13  Mark Wielaard  <mark@klomp.org>
14213
14214         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14215
14216 2017-03-10  Keith Seitz  <keiths@redhat.com>
14217
14218         PR c++/8218
14219         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14220
14221 2017-03-08  Pedro Alves  <palves@redhat.com>
14222
14223         PR gdb/18360
14224         * infrun.c (start_step_over, do_target_resume, resume)
14225         (restart_threads): Assert we're not resuming a thread that is
14226         meant to be stopped.
14227         (infrun_thread_stop_requested_callback): Delete.
14228         (infrun_thread_stop_requested): If the thread is internally
14229         stopped, queue a pending stop event and clear the thread's
14230         inline-frame state.
14231         (handle_stop_requested): New function.
14232         (handle_syscall_event, handle_inferior_event_1): Use
14233         handle_stop_requested.
14234         (handle_stop_requested): New function.
14235         (handle_signal_stop): Set the thread's stop_signal here instead of
14236         at caller.
14237         (finish_step_over): Clear step over info unconditionally.
14238         (handle_signal_stop): If the user had interrupted the event
14239         thread, consider the stop a random signal.
14240         (handle_signal_stop) <signal arrived while stepping over
14241         breakpoint>: Don't restart threads here.
14242         (stop_waiting): Don't clear step-over info here.
14243
14244 2017-03-08  Pedro Alves  <palves@redhat.com>
14245
14246         PR 21206
14247         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14248         goes to argument 2, not 1.
14249
14250 2017-03-08  Pedro Alves  <palves@redhat.com>
14251
14252         PR cli/21218
14253         * top.c (gdb_readline_wrapper): Avoid passing NULL to
14254         display_gdb_prompt.
14255         (command_line_input): Add comment.
14256
14257 2017-03-08  Pedro Alves  <palves@redhat.com>
14258
14259         PR tui/21216
14260         * tui/tui-file.c (tui_file::write): New.
14261         * tui/tui-file.h (tui_file): Override "write".
14262         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14263         factored out from ...
14264         (tui_puts): ... here.
14265         (tui_putc): Use them.
14266         (tui_write): New function.
14267         * tui/tui-io.h (tui_write): Declare.
14268
14269 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
14270
14271         * Makefile.in (SFILES): Replace "environ.c" with
14272         "common/environ.c".
14273         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14274         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
14275         to...
14276         * common/environ.c: ... here.
14277         * environ.h: Moved to...
14278         * common/environ.h: ... here.
14279
14280 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14281
14282         * gdbarch.sh (pstring_ptr): New static function.
14283         (gdbarch_disassembler_options): Use it.
14284         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14285         not valid_disassembler_option->name.
14286         * gdbarch.c: Regenerate.
14287
14288 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14289
14290         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14291
14292 2017-03-07  Pedro Alves  <palves@redhat.com>
14293
14294         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14295
14296 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14297
14298         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14299         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14300         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14301         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14302
14303 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14304
14305         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14306
14307 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14308
14309         * remote.c (remote_add_target_side_commands): Use range-based
14310         for loop.
14311
14312 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14313
14314         PR gdb/21165
14315         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14316         value is lazy.
14317         * valprint.c (common_val_print): Likewise.
14318
14319 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14320
14321         * NEWS: Mention new set/show disassembler-options commands.
14322         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14323         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14324         (prospective_options): New static variable.
14325         (gdb_disassembler::gdb_disassembler): Initialize
14326         m_di.disassembler_options.
14327         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14328         (get_disassembler_options): New function.
14329         (set_disassembler_options): Likewise.
14330         (set_disassembler_options_sfunc): Likewise.
14331         (show_disassembler_options_sfunc): Likewise.
14332         (disassembler_options_completer): Likewise.
14333         (_initialize_disasm): Likewise.
14334         * disasm.h (get_disassembler_options): New prototype.
14335         (set_disassembler_options): Likewise.
14336         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14337         (gdbarch_verify_disassembler_options): Likewise.
14338         * gdbarch.c: Regenerate.
14339         * gdbarch.h: Likewise.
14340         * arm-tdep.c (num_disassembly_options): Delete.
14341         (set_disassembly_style): Likewise.
14342         (arm_disassembler_options): New static variable.
14343         (set_disassembly_style_sfunc): Convert short style name into long
14344         option name.  Call set_disassembler_options.
14345         (show_disassembly_style_sfunc): New function.
14346         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14347         set_gdbarch_verify_disassembler_options.
14348         (_initialize_arm_tdep): Delete regnames variable and update callers.
14349         (arm_disassembler_options): Initialize.
14350         (disasm_options): New variable.
14351         (num_disassembly_options): Rename from this...
14352         (num_disassembly_styles): ...to this.  Compute by scanning through
14353         disasm_options.
14354         (valid_disassembly_styles): Initialize using disasm_options.
14355         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14356         set_arm_regname_option.
14357         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14358         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14359         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14360         set_gdbarch_verify_disassembler_options.
14361         * s390-tdep.c (s390_disassembler_options): New static variable.
14362         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14363         set_gdbarch_verify_disassembler_options.
14364
14365 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14366
14367         * remote.c (remote_add_target_side_condition): Remove "struct"
14368         keyword from range-based for loop.
14369
14370 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14371
14372         * remote.c (remote_add_target_side_condition): Use range-based
14373         for loop.  Update comment.
14374
14375 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14376
14377         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14378
14379 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14380
14381         * regcache.c (regcache_raw_update): New function.
14382         (regcache_raw_read): Move code to regcache_raw_update.
14383         * regcache.h (regcache_raw_update): New declaration.
14384         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14385
14386 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14387
14388         * dwarf2read.c (create_debug_type_hash_table): Initialize
14389         header.signature and header.type_offset_in_tu.
14390
14391 2017-02-24  Pedro Alves  <palves@redhat.com>
14392
14393         * symtab.c (make_file_symbol_completion_list_1): Use
14394         add_symtab_completions.
14395
14396 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14397
14398         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14399
14400 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14401
14402         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14403         I386_MAX_REGISTER_SIZE.
14404         (i386_pseudo_register_write): Likewise.
14405         (i386_process_record): Likewise.
14406         * i387-tdep.c (i387_supply_xsave): Likewise.
14407         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14408         (store_register): Likewise.
14409
14410 2017-02-23  Pedro Alves  <palves@redhat.com>
14411
14412         * ada-lang.c: Include "common/function-view.h".
14413         (ada_iterate_over_symbols): Adjust to use function_view as
14414         callback type.
14415         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14416         (ada_make_symbol_completion_list): Use a lambda.
14417         (ada_exc_search_name_matches): Delete.
14418         (name_matches_regex): New.
14419         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14420         * compile/compile-c-support.c: Include "common/function-view.h".
14421         (print_one_macro): Change prototype to accept a ui_file pointer.
14422         (write_macro_definitions): Use a lambda.
14423         * dwarf2read.c: Include "common/function-view.h".
14424         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14425         (dw2_expand_symtabs_matching): Adjust to use function_view as
14426         callback type.
14427         * language.h: Include "common/function-view.h".
14428         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14429         function_view as callback type.
14430         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14431         * linespec.c: Include "common/function-view.h".
14432         (collect_info::add_symbol): New method.
14433         (struct symbol_and_data_callback, iterate_inline_only, struct
14434         symbol_matcher_data, iterate_name_matcher): Delete.
14435         (iterate_over_all_matching_symtabs): Adjust to use function_view
14436         as callback type and lambdas.
14437         (iterate_over_file_blocks): Adjust to use function_view as
14438         callback type.
14439         (decode_compound_collector): Now a class with private fields.
14440         (decode_compound_collector::release_symbols): New method.
14441         (collect_one_symbol): Rename to...
14442         (decode_compound_collector::operator()): ... this and adjust.
14443         (lookup_prefix_sym): decode_compound_collector construction bits
14444         move to decode_compound_collector ctor.  Pass the
14445         decode_compound_collector object directly as callback.  Remove
14446         cleanups and use decode_compound_collector::release_symbols
14447         instead.
14448         (symtab_collector): Now a class with private fields.
14449         (symtab_collector::release_symtabs): New method.
14450         (add_symtabs_to_list): Rename to...
14451         (symtab_collector::operator()): ... this and adjust.
14452         (collect_symtabs_from_filename): symtab_collector construction
14453         bits move to symtab_collector ctor.  Pass the symtab_collector
14454         object directly as callback.  Remove cleanups and use
14455         symtab_collector::release_symtabs instead.
14456         (collect_symbols): Delete.
14457         (add_matching_symbols_to_info): Use lambdas.
14458         * macrocmd.c (print_macro_callback): Delete.
14459         (info_macro_command): Use a lambda.
14460         (info_macros_command): Pass print_macro_definition as callable
14461         directly.
14462         (print_one_macro): Remove 'ignore' parameter.
14463         (macro_list_command): Adjust.
14464         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14465         (macro_for_each_data::user_data): Delete field.
14466         (foreach_macro): Adjust to call the function_view.
14467         (macro_for_each): Adjust to use function_view as callback type.
14468         (foreach_macro_in_scope): Adjust to call the function_view.
14469         (macro_for_each_in_scope): Adjust to use function_view as callback
14470         type.
14471         * macrotab.h: Include "common/function-view.h".
14472         (macro_callback_fn): Declare a prototype instead of a pointer.
14473         Remove "user_data" parameter.
14474         (macro_for_each, macro_for_each_in_scope): Adjust to use
14475         function_view as callback type.
14476         * psymtab.c (partial_map_expand_apply)
14477         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14478         Adjust to use function_view as callback type and to return bool.
14479         (psym_expand_symtabs_matching): Adjust to use function_view as
14480         callback types.
14481         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14482         to use function_view as callback type and to return bool.
14483         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14484         callback types.
14485         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14486         as callback types.
14487         * symfile.h: Include "common/function-view.h".
14488         (expand_symtabs_file_matcher_ftype)
14489         (expand_symtabs_symbol_matcher_ftype)
14490         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14491         return bool.
14492         (quick_symbol_functions::map_symtabs_matching_filename)
14493         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14494         function_view as callback type and return bool.
14495         (expand_symtabs_matching): Adjust to use function_view as callback
14496         type.
14497         (maintenance_expand_name_matcher)
14498         (maintenance_expand_file_matcher): Delete.
14499         (maintenance_expand_symtabs): Use lambdas.
14500         * symtab.c (iterate_over_some_symtabs): Adjust to use
14501         function_view as callback types and return bool.
14502         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14503         of a cleanup.
14504         (lookup_symtab_callback): Delete.
14505         (lookup_symtab): Use a lambda.
14506         (iterate_over_symbols): Adjust to use function_view as callback
14507         type.
14508         (struct search_symbols_data, search_symbols_file_matches)
14509         (search_symbols_name_matches): Delete.
14510         (search_symbols): Use a pair of lambdas.
14511         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14512         (symtab_expansion_callback): Delete.
14513         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14514         * symtab.h: Include "common/function-view.h".
14515         (iterate_over_some_symtabs): Adjust to use function_view as
14516         callback type and return bool.
14517         (iterate_over_symtabs): Adjust to use function_view as callback
14518         type.
14519         (symbol_found_callback_ftype): Remove 'data' parameter and return
14520         bool.
14521         (iterate_over_symbols): Adjust to use function_view as callback
14522         type.
14523
14524 2017-02-23  Pedro Alves  <palves@redhat.com>
14525
14526         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14527         (%.o) <unittests/%.c>: New pattern.
14528         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14529         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14530         * common/function-view.h: New file.
14531         * unittests/function-view-selftests.c: New file.
14532         * configure: Regenerate.
14533
14534 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14535
14536         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14537         inferior_ptid.
14538         * go32-nat.c (go32_thread_alive): Likewise.
14539
14540 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14541
14542         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14543         delete.
14544
14545 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14546
14547         * varobj.c (varobj_clear_saved_item): Use delete instead of
14548         xfree.
14549         (update_dynamic_varobj_children): Likewise.
14550
14551 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14552
14553         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14554
14555 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14556
14557         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14558         m_enum_value to 0 in default constructor.
14559
14560 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14561
14562         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14563         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14564         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14565         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14566         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14567         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14568         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14569         IS_STORE_CONDITIONAL_INSN.
14570
14571 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14572
14573         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14574
14575 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14576
14577         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14578
14579 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14580
14581         * dwarf2read.c (skip_one_die, read_attribute_value)
14582         (dwarf2_const_value_attr, dump_die_shallow)
14583         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14584         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14585
14586 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14587
14588         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14589         (dwarf_parse_macro_header): Accept DWARF version 5.
14590         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14591
14592 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14593
14594         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14595         DW_AT_GNU_*.
14596         * common/common-exceptions.h (enum errors): Likewise.
14597         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14598         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14599         (dwarf_expr_context::execute_stack_op): Likewise.
14600         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14601         Likewise.
14602         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14603         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14604         (show_entry_values_debug, call_site_to_target_addr)
14605         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14606         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14607         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14608         (value_of_dwarf_block_entry, indirect_pieced_value)
14609         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14610         (disassemble_dwarf_expression): Likewise.
14611         * dwarf2read.c (process_die, inherit_abstract_dies)
14612         (read_call_site_scope): Likewise.
14613         * gdbtypes.h (struct func_type, struct call_site_parameter)
14614         (struct call_site): Likewise.
14615         * stack.c (read_frame_arg): Likewise.
14616         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14617
14618 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14619
14620         * defs.h (read_unsigned_leb128): New declaration.
14621         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14622         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14623         (dwarf2_find_location_expression): Call also
14624         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14625         * dwarf2loc.h (dwarf2_version): New declaration.
14626         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14627         rnglists.
14628         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14629         .debug_rnglists.
14630         (struct dwop_section_names): Add loclists_dwo.
14631         (dwop_section_names): Add .debug_loclists.dwo.
14632         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14633         (struct dwarf2_per_cu_data): Add dwarf_version.
14634         (struct dwo_sections): Add loclists.
14635         (struct attr_abbrev): Add implicit_const.
14636         (read_indirect_line_string): New declaration.
14637         (read_unsigned_leb128): Delete declaration.
14638         (rcuh_kind): New definition.
14639         (read_and_check_comp_unit_head): Change parameter
14640         is_debug_types_section to section_kind.
14641         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14642         (read_comp_unit_head): Change parameter abfd to section, add parameter
14643         section_kind.  Handle DWARF-5.
14644         (error_check_comp_unit_head): Accept also DWARF version 5.
14645         (read_and_check_comp_unit_head): Change parameter
14646         is_debug_types_section to section_kind.
14647         (read_and_check_type_unit_head): Delete function.
14648         (read_abbrev_offset): Handle DWARF-5.
14649         (create_debug_type_hash_table): Add parameter section_kind.  Process
14650         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14651         comp_unit_head.
14652         (create_debug_types_hash_table): Update create_debug_type_hash_table
14653         caller.
14654         (create_all_type_units): Call create_debug_type_hash_table.
14655         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14656         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14657         caller.
14658         (skip_one_die): Handle DW_FORM_implicit_const.
14659         (dwarf2_rnglists_process): New function.
14660         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14661         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14662         (read_attribute_value): Handle DW_FORM_implicit_const,
14663         DW_FORM_line_strp.
14664         (read_attribute): Handle DW_FORM_implicit_const.
14665         (read_indirect_string_at_offset_from): New function from
14666         read_indirect_string_at_offset.
14667         (read_indirect_string_at_offset): Call
14668         read_indirect_string_at_offset_from.
14669         (read_indirect_line_string_at_offset): New function.
14670         (read_indirect_string): New function comment.
14671         (read_indirect_line_string): New function.
14672         (read_unsigned_leb128): Make it global.
14673         (dwarf2_string_attr): Handle DWARF-5.
14674         (add_include_dir_stub, read_formatted_entries): New functions.
14675         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14676         Handle DWARF-5.
14677         (per_cu_header_read_in): Update read_comp_unit_head caller.
14678         (dwarf2_version): New function.
14679         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14680         rnglists.
14681         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14682         fields.
14683
14684 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14685
14686         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14687
14688 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14689
14690         * dwarf2read.c (dwarf2_ranges_process): New function from
14691         dwarf2_ranges_read.
14692         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14693         dwarf2_ranges_process.
14694
14695 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14696
14697         * dwarf2read.c (create_debug_type_hash_table): New function from
14698         create_debug_types_hash_table.
14699         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14700         (create_all_type_units, open_and_init_dwo_file): Update
14701         create_debug_types_hash_table callers.
14702
14703 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14704
14705         PR gdb/16188
14706         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14707         refer to 'ap', not 'args'.
14708
14709 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14710             Pedro Alves  <palves@redhat.com>
14711
14712         PR gdb/16188
14713         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14714         calls succeeded.
14715         * fork-child.c (trace_start_error): New function.
14716         (trace_start_error_with_name): Likewise.
14717         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14718         * inf-ptrace.c (inf_ptrace_me): Likewise.
14719         * inferior.h (trace_start_error): New prototype.
14720         (trace_start_error_with_name): Likewise.
14721
14722 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14723
14724         PR gdb/21164
14725         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14726         NULL before using it.
14727         * symmisc.c (maintenance_print_symbols): Likewise.
14728         (maintenance_print_msymbols): Likewise.
14729
14730 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14731
14732         * NEWS: Add record Python bindings entry.
14733
14734 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14735
14736         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14737         py-record-full.o.
14738         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14739         * python/py-record-btrace.c, python/py-record-btrace.h,
14740         python/py-record-full.c, python/py-record-full.h: New file.
14741         * python/py-record.c: Add include for py-record-btrace.h and
14742         py-record-full.h.
14743         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14744         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14745         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14746         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14747         New definition.
14748         (gdbpy_initialize_btrace): New export.
14749         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14750
14751 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14752
14753         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14754         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14755         * python/py-record.c: New file.
14756         * python/python-internal.h (gdbpy_start_recording,
14757         gdbpy_current_recording, gdpy_stop_recording,
14758         gdbpy_initialize_record): New export.
14759         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14760         (python_GdbMethods): Add gdbpy_start_recording,
14761         gdbpy_current_recording and gdbpy_stop_recording.
14762
14763 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14764
14765         * record-btrace.c (record_btrace_record_method): New function.
14766         (init_record_btrace_ops): Initialize to_record_method.
14767         * record-full.c (record_full_record_method): New function.
14768         (init_record_full_ops, init_record_full_core_ops): Add
14769         record_full_record_method.
14770         * record.h (enum record_method): New enum.
14771         * target-debug.h (target_debug_print_enum_record_method: New define.
14772         * target-delegates.c: Regenerate.
14773         * target.c (target_record_method): New function.
14774         * target.h: Include record.h.
14775         (struct target_ops) <to_record_method>: New field.
14776         (target_record_method): New export.
14777
14778 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14779
14780         * record.h (record_start, record_stop): New export.
14781         * record.c (record_start, record_stop): New function.
14782
14783 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14784
14785         * btrace.c (btrace_fetch): Copy function call segments pointer
14786         into a vector.
14787         (btrace_clear): Clear the vector.
14788         (btrace_find_insn_by_number): Use binary search to find the correct
14789         function call segment.
14790         * btrace.h (brace_fun_p): New typedef.
14791         (struct btrace_thread_info) <functions>: New field.
14792
14793 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14794
14795         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14796         * btrace.c (btrace_decode_error): ... here.  New function.
14797         * btrace.h (btrace_decode_error): New export.
14798
14799 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14800
14801         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14802         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14803         btrace_find_insn_by_number): Remove special case for gaps.
14804         * btrace.h (btrace_insn_get_error): New export.
14805         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14806         * record-btrace.c (btrace_insn_history): Print number for gaps.
14807         (record_btrace_info, record_btrace_goto): Handle gaps.
14808
14809 2017-02-14  Tom Tromey  <tom@tromey.com>
14810
14811         PR python/13598:
14812         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14813         event.
14814         * python/py-evts.c (gdbpy_initialize_py_events): Add
14815         before_prompt registry.
14816         * python/py-events.h (events_object) <before_prompt>: New field.
14817
14818 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14819
14820         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14821
14822 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14823
14824         * symfile (_initialize_symfile): Add usage text to the load command's
14825         help text.
14826
14827 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14828
14829         * utils.c (defaulted_query): Don't query on secondary UIs.
14830
14831 2017-02-10  Tom Tromey  <tom@tromey.com>
14832
14833         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14834
14835 2017-02-10  Tom Tromey  <tom@tromey.com>
14836
14837         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14838         "cleanup" local.
14839         * python/py-type.c (typy_legacy_template_argument): Remove
14840         unnecessary "cleanup" local.
14841
14842 2017-02-10  Tom Tromey  <tom@tromey.com>
14843
14844         * python/python.c (do_start_initialization): New function, from
14845         _initialize_python.
14846         (_initialize_python): Call do_start_initialization.
14847         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14848         goto.
14849
14850 2017-02-10  Tom Tromey  <tom@tromey.com>
14851
14852         * python/py-prettyprint.c (pretty_print_one_value): Use
14853         gdbpy_ref.
14854
14855 2017-02-10  Tom Tromey  <tom@tromey.com>
14856
14857         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14858         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14859         gdbpy_ref.
14860         * python/py-type.c (field_new): Use gdbpy_ref.
14861         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14862         gdbpy_ref.
14863         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14864         (py_free_pspace): Likewise.
14865         (pspace_to_pspace_object): Likewise.
14866         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14867         (py_free_objfile): Likewise.
14868         (objfile_to_objfile_object): Likewise.
14869         * python/py-inferior.c (delete_thread_object): Use
14870         gdbpy_ref.
14871         (infpy_read_memory): Likewise.
14872         (py_free_inferior): Likewise.
14873         * python/py-evtregistry.c (create_eventregistry_object): Use
14874         gdbpy_ref.
14875         * python/py-event.c (create_event_object): Use gdbpy_ref.
14876
14877 2017-02-10  Tom Tromey  <tom@tromey.com>
14878
14879         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14880         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14881         used.
14882         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14883         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14884         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14885         python/py-framefilter.c, python/py-function.c,
14886         python/py-inferior.c, python/py-infevents.c,
14887         python/py-linetable.c, python/py-newobjfileevent.c,
14888         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14889         python/py-signalevent.c, python/py-stopevent.c,
14890         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14891         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14892         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14893         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14894
14895 2017-02-10  Tom Tromey  <tom@tromey.com>
14896
14897         * ui-out.h (ui_out_emit_type): New class.
14898         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14899         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14900         and ui_out_emit_tuple.
14901         (enumerate_locals): Likewise.
14902         (py_mi_print_variables, py_print_locals, py_print_args): Use
14903         ui_out_emit_list.
14904         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14905         ui_out_emit_list.
14906         * common/gdb_optional.h: New file.
14907
14908 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14909
14910         * MAINTAINERS (Write After Approval): Update my e-mail address.
14911
14912 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14913
14914         PR gdb/21122
14915         * breakpoint.c (_initialize_breakpoint): Update the help description
14916         of the 'commands' command to indicate that it takes a list argument.
14917
14918 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14919
14920         * interps.c (current_interp_set_logging): Remove "return".
14921
14922 2017-02-09  Gary Benson  <gbenson@redhat.com>
14923
14924         * symtab.c (add_symtab_completions): Prevent NULL pointer
14925         dereference.
14926
14927 2017-02-08  Pedro Alves  <palves@redhat.com>
14928
14929         * interps.c (interp::interp): Remove reference to quiet_p.
14930         (interp_set): Make static.  Remove dead "Switching to" output
14931         code.
14932         (interp_quiet_p, interp_set_quiet): Delete.
14933         (interpreter_exec_cmd): Don't set the interpreter quiet.
14934         * interps.h (interp_quiet_p): Make static.
14935         (class interp) <quiet_p>: Remove field
14936
14937 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14938
14939         * cli/cli-decode.c (find_command_name_length): Make it extern.
14940         * cli/cli-decode.h (find_command_name_length): Declare.
14941         * cli/cli-script.c (command_name_equals, line_first_arg):
14942         New functions.
14943         (process_next_line): Use cli-decode to parse command names.
14944         (build_command_line): Make args a constant pointer.
14945
14946 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14947
14948         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14949         Remove case-insensitive search.
14950
14951 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14952
14953         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14954         at the end of the line.  Avoids an ARI warning.
14955
14956 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14957
14958         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14959         rdseed instructions.
14960         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14961
14962 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14963
14964         PR tdep/20936
14965         Provide and use sparc32 and sparc64 target description XML files.
14966         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14967         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14968         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14969         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14970         * features/sparc/sparc32-solaris.xml: New file.
14971         * features/sparc/sparc64-solaris.xml: New file.
14972         * features/sparc/sparc32-solaris.c: Generated.
14973         * features/sparc/sparc64-solaris.c: Generated.
14974         * sparc-tdep.h: Account for differences in target descriptions.
14975         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14976         (sparc32_register_type): Use target provided registers.
14977         (validate_tdesc_registers): New function.
14978         (sparc32_gdbarch_init): Use tdesc_has_registers.
14979         Set pseudoregister functions.
14980         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14981         (sparc64_register_type): Use target provided registers.
14982         (sparc64_init_abi): Set pseudoregister functions.
14983
14984 2017-02-03  Tom Tromey  <tom@tromey.com>
14985
14986         PR rust/21097:
14987         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14988         with a single member.
14989
14990 2017-02-03  Pedro Alves  <palves@redhat.com>
14991
14992         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14993         (cli_interp_base::~cli_interp_base): New.
14994         (cli_interp): New struct.
14995         (as_cli_interp): Cast the interp itself to cli_interp.
14996         (cli_interpreter_pre_command_loop): Rename to ...
14997         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14998         parameter.
14999         (cli_interpreter_init): Rename to ...
15000         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
15001         boolean.  Make extern.
15002         (cli_interpreter_resume): Rename to ...
15003         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
15004         extern.
15005         (cli_interpreter_suspend): Rename to ...
15006         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
15007         extern.
15008         (cli_interpreter_exec): Rename to ...
15009         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
15010         extern.
15011         (cli_interpreter_supports_command_editing): Rename to ...
15012         (cli_interp_base::supports_command_editing): ... this.  Remove
15013         'interp' parameter.  Make extern.
15014         (cli_ui_out): Rename to ...
15015         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
15016         Make extern.
15017         (cli_set_logging): Rename to ...
15018         (cli_interp_base::set_logging): ... this.  Remove 'interp'
15019         parameter.  Make extern.
15020         (cli_interp_procs): Delete.
15021         (cli_interp_factory): Adjust to use "new".
15022         * cli/cli-interp.h: Include "interps.h".
15023         (struct cli_interp_base): New struct.
15024         * interps.c (struct interp): Delete.  Fields moved to interps.h.
15025         (interp_new): Delete.
15026         (interp::interp, interp::~interp): New.
15027         (interp_set): Use bool, and return void.  Assume the interpreter
15028         has suspend, init and resume methods, and that the all return
15029         void.
15030         (set_top_level_interpreter): interp_set returns void.
15031         (interp_ui_out): Adapt.
15032         (current_interp_set_logging): Adapt.
15033         (interp_data): Delete.
15034         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15035         (interp_exec): Adapt.
15036         (top_level_interpreter_data): Delete.
15037         * interps.h (interp_init_ftype, interp_resume_ftype)
15038         (interp_suspend_ftype, interp_exec_ftype)
15039         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15040         (class interp): New.
15041         (interp_new): Delete.
15042         (interp_set): Now returns void.  Use bool.
15043         (interp_data, top_level_interpreter_data): Delete.
15044         * mi/mi-common.h: Include interps.h.
15045         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
15046         init, resume, suspect, exec, interp_ui_out, set_logging and
15047         pre_command_loop methods.
15048         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15049         (mi_interpreter_init): Rename to ...
15050         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
15051         bool, return void and make extern.  Adjust.
15052         (mi_interpreter_resume): ... Rename to ...
15053         (mi_interp::resume): ... this.  Remove the 'data' parameter,
15054         return void and make extern.  Adjust.
15055         (mi_interpreter_suspend): ... Rename to ...
15056         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
15057         return void and make extern.  Adjust.
15058         (mi_interpreter_exec): ... Rename to ...
15059         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
15060         extern.  Adjust.
15061         (mi_interpreter_pre_command_loop): ... Rename to ...
15062         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
15063         parameter and make extern.
15064         (mi_on_normal_stop_1): Adjust.
15065         (mi_ui_out): Rename to ...
15066         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
15067         parameter and make extern.  Adjust.
15068         (mi_set_logging): Rename to ...
15069         (mi_interp::set_logging): ... this.  Remove the 'interp'
15070         parameter and make extern.  Adjust.
15071         (mi_interp_procs): Delete.
15072         (mi_interp_factory): Adjust to use 'new'.
15073         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15074         (mi_print_exception, mi_execute_command, mi_load_progress):
15075         Adjust.
15076         * tui/tui-interp.c (tui_interp): New class.
15077         (as_tui_interp): Return a tui_interp pointer.
15078         (tui_on_normal_stop, tui_on_signal_received)
15079         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15080         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15081         to use interp::interp_ui_out.
15082         (tui_init): Rename to ...
15083         (tui_interp::init): ... this.  Remove the 'self' parameter, use
15084         bool, return void and make extern.  Adjust.
15085         (tui_resume): Rename to ...
15086         (tui_interp::resume): ... this.  Remove the 'data' parameter,
15087         return void and make extern.  Adjust.
15088         (tui_suspend): Rename to ...
15089         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
15090         return void and make extern.  Adjust.
15091         (tui_ui_out): Rename to ...
15092         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
15093         parameter, and make extern.  Adjust.
15094         (tui_exec): Rename to ...
15095         (tui_interp::exec): ... this.  Remove the 'data' parameter and
15096         make extern.
15097         (tui_interp_procs): Delete.
15098         (tui_interp_factory): Use "new".
15099
15100 2017-02-02  Tom Tromey  <tom@tromey.com>
15101
15102         * rust-exp.y (ends_raw_string, space_then_number)
15103         (rust_identifier_start_p): Return bool.
15104         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15105         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15106         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15107         (rust_chartype_p): Return bool.
15108         (val_print_struct, rust_print_struct_def, rust_print_type):
15109         Update.
15110         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15111         Return bool.
15112
15113 2017-02-02  Tom Tromey  <tom@tromey.com>
15114
15115         * rust-lang.c: Reindent.
15116
15117 2017-02-02  Tom Tromey  <tom@tromey.com>
15118
15119         * rust-lang.h (rust_crate_for_block): Update.
15120         * rust-lang.c (rust_crate_for_block): Return std::string.
15121         (rust_get_disr_info): Use std:;string, not
15122         gdb::unique_xmalloc_ptr.
15123         * rust-exp.y (crate_name): Update.
15124
15125 2017-02-02  Pedro Alves  <palves@redhat.com>
15126
15127         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15128         field out of gdb_disassembler_test and make it static.
15129
15130 2017-02-02  Pedro Alves  <palves@redhat.com>
15131
15132         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15133         mi1_interp and mi_interp fields.
15134
15135 2017-02-02  Pedro Alves  <palves@redhat.com>
15136
15137         * cli/cli-interp.c (struct saved_output_files, saved_output):
15138         Moved from cli/cli-logging.c.
15139         (cli_set_logging): New function.
15140         (cli_interp_procs): Install cli_set_logging.
15141         * cli/cli-interp.h (make_logging_output, cli_set_logging):
15142         Declare.
15143         * cli/cli-logging.c (struct saved_output_files, saved_output):
15144         Moved to cli/cli-interp.c.
15145         (pop_output_files): Don't save outputs here.
15146         (make_logging_output): New function.
15147         (handle_redirections): Don't build tee nor save previous outputs
15148         here.
15149         * interps.c (current_interp_set_logging): Change prototype.
15150         Assume there's always a set_logging_proc method installed.
15151         * interps.h (interp_set_logging_ftype): Change prototype.
15152         (current_interp_set_logging): Change prototype and adjust comment.
15153         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
15154         use make_logging_output.
15155         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15156 2017-02-02  Pedro Alves  <palves@redhat.com>
15157
15158         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15159         from ...
15160         (set_logging_overwrite): ... here.
15161         (logging_no_redirect_file): Delete.
15162         (set_logging_redirect): Don't handle redirection on the fly.
15163         Instead warn that "logging off" / "logging on" is necessary.
15164         (pop_output_files): Delete references to logging_no_redirect_file.
15165         (show_logging_command): Always speak in terms of what will happen
15166         once logging is reenabled.
15167
15168 2017-02-02  Pedro Alves  <palves@redhat.com>
15169
15170         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15171
15172 2017-02-02  Pedro Alves  <palves@redhat.com>
15173
15174         * disasm.c (gdb_pretty_print_insn): Rename to ...
15175         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15176         Remove gdbarch parameter.  Adapt to clear the object's buffers
15177         instead of allocating new buffers, and to print using the object's
15178         gdb_disassembler instead of calling gdb_print_insn.
15179         (dump_insns): Use gdb_pretty_print_disassembler.
15180         * disasm.h (gdb_pretty_print_insn): Delete declaration.
15181         (gdb_pretty_print_disassembler): New class.
15182         * record-btrace.c (btrace_insn_history): Use
15183         gdb_pretty_print_disassembler.
15184
15185 2017-02-02  Pedro Alves  <palves@redhat.com>
15186
15187         * ada-lang.c (type_as_string): Use string_file.
15188         * ada-valprint.c (ada_print_floating): Use string_file.
15189         * ada-varobj.c (ada_varobj_scalar_image)
15190         (ada_varobj_get_value_image): Use string_file.
15191         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15192         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15193         * breakpoint.c (update_inserted_breakpoint_locations)
15194         (insert_breakpoint_locations, reattach_breakpoints)
15195         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15196         (print_it_watchpoint): Use string_file.
15197         (save_breakpoints): Use stdio_file.
15198         * c-exp.y (oper): Use string_file.
15199         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15200         tee_file.
15201         (pop_output_files): Use delete.
15202         (handle_redirections): Use stdio_file and tee_file.
15203         * cli/cli-setshow.c (do_show_command): Use string_file.
15204         * compile/compile-c-support.c (c_compute_program): Use
15205         string_file.
15206         * compile/compile-c-symbols.c (generate_vla_size): Take a
15207         'string_file &' instead of a 'ui_file *'.
15208         (generate_c_for_for_one_variable): Take a 'string_file &' instead
15209         of a 'ui_file *'.  Use string_file.
15210         (generate_c_for_variable_locations): Take a 'string_file &'
15211         instead of a 'ui_file *'.
15212         * compile/compile-internal.h (generate_c_for_for_one_variable):
15213         Take a 'string_file &' instead of a 'ui_file *'.
15214         * compile/compile-loc2c.c (push, pushf, unary, binary)
15215         (print_label, pushf_register_address, pushf_register)
15216         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15217         'ui_file *'.  Adjust.
15218         * compile/compile.c (compile_to_object): Use string_file.
15219         * compile/compile.h (compile_dwarf_expr_to_c)
15220         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15221         'ui_file *'.
15222         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15223         (replace_typedefs_qualified_name): Use string_file and
15224         obstack_copy0.
15225         * disasm.c (gdb_pretty_print_insn): Use string_file.
15226         (gdb_disassembly): Adjust reference the null_stream global.
15227         (do_ui_file_delete): Delete.
15228         (gdb_insn_length): Use null_stream.
15229         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15230         * dwarf2loc.c (dwarf2_compile_property_to_c)
15231         (locexpr_generate_c_location, loclist_generate_c_location): Take a
15232         'string_file &' instead of a 'ui_file *'.
15233         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15234         * dwarf2read.c (do_ui_file_peek_last): Delete.
15235         (dwarf2_compute_name): Use string_file.
15236         * event-top.c (gdb_setup_readline): Use stdio_file.
15237         * gdbarch.sh (verify_gdbarch): Use string_file.
15238         * gdbtypes.c (safe_parse_type): Use null_stream.
15239         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15240         string_file.
15241         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15242         'string_file *' instead of a 'ui_file *'.
15243         (gdbscm_arch_disassemble): Use string_file.
15244         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15245         * guile/scm-ports.c (class ioscm_file_port): Now a class that
15246         inherits from ui_file.
15247         (ioscm_file_port_delete, ioscm_file_port_rewind)
15248         (ioscm_file_port_put): Delete.
15249         (ioscm_file_port_write): Rename to ...
15250         (ioscm_file_port::write): ... this.  Remove file_port_magic
15251         checks.
15252         (ioscm_file_port_new): Delete.
15253         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15254         ui_file_up.
15255         * guile/scm-type.c (tyscm_type_name): Use string_file.
15256         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15257         Use string_file.
15258         * infcmd.c (print_return_value_1): Use string_file.
15259         * infrun.c (print_target_wait_results): Use string_file.
15260         * language.c (add_language): Use string_file.
15261         * location.c (explicit_to_string_internal): Use string_file.
15262         * main.c (captured_main_1): Use null_file.
15263         * maint.c (maintenance_print_architecture): Use stdio_file.
15264         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15265         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15266         event_channel>: Change type to mi_console_file pointer.
15267         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15268         (mi_console_file_delete): Delete.
15269         (struct mi_console_file): Delete.
15270         (mi_console_file_magic): Delete.
15271         (mi_console_file_new): Delete.
15272         (mi_console_file::mi_console_file): New.
15273         (mi_console_file_delete): Delete.
15274         (mi_console_file_fputs): Delete.
15275         (mi_console_file::write): New.
15276         (mi_console_raw_packet): Delete.
15277         (mi_console_file::flush): New.
15278         (mi_console_file_flush): Delete.
15279         (mi_console_set_raw): Rename to ...
15280         (mi_console_file::set_raw): ... this.
15281         * mi/mi-console.h (class mi_console_file): New class.
15282         (mi_console_file_new, mi_console_set_raw): Delete.
15283         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15284         (mi_set_logging): Use delete and tee_file.  Adjust.
15285         * mi/mi-main.c (output_register): Use string_file.
15286         (mi_cmd_data_evaluate_expression): Use string_file.
15287         (mi_cmd_data_read_memory): Use string_file.
15288         (mi_cmd_execute, print_variable_or_computed): Use string_file.
15289         * mi/mi-out.c (mi_ui_out::main_stream): New.
15290         (mi_ui_out::rewind): Use main_stream and
15291         string_file.
15292         (mi_ui_out::put): Use main_stream and string_file.
15293         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15294         Allocate a 'string_file' instead.
15295         (mi_out_new): Don't allocate a mem_fileopen stream here.
15296         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15297         (mi_ui_out::main_stream): Declare method.
15298         * printcmd.c (eval_command): Use string_file.
15299         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15300         * python/py-arch.c (archpy_disassemble): Use string_file.
15301         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15302         * python/py-frame.c (frapy_str): Use string_file.
15303         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15304         Use string_file.
15305         * python/py-type.c (typy_str): Use string_file.
15306         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15307         * python/py-value.c (valpy_str): Use string_file.
15308         * record-btrace.c (btrace_insn_history): Use string_file.
15309         * regcache.c (regcache_print): Use stdio_file.
15310         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15311         * remote.c (escape_buffer): Use string_file.
15312         * rust-lang.c (rust_get_disr_info): Use string_file.
15313         * serial.c (serial_open_ops_1): Use stdio_file.
15314         (do_serial_close): Use delete.
15315         * stack.c (print_frame_arg): Use string_file.
15316         (print_frame_args): Remove local mem_fileopen stream, not used.
15317         (print_frame): Use string_file.
15318         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15319         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15320         Take a 'string_file *' instead of a 'ui_file *'.
15321         * top.c (new_ui): Use stdio_file and stderr_file.
15322         (free_ui): Use delete.
15323         (execute_command_to_string): Use string_file.
15324         (quit_confirm): Use string_file.
15325         * tracepoint.c (collection_list::append_exp): Use string_file.
15326         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15327         * tui/tui-file.c: Don't include "ui-file.h".
15328         (enum streamtype, struct tui_stream): Delete.
15329         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15330         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15331         (tui_file::tui_file): New method.
15332         (tui_file_fputs): Delete.
15333         (tui_file_get_strbuf): Delete.
15334         (tui_file::puts): New method.
15335         (tui_file_adjust_strbuf): Delete.
15336         (tui_file_flush): Delete.
15337         (tui_file::flush): New method.
15338         * tui/tui-file.h: Tweak intro comment.
15339         Include ui-file.h.
15340         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15341         (tui_file_adjust_strbuf): Delete declarations.
15342         (class tui_file): New class.
15343         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15344         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15345         (tui_register_format): Use string_stream.
15346         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15347         (tui_get_function_from_frame): Use string_file.
15348         * typeprint.c (type_to_string): Use string_file.
15349         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15350         (null_stream): New global.
15351         (ui_file_delete): Delete.
15352         (ui_file::ui_file): New.
15353         (null_file_isatty): Delete.
15354         (ui_file::~ui_file): New.
15355         (null_file_rewind): Delete.
15356         (ui_file::printf): New.
15357         (null_file_put): Delete.
15358         (null_file_flush): Delete.
15359         (ui_file::putstr): New.
15360         (null_file_write): Delete.
15361         (ui_file::putstrn): New.
15362         (null_file_read): Delete.
15363         (ui_file::putc): New.
15364         (null_file_fputs): Delete.
15365         (null_file_write_async_safe): Delete.
15366         (ui_file::vprintf): New.
15367         (null_file_delete): Delete.
15368         (null_file::write): New.
15369         (null_file_fseek): Delete.
15370         (null_file::puts): New.
15371         (ui_file_data): Delete.
15372         (null_file::write_async_safe): New.
15373         (gdb_flush, ui_file_isatty): Adjust.
15374         (ui_file_put, ui_file_rewind): Delete.
15375         (ui_file_write): Adjust.
15376         (ui_file_write_for_put): Delete.
15377         (ui_file_write_async_safe, ui_file_read): Adjust.
15378         (ui_file_fseek): Delete.
15379         (fputs_unfiltered): Adjust.
15380         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15381         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15382         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15383         (set_ui_file_data): Delete.
15384         (string_file::~string_file, string_file::write)
15385         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15386         (do_ui_file_as_string, ui_file_as_string): Delete.
15387         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15388         (struct mem_file): Delete.
15389         (mem_file_new): Delete.
15390         (stdio_file::stdio_file): New.
15391         (mem_file_delete): Delete.
15392         (stdio_file::stdio_file): New.
15393         (mem_fileopen): Delete.
15394         (stdio_file::~stdio_file): New.
15395         (mem_file_rewind): Delete.
15396         (stdio_file::set_stream): New.
15397         (mem_file_put): Delete.
15398         (stdio_file::open): New.
15399         (mem_file_write): Delete.
15400         (stdio_file_magic, struct stdio_file): Delete.
15401         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15402         (stdio_file::flush): New.
15403         (stdio_file_read): Rename to ...
15404         (stdio_file::read): ... this.  Adjust.
15405         (stdio_file_write): Rename to ...
15406         (stdio_file::write): ... this.  Adjust.
15407         (stdio_file_write_async_safe): Rename to ...
15408         (stdio_file::write_async_safe) ... this.  Adjust.
15409         (stdio_file_fputs): Rename to ...
15410         (stdio_file::puts) ... this.  Adjust.
15411         (stdio_file_isatty): Delete.
15412         (stdio_file_fseek): Delete.
15413         (stdio_file::isatty): New.
15414         (stderr_file_write): Rename to ...
15415         (stderr_file::write) ... this.  Adjust.
15416         (stderr_file_fputs): Rename to ...
15417         (stderr_file::puts) ... this.  Adjust.
15418         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15419         (stderr_file::stderr_file): New.
15420         (tee_file_magic): Delete.
15421         (struct tee_file): Delete.
15422         (tee_file::tee_file): New.
15423         (tee_file_new): Delete.
15424         (tee_file::~tee_file): New.
15425         (tee_file_delete): Delete.
15426         (tee_file_flush): Rename to ...
15427         (tee_file::flush): ... this.  Adjust.
15428         (tee_file_write): Rename to ...
15429         (tee_file::write): ... this.  Adjust.
15430         (tee_file::write_async_safe): New.
15431         (tee_file_fputs): Rename to ...
15432         (tee_file::puts): ... this.  Adjust.
15433         (tee_file_isatty): Rename to ...
15434         (tee_file::isatty): ... this.  Adjust.
15435         * ui-file.h (struct obstack, struct ui_file): Don't
15436         forward-declare.
15437         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15438         (ui_file_write_ftype)
15439         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15440         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15441         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15442         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15443         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15444         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15445         (set_ui_file_fseek): Delete.
15446         (ui_file_data, ui_file_delete, ui_file_rewind)
15447         (struct ui_file): New.
15448         (ui_file_up): New.
15449         (class null_file): New.
15450         (null_stream): Declare.
15451         (ui_file_write_for_put, ui_file_put): Delete.
15452         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15453         Delete.
15454         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15455         (gdb_fopen, tee_file_new): Delete.
15456         (struct string_file): New.
15457         (struct stdio_file): New.
15458         (stdio_file_up): New.
15459         (struct stderr_file): New.
15460         (class tee_file): New.
15461         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15462         of a 'ui_file *'.  Adjust.
15463         * ui-out.h (class ui_out) <field_stream>: Likewise.
15464         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15465         (null_stream): Delete.
15466         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15467         Adjust.
15468         * utils.h (struct ui_file): Delete forward declaration..
15469         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15470         (error_stream): Take a 'string_file &' instead of a
15471         'ui_file *'.
15472         * varobj.c (varobj_value_get_print_value): Use string_file.
15473         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15474         * gdbarch.c: Regenerate.
15475
15476 2017-02-02  Pedro Alves  <palves@redhat.com>
15477
15478         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15479         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15480         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15481         Adjust to call gdb_print_insn instead of
15482         gdb_disassembler::print_insn.
15483         (dump_insns, do_mixed_source_and_assembly_deprecated)
15484         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15485         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15486         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15487         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15488         declaration.
15489         (gdb_pretty_print_insn): Re-add declaration.
15490         * record-btrace.c (btrace_insn_history): Don't allocate a
15491         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15492
15493 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15494
15495         * disasm.h (gdb_disassembly): Remove file_string parameter.
15496         * disasm.c (gdb_disassembly): Likewise.
15497         * cli/cli-cmds.c (print_disassembly): Adapt.
15498         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15499         * stack.c (do_gdb_disassembly): Likewise.
15500
15501 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15502
15503         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15504         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15505         targets.  And if the implicit value is longer than needed, extract
15506         the first bytes instead of the "least significant" ones.
15507
15508 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15509
15510         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15511         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15512         (btrace_fetch): Assert can_access_registers_ptid.
15513         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15514         validate_registers_access.
15515
15516 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15517
15518         * gdbthread.h (can_access_registers_ptid): New.
15519         * thread.c (can_access_registers_ptid): New.
15520
15521 2017-02-01  Pedro Alves  <palves@redhat.com>
15522
15523         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15524
15525 2017-01-31  Pedro Alves  <palves@redhat.com>
15526
15527         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15528         Fix typos.
15529
15530 2017-01-31  Pedro Alves  <palves@redhat.com>
15531
15532         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15533         not used.
15534
15535 2017-01-31  Pedro Alves  <palves@redhat.com>
15536
15537         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15538
15539 2017-01-31  Pedro Alves  <palves@redhat.com>
15540
15541         * common/scoped_restore.h
15542         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15543         change the value's parameter type to T2.
15544         (make_scoped_restore): Likewise.
15545
15546 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15547             Richard Henderson  <rth@redhat.com>
15548
15549         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15550         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15551         GS_BASE for older kernels.
15552         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15553         GS_BASE for older kernels.
15554         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15555         and GS_BASE to the offset table.
15556         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15557         system register group.
15558         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15559         for older kernels.
15560         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15561         amd64 ABI.
15562         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15563         AMD64_GSBASE_REGNUM.
15564         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15565         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15566         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15567         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15568         i386/64bit-segments.xml in those rules.
15569         * features/i386/64bit-segments.xml: New file.
15570         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15571         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15572         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15573         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15574         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15575         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15576         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15577         * features/i386/amd64-avx-linux.c: Regenerated.
15578         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15579         * features/i386/amd64-avx-mpx.c: Regenerated.
15580         * features/i386/amd64-avx512-linux.c: Regenerated.
15581         * features/i386/amd64-linux.c: Regenerated.
15582         * features/i386/amd64-mpx-linux.c: Regenerated.
15583         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15584         * features/i386/i386-avx-mpx.c: Regenerated.
15585         * features/i386/x32-avx-linux.c: Regenerated.
15586         * features/i386/x32-avx512-linux.c: Regenerated.
15587         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15588         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15589         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15590         * regformats/i386/amd64-linux.dat: Regenerated.
15591         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15592         * regformats/i386/x32-avx-linux.dat: Regenerated.
15593         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15594         * regformats/i386/x32-linux.dat: Regenerated.
15595
15596 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15597
15598         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15599         Set to AMD64_NUM_REGS.
15600
15601 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15602
15603         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15604         that checks validity of a register number.
15605
15606 2017-01-27  Kees Cook  <keescook@google.com>
15607
15608         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15609         fetch_fpregs if target has fpa registers.
15610         (arm_linux_store_inferior_registers): Call store_fpregs if target
15611         has fpa registers.
15612
15613 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15614
15615         * cris-tdep.c (cris_gdbarch_init): Remove check for
15616         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15617
15618 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15619
15620         * corelow.c (get_core_register_section): Check for regset
15621         existence before checking for REGSET_VARIABLE_SIZE.
15622
15623 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15624             Pedro Alves  <palves@redhat.com>
15625
15626         PR gdb/20939
15627         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15628         call memory_error, save memaddr instead.
15629         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15630         negative, cal memory_error.
15631         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15632
15633 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15634
15635         * disasm-selftests.c (memory_error_test): New function.
15636         (_initialize_disasm_selftests): Register memory_error_test.
15637
15638 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15639
15640         * Makefile.in (SFILES): Add disasm-selftests.c and
15641         selftest-arch.c.
15642         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15643         * disasm-selftests.c: New file.
15644         * selftest-arch.c: New file.
15645         * selftest-arch.h: New file.
15646
15647 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15648
15649         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15650         to bfd_arch_mep.  Don't return 0 if section is not
15651         found.  Call print_insn_mep.
15652
15653 2017-01-26  Pedro Alves  <palves@redhat.com>
15654             Yao Qi  <yao.qi@linaro.org>
15655
15656         * arm-tdep.c: Include "disasm.h".
15657         (gdb_print_insn_arm): Update code to get gdbarch.
15658         * disasm.c (dis_asm_read_memory): Change it to
15659         gdb_disassembler::dis_asm_read_memory.
15660         (dis_asm_memory_error): Likewise.
15661         (dis_asm_print_address): Likewise.
15662         (gdb_pretty_print_insn): Change it to
15663         gdb_disassembler::pretty_print_insn.
15664         (dump_insns): Add one argument gdb_disassemlber.  All
15665         callers updated.
15666         (do_mixed_source_and_assembly_deprecated): Likewise.
15667         (do_mixed_source_and_assembly): Likewise.
15668         (do_assembly_only): Likewise.
15669         (gdb_disassembler::gdb_disassembler): New.
15670         (gdb_disassembler::print_insn): New.
15671         * disasm.h (class gdb_disassembler): New.
15672         (gdb_pretty_print_insn): Remove declaration.
15673         (gdb_disassemble_info): Likewise.
15674         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15675         (gdbscm_disasm_read_memory_worker): Update.
15676         (gdbscm_disasm_read_memory): Update.
15677         (gdbscm_disasm_memory_error): Remove.
15678         (gdbscm_disasm_print_address): Remove.
15679         (gdbscm_disassembler::gdbscm_disassembler): New.
15680         (gdbscm_print_insn_from_port): Update.
15681         * mips-tdep.c: Include disasm.h.
15682         (gdb_print_insn_mips): Update code to get gdbarch.
15683         * record-btrace.c (btrace_insn_history): Update.
15684         * spu-tdep.c: Include disasm.h.
15685         (struct spu_dis_asm_data): Remove.
15686         (struct spu_dis_asm_info): New.
15687         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15688         SPU id.
15689         (gdb_print_insn_spu): Cast disassemble_info to
15690         spu_dis_asm_info.
15691
15692 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15693
15694         * disasm.c (do_ui_file_delete): Delete.
15695         (gdb_insn_length): Move code creating stream to ...
15696         * utils.c (null_stream): ... here.  New function.
15697         * utils.h (null_stream): Declare.
15698
15699 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15700
15701         * python/py-inferior.c (find_thread_object): Return directly
15702         from the loop.  Remove "found" variable.
15703
15704 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15705
15706         GDB 7.12.1 released.
15707
15708 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15709
15710         * python/py-function.c (fnpy_call): Reorder declarations to have
15711         the gdbpy_enter object declared first.
15712         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15713
15714 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15715
15716         PR python/21068
15717         * python/python-internal.h (PyMem_RawMalloc): Define for
15718         Python < 3.4.
15719         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15720         PyMem_RawMalloc instead of PyMem_Malloc.
15721
15722 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15723             Luis Machado  <lgustavo@codesourcery.com>
15724
15725         * NEWS (New commands): Mention flash-erase.
15726         (New MI commands): Mention target-flash-erase.
15727         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15728         command.
15729         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15730         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15731         * target.c (flash_erase_command): New function.
15732         (initialize_targets): Add new flash-erase command.
15733         * target.h (flash_erase_command): New declaration.
15734
15735 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15736
15737         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15738         HAVE_SYS_PROCFS_H is defined.
15739
15740 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15741
15742         * remote.c (struct cached_reg): Change data into a pointer.
15743         * (stop_reply_dtr): Free data pointers before deleting vector.
15744         (process_stop_reply): Likewise.
15745         (remote_parse_stop_reply): Allocate space for data
15746
15747 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15748
15749         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15750         MAX_REGISTER_SIZE.
15751         (amd64_pseudo_register_read_value): Likewise.
15752         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15753         (store_register_using_P): Likewise.
15754         * regcache.c (regcache_xfer_part): Likewise.
15755
15756 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15757
15758         Split real and pseudo registers.
15759         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15760         (sparc32_pseudo_regnum): New enum.
15761         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15762         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15763         (SPARC32_CP0_REGISTERS): New macro.
15764         (sparc32_pseudo_register_name): New function.
15765         (sparc32_register_name): Use sparc32_pseudo_register_name.
15766         (sparc32_pseudo_register_type): New function.
15767         (sparc32_register_type): Use sparc32_pseudo_register_type.
15768         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15769         pseudo register numbers.
15770         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15771         (SPARC64_CP0_REGISTERS): New macro.
15772         (sparc64_pseudo_register_name): New function.
15773         (sparc64_register_name): Use sparc64_pseudo_register_name.
15774         (sparc64_pseudo_register_type): New function.
15775         (sparc64_register_type): Use sparc64_pseudo_register_type.
15776         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15777         pseudo register numbers.
15778         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15779         sparc64_store_arguments): Handle pseudo register numbers.
15780
15781 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15782
15783         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15784         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15785         output.
15786         (getpkt_or_notif_sane_1): Likewise.
15787
15788 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15789
15790         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15791         of CC.  Pass "-x c++-header" instead of "-x c".
15792
15793 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15794
15795         * remote.c (remote_can_async_p): Update comment.
15796
15797 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15798
15799         * linux-nat.c (linux_nat_can_async_p): Update comment.
15800
15801 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15802
15803         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15804
15805 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15806
15807         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15808
15809 2017-01-10  Tom Tromey  <tom@tromey.com>
15810
15811         * python/py-type.c (typy_legacy_template_argument): Update.
15812         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15813         ~demangle_parse_info): Declare new members.
15814         (cp_demangled_name_to_comp): Return unique_ptr.
15815         (cp_demangled_name_parse_free)
15816         (make_cleanup_cp_demangled_name_parse_free)
15817         (cp_new_demangle_parse_info): Remove.
15818         * cp-support.c (do_demangled_name_parse_free_cleanup)
15819         (make_cleanup_cp_demangled_name_parse_free): Remove.
15820         (inspect_type, cp_canonicalize_string_full)
15821         (cp_canonicalize_string): Update.
15822         (mangled_name_to_comp): Change return type.
15823         (cp_class_name_from_physname, method_name_from_physname)
15824         (cp_func_name, cp_remove_params): Update.
15825         * cp-name-parser.y (demangle_parse_info): New constructor, from
15826         cp_new_demangle_parse_info.
15827         (~demangle_parse_info): New destructor, from
15828         cp_demangled_name_parse_free.
15829         (cp_merge_demangle_parse_infos): Update.
15830         (cp_demangled_name_to_comp): Change return type.
15831
15832 2017-01-10  Tom Tromey  <tom@tromey.com>
15833
15834         * top.c (prevent_dont_repeat): Change return type.
15835         * python/python.c (execute_gdb_command): Use std::string.
15836         Update.
15837         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15838         * command.h (prevent_dont_repeat): Change return type.
15839         * breakpoint.c (bpstat_do_actions_1): Update.
15840
15841 2017-01-10  Tom Tromey  <tom@tromey.com>
15842
15843         * value.h (scoped_value_mark::~scoped_value_mark): Call
15844         free_to_mark.
15845         (scoped_value_mark::free_to_mark): New method.
15846         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15847         scoped_value_mark.
15848
15849 2017-01-10  Tom Tromey  <tom@tromey.com>
15850
15851         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15852         (valpy_reference_value, valpy_const_value, valpy_get_address)
15853         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15854         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15855         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15856         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15857         scoped_value_mark.
15858         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15859         * value.h (scoped_value_mark): New class.
15860
15861 2017-01-10  Tom Tromey  <tom@tromey.com>
15862
15863         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15864         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15865         * psymtab.c (discard_psymtabs_upto): Remove.
15866         (make_cleanup_discard_psymtabs): Remove.
15867         (struct psymtab_state): Remove.
15868
15869 2017-01-10  Tom Tromey  <tom@tromey.com>
15870
15871         * record-full.c (record_full_save_cleanups): Remove.
15872         (record_full_save): Use gdb::unlinker.
15873         * gcore.c (do_bfd_delete_cleanup): Remove.
15874         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15875         cleanups.
15876         * dwarf2read.c (unlink_if_set): Remove.
15877         (write_psymtabs_to_index): Use gdb::unlinker.
15878         * common/gdb_unlinker.h: New file.
15879
15880 2017-01-10  Tom Tromey  <tom@tromey.com>
15881
15882         * windows-tdep.c (windows_xfer_shared_library): Update.
15883         * windows-nat.c (windows_make_so): Update.
15884         * utils.h (make_cleanup_bfd_unref): Remove.
15885         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15886         * symfile.h (symfile_bfd_open)
15887         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15888         * symfile.c (read_symbols, symbol_file_add)
15889         (separate_debug_file_exists): Update.
15890         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15891         (generic_load, reread_symbols): Update.
15892         * symfile-mem.c (symbol_file_add_from_memory): Update.
15893         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15894         (spu_symbol_file_add_from_memory): Update.
15895         * solist.h (struct target_so_ops) <bfd_open>: Return
15896         gdb_bfd_ref_ptr.
15897         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15898         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15899         gdb_bfd_ref_ptr.
15900         (solib_map_sections, reload_shared_libraries_1): Update.
15901         * solib-svr4.c (enable_break): Update.
15902         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15903         * solib-frv.c (enable_break2): Update.
15904         * solib-dsbt.c (enable_break): Update.
15905         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15906         gdb_bfd_ref_ptr.
15907         (darwin_solib_get_all_image_info_addr_at_init): Update.
15908         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15909         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15910         * record-full.c (record_full_save): Update.
15911         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15912         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15913         * minidebug.c (find_separate_debug_file_in_section): Return
15914         gdb_bfd_ref_ptr.
15915         * machoread.c (macho_add_oso_symfile): Change abfd to
15916         gdb_bfd_ref_ptr.
15917         (macho_symfile_read_all_oso): Update.
15918         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15919         (macho_symfile_read): Update.
15920         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15921         (jit_bfd_try_read_symtab): Update.
15922         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15923         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15924         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15925         gdb_bfd_ref_ptr.
15926         (gdb_bfd_ref_policy): New struct.
15927         (gdb_bfd_ref_ptr): New typedef.
15928         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15929         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15930         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15931         gdb_bfd_ref_ptr.
15932         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15933         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15934         (gcore_command): Update.
15935         * exec.c (exec_file_attach): Update.
15936         * elfread.c (elf_symfile_read): Update.
15937         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15938         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15939         (open_and_init_dwo_file): Update.
15940         (open_dwp_file): Return gdb_bfd_ref_ptr.
15941         (open_and_init_dwp_file): Update.
15942         * corelow.c (core_open): Update.
15943         * compile/compile-object-load.c (compile_object_load): Update.
15944         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15945         * coffread.c (coff_symfile_read): Update.
15946         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15947         gdb_bfd_ref_ptr.  Rename.
15948         (dump_bfd_file, restore_command): Update.
15949         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15950         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15951         (find_separate_debug_file_by_buildid): Update.
15952
15953 2017-01-10  Tom Tromey  <tom@tromey.com>
15954
15955         * common/gdb_ref_ptr.h: New file.
15956         * python/py-ref.h (struct gdbpy_ref_policy): New.
15957         (gdbpy_ref): Now a typedef.
15958
15959 2017-01-10  Tom Tromey  <tom@tromey.com>
15960
15961         * utils.h (make_cleanup_htab_delete): Don't declare.
15962         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15963         Remove.
15964         * linespec.c (decode_compound_collector): Add constructor,
15965         destructor.
15966         (lookup_prefix_sym): Remove cleanup.
15967         (symtab_collector): Add constructor, destructor.
15968         (collect_symtabs_from_filename): Remove cleanup.
15969         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15970         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15971         Use htab_up.
15972         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15973         * dwarf2read.c (dw2_expand_symtabs_matching)
15974         (dw2_map_symbol_filenames, dwarf_decode_macros)
15975         (write_psymtabs_to_index): Use htab_up.
15976         * dwarf2loc.c (func_verify_no_selftailcall)
15977         (call_site_find_chain_1, func_verify_no_selftailcall)
15978         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15979         std::vector, gdb::unique_xmalloc_ptr.
15980         (call_sitep): Remove typedef.
15981         (dwarf2_locexpr_baton_eval): Remove unused variable.
15982
15983 2017-01-10  Tom Tromey  <tom@tromey.com>
15984
15985         * python/python-internal.h (make_cleanup_py_decref)
15986         (make_cleanup_py_xdecref): Don't declare.
15987         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15988         (py_xdecref, make_cleanup_py_xdecref): Remove.
15989
15990 2017-01-10  Tom Tromey  <tom@tromey.com>
15991
15992         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15993         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15994
15995 2017-01-10  Tom Tromey  <tom@tromey.com>
15996
15997         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15998
15999 2017-01-10  Tom Tromey  <tom@tromey.com>
16000
16001         * python/py-utils.c (unicode_to_encoded_string)
16002         (python_string_to_target_string)
16003         (python_string_to_target_python_string)
16004         (python_string_to_host_string, gdbpy_obj_to_string)
16005         (get_addr_from_python): Use gdbpy_ref.
16006
16007 2017-01-10  Tom Tromey  <tom@tromey.com>
16008
16009         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16010         gdbpy_ref.
16011
16012 2017-01-10  Tom Tromey  <tom@tromey.com>
16013
16014         * python/python.c (eval_python_command, gdbpy_decode_line)
16015         (gdbpy_run_events, gdbpy_start_type_printers)
16016         (gdbpy_apply_type_printers): Use gdbpy_ref.
16017
16018 2017-01-10  Tom Tromey  <tom@tromey.com>
16019
16020         * python/py-param.c (get_doc_string, compute_enum_values): Use
16021         gdbpy_ref.
16022
16023 2017-01-10  Tom Tromey  <tom@tromey.com>
16024
16025         * python/py-inferior.c (find_thread_object, build_inferior_list):
16026         Use gdbpy_ref.
16027
16028 2017-01-10  Tom Tromey  <tom@tromey.com>
16029
16030         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16031
16032 2017-01-10  Tom Tromey  <tom@tromey.com>
16033
16034         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16035         gdbpy_ref.
16036
16037 2017-01-10  Tom Tromey  <tom@tromey.com>
16038
16039         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
16040         extra incref.
16041         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16042         Use gdbpy_ref.
16043
16044 2017-01-10  Tom Tromey  <tom@tromey.com>
16045
16046         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16047         gdbpy_ref.
16048
16049 2017-01-10  Tom Tromey  <tom@tromey.com>
16050
16051         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
16052         decref results of PyArg_ParseTupleAndKeywords.
16053
16054 2017-01-10  Tom Tromey  <tom@tromey.com>
16055
16056         * python/python.c (python_run_simple_file): Use
16057         unique_xmalloc_ptr, gdbpy_ref.
16058
16059 2017-01-10  Tom Tromey  <tom@tromey.com>
16060
16061         * python/py-prettyprint.c (print_stack_unless_memory_error)
16062         (print_string_repr, print_children): Use gdbpy_ref.
16063         (dummy_python_frame): New class.
16064         (dummy_python_frame::dummy_python_frame): Rename from
16065         push_dummy_python_frame.
16066         (py_restore_tstate): Remove.
16067
16068 2017-01-10  Tom Tromey  <tom@tromey.com>
16069
16070         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16071
16072 2017-01-10  Tom Tromey  <tom@tromey.com>
16073
16074         * python/python.c (ensure_python_env, restore_python_env):
16075         Remove.
16076         * python/python-internal.h (ensure_python_env): Don't declare.
16077         * varobj.h (varobj_ensure_python_env): Don't declare.
16078         * varobj.c (varobj_ensure_python_env): Remove.
16079
16080 2017-01-10  Tom Tromey  <tom@tromey.com>
16081
16082         * varobj.c (varobj_value_get_print_value): Use
16083         gdbpy_enter_varobj.
16084
16085 2017-01-10  Tom Tromey  <tom@tromey.com>
16086
16087         * python/py-prettyprint.c (print_string_repr, print_children):
16088         Update.
16089         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16090         of "encoding".
16091         * varobj.c (varobj_value_get_print_value): Update.
16092         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16093
16094 2017-01-10  Tom Tromey  <tom@tromey.com>
16095
16096         * varobj.c (varobj_get_display_hint)
16097         (dynamic_varobj_has_child_method, install_new_value_visualizer)
16098         (varobj_set_visualizer, free_variable): Use
16099         gdbpy_enter_varobj.
16100
16101 2017-01-10  Tom Tromey  <tom@tromey.com>
16102
16103         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16104         (do_finish_initialization): New function.  Use gdbpy_ref.
16105         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
16106         do_finish_initialization.
16107
16108 2017-01-10  Tom Tromey  <tom@tromey.com>
16109
16110         * python/py-param.c (get_set_value, get_show_value): Use
16111         gdbpy_enter, gdbpy_ref.
16112
16113 2017-01-10  Tom Tromey  <tom@tromey.com>
16114
16115         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16116
16117 2017-01-10  Tom Tromey  <tom@tromey.com>
16118
16119         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16120
16121 2017-01-10  Tom Tromey  <tom@tromey.com>
16122
16123         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16124         Use gdbpy_enter_varobj.
16125
16126 2017-01-10  Tom Tromey  <tom@tromey.com>
16127
16128         * varobj.c (gdbpy_enter_varobj): New constructor.
16129         * python/python-internal.h (gdbpy_enter_varobj): New class.
16130         * python/py-varobj.c (py_varobj_get_iterator): Use
16131         gdbpy_enter_varobj.
16132
16133 2017-01-10  Tom Tromey  <tom@tromey.com>
16134
16135         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16136         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16137         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16138         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16139         unique_xmalloc_ptr.
16140         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16141
16142 2017-01-10  Tom Tromey  <tom@tromey.com>
16143
16144         * python/py-xmethods.c (invoke_match_method): Use
16145         gdbpy_ref.
16146
16147 2017-01-10  Tom Tromey  <tom@tromey.com>
16148
16149         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16150         gdbpy_enter, gdbpy_ref.
16151
16152 2017-01-10  Tom Tromey  <tom@tromey.com>
16153
16154         * python/python.c (python_interactive_command): Use gdbpy_enter.
16155
16156 2017-01-10  Tom Tromey  <tom@tromey.com>
16157
16158         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16159         gdbpy_ref.
16160
16161 2017-01-10  Tom Tromey  <tom@tromey.com>
16162
16163         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16164         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16165
16166 2017-01-10  Tom Tromey  <tom@tromey.com>
16167
16168         * utils.h (htab_deleter): New struct.
16169         (htab_up): New typedef.
16170         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16171         gdbpy_enter, gdbpy_ref, htab_up.
16172
16173 2017-01-10  Tom Tromey  <tom@tromey.com>
16174
16175         * python/py-unwind.c (pending_frame_invalidate): Remove.
16176         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16177
16178 2017-01-10  Tom Tromey  <tom@tromey.com>
16179
16180         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16181         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16182
16183 2017-01-10  Tom Tromey  <tom@tromey.com>
16184
16185         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16186
16187 2017-01-10  Tom Tromey  <tom@tromey.com>
16188
16189         * python/python.c (gdbpy_eval_from_control_command)
16190         (gdbpy_source_script, gdbpy_run_events)
16191         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16192         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16193         gdbpy_enter.
16194
16195 2017-01-10  Tom Tromey  <tom@tromey.com>
16196
16197         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16198
16199 2017-01-10  Tom Tromey  <tom@tromey.com>
16200
16201         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16202
16203 2017-01-10  Tom Tromey  <tom@tromey.com>
16204
16205         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16206         (python_on_inferior_call_pre, python_on_inferior_call_post)
16207         (python_on_memory_change, python_on_register_change)
16208         (python_inferior_exit, python_new_objfile, add_thread_object)
16209         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16210
16211 2017-01-10  Tom Tromey  <tom@tromey.com>
16212
16213         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16214         (bpfinishpy_handle_exit): Use gdbpy_enter.
16215
16216 2017-01-10  Tom Tromey  <tom@tromey.com>
16217
16218         * python/py-cmd.c (cmdpy_destroyer)
16219         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16220         gdbpy_enter.
16221
16222 2017-01-10  Tom Tromey  <tom@tromey.com>
16223
16224         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16225         gdbpy_enter.
16226         (gdbpy_breakpoint_has_cond): Likewise.
16227
16228 2017-01-10  Tom Tromey  <tom@tromey.com>
16229
16230         * python/python.c (gdbpy_enter): New constructor.
16231         (~gdbpy_enter): New destructor.
16232         (restore_python_env, ensure_python_env): Rewrite.
16233         * python/python-internal.h (gdbpy_enter): New class.
16234
16235 2017-01-10  Tom Tromey  <tom@tromey.com>
16236
16237         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16238
16239 2017-01-10  Tom Tromey  <tom@tromey.com>
16240
16241         * python/py-value.c (value_has_field, get_field_flag)
16242         (get_field_type, valpy_getitem, convert_value_from_python): Use
16243         gdbpy_ref.
16244
16245 2017-01-10  Tom Tromey  <tom@tromey.com>
16246
16247         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16248         gdbpy_ref.
16249
16250 2017-01-10  Tom Tromey  <tom@tromey.com>
16251
16252         * python/py-prettyprint.c (search_pp_list)
16253         (find_pretty_printer_from_objfiles)
16254         (find_pretty_printer_from_progspace)
16255         (find_pretty_printer_from_gdb, find_pretty_printer)
16256         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16257         gdbpy_ref.
16258
16259 2017-01-10  Tom Tromey  <tom@tromey.com>
16260
16261         * python/py-param.c (call_doc_function): Use gdbpy_ref.
16262
16263 2017-01-10  Tom Tromey  <tom@tromey.com>
16264
16265         * python/py-linetable.c (build_line_table_tuple_from_pcs)
16266         (ltpy_get_all_source_lines): Use gdbpy_ref.
16267
16268 2017-01-10  Tom Tromey  <tom@tromey.com>
16269
16270         * python/py-framefilter.c (extract_sym, extract_value)
16271         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16272         gdbpy_ref.
16273
16274 2017-01-10  Tom Tromey  <tom@tromey.com>
16275
16276         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16277
16278 2017-01-10  Tom Tromey  <tom@tromey.com>
16279
16280         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16281
16282 2017-01-10  Tom Tromey  <tom@tromey.com>
16283
16284         * python/py-function.c (convert_values_to_python, fnpy_init): Use
16285         gdbpy_ref.
16286
16287 2017-01-10  Tom Tromey  <tom@tromey.com>
16288
16289         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16290
16291 2017-01-10  Tom Tromey  <tom@tromey.com>
16292
16293         * python/py-type.c (convert_field, make_fielditem, typy_fields)
16294         (typy_range): Use gdbpy_ref.
16295
16296 2017-01-10  Tom Tromey  <tom@tromey.com>
16297
16298         * python/py-threadevent.c (create_thread_event_object): Use
16299         gdbpy_ref.
16300         * python/py-stopevent.c (create_stop_event_object): Simplify.
16301         (emit_stop_event): Use gdbpy_ref.
16302         * python/py-signalevent.c (create_signal_event_object): Use
16303         gdbpy_ref.
16304         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16305         (emit_new_objfile_event, create_clear_objfiles_event_object)
16306         (emit_clear_objfiles_event): Use gdbpy_ref.
16307         * python/py-infevents.c (create_inferior_call_event_object)
16308         (create_register_changed_event_object)
16309         (create_memory_changed_event_object, emit_inferior_call_event)
16310         (emit_memory_changed_event, emit_register_changed_event): Use
16311         gdbpy_ref.
16312         * python/py-exitedevent.c (create_exited_event_object)
16313         (emit_exited_event): Use gdbpy_ref.
16314         * python/py-event.h (evpy_emit_event): Remove
16315         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16316         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16317         * python/py-continueevent.c (emit_continue_event): Use
16318         gdbpy_ref.
16319         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16320         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16321         gdbpy_ref.
16322         * python/py-bpevent.c (create_breakpoint_event_object): Use
16323         gdbpy_ref.
16324
16325 2017-01-10  Tom Tromey  <tom@tromey.com>
16326
16327         * python/py-ref.h: New file.
16328
16329 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16330
16331         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16332         void.
16333         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16334         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16335         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16336         * ui-out.c (ui_out::redirect): Likewise.
16337         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16338         * cli/cli-logging.c (set_logging_redirect): Update call site of
16339         ui_out::redirect.
16340         (handle_redirections): Likewise.
16341         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16342         * top.c (execute_command_to_string): Likewise.
16343         * utils.c (do_ui_out_redirect_pop): Likewise.
16344
16345 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16346
16347         * stack.c (_initialize_stack): Update "frame" command help message.
16348
16349 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16350
16351         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16352
16353 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16354
16355         * x86-linux-nat.h: Include gdb_proc_service.h.
16356
16357 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16358
16359         * ser-base.h: Include serial.h.
16360
16361 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16362
16363         * ppc-linux-tdep.h: Include ppc-tdep.h.
16364
16365 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16366
16367         * nat/amd64-linux-siginfo.h: Include signal.h.
16368
16369 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16370
16371         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16372
16373 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16374
16375         * mi/mi-parse.h: Include mi-cmds.h.
16376
16377 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16378
16379         * inf-loop.c: Don't include "target.h".
16380         * inf-loop.h: Include it here.
16381
16382 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16383
16384         * dfp.h: Include "dboulest.h" and "expression.h".
16385
16386 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16387
16388         * ax-gdb.h: Include "ax.h".
16389
16390 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16391
16392         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16393         with nat/gdb_ptrace.h.
16394
16395 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16396
16397         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16398         new line.
16399         (mips64_fbsd_sigframe_init): Likewise.
16400
16401 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16402
16403         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16404         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16405
16406 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16407
16408         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16409         * NEWS: Mention new FreeBSD/mips native configuration.
16410         * config/mips/fbsd.mh: New file.
16411         * configure.host: Add mips*-*-freebsd*.
16412         * mips-fbsd-nat.c: New file.
16413
16414 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16415
16416         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16417         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16418         * NEWS: Mention new FreeBSD/mips target.
16419         * configure.tgt: Add mips*-*-freebsd*.
16420         * mips-fbsd-tdep.c: New file.
16421         * mips-fbsd-tdep.h: New file.
16422
16423 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16424
16425         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16426         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16427
16428 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16429
16430         Update copyright year range in all GDB files.
16431
16432 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16433
16434         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16435
16436 For older changes see ChangeLog-2016.
16437 \f
16438 Local Variables:
16439 mode: change-log
16440 left-margin: 8
16441 fill-column: 74
16442 version-control: never
16443 coding: utf-8
16444 End: