remote: C++ify thread_item and threads_listing_context
[external/binutils.git] / gdb / ChangeLog
1 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * remote.c (struct thread_item): Add constructor, disable copy
4         construction and copy assignment, define default move
5         construction and move assignment.
6         <extra, name>: Change type to std::string.
7         <core>: Initialize.
8         <thread_handle>: Make non-pointer.
9         (thread_item_t): Remove typedef.
10         (DEF_VEC_O(thread_item_t)): Remove.
11         (threads_listing_context) <contains_thread>: New method.
12         <remove_thread>: New method.
13         <items>: Change type to std::vector.
14         (clear_threads_listing_context): Remove.
15         (threads_listing_context_remove): Remove.
16         (remote_newthread_step): Use thread_item constructor, adjust to
17         change to std::vector.
18         (start_thread): Use thread_item constructor, adjust to change to
19         std::vector.
20         (end_thread): Adjust to change to std::vector and std::string.
21         (remote_get_threads_with_qthreadinfo): Use thread_item
22         constructor, adjust to std::vector.
23         (remote_update_thread_list): Adjust to change to std::vector and
24         std::string, use threads_listing_context methods.
25         (remove_child_of_pending_fork): Adjust.
26         (remove_new_fork_children): Adjust.
27         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
28         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
29         * unittests/rsp-low-selftests.c: New file.
30         * common/rsp-low.h: Include common/byte-vector.h.
31         (hex2bin): New overload.
32         * common/rsp-low.c (hex2bin): New overload.
33
34 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
35
36         * inferior.h (private_inferior): Define structure type, add
37         virtual pure destructor.
38         (inferior) <priv>: Change type to unique_ptr.
39         * inferior.c (private_inferior::~private_inferior): Provide
40         default implementation.
41         (inferior::~inferior): Don't free priv field.
42         (exit_inferior_1): Likewise.
43         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
44         (darwin_exception_info): Remove typedef.
45         (DEF_VEC_O (darwin_thread_t)); Remove.
46         (private_inferior): Rename to ...
47         (darwin_private_inferior): ... this, extend private_inferior.
48         (get_darwin_inferior): New.
49         <threads>: Change type to std::vector of darwin_thread_t pointers.
50         * darwin-nat.c (darwin_check_new_threads): Adjust.
51         (find_inferior_task_it): Adjust.
52         (darwin_find_thread); Adjust.
53         (darwin_suspend_inferior): Adjust.
54         (darwin_resume_inferior): Adjust.
55         (darwin_find_new_inferior): Adjust.
56         (darwin_decode_notify_message): Adjust.
57         (darwin_send_reply): Adjust.
58         (darwin_resume_inferior_threads): Adjust.
59         (darwin_suspend_inferior_threads): Adjust.
60         (darwin_decode_message): Adjust.
61         (darwin_wait): Adjust.
62         (darwin_interrupt): Adjust.
63         (darwin_deallocate_threads): Adjust.
64         (darwin_mourn_inferior): Adjust, don't free private data.
65         (darwin_reply_to_all_pending_messages): Adjust.
66         (darwin_stop_inferior): Adjust.
67         (darwin_setup_exceptions): Adjust.
68         (darwin_kill_inferior): Adjust.
69         (darwin_setup_request_notification): Adjust.
70         (darwin_attach_pid): Adjust.
71         (darwin_init_thread_list): Adjust.
72         (darwin_setup_fake_stop_event): Adjust.
73         (darwin_attach): Adjust.
74         (darwin_detach): Adjust.
75         (darwin_xfer_partial): Adjust.
76         (set_enable_mach_exceptions): Adjust.
77         (darwin_pid_to_exec_file): Adjust.
78         (darwin_get_ada_task_ptid): Adjust.
79         * darwin-nat-info.c (get_task_from_args): Adjust.
80         (info_mach_ports_command): Adjust.
81         (info_mach_region_command): Adjust.
82         (info_mach_exceptions_command): Adjust.
83         * remote.c (private_inferior): Rename to ...
84         (remote_private_inferior): ... this, initialize fields.
85         (get_remote_inferior); New.
86         (remote_commit_resume): Use get_remote_inferior.
87         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
88
89 2017-11-24  Pedro Alves  <palves@redhat.com>
90
91         * NEWS: Mention linespecs and explicit locations, and completion
92         improvements.
93
94 2017-11-24  Yao Qi  <yao.qi@linaro.org>
95
96         * regcache.c (regcache::dump): Remove footnote_register_size.
97
98 2017-11-24  Yao Qi  <yao.qi@linaro.org>
99
100         * regcache.c (cooked_read_test): Add more test for readonly
101         regcache.
102
103 2017-11-24  Yao Qi  <yao.qi@linaro.org>
104
105         * gdbarch-selftests.c (test_target_has_registers): Move it to
106         target.c.
107         (test_target_has_stack): Likewise.
108         (test_target_has_memory): Likewise.
109         (test_target_prepare_to_store): Likewise.
110         (test_target_store_registers): Likewise.
111         (test_target_ops): Likewise.
112         * regcache.c: Include selftest-arch.h and gdbthread.h.
113         (target_ops_no_register): New class.
114         (test_target_fetch_registers): New.
115         (test_target_store_registers): New.
116         (test_target_xfer_partial): New.
117         (readwrite_regcache): New.
118         (cooked_read_test): New.
119         (_initialize_regcache): Register the test.
120         * target.c: (test_target_has_registers): Moved from
121         gdbarch-selftests.c.
122         (test_target_has_stack): Likewise.
123         (test_target_has_memory): Likewise.
124         (test_target_prepare_to_store): Likewise.
125         (test_target_store_registers): Likewise.
126         * target.h (test_target_ops): New class.
127
128 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
129
130         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
131         selftest.
132
133 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
134
135         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
136         * arch/aarch64.c (aarch64_create_target_description): Create
137         new target description.
138         * features/Makefile: Add new files.
139         * features/aarch64.c: Remove file.
140         * features/aarch64-core.c: New autogenerated file.
141         * features/aarch64-fpu.c: New autogenerated file.
142         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
143
144 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
145
146         * Makefile.in: Add new files.
147         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
148         aarch64_read_description.
149         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
150         Call aarch64_read_description.
151         * aarch64-tdep.c (aarch64_read_description): New function.
152         (aarch64_gdbarch_init): Call aarch64_read_description.
153         * aarch64-tdep.h (aarch64_read_description): New function.
154         * arch/aarch64.c: New file.
155         * configure.tgt: Add new files.
156
157 2017-11-24  Yao Qi  <yao.qi@linaro.org>
158
159         * mi/mi-main.c (register_changed_p): Update.
160         * value.c (value_contents_bits_eq): Change return type.
161         (value_contents_eq): Likewise.
162         * value.h: Update comments.
163
164 2017-11-24  Yao Qi  <yao.qi@linaro.org>
165
166         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
167         local 'changed'.  Remove error.
168         (register_changed_p): Change return type to bool.
169
170 2017-11-24  Yao Qi  <yao.qi@linaro.org>
171
172         * arch/tic6x.c: New file.
173         * arch/tic6x.h: New file.
174         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
175         tic6x-core.xml and tic6x-gp.xml.
176         * features/tic6x-c6xp.c: Generated.
177         * features/tic6x-core.c: Generated.
178         * features/tic6x-gp.c: Generated.
179         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
180         "tic6x-".
181
182 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
183
184         * mi/mi-main.c (list_available_thread_groups): Change map value
185         type to std::vector.
186
187 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
188
189         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
190
191 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
192
193         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
194         back to...
195         <children_requested>: ... this.
196         (varobj_get_num_children, varobj_update): Adjust.
197
198 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
199
200         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
201         (ada_value_has_mutated): Likewise.
202         * c-varobj.c (varobj_is_anonymous_child): Likewise.
203         (c_is_path_expr_parent): Likewise.
204         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
205         (mi_cmd_var_set_frozen): Likewise.
206         (mi_cmd_var_update_iter): Likewise.
207         (mi_cmd_var_update): Likewise.
208         * varobj.c (pretty_printing): Likewise.
209         (varobj_enable_pretty_printing): Likewise.
210         (struct varobj_root) <floating, is_valid>: Likewise.
211         (struct varobj_dynamic) <children_requested>: Likewise.
212         (delete_variable): Likewise.
213         (delete_variable_1): Likewise.
214         (install_variable): Likewise.
215         (update_type_if_necessary): Likewise.
216         (install_new_value): Likewise.
217         (value_of_root): Likewise.
218         (is_root_p): Likewise.
219         (varobj_create): Likewise.
220         (varobj_delete): Likewise.
221         (varobj_has_more): Likewise.
222         (varobj_set_frozen): Likewise.
223         (varobj_get_frozen): Likewise.
224         (install_dynamic_child): Likewise.
225         (dynamic_varobj_has_child_method): Likewise.
226         (update_dynamic_varobj_children): Likewise.
227         (varobj_get_num_children): Likewise.
228         (varobj_list_children): Likewise.
229         (is_path_expr_parent): Likewise.
230         (varobj_default_is_path_expr_parent): Likewise.
231         (varobj_is_dynamic_p): Likewise.
232         (varobj_set_value): Likewise.
233         (varobj_value_has_mutated): Likewise.
234         (varobj_update): Likewise.
235         (check_scope): Likewise.
236         (value_of_root_1): Likewise.
237         (varobj_value_get_print_value): Likewise.
238         (varobj_editable_p): Likewise.
239         (varobj_value_is_changeable_p): Likewise.
240         (varobj_floating_p): Likewise.
241         (varobj_default_value_is_changeable_p): Likewise.
242         (varobj_invalidate_iter): Likewise.
243         * varobj.h (struct varobj_update_result) <type_changed,
244         children_changed, changed, value_installed>: Likewise.
245         (struct varobj) <updated, frozen, not_fetched>: Likewise.
246         (struct lang_varobj_ops) <value_is_changeable_p,
247         value_has_mutated, is_path_expr_parent>: Likewise.
248         (varobj_delete): Likewise.
249         (varobj_set_frozen): Likewise.
250         (varobj_get_frozen): Likewise.
251         (varobj_set_value): Likewise.
252         (varobj_update): Likewise.
253         (varobj_editable_p): Likewise.
254         (varobj_floating_p): Likewise.
255         (varobj_has_more): Likewise.
256         (varobj_is_dynamic_p): Likewise.
257         (varobj_default_value_is_changeable_p): Likewise.
258         (varobj_value_is_changeable_p): Likewise.
259         (varobj_is_anonymous_child): Likewise.
260         (varobj_default_is_path_expr_parent): Likewise.
261
262 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
263
264         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
265         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
266         <type_str>: Convert to 'std::string'.
267         <expr>: Convert to 'expression_up'.
268         (dtrace_probe_arg_s): Delete type and VEC.
269         (dtrace_probe_enabler_s): Likewise.
270         (struct dtrace_probe): Replace by...
271         (class dtrace_static_probe_ops): ...this and...
272         (class dtrace_probe): ...this.
273         (dtrace_probe_is_linespec): Rename to...
274         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
275         to reflect change.
276         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
277         Adjust code.  Create new instance of 'dtrace_probe'.
278         (dtrace_build_arg_exprs): Rename to...
279         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
280         reflect change.
281         (dtrace_get_probes): Rename to...
282         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
283         to reflect change.
284         (dtrace_get_arg): Rename to...
285         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
286         reflect change.
287         (dtrace_probe_is_enabled): Rename to...
288         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
289         change.
290         (dtrace_get_probe_address): Rename to...
291         (dtrace_probe::get_relocated_address): ...this.  Adjust code
292         to reflect change.
293         (dtrace_get_probe_argument_count): Rename to...
294         (dtrace_probe::get_argument_count): ...this.  Adjust code to
295         reflect change.
296         (dtrace_can_evaluate_probe_arguments): Rename to...
297         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
298         to reflect change.
299         (dtrace_evaluate_probe_argument): Rename to...
300         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
301         reflect change.
302         (dtrace_compile_to_ax): Rename to...
303         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
304         reflect change.
305         (dtrace_probe_destroy): Delete.
306         (dtrace_type_name): Rename to...
307         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
308         reflect change.
309         (dtrace_probe::get_static_ops): New method.
310         (dtrace_gen_info_probes_table_header): Rename to...
311         (dtrace_static_probe_ops::gen_info_probes_table_header):
312         ...this.  Adjust code to reflect change.
313         (dtrace_gen_info_probes_table_values): Rename to...
314         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
315         code to reflect change.
316         (dtrace_enable_probe): Rename to...
317         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
318         change.
319         (dtrace_disable_probe): Rename to...
320         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
321         change.
322         (struct probe_ops dtrace_probe_ops): Delete.
323         (info_probes_dtrace_command): Call 'info_probes_for_spops'
324         instead of 'info_probes_for_ops'.
325         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
326         of 'all_probe_ops'.
327
328 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
329             Simon Marchi  <simark@simark.ca>
330
331         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
332         variable.
333         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
334         <aexpr>: Change type to 'expression_up'.
335         (stap_probe_arg_s): Delete type and VEC.
336         (struct stap_probe): Delete.  Replace by...
337         (class stap_static_probe_ops): ...this and...
338         (class stap_probe): ...this.  Rename variables to add 'm_'
339         prefix.  Do not use 'union' for arguments anymore.
340         (stap_get_expected_argument_type): Receive probe name instead
341         of 'struct stap_probe'.  Adjust code.
342         (stap_parse_probe_arguments): Rename to...
343         (stap_probe::parse_arguments): ...this.  Adjust code to
344         reflect change.
345         (stap_get_probe_address): Rename to...
346         (stap_probe::get_relocated_address): ...this.  Adjust code
347         to reflect change.
348         (stap_get_probe_argument_count): Rename to...
349         (stap_probe::get_argument_count): ...this.  Adjust code
350         to reflect change.
351         (stap_get_arg): Rename to...
352         (stap_probe::get_arg_by_number'): ...this. Adjust code to
353         reflect change.
354         (can_evaluate_probe_arguments): Rename to...
355         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
356         to reflect change.
357         (stap_evaluate_probe_argument): Rename to...
358         (stap_probe::evaluate_argument): ...this.  Adjust code
359         to reflect change.
360         (stap_compile_to_ax): Rename to...
361         (stap_probe::compile_to_ax): ...this.  Adjust code to
362         reflect change.
363         (stap_probe_destroy): Delete.
364         (stap_modify_semaphore): Adjust comment.
365         (stap_set_semaphore): Rename to...
366         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
367         change.
368         (stap_clear_semaphore): Rename to...
369         (stap_probe::clear_semaphore): ...this.  Adjust code to
370         reflect change.
371         (stap_probe::get_static_ops): New method.
372         (handle_stap_probe): Adjust code to create instance of
373         'stap_probe'.
374         (stap_get_probes): Rename to...
375         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
376         reflect change.
377         (stap_probe_is_linespec): Rename to...
378         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
379         reflect change.
380         (stap_type_name): Rename to...
381         (stap_static_probe_ops::type_name): ...this.  Adjust code to
382         reflect change.
383         (stap_gen_info_probes_table_header): Rename to...
384         (stap_static_probe_ops::gen_info_probes_table_header):
385         ...this.  Adjust code to reflect change.
386         (stap_gen_info_probes_table_values): Rename to...
387         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
388         code to reflect change.
389         (struct probe_ops stap_probe_ops): Delete.
390         (info_probes_stap_command): Use 'info_probes_for_spops'
391         instead of 'info_probes_for_ops'.
392         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
393         of 'all_probe_ops'.
394
395 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
396
397         * break-catch-throw.c (fetch_probe_arguments): Use
398         'probe.prob' instead of 'probe.probe'.
399         * breakpoint.c (create_longjmp_master_breakpoint): Call
400         'can_evaluate_arguments' and 'get_relocated_address' methods
401         from probe.
402         (create_exception_master_breakpoint): Likewise.
403         (add_location_to_breakpoint): Use 'sal->prob' instead of
404         'sal->probe'.
405         (bkpt_probe_insert_location): Call 'set_semaphore' method from
406         probe.
407         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
408         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
409         of 'probe_ops'.
410         (probe_key_free): Call 'delete' on probe.
411         (check_exception_resume): Use 'probe.prob' instead of
412         'probe.probe'.
413         * location.c (string_to_event_location_basic): Call
414         'probe_linespec_to_static_ops'.
415         * probe.c (class any_static_probe_ops): New class.
416         (any_static_probe_ops any_static_probe_ops): New variable.
417         (parse_probes_in_pspace): Receive 'static_probe_ops' as
418         argument.  Adjust code to reflect change.
419         (parse_probes): Use 'static_probe_ops' instead of
420         'probe_ops'.  Adjust code to reflect change.
421         (find_probes_in_objfile): Call methods to get name and
422         provider from probe.
423         (find_probe_by_pc): Use 'result.prob' instead of
424         'result.probe'.  Call 'get_relocated_address' method from
425         probe.
426         (collect_probes): Adjust comment and argument list to receive
427         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
428         reflect change.  Call necessary methods from probe.
429         (compare_probes): Call methods to get name and provider from
430         probes.
431         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
432         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
433         adjust code accordingly.
434         (print_ui_out_not_applicables): Likewise.
435         (info_probes_for_ops): Rename to...
436         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
437         as argument instead of 'probe_ops'.  Adjust code.  Call
438         necessary methods from probe.
439         (info_probes_command): Use 'info_probes_for_spops'.
440         (enable_probes_command): Pass correct argument to
441         'collect_probes'.  Call methods from probe.
442         (disable_probes_command): Likewise.
443         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
444         (get_probe_argument_count): Move to
445         'any_static_probe_ops::get_argument_count'.
446         (can_evaluate_probe_arguments): Move to
447         'any_static_probe_ops::can_evaluate_arguments'.
448         (evaluate_probe_argument): Move to
449         'any_static_probe_ops::evaluate_argument'.
450         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
451         'probe.probe'.
452         (probe_linespec_to_ops): Rename to...
453         (probe_linespec_to_static_ops): ...this.  Adjust code.
454         (probe_any_is_linespec): Rename to...
455         (any_static_probe_ops::is_linespec): ...this.
456         (probe_any_get_probes): Rename to...
457         (any_static_probe_ops::get_probes): ...this.
458         (any_static_probe_ops::type_name): New method.
459         (any_static_probe_ops::gen_info_probes_table_header): New
460         method.
461         (compute_probe_arg): Use 'pc_probe.prob' instead of
462         'pc_probe.probe'.  Call methods from probe.
463         (compile_probe_arg): Likewise.
464         (std::vector<const probe_ops *> all_probe_ops): Delete.
465         (std::vector<const static_probe_ops *> all_static_probe_ops):
466         New variable.
467         (_initialize_probe): Use 'all_static_probe_ops' instead of
468         'all_probe_ops'.
469         * probe.h (struct info_probe_column) <field_name>: Delete
470         extraneous newline
471         (info_probe_column_s): Delete type and VEC.
472         (struct probe_ops): Delete.  Replace with...
473         (class static_probe_ops): ...this and...
474         (clas probe): ...this.
475         (struct bound_probe) <bound_probe>: Delete extraneous
476         newline.  Adjust constructor to receive 'probe' instead of
477         'struct probe'.
478         <probe>: Rename to...
479         <prob>: ...this.  Delete extraneous newline.
480         <objfile>: Delete extraneous newline.
481         (register_probe_ops): Delete unused prototype.
482         (info_probes_for_ops): Rename to...
483         (info_probes_for_spops): ...this.  Adjust comment.
484         (get_probe_address): Move to 'probe::get_address'.
485         (get_probe_argument_count): Move to
486         'probe::get_argument_count'.
487         (can_evaluate_probe_arguments): Move to
488         'probe::can_evaluate_arguments'.
489         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
490         * solib-svr4.c (struct svr4_info): Adjust comment.
491         (struct probe_and_action) <probe>: Rename to...
492         <prob>: ...this.
493         (register_solib_event_probe): Receive 'probe' instead of
494         'struct probe' as argument.  Use 'prob' instead of 'probe'
495         when applicable.
496         (solib_event_probe_action): Call 'get_argument_count' method
497         from probe.  Adjust comment.
498         (svr4_handle_solib_event): Adjust comment.  Call
499         'evaluate_argument' method from probe.
500         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
501         from probe.
502         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
503         'struct probe'.  Call 'can_evaluate_arguments' from probe.
504         * symfile.h: Forward declare 'class probe' instead of 'struct
505         probe'.
506         * symtab.h: Likewise.
507         (struct symtab_and_line) <probe>: Rename to...
508         <prob>: ...this.
509         * tracepoint.c (start_tracing): Use 'prob' when applicable.
510         Call probe methods.
511         (stop_tracing): Likewise.
512
513 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
514
515         * ravenscar-thread.c (ravenscar_inferior_created): Remove
516         trailing newline at end of string in call to warning.
517
518 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
519
520         * osdata.h: Include vector isntead of vec.h.
521         (osdata_column_s): Remove typedef.
522         (struct osdata_column): Add constructor.
523         <name, value>: Change type to std::string.
524         (DEF_VEC_O (osdata_column_s)): Remove.
525         (osdata_item_s): Remove typedef.
526         (struct osdata_item) <columns>: Change type to std::vector.
527         (DEF_VEC_O (osdata_item_s)): Remove.
528         (struct osdata): Add constructor.
529         <type>: Change type to std::string.
530         <items>: Change type to std::vector.
531         (osdata_p): Remove typedef.
532         (DEF_VEC_P (osdata_p)): Remove.
533         (osdata_parse): Return a unique_ptr.
534         (osdata_free): Remove.
535         (make_cleanup_osdata_free): Remove.
536         (get_osdata): Return a unique_ptr.
537         (get_osdata_column): Return pointer to std::string, take a
538         reference to osdata_item as parameter.
539         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
540         unique_ptr.
541         <property_name>: Change type to std::string.
542         (osdata_start_osdata): Allocate osdata with new and adjust.
543         (osdata_start_item): Adjust.
544         (osdata_start_column): Adjust.
545         (osdata_end_column): Adjust.
546         (clear_parsing_data): Remove.
547         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
548         (osdata_item_clear): Remove.
549         (get_osdata): return a unique_ptr and adjust.
550         (get_osdata_column): Return a pointer to std::string and adjust.
551         (info_osdata): Adjust.
552         * mi/mi-main.c: Include <map>.
553         (free_vector_of_osdata_items): Remove.
554         (list_available_thread_groups): Adjust, use std::map instead of
555         splay tree.
556
557 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
558
559         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
560         case in switch.
561
562 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
563
564         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
565
566 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
567
568         * varobj.h (struct varobj_update_result): Add constructor, add
569         move constructor, disable copy and assign, initialize fields.
570         <newobj>: Change type to std::vector.
571         (varobj_update): Return std::vector.
572         * varobj.c (install_dynamic_child): Change VEC parameters to
573         std::vector and adjust.
574         (update_dynamic_varobj_children): Likewise.
575         (varobj_update): Return std::vector and adjust.
576         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
577
578 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
579
580         * varobj.h (struct varobj) <parent>: Remove const.
581         <children>: Change type to std::vector.
582         (varobj_list_children): Return std::vector const reference.
583         (varobj_restrict_range): Change parameter type to std::vector
584         const reference.
585         * varobj.c (varobj_has_more): Adjust.
586         (varobj_restrict_range): Change parameter type to std::vector
587         const reference and adjust.
588         (install_dynamic_child): Adjust.
589         (update_dynamic_varobj_children): Adjust.
590         (varobj_list_children): Return std::vector const reference and
591         adjust.
592         (varobj_add_child): Adjust.
593         (update_type_if_necessary): Adjust.
594         (varobj_update): Adjust.
595         (delete_variable_1): Adjust.
596         * ada-varobj.c (ada_value_has_mutated): Adjust.
597         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
598
599 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
600
601         * varobj.h (struct varobj): Add constructor and destructor,
602         initialize fields.
603         * varobj.c (struct varobj_root): Initialize fields.
604         (struct varobj_dynamic): Initialize fields.
605         (varobj_create): Use unique_ptr instead of cleanup.  Create
606         varobj with new instead of new_root_variable.
607         (delete_variable_1): Free variable with delete instead of
608         free_variable.
609         (create_child_with_value): Create variable with new instead of
610         new_variable.
611         (varobj::varobj): New.
612         (varobj::~varobj): New (body mostly coming from free_variable).
613         (new_variable): Remove.
614         (free_variable): Remove.
615         (do_free_variable_cleanup): Remove.
616         (make_cleanup_free_variable): Remove.
617
618 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
619
620         * core-regset.c: Remove file.
621         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
622
623 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
624
625         * NEWS: Document use of GNU MPFR.
626         * README: Likewise.
627
628         * Makefile.in (LIBMPFR): Add define.
629         (CLIBS): Add $(LIBMPFR).
630         * configure.ac: Add --with-mpfr configure option.
631         * configure: Regenerate.
632         * config.in: Regenerate.
633
634         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
635         (class mpfr_float_ops): New type.
636         (mpfr_float_ops::from_target): Two new overloaded functions.
637         (mpfr_float_ops::to_target): Likewise.
638         (mpfr_float_ops::to_string): New function.
639         (mpfr_float_ops::from_string): Likewise.
640         (mpfr_float_ops::to_longest): Likewise.
641         (mpfr_float_ops::from_longest): Likewise.
642         (mpfr_float_ops::from_ulongest): Likewise.
643         (mpfr_float_ops::to_host_double): Likewise.
644         (mpfr_float_ops::from_host_double): Likewise.
645         (mpfr_float_ops::convert): Likewise.
646         (mpfr_float_ops::binop): Likewise.
647         (mpfr_float_ops::compare): Likewise.
648         (get_target_float_ops): Use mpfr_float_ops if available.
649
650 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
651
652         * target-float.c: Do not include <math.h>.
653         Include <cmath> and <limits>.
654         (DOUBLEST): Do not define.
655         (class target_float_ops): New type.
656         (class host_float_ops): New templated type.
657         (class decimal_float_ops): New type.
658
659         (floatformat_to_doublest): Rename to ...
660         (host_float_ops<T>::from_target): ... this.  Use template type T
661         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
662         (host_float_ops<T>::from_target): New overload using a type argument.
663         (floatformat_from_doublest): Rename to ...
664         (host_float_ops<T>::to_target): ... this.  Use template type T
665         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
666         (host_float_ops<T>::to_target): New overload using a type argument.
667         (floatformat_printf_format): New function.
668         (struct printf_length_modifier): New templated type.
669         (floatformat_to_string): Rename to ...
670         (host_float_ops<T>::to_string): ... this.  Use type instead of
671         floatformat argument.  Use floatformat_printf_format and
672         printf_length_modifier.  Remove special handling of invalid numbers,
673         infinities and NaN (moved to target_float_to_string).
674         (struct scanf_length_modifier): New templated type.
675         (floatformat_from_string): Rename to ...
676         (host_float_ops<T>::from_string): ... this.  Use type instead of
677         floatformat argument.  Use scanf_length_modifier.
678         (floatformat_to_longest): Rename to ...
679         (host_float_ops<T>::to_longest): ... this.  Use type instead of
680         floatformat argument.  Handle out-of-range values deterministically.
681         (floatformat_from_longest): Rename to ...
682         (host_float_ops<T>::from_longest): ... this.  Use type instead of
683         floatformat argument.
684         (floatformat_from_ulongest): Rename to ...
685         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
686         floatformat argument.
687         (floatformat_to_host_double): Rename to ...
688         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
689         floatformat argument.
690         (floatformat_from_host_double): Rename to ...
691         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
692         floatformat argument.
693         (floatformat_convert): Rename to ...
694         (host_float_ops<T>::convert): ... this.  Use type instead of
695         floatformat arguments.  Remove handling of no-op conversions.
696         (floatformat_binop): Rename to ...
697         (host_float_ops<T>::binop): ... this.  Use type instead of
698         floatformat arguments.
699         (floatformat_compare): Rename to ...
700         (host_float_ops<T>::compare): ... this.  Use type instead of
701         floatformat arguments.
702
703         (match_endianness): Use type instead of length/byte_order arguments.
704         (set_decnumber_context): Likewise.
705         (decimal_from_number): Likewise.  Update calls.
706         (decimal_to_number): Likewise.
707         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
708         (decimal_float_ops::to_host_double): New dummy function.
709         (decimal_float_ops::from_host_double): Likewise.
710         (decimal_to_string): Rename to ...
711         (decimal_float_ops::to_string): ... this.  Use type instead of
712         length/byte_order arguments.  Update calls.
713         (decimal_from_string): Rename to ...
714         (decimal_float_ops::from_string): ... this.  Use type instead of
715         length/byte_order arguments.  Update calls.
716         (decimal_from_longest): Rename to ...
717         (decimal_float_ops::from_longest): ... this.  Use type instead of
718         length/byte_order arguments.  Update calls.
719         (decimal_from_ulongest): Rename to ...
720         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
721         length/byte_order arguments.  Update calls.
722         (decimal_to_longest): Rename to ...
723         (decimal_float_ops::to_longest): ... this.  Use type instead of
724         length/byte_order arguments.  Update calls.
725         (decimal_binop): Rename to ...
726         (decimal_float_ops::binop): ... this.  Use type instead of
727         length/byte_order arguments.  Update calls.
728         (decimal_compare): Rename to ...
729         (decimal_float_ops::compare): ... this.  Use type instead of
730         length/byte_order arguments.  Update calls.
731         (decimal_convert): Rename to ...
732         (decimal_float_ops::convert): ... this.  Use type instead of
733         length/byte_order arguments.  Update calls.
734
735         (target_float_same_category_p): New function.
736         (target_float_same_format_p): Likewise.
737         (target_float_format_length): Likewise.
738         (enum target_float_ops_kind): New type.
739         (get_target_float_ops_kind): New function.
740         (get_target_float_ops): Three new overloaded functions.
741
742         (target_float_is_zero): Update call.
743         (target_float_to_string): Add special handling of invalid numbers,
744         infinities and NaN (moved from floatformat_to_string).  Use
745         target_float_ops callback.
746         (target_float_from_string): Use target_float_ops callback.
747         (target_float_to_longest): Likewise.
748         (target_float_from_longest): Likewise.
749         (target_float_from_ulongest): Likewise.
750         (target_float_to_host_double): Likewise.
751         (target_float_from_host_double): Likewise.
752         (target_float_convert): Add special case for no-op conversions.
753         Use target_float_ops callback.
754         (target_float_binop): Use target_float_ops callback.
755         (target_float_compare): Likewise.
756
757 2017-11-22  Yao Qi  <yao.qi@linaro.org>
758
759         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
760
761 2017-11-22  Yao Qi  <yao.qi@linaro.org>
762
763         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
764         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
765
766 2017-11-21  Jerome Guitton  <guitton@adacore.com>
767
768         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
769         with event ptid from the lower layer before doing the
770         ravenscar-specific update.
771
772 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
773
774         * ravenscar-thread.c (is_ravenscar_task): Also verify that
775         the ptid's TID is nonzero.
776
777 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
778
779         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
780         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
781         Make non-static.  Change return type to char *.  Adjust code
782         accordingly.  Rewrite the function's documentation.
783         (read_atcb): Adjust call to get_tcb_types_info accordingly.
784         * ravenscar-thread.c (ravenscar_inferior_created): Check that
785         we have enough debugging information in the runtime to support
786         Ada task debugging before we enable the ravenscar-thread layer.
787
788 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
789
790         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
791         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
792         * ravenscar-thread.c: Add into comment.
793         (base_magic_null_ptid): Delete.
794         (base_ptid): Change documentation.
795         (ravenscar_active_task): Renames ravenscar_running_thread.
796         All callers updated throughout.
797         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
798         (ravenscar_task_is_currently_active): Likewise.
799         (get_base_thread_from_ravenscar_task): Ditto.
800         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
801         (ravenscar_runtime_initialized): Likewise.
802         (get_running_thread_id): Add new parameter "cpu".  Adjust
803         implementation to handle this new parameter.
804         (ravenscar_fetch_registers): Small adjustment to use
805         is_ravenscar_task and ravenscar_task_is_currently_active in
806         order to decide whether to use the target beneath or this
807         module's arch_ops.
808         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
809         (ravenscar_stopped_by_sw_breakpoint): Use
810         get_base_thread_from_ravenscar_task to get the underlying
811         thread, rather than using base_ptid.
812         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
813         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
814         Likewise.
815         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
816
817 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
818
819         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
820         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
821         (get_tcb_types_info): Set fieldnos.base_cpu.
822         (read_atcb): Set task_info->base_cpu.
823         (info_task): Print "Base CPU" info if set by runtime.
824
825 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
826
827         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
828         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
829         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
830         New functions.
831         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
832         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
833         to_stopped_data_address and to_core_of_thread fields of
834         ravenscar_ops.
835
836 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
837
838         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
839         (struct gdbarch_tdep): New member long_double_abi.
840         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
841         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
842         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
843         format depending on long_double_abi tdep member.
844         (ppc_floatformat_for_type): Handle __ibm128 type.
845
846 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
847
848         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
849
850 2017-11-21  Pedro Alves  <palves@redhat.com>
851
852         * dwarf2read.c (mapped_index::find_name_components_bounds)
853         <completion mode, upper bound>: Use std::lower_bound instead of
854         std::upper_bound.
855         (test_mapped_index_find_name_component_bounds): Remove incorrect
856         "t1_fund" from expected symbols.
857
858 2017-11-21  Pedro Alves  <palves@redhat.com>
859
860         * dwarf2read.c (mapped_index::name_components_casing): New field.
861         (mapped_index) <build_name_components,
862         find_name_components_bounds): Declare new methods.
863         (mapped_index::find_name_components_bounds)
864         (mapped_index::build_name_components): New methods, factored out
865         from dw2_expand_symtabs_matching_symbol.
866         (check_find_bounds_finds)
867         (test_mapped_index_find_name_component_bounds): New.
868         (run_test): Rename to ...
869         (test_dw2_expand_symtabs_matching_symbol): ... this.
870         (run_test): Reimplement.
871
872 2017-11-21  Pedro Alves  <palves@redhat.com>
873
874         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
875         (symbol_end): Use cp_ident_is_alnum.
876         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
877         * dwarf2read.c (make_sort_after_prefix_name): New function.
878         (dw2_expand_symtabs_matching_symbol): Use it.
879         (test_symbols): Add more symbols.
880         (run_test): Add tests.
881
882 2017-11-17  Tom Tromey  <tom@tromey.com>
883
884         * symtab.h (enum symbol_subclass_kind): New.
885         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
886         Remove.
887         <subclass>: New member.
888         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
889         * rust-lang.c (rust_get_trait_object_pointer): Update.
890         * dwarf2read.c (read_func_scope): Update.
891         (read_variable): Update.
892
893 2017-11-17  Tom Tromey  <tom@tromey.com>
894
895         * dwarf2read.c (read_func_scope): Update.
896         * symtab.h (struct template_symbol): Derive from symbol.
897         <base>: Remove.
898
899 2017-11-17  Tom Tromey  <tom@tromey.com>
900
901         * symtab.h (struct symbol) <is_rust_vtable>: New member.
902         (struct rust_vtable_symbol): New.
903         (find_symbol_at_address): Declare.
904         * symtab.c (find_symbol_at_address): New function.
905         * symfile.h (struct quick_symbol_functions)
906         <find_compunit_symtab_by_address>: New member.
907         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
908         function.
909         (debug_sym_quick_functions): Link to
910         debug_qf_find_compunit_symtab_by_address.
911         * rust-lang.c (rust_get_trait_object_pointer): New function.
912         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
913         rust_get_trait_object_pointer.
914         * psymtab.c (psym_relocate): Clear psymbol_map.
915         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
916         functions.
917         (psym_functions): Link to psym_find_compunit_symtab_by_address.
918         * objfiles.h (struct objfile) <psymbol_map>: New member.
919         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
920         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
921         (rust_containing_type, read_variable): New functions.
922
923 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
924
925         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
926
927 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
928
929         * common/filestuff.c: Include <algorithm>.
930         (open_fds): Change type to std::vector<int>.
931         (do_mark_open_fd): Adjust.
932         (unmark_fd_no_cloexec): Adjust.
933         (do_close): Adjust.
934
935 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
936
937         * breakpoint.c (output_thread_groups): Take an std::vector.
938         (print_one_breakpoint_location): Adjust.
939
940 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
941
942         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
943         (ada_evaluate_subexp_for_cast): New function.
944         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
945         ada_evaluate_subexp_for_cast.
946         (ada_evaluate_subexp) <nosideret>: Replace code by call to
947         eval_skip_value.
948         * eval.c (evaluate_var_value): Make non-static.
949         (evaluate_var_msym_value, eval_skip_value): Likewise.
950         * value.h (evaluate_var_value, evaluate_var_msym_value)
951         (eval_skip_value): Declare.
952
953 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
954
955         * ada-lang.c (ada_value_cast): Remove parameter "noside".
956         Update all callers.
957
958 2017-11-16  Pedro Alves  <palves@redhat.com>
959
960         * python/py-unwind.c (pyuw_sniffer): Translate
961         PyExc_KeyboardInterrupt to a GDB Quit exception.
962
963 2017-11-16  Pedro Alves  <palves@redhat.com>
964
965         * infrun.c (resume_cleanups): Delete.
966         (resume): No longer install a resume_cleanups cleanup nor call
967         QUIT.
968         (proceed): Pass the terminal to the inferior.
969         (keep_going_pass_signal): No longer install a resume_cleanups
970         cleanup.
971
972 2017-11-16  Pedro Alves  <palves@redhat.com>
973
974         * inf-loop.c (inferior_event_handler): Don't swallow the exception
975         if the prompt is blocked.
976
977 2017-11-16  Pedro Alves  <palves@redhat.com>
978
979         * breakpoint.c (insert_bp_location): Replace bp_err and
980         bp_err_message locals by a gdb_exception local.
981
982 2017-11-16  Pedro Alves  <palves@redhat.com>
983
984         * inflow.c (scoped_ignore_sigttou): New class.
985         (child_terminal_ours_1, new_tty): Use it.
986
987 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
988
989         * target-float.c (decimal_from_number): Add byte_order argument and
990         call match_endianness.  Error if unknown floating-point type.
991         (decimal_to_number): Add byte_order argument and call match_endianness.
992         (decimal_from_longest): Update call.  Do not call match_endianness.
993         (decimal_from_ulongest): Likewise.
994         (decimal_binop): Likewise.
995         (decimal_is_zero): Likewise.
996         (decimal_compare): Likewise.
997         (decimal_convert): Likewise.
998
999 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
1000
1001         * python/python.c (gdbpy_rbreak): New function.
1002         * NEWS: Document Python rbreak feature.
1003
1004 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1005
1006         * features/tic6x-c62x.xml: Remove.
1007         * features/tic6x-c64x.xml: Remove.
1008         * features/tic6x-c64xp.xml: Remove.
1009
1010 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1011
1012         * symtab.h: Include <array>.
1013
1014 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1015
1016         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1017         (bsd_kvm_proc_cmd): Likewise.
1018
1019 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
1020
1021         * tui/tui-win.c (window_name_completer): Replace VEC with
1022         std::vector.
1023
1024 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1025
1026         * MAINTAINERS: Remove no-longer applicable entries.
1027
1028 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1029
1030         * MAINTAINERS: Move self to Past Maintainers.
1031
1032 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1033
1034         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1035         * features/nios2-linux.c: Remove.
1036         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1037         initialize_tdesc_nios2_linux.
1038
1039 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1040
1041         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1042         M68HC11_LAST_HARD_REG + 1.
1043
1044 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
1045
1046         PR gdb/22388
1047         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1048         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1049         Return TARGET_XFER_EOF if size of returned data is 0.
1050
1051 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
1052
1053         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1054         memory-map-selftests.c.
1055         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1056         * memory-map.c (memory_map_start_memory): Fix computation of hi
1057         address.
1058         * unittests/memory-map-selftests.c: New file.
1059
1060 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
1061
1062         * ada-lang.c: Fix some typos in the general command documenting
1063         how Ada expressions are being evaluated and how their result
1064         is printed.
1065
1066 2017-11-09  Tom Tromey  <tom@tromey.com>
1067
1068         * psymtab.c (psymbol_hash): Do not hash string contents.
1069         (psymbol_compare): Add comment.
1070
1071 2017-11-09  Tom Tromey  <tom@tromey.com>
1072
1073         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1074
1075 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
1076
1077         * ada-exp.y (write_var_from_sym): Remove parameter
1078         "orig_left_context".  Update all callers.
1079
1080 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
1081
1082         * tracepoint.h (class collection_list) <stringify>: Return
1083         std::vector<std::string>.
1084         (encode_actions_rsp): Change parameters to
1085         std::vector<std::string> *.
1086         * tracepoint.c (collection_list::stringify): Return
1087         std::vector<std::string> and adjust accordingly.
1088         (encode_actions_rsp): Changee parameters to
1089         std::vector<std::string> and adjust accordingly.
1090         * remote.c (free_actions_list),
1091         free_actions_list_cleanup_wrapper): Remove.
1092         (remote_download_tracepoint): Adjust to std::vector.
1093
1094 2017-11-08  Tom Tromey  <tom@tromey.com>
1095
1096         * dwarf2read.c (symbolp): Remove typedef.
1097         (read_func_scope): Use std::vector.
1098         (process_structure_scope): Use std::vector.
1099
1100 2017-11-08  Pedro Alves  <palves@redhat.com>
1101
1102         * ada-lang.c (ada_make_symbol_completion_list): Use
1103         completion_skip_symbol.
1104         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1105         (symbol_is_function_or_method(symbol*)): New.
1106         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
1107         completion_skip_symbol.
1108         (default_collect_symbol_completion_matches_break_on): Use
1109         completion_skip_symbol.  Pass down mode.
1110         (collect_file_symbol_completion_matches): Pass down mode.
1111         * symtab.h (symbol_is_function_or_method): New declarations.
1112         (completion_skip_symbol): New template function.
1113
1114 2017-11-08  Pedro Alves  <palves@redhat.com>
1115
1116         * linespec.c (iterate_over_all_matching_symtabs): Add
1117         search_domain parameter.  Pass it down to expand_symtabs_matching.
1118         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1119         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1120         search_domain.
1121         (add_all_symbol_names_from_pspace): Add search_domain parameter.
1122         Pass it down.
1123         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1124         symbols.
1125         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
1126         it down.
1127
1128 2017-11-08  Pedro Alves  <palves@redhat.com>
1129
1130         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1131         text_len locals and don't pass them down.
1132         * symtab.c (completion_list_add_name): Remove
1133         sym_text/sym_text_len parameters and adjust.
1134         (completion_list_add_symbol, completion_list_add_msymbol)
1135         (completion_list_objc_symbol, completion_list_add_fields)
1136         (add_symtab_completions): Likewise.
1137         (default_collect_symbol_completion_matches_break_on)
1138         (collect_file_symbol_completion_matches): Remove sym_text_len
1139         local and don't pass it down.
1140         * symtab.h (completion_list_add_name): Remove
1141         sym_text/sym_text_len parameters.
1142
1143 2017-11-08  Pedro Alves  <palves@redhat.com>
1144
1145         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1146         unittests/lookup_name_info-selftests.c.
1147         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1148         * cp-support.c: Include "selftest.h".
1149         (cp_remove_params_1): Rename from cp_remove_params.  Add
1150         'require_param' parameter, and handle it.
1151         (cp_remove_params): Reimplement.
1152         (cp_remove_params_if_any): New.
1153         (selftests::quote): New.
1154         (selftests::check_remove_params): New.
1155         (selftests::test_cp_remove_params): New.
1156         (_initialize_cp_support): Install
1157         selftests::test_cp_remove_params.
1158         * cp-support.h (cp_remove_params_if_any): Declare.
1159         * dwarf2read.c :Include "selftest.h".
1160         (dw2_expand_symtabs_matching_symbol): Use
1161         lookup_name_info::make_ignore_params.
1162         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1163         (selftests::dw2_expand_symtabs_matching::string_or_null)
1164         (selftests::dw2_expand_symtabs_matching::check_match)
1165         (selftests::dw2_expand_symtabs_matching::test_symbols)
1166         (selftests::dw2_expand_symtabs_matching::run_test): New.
1167         (_initialize_dwarf2_read): Register
1168         selftests::dw2_expand_symtabs_matching::run_test.
1169         * psymtab.c (psym_expand_symtabs_matching): Use
1170         lookup_name_info::make_ignore_params.
1171         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1172         If the lookup name wants to ignore parameters, strip them.
1173         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1174         code handling '('.
1175         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1176         (default_collect_symbol_completion_matches_break_on): Don't try to
1177         strip parameters.
1178         * symtab.h (lookup_name_info::lookup_name_info): Add
1179         'ignore_parameters' parameter.
1180         (lookup_name_info::ignore_parameters)
1181         (lookup_name_info::make_ignore_params): New methods.
1182         (lookup_name_info::m_ignore_parameters): New field.
1183         * unittests/lookup_name_info-selftests.c: New file.
1184
1185 2017-11-08  Pedro Alves  <palves@redhat.com>
1186
1187         * dwarf2read.c (dw2_expand_marked_cus)
1188         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1189         (dw2_expand_symtabs_matching): Move further below.
1190         (dw2_expand_marked_cus): Reindent.
1191
1192 2017-11-08  Pedro Alves  <palves@redhat.com>
1193
1194         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1195         (struct name_component): New.
1196         (mapped_index::name_components): New field.
1197         (mapped_index::symbol_name_at): New method.
1198         (dwarf2_read_index): Call mapped_index ctor.
1199         (dw2_map_matching_symbols): Add comment about name_components
1200         table.
1201         (dw2_expand_symtabs_matching): Factor part to...
1202         (dw2_expand_symtabs_matching_symbol): ... this new function.
1203         Build name components table, and lookup symbols in it before
1204         calling the name matcher.
1205         (dw2_expand_marked_cus): New, factored out from
1206         dw2_expand_symtabs_matching.
1207         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1208
1209 2017-11-08   Pedro Alves  <palves@redhat.com>
1210
1211         * ada-lang.c (ada_encode): Rename to ..
1212         (ada_encode_1): ... this.  Add throw_errors parameter and handle
1213         it.
1214         (ada_encode): Reimplement.
1215         (match_name): Delete, folded into full_name.
1216         (resolve_subexp): No longer pass the encoded name to
1217         ada_lookup_symbol_list.
1218         (should_use_wild_match): Delete.
1219         (name_match_type_from_name): New.
1220         (ada_lookup_simple_minsym): Use lookup_name_info and the
1221         language's symbol_name_matcher_ftype.
1222         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1223         (ada_add_block_renamings): Adjust to use lookup_name_info.
1224         (ada_lookup_name): New.
1225         (add_nonlocal_symbols, ada_add_all_symbols)
1226         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1227         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1228         (ada_name_for_lookup): Delete.
1229         (ada_lookup_encoded_symbol): Construct a verbatim name.
1230         (wild_match): Reverse sense of return type.  Use bool.
1231         (full_match): Reverse sense of return type.  Inline bits of old
1232         match_name here.
1233         (ada_add_block_symbols): Adjust to use lookup_name_info.
1234         (symbol_completion_match): Delete, folded into...
1235         (ada_lookup_name_info::matches): ... .this new method.
1236         (symbol_completion_add): Delete.
1237         (ada_collect_symbol_completion_matches): Add name_match_type
1238         parameter.  Adjust to use lookup_name_info and
1239         completion_list_add_name.
1240         (get_var_value, ada_add_global_exceptions): Adjust to use
1241         lookup_name_info.
1242         (ada_get_symbol_name_cmp): Delete.
1243         (do_wild_match, do_full_match): New functions.
1244         (ada_lookup_name_info::ada_lookup_name_info): New method.
1245         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1246         functions.
1247         (ada_language_defn): Install ada_get_symbol_name_matcher.
1248         * ada-lex.l (processId): If name starts with '<', copy it
1249         verbatim.
1250         * block.c (block_iter_match_step, block_iter_match_first)
1251         (block_iter_match_next, block_lookup_symbol)
1252         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1253         lookup_name_info.
1254         * block.h (block_iter_match_first, block_iter_match_next)
1255         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1256         * c-lang.c (c_language_defn, cplus_language_defn)
1257         (asm_language_defn, minimal_language_defn): Adjust comments to
1258         refer to la_get_symbol_name_matcher.
1259         * completer.c (complete_files_symbols)
1260         (collect_explicit_location_matches, symbol_completer): Pass a
1261         symbol_name_match_type down.
1262         * completer.h (class completion_match, completion_match_result):
1263         New classes.
1264         (completion_tracker::reset_completion_match_result): New method.
1265         (completion_tracker::m_completion_match_result): New field.
1266         * cp-support.c (make_symbol_overload_list_block): Adjust to use
1267         lookup_name_info.
1268         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1269         functions.
1270         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1271         * d-lang.c: Adjust comments to refer to
1272         la_get_symbol_name_matcher.
1273         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1274         Adjust to use lookup_name_info.
1275         (dict_iter_match_first, dict_iter_match_next)
1276         (iter_match_first_hashed, iter_match_next_hashed)
1277         (iter_match_first_linear, iter_match_next_linear): Adjust to work
1278         with a lookup_name_info.
1279         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1280         Likewise.
1281         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1282         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1283         (gdb_index_symbol_name_matcher): New class.
1284         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1285         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
1286         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1287         with a symbol_name_match_type.
1288         (f_language_defn): Adjust comments to refer to
1289         la_get_symbol_name_matcher.
1290         * go-lang.c (go_language_defn): Adjust comments to refer to
1291         la_get_symbol_name_matcher.
1292         * language.c (default_symbol_name_matcher)
1293         (language_get_symbol_name_matcher): New functions.
1294         (unknown_language_defn, auto_language_defn): Adjust comments to
1295         refer to la_get_symbol_name_matcher.
1296         * language.h (symbol_name_cmp_ftype): Delete.
1297         (language_defn) <la_collect_symbol_completion_matches>: Add match
1298         type parameter.
1299         <la_get_symbol_name_cmp>: Delete field.
1300         <la_get_symbol_name_matcher>: New field.
1301         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1302         (default_symbol_name_matcher, language_get_symbol_name_matcher):
1303         Declare.
1304         * linespec.c (iterate_over_all_matching_symtabs)
1305         (iterate_over_file_blocks): Adjust to use lookup_name_info.
1306         (find_methods): Add language parameter, and use lookup_name_info
1307         and the language's symbol_name_matcher_ftype.
1308         (linespec_complete_function): Adjust.
1309         (lookup_prefix_sym): Use lookup_name_info.
1310         (add_all_symbol_names_from_pspace): Adjust.
1311         (find_superclass_methods): Add language parameter and pass it
1312         down.
1313         (find_method): Pass symbol language down.
1314         (find_linespec_symbols): Don't demangle or Ada encode here.
1315         (search_minsyms_for_name): Add lookup_name_info parameter.
1316         (add_matching_symbols_to_info): Add name_match_type parameter.
1317         Use lookup_name_info.
1318         * m2-lang.c (m2_language_defn): Adjust comments to refer to
1319         la_get_symbol_name_matcher.
1320         * minsyms.c: Include <algorithm>.
1321         (add_minsym_to_demangled_hash_table): Remove table parameter and
1322         add objfile parameter.  Use search_name_hash, and add language to
1323         demangled languages vector.
1324         (struct found_minimal_symbols): New struct.
1325         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1326         New functions.
1327         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
1328         input names here.  Use lookup_name_info instead.  Lookup up
1329         demangled names once for each language in the demangled names
1330         vector.
1331         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
1332         demangled names once for each language in the demangled names
1333         vector.
1334         (build_minimal_symbol_hash_tables): Adjust.
1335         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1336         lookup_name_info.
1337         * objc-lang.c (objc_language_defn): Adjust comment to refer to
1338         la_get_symbol_name_matcher.
1339         * objfiles.h: Include <vector>.
1340         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1341         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1342         la_get_symbol_name_matcher.
1343         * p-lang.c (pascal_language_defn): Adjust comment to refer to
1344         la_get_symbol_name_matcher.
1345         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1346         (match_partial_symbol): Use symbol_name_match_type,
1347         lookup_name_info and psymbol_name_matches.
1348         (lookup_partial_symbol): Use lookup_name_info.
1349         (map_block): Use symbol_name_match_type and lookup_name_info.
1350         (psym_map_matching_symbols): Use symbol_name_match_type.
1351         (psymbol_name_matches): New.
1352         (recursively_search_psymtabs): Use lookup_name_info and
1353         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
1354         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
1355         'kind' parameter to 'domain'.
1356         * rust-lang.c (rust_language_defn): Adjust comment to refer to
1357         la_get_symbol_name_matcher.
1358         * symfile-debug.c (debug_qf_map_matching_symbols)
1359         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1360         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1361         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1362         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1363         Adjust to use symbol_name_match_type.
1364         <expand_symtabs_matching>: Adjust to use lookup_name_info.
1365         (expand_symtabs_matching): Adjust to use lookup_name_info.
1366         * symmisc.c (maintenance_expand_symtabs): Use
1367         lookup_name_info::match_any ().
1368         * symtab.c (symbol_matches_search_name): New.
1369         (eq_symbol_entry): Adjust to use lookup_name_info and the
1370         language's matcher.
1371         (demangle_for_lookup_info::demangle_for_lookup_info): New.
1372         (lookup_name_info::match_any): New.
1373         (iterate_over_symbols, search_symbols): Use lookup_name_info.
1374         (compare_symbol_name): Add language, lookup_name_info and
1375         completion_match_result parameters, and use them.
1376         (completion_list_add_name): Make extern.  Add language and
1377         lookup_name_info parameters.  Use them.
1378         (completion_list_add_symbol, completion_list_add_msymbol)
1379         (completion_list_objc_symbol): Add lookup_name_info parameters and
1380         adjust.  Pass down language.
1381         (completion_list_add_fields): Add lookup_name_info parameters and
1382         adjust.  Pass down language.
1383         (add_symtab_completions): Add lookup_name_info parameters and
1384         adjust.
1385         (default_collect_symbol_completion_matches_break_on): Add
1386         name_match_type parameter, and use it.  Use lookup_name_info.
1387         (default_collect_symbol_completion_matches)
1388         (collect_symbol_completion_matches): Add name_match_type
1389         parameter, and pass it down.
1390         (collect_symbol_completion_matches_type): Adjust.
1391         (collect_file_symbol_completion_matches): Add name_match_type
1392         parameter, and use lookup_name_info.
1393         * symtab.h: Include <string> and "common/gdb_optional.h".
1394         (enum class symbol_name_match_type): New.
1395         (class ada_lookup_name_info): New.
1396         (struct demangle_for_lookup_info): New.
1397         (class lookup_name_info): New.
1398         (symbol_name_matcher_ftype): New.
1399         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1400         (symbol_matches_search_name): Declare.
1401         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1402         (default_collect_symbol_completion_matches)
1403         (collect_symbol_completion_matches)
1404         (collect_file_symbol_completion_matches): Add name_match_type
1405         parameter.
1406         (iterate_over_symbols): Use lookup_name_info.
1407         (completion_list_add_name): Declare.
1408         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1409         (strncmp_iw_with_mode): Now extern.
1410         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1411         (strncmp_iw_with_mode): Declare.
1412
1413 2017-11-08  Keith Seitz  <keiths@redhat.com>
1414             Pedro Alves  <palves@redhat.com>
1415
1416         * ada-lang.c (ada_language_defn): Install
1417         default_search_name_hash.
1418         * buildsym.c (struct buildsym_compunit): <language>: New field.
1419         (finish_block_internal): Pass language when creating dictionaries.
1420         (start_buildsym_compunit, start_symtab): New language parameters.
1421         Use them.
1422         (restart_symtab): Pass down compilation unit's language.
1423         * buildsym.h (enum language): Forward declare.
1424         (start_symtab): New 'language' parameter.
1425         * c-lang.c (c_language_defn, cplus_language_defn)
1426         (asm_language_defn, minimal_language_defn): Install
1427         default_search_name_hash.
1428         * coffread.c (coff_start_symtab): Adjust.
1429         * d-lang.c (d_language_defn): Install default_search_name_hash.
1430         * dbxread.c (struct symloc): Add 'pst_language' field.
1431         (PST_LANGUAGE): Define.
1432         (start_psymtab, read_ofile_symtab): Use it.
1433         (process_one_symbol): New 'language' parameter.  Pass it down.
1434         * dictionary.c (struct dictionary) <language>: New field.
1435         (DICT_LANGUAGE): Define.
1436         (dict_create_hashed, dict_create_hashed_expandable)
1437         (dict_create_linear, dict_create_linear_expandable): New parameter
1438         'language'.  Set the dictionary's language.
1439         (iter_match_first_hashed): Adjust to rename.
1440         (insert_symbol_hashed): Assert we don't see mismatching
1441         languages.  Adjust to rename.
1442         (dict_hash): Rename to ...
1443         (default_search_name_hash): ... this and make extern.
1444         * dictionary.h (struct language_defn): Forward declare.
1445         (dict_create_hashed): New parameter 'language'.
1446         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1447         * f-lang.c (f_language_defn): Install default_search_name_hash.
1448         * go-lang.c (go_language_defn): Install default_search_name_hash.
1449         * jit.c (finalize_symtab): Pass compunit's language to dictionary
1450         creation.
1451         * language.c (unknown_language_defn, auto_language_defn):
1452         * language.h (language_defn::la_search_name_hash): New field.
1453         (default_search_name_hash): Declare.
1454         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1455         * mdebugread.c (new_block): New parameter 'language'.
1456         * mdebugread.c (parse_symbol): Pass symbol language to block
1457         allocation.
1458         (psymtab_to_symtab_1): Pass down language.
1459         (new_symtab): Pass compunit's language to block allocation.
1460         * objc-lang.c (objc_language_defn): Install
1461         default_search_name_hash.
1462         * opencl-lang.c (opencl_language_defn):
1463         * p-lang.c (pascal_language_defn): Install
1464         default_search_name_hash.
1465         * rust-lang.c (rust_language_defn): Install
1466         default_search_name_hash.
1467         * stabsread.h (enum language): Forward declare.
1468         (process_one_symbol): Add 'language' parameter.
1469         * symtab.c (search_name_hash): New function.
1470         * symtab.h (search_name_hash): Declare.
1471         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1472
1473 2017-11-08  Pedro Alves  <palves@redhat.com>
1474
1475         * cp-name-parser.y (main): Don't initialize extra_chars.
1476
1477 2017-11-07  Tom Tromey  <tom@tromey.com>
1478
1479         * event-top.h (command_handler): Constify.
1480         * record-full.c (cmd_record_full_start): Update.
1481         * thread.c (thread_apply_all_command): Update.
1482         * printcmd.c (eval_command): Update.
1483         * mi/mi-main.c (mi_execute_cli_command): Update.
1484         (mi_execute_async_cli_command): Update.
1485         * tui/tui-stack.c (tui_update_command): Update.
1486         * cli/cli-interp.c (safe_execute_command): Constify.
1487         * record.c (record_start): Update.
1488         (record_start, record_stop, cmd_record_start): Update.
1489         * record-btrace.c (cmd_record_btrace_bts_start): Update.
1490         (cmd_record_btrace_pt_start): Update.
1491         (cmd_record_btrace_start): Update.
1492         (cmd_record_btrace_start): Update.
1493         * reverse.c (exec_reverse_once): Update.
1494         * python/python.c (execute_gdb_command): Don't copy the command.
1495         * event-top.c (command_line_handler): Update.
1496         (command_handler): Constify.
1497         * defs.h (deprecated_call_command_hook): Constify.
1498         * cli/cli-script.h (execute_user_command): Constify.
1499         * cli/cli-script.c (execute_user_command): Constify.
1500         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1501         (enum command_control_type): Update.
1502         * main.c (catch_command_errors): Remove non-const overload.
1503         (catch_command_errors_ftype): Remove.
1504         * python/py-cmd.c (cmdpy_function): Constify.
1505         * guile/scm-cmd.c (cmdscm_function): Constify.
1506         * cli/cli-dump.c (call_dump_func): Constify.
1507         * cli/cli-decode.c (do_const_cfunc): Constify.
1508         (do_sfunc): Constify.
1509         (cmd_func): Constify.
1510         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1511         * top.h (execute_command): Constify.
1512         * top.c (execute_command): Constify.
1513         (execute_command_to_string): Constify.
1514         (deprecated_call_command_hook): Constify.
1515         * command.h (cmd_func): Constify.
1516         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1517
1518 2017-11-07  Tom Tromey  <tom@tromey.com>
1519
1520         * ada-lang.c (catch_ada_exception_command): Constify.
1521         (catch_assert_command): Constify.
1522         * break-catch-throw.c (catch_catch_command, catch_throw_command)
1523         (catch_rethrow_command): Constify.
1524         (catch_exception_command_1): Constify.
1525         * breakpoint.h (add_catch_command): Constify.
1526         * break-catch-syscall.c (catch_syscall_command_1): Constify.
1527         (catch_syscall_split_args): Constify.
1528         * break-catch-sig.c (catch_signal_command): Constify.
1529         (catch_signal_split_args): Constify.
1530         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1531         cmd_const_sfunc_ftype.
1532         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1533         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1534         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1535         (add_setshow_string_cmd, struct cmd_list_element)
1536         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1537         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1538         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1539         Constify.
1540         (set_cmd_sfunc): Constify.
1541         (empty_sfunc): Constify.
1542         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1543         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1544         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1545         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1546         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1547         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1548         Constify.
1549         (set_cmd_sfunc): Constify.
1550         (cmd_sfunc_ftype): Remove.
1551         * compile/compile.c (set_compile_args): Constify.
1552         * infrun.c (set_disable_randomization): Constify.
1553         * infcmd.c (set_args_command, set_cwd_command): Constify.
1554         * breakpoint.c (set_condition_evaluation_mode): Constify.
1555         (add_catch_command): Constify.
1556         (catch_fork_command_1, catch_exec_command_1)
1557         (catch_load_command_1, catch_unload_command_1): Constify.
1558         (catch_load_or_unload): Constify.
1559         * guile/scm-param.c (pascm_set_func): Constify.
1560         (add_setshow_generic): Constify.
1561         * python/py-param.c (get_set_value): Constify.
1562         * top.h (set_verbose): Constify.
1563         * tui/tui-win.c (tui_set_var_cmd): Constify.
1564         * mi/mi-main.c (set_mi_async_command): Constify.
1565         * cli/cli-logging.c (set_logging_overwrite)
1566         (set_logging_redirect): Constify.
1567         * value.c (set_max_value_size): Constify.
1568         * valprint.c (set_input_radix, set_output_radix): Constify.
1569         * utils.c (set_width_command, set_height_command): Constify.
1570         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1571         * tracepoint.c (set_disconnected_tracing)
1572         (set_circular_trace_buffer, set_trace_buffer_size)
1573         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1574         * top.c (set_history_size_command, set_verbose, set_editing)
1575         (set_gdb_datadir, set_history_filename): Constify.
1576         * target.c (set_targetdebug, maint_set_target_async_command)
1577         (maint_set_target_non_stop_command, set_target_permissions)
1578         (set_write_memory_permission): Constify.
1579         (open_target): Constify.
1580         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1581         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1582         * symtab.c (set_symbol_cache_size_handler): Constify.
1583         * symfile.c (set_ext_lang_command): Constify.
1584         * symfile-debug.c (set_debug_symfile): Constify.
1585         * source.c (set_directories_command): Constify.
1586         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1587         * serial.c (set_parity): Constify.
1588         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1589         * remote.c (set_remote_exec_file, set_remotebreak)
1590         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1591         * record.c (set_record_insn_history_size)
1592         (set_record_call_history_size): Constify.
1593         * record-full.c (set_record_full_insn_max_num): Constify.
1594         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1595         * osabi.c (set_osabi): Constify.
1596         * mips-tdep.c (set_mips64_transfers_32bit_regs)
1597         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1598         * maint.c (maintenance_set_profile_cmd): Constify.
1599         * linux-thread-db.c (set_libthread_db_search_path): Constify.
1600         * language.c (set_language_command, set_range_command)
1601         (set_case_command): Constify.
1602         * infrun.c (set_non_stop, set_observer_mode)
1603         (set_stop_on_solib_events, set_schedlock_func)
1604         (set_exec_direction_func): Constify.
1605         * infcmd.c (set_inferior_tty_command): Constify.
1606         * disasm.c (set_disassembler_options_sfunc): Constify.
1607         * demangle.c (set_demangling_command): Constify.
1608         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1609         * cris-tdep.c (set_cris_version, set_cris_mode)
1610         (set_cris_dwarf2_cfi): Constify.
1611         * corefile.c (set_gnutarget_command): Constify.
1612         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1613         (set_target_wide_charset_sfunc): Constify.
1614         * breakpoint.c (update_dprintf_commands): Constify.
1615         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1616         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1617         (set_disassembly_style_sfunc): Constify.
1618         * arch-utils.c (set_endian, set_architecture): Constify.
1619         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1620         * agent.c (set_can_use_agent): Constify.
1621
1622 2017-11-07  Tom Tromey  <tom@tromey.com>
1623
1624         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1625         (go32_pde, go32_pte, go32_pte_for_address): Constify.
1626         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1627         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1628         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1629         (parse_int_arg, show_thread_default_detach_sc_cmd)
1630         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1631         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1632         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1633         (show_task_pause_cmd, set_task_detach_sc_cmd)
1634         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1635         (set_noninvasive_cmd, set_thread_pause_cmd)
1636         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1637         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1638         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1639         * windows-nat.c (display_selectors): Constify.
1640         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1641         non-const "cfunc".
1642         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1643         (cmd_cfunc_eq): Likewise.
1644         (struct cmd_list_element): Likewise.
1645         (do_cfunc): Remove.
1646         (cli_user_command_p): Update.
1647         * command.h (add_cmd): Remove non-const overload.
1648         (cmd_cfunc_ftype): Remove typedef.
1649         (cmd_cfunc_eq): Remove non-const overload.
1650         * value.c (show_values): Constify.
1651         * thread.c (thread_apply_all_command): Constify.
1652         * symfile.c (load_command): Constify.
1653         * source.c (directory_command): Constify.
1654         * maint.c (maintenance_internal_error)
1655         (maintenance_demangler_warning, maintenance_space_display)
1656         (maintenance_print_architecture, maintenance_translate_address)
1657         (maintenance_info_selftests, maintenance_internal_warning):
1658         Constify.
1659         * breakpoint.c (disable_trace_command, enable_trace_command):
1660         Constify.
1661         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1662         Constify.
1663         (add_auto_load_safe_path): Constify.
1664         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1665         * top.h (show_commands): Constify.
1666         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1667         * sparc64-tdep.c (adi_examine_command): Constify.
1668         (adi_assign_command): Constify.
1669
1670 2017-11-07  Tom Tromey  <tom@tromey.com>
1671
1672         * frame.h (info_locals_command, info_args_command): Constify.
1673         * auto-load.h (auto_load_info_scripts): Constify.
1674         * inferior.h (registers_info): Constify.
1675         * copying.c: Rebuild.
1676         * copying.awk: Constify generated commands.
1677         * auto-load.c (auto_load_info_scripts)
1678         (info_auto_load_gdb_scripts): Constify.
1679         * cli/cli-decode.c (struct cmd_list_element): Take a
1680         cmd_const_cfunc_ftype.
1681         * command.h (add_info): Take a cmd_const_cfunc_ftype.
1682         * tui/tui-win.c (tui_all_windows_info): Constify.
1683         * python/py-auto-load.c (info_auto_load_python_scripts):
1684         Constify.
1685         * cli/cli-cmds.c (show_command): Remove non-const overload.
1686         * tracepoint.c (info_tvariables_command, info_scope_command):
1687         Constify.
1688         (info_static_tracepoint_markers_command): Constify.
1689         * thread.c (info_threads_command): Constify.
1690         (print_thread_info_1): Constify.
1691         * target.c (info_target_command): Constify.
1692         * symtab.c (info_sources_command, info_functions_command)
1693         (info_types_command): Constify.
1694         (info_variables_command): Remove non-const overload.
1695         * symfile.c (info_ext_lang_command): Constify.
1696         * stack.c (info_frame_command, info_locals_command)
1697         (info_args_command): Constify.
1698         (backtrace_command): Remove non-const overload.
1699         * source.c (info_source_command, info_line_command): Constify.
1700         * solib.c (info_sharedlibrary_command): Constify.
1701         * skip.c (info_skip_command): Constify.
1702         * ser-go32.c (info_serial_command): Constify.
1703         * reverse.c (info_bookmarks_command): Constify.
1704         * printcmd.c (info_symbol_command, info_address_command)
1705         (info_display_command): Constify.
1706         * osdata.c (info_osdata_command): Constify.
1707         * objc-lang.c (info_selectors_command, info_classes_command):
1708         Constify.
1709         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1710         * memattr.c (info_mem_command): Constify.
1711         * macrocmd.c (info_macro_command, info_macros_command): Constify.
1712         * linux-fork.c (info_checkpoints_command): Constify.
1713         * infrun.c (info_signals_command): Constify.
1714         * inflow.c (info_terminal_command): Constify.
1715         * inferior.c (info_inferiors_command): Constify.
1716         (print_inferior): Constify.
1717         * infcmd.c (info_program_command, info_all_registers_command)
1718         (info_registers_command, info_vector_command)
1719         (info_float_command): Constify.
1720         (registers_info): Constify.
1721         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1722         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1723         Constify.
1724         * f-valprint.c (info_common_command): Constify.
1725         * dcache.c (info_dcache_command): Constify.
1726         (dcache_info_1): Constify.
1727         * darwin-nat-info.c (info_mach_tasks_command)
1728         (info_mach_task_command, info_mach_ports_command)
1729         (info_mach_port_command, info_mach_threads_command)
1730         (info_mach_thread_command, info_mach_regions_command)
1731         (info_mach_regions_recurse_command, info_mach_region_command)
1732         (info_mach_exceptions_command): Constify.
1733         (get_task_from_args): Constify.
1734         * cp-support.c (info_vtbl_command): Constify.
1735         * breakpoint.c (info_watchpoints_command)
1736         (info_tracepoints_command): Constify.
1737         (info_breakpoints_command): Remove non-const overload.
1738         * avr-tdep.c (avr_io_reg_read_command): Constify.
1739         * auxv.c (info_auxv_command): Constify.
1740         * ada-tasks.c (info_tasks_command): Constify.
1741         (info_task): Constify.
1742         * ada-lang.c (info_exceptions_command): Constify.
1743
1744 2017-11-07  Tom Tromey  <tom@tromey.com>
1745
1746         * solib.h (no_shared_libraries): Constify.
1747         * frame.h (return_command): Constify.
1748         * cli/cli-cmds.h (quit_command): Constify.
1749         * top.h (quit_command, execute_command): Constify.
1750         * target.h (flash_erase_command): Constify.
1751         * inferior.h (set_inferior_args, attach_command): Constify.
1752         * tracepoint.h (start_tracing, stop_tracing): Constify.
1753         * breakpoint.h (break_command, tbreak_command)
1754         (hbreak_command_wrapper, thbreak_command_wrapper)
1755         (rbreak_command_wrapper, watch_command_wrapper)
1756         (awatch_command_wrapper, rwatch_command_wrapper)
1757         (get_tracepoint_by_number): Constify.
1758         * symtab.c (info_variables_command, rbreak_command)
1759         (symtab_symbol_info): Constify.
1760         (info_variables_command): Add non-const overload.
1761         * top.c (dont_repeat_command): Constify.
1762         * breakpoint.c (ignore_command, commands_command)
1763         (condition_command, tbreak_command, hbreak_command)
1764         (thbreak_command, clear_command, break_command)
1765         (info_breakpoints_command, watch_command, rwatch_command)
1766         (awatch_command, trace_command, ftrace_command, strace_command)
1767         (trace_pass_command, break_range_command, dprintf_command)
1768         (agent_printf_command, get_tracepoint_by_number)
1769         (watch_maybe_just_location, trace_pass_command): Constify.
1770         (info_breakpoints_command): Add non-const overload.
1771         * tracefile.c (tsave_command): Constify.
1772         * infcmd.c (attach_command, disconnect_command, signal_command)
1773         (queue_signal_command, stepi_command, nexti_command)
1774         (finish_command, next_command, step_command, until_command)
1775         (advance_command, jump_command, continue_command, run_command)
1776         (start_command, starti_command, interrupt_command)
1777         (run_command_1, set_inferior_args, step_1): Constify.
1778         * inferior.c (add_inferior_command, remove_inferior_command)
1779         (clone_inferior_command): Constify.
1780         * linux-fork.c (checkpoint_command, restart_command): Constify.
1781         * windows-nat.c (signal_event_command): Constify.
1782         * guile/guile.c (guile_repl_command, guile_command): Constify.
1783         * printcmd.c (x_command, display_command, printf_command)
1784         (output_command, set_command, call_command, print_command)
1785         (eval_command): Constify.
1786         (non_const_set_command): Remove.
1787         (_initialize_printcmd): Update.
1788         * source.c (forward_search_command, reverse_search_command):
1789         Constify.
1790         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1791         Constify.
1792         * infrun.c (handle_command): Constify.
1793         * memattr.c (mem_command): Constify.
1794         * stack.c (return_command, up_command, up_silently_command)
1795         (down_command, down_silently_command, frame_command)
1796         (backtrace_command, func_command, backtrace_command_1): Constify.
1797         (backtrace_command): Add non-const overload.
1798         * remote-sim.c (simulator_command): Constify.
1799         * exec.c (set_section_command): Constify.
1800         * tracepoint.c (tdump_command, trace_variable_command)
1801         (tstatus_command, tstop_command, tstart_command)
1802         (end_actions_pseudocommand, while_stepping_pseudocommand)
1803         (collect_pseudocommand, teval_pseudocommand, actions_command)
1804         (start_tracing, stop_tracing): Constify.
1805         * value.c (init_if_undefined_command): Constify.
1806         * tui/tui-stack.c (tui_update_command): Constify.
1807         * tui/tui-win.c (tui_refresh_all_command)
1808         (tui_set_tab_width_command, tui_set_win_height_command)
1809         (tui_set_focus_command, tui_scroll_forward_command)
1810         (tui_scroll_backward_command, tui_scroll_left_command)
1811         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1812         (tui_set_win_height): Constify.
1813         * tui/tui-layout.c (tui_layout_command): Constify.
1814         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1815         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1816         (proc_untrace_sysexit_cmd): Constify.
1817         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1818         (threadset_test_cmd, threadlist_update_test_cmd)
1819         (threadalive_test): Constify.
1820         * objc-lang.c (print_object_command): Constify.
1821         * command.h (add_com): Constify.
1822         * cli/cli-dump.c (restore_command): Constify.
1823         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1824         (help_command, complete_command, shell_command, edit_command)
1825         (list_command, disassemble_command, make_command)
1826         (apropos_command, alias_command): Constify.
1827         * cli/cli-script.c (document_command, define_command)
1828         (while_command, if_command, validate_comname): Constify.
1829         * cli/cli-decode.c (struct cmd_list_element): Change type of
1830         "fun".
1831         * target.c (do_monitor_command, flash_erase_command): Constify.
1832         * regcache.c (reg_flush_command): Constify.
1833         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1834         (reverse_nexti, reverse_continue, reverse_finish)
1835         (save_bookmark_command, goto_bookmark_command)
1836         (exec_reverse_once): Constify.
1837         * python/python.c (python_interactive_command, python_command):
1838         Constify.
1839         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1840         Constify.
1841         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1842         * gcore.c (gcore_command): Constify.
1843
1844 2017-11-07  Tom Tromey  <tom@tromey.com>
1845
1846         * printcmd.c (x_command): Call set_repeat_arguments.
1847         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1848         * top.c (repeat_arguments): New global.
1849         (set_repeat_arguments): New function.
1850         (execute_command): Handle repeat_arguments.
1851         (show_commands): Calls set_repeat_arguments.
1852         * command.h (set_repeat_arguments): Declare.
1853
1854 2017-11-07  Tom Tromey  <tom@tromey.com>
1855
1856         * stack.c (backtrace_command): Use std::string.
1857         (backtrace_command_1): Make "count_exp" const.
1858
1859 2017-11-07  Tom Tromey  <tom@tromey.com>
1860
1861         * source.c (directory_switch, mod_path, add_path): Constify.
1862         * defs.h (add_path, mod_path, directory_switch): Constify.
1863         * mi/mi-cmd-env.c (env_mod_path): Constify.
1864
1865 2017-11-07  Tom Tromey  <tom@tromey.com>
1866
1867         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1868         (run_command_1, continue_command, step_1, jump_command)
1869         (signal_command, until_command, advance_command, finish_command)
1870         (attach_command): Update.
1871
1872 2017-11-07  Tom Tromey  <tom@tromey.com>
1873
1874         * command.h (set_cmd_cfunc): Don't declare.
1875         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1876
1877 2017-11-07  Tom Tromey  <tom@tromey.com>
1878
1879         * stack.c (select_frame_command): Constify.
1880         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1881         * command.h (add_com_suppress_notification): Constify.
1882
1883 2017-11-07  Tom Tromey  <tom@tromey.com>
1884
1885         * breakpoint.c (stop_command): Constify.
1886         * cli/cli-decode.c (struct cmd_list_element): Constify.
1887         * command.h (add_abbrev_prefix_cmd): Constify.
1888
1889 2017-11-07  Pedro Alves  <palves@redhat.com>
1890
1891         * breakpoint.c (extract_bp_kind): New enum.
1892         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1893         factored out from ...
1894         (extract_bp_number_and_location): ... here.
1895         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1896
1897 2017-11-07  Pedro Alves  <palves@redhat.com>
1898
1899         * breakpoint.c (extract_bp_number_and_location): Change return
1900         type to void.  Throw error instead of warning.
1901         (enable_disable_command): Adjust.
1902
1903 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1904             Pedro Alves  <palves@redhat.com>
1905
1906         * breakpoint.c (map_breakpoint_number_range): New, factored out
1907         from ...
1908         (map_breakpoint_numbers): ... here.
1909         (find_location_by_number): Change parameters from string to
1910         breakpoint number and location.
1911         (extract_bp_number_and_location): New function.
1912         (enable_disable_bp_num_loc)
1913         (enable_disable_breakpoint_location_range)
1914         (enable_disable_command): New functions, factored out ...
1915         (enable_command, disable_command): ... these functions, and
1916         adjusted to support ranges.
1917         * NEWS: Document enable/disable breakpoint location range feature.
1918
1919 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1920
1921         * MAINTAINERS (Write After Approval): Update my e-mail address.
1922
1923 2017-11-06  Pedro Alves  <palves@redhat.com>
1924
1925         * gnu-nat.c (gnu_terminal_init): Delete.
1926         (gnu_target): Don't install gnu_terminal_init.
1927         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1928         (child_terminal_init): ... this function.
1929
1930 2017-11-06  Pedro Alves  <palves@redhat.com>
1931
1932         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1933         sgtty.h.
1934         * config.in, configure: Regenerate.
1935
1936 2017-11-06  Pedro Alves  <palves@redhat.com>
1937
1938         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1939         (async_init_signals): Adjust.
1940         (handle_stop_sig): Rename to ...
1941         (handle_sigtstp): ... this.
1942         (async_stop_sig): Rename to ...
1943         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1944         SIGTSTP path.
1945         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1946         instead of STOP_SIGNAL thoughout.
1947         (handle_stop_sig): Rename to ...
1948         (handle_sigtstp): ... this.
1949         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1950
1951 2017-11-06  Pedro Alves  <palves@redhat.com>
1952
1953         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1954         longer set flags twice in row.
1955
1956 2017-11-06  Pedro Alves  <palves@redhat.com>
1957
1958         * Makefile.in (SER_HARDWIRE): Update comment.
1959         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1960         * common/gdb_termios.h: Delete file.
1961         * common/job-control.c: Include termios.h and unistd.h instead of
1962         gdb_termios.h.
1963         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1964         check.
1965         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1966         Remove sgtty code.
1967         * configure.ac: No longer check for termio.h and sgtty.h.
1968         * configure: Regenerate.
1969         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1970         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1971         Replace PROCESS_GROUP_TYPE references with pid_t references
1972         throughout.
1973         (gdb_getpgrp): Delete.
1974         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1975         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1976         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1977         gdb_getpgrp.  Use serial_set_tty_state instead aof
1978         serial_noflush_set_tty_state.  Remove sgtty code.
1979         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1980         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1981         (inferior_process_group): Now returns pid_t.
1982         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1983         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1984         * ser-event.c (serial_event_ops): Update.
1985         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1986         (dos_ops): Update.
1987         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1988         * ser-pipe.c (pipe_ops): Update.
1989         * ser-tcp.c (tcp_ops): Update.
1990         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1991         HAVE_TERMIOS checks.
1992         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1993         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1994         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1995         assume termios.
1996         (hardwire_noflush_set_tty_state): Delete.
1997         (hardwire_print_tty_state, hardwire_drain_output)
1998         (hardwire_flush_output, hardwire_flush_input)
1999         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2000         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2001         code, and assume termios.
2002         (hardwire_ops): Update.
2003         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2004         * serial.c (serial_noflush_set_tty_state): Delete.
2005         * serial.h (serial_noflush_set_tty_state): Delete.
2006         (serial_ops::noflush_set_tty_state): Delete.
2007
2008 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2009
2010         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2011         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2012         (COMMON_OBS): Remove doublest.o and dfp.o.
2013         Do not build target-float.c (instead of doublest.c)
2014         with -Wformat-nonliteral.
2015
2016         * doublest.c: Remove file.
2017         * doublest.h: Remove file.
2018         * dfp.c: Remove file.
2019         * dfp.h: Remove file.
2020
2021         * target-float.c: Do not include "doublest.h" and "dfp.h".
2022         (DOUBLEST): Move here from doublest.h.
2023         (enum float_kind): Likewise.
2024         (FLOATFORMAT_CHAR_BIT): Likewise.
2025         (FLOATFORMAT_LARGEST_BYTES): Likewise.
2026         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
2027         (floatformat_precision): Likewise.
2028         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2029         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2030         Likewise.
2031         (host_float_format, host_double_format, host_long_double_format):
2032         Likewise.
2033         (floatformat_to_string, floatformat_from_string): Likewise.
2034         (floatformat_to_doublest): Likewise.  Also, inline the original
2035         convert_floatformat_to_doublest.
2036         (floatformat_from_doublest): Likewise.  Also, inline the original
2037         convert_floatformat_from_doublest.
2038
2039         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2040         (MAX_DECIMAL_STRING): Move here from dfp.c.
2041         (match_endianness): Likewise.
2042         (set_decnumber_context, decimal_check_errors): Likewise.
2043         (decimal_from_number, decimal_to_number): Likewise.
2044         (decimal_to_string, decimal_from_string): Likewise.  Make static.
2045         (decimal_from_longest, decimal_from_ulongest): Likewise.
2046         (decimal_to_longest): Likewise.
2047         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2048         (decimal_convert): Likewise.
2049
2050 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2051
2052         * doublest.c: Do not include "gdbtypes.h".
2053         (extract_typed_floating): Remove.
2054         (store_typed_floating): Remove.
2055         (convert_typed_floating): Remove.
2056         * doublest.h (struct type): Remove.
2057         (DOUBLEST_PRINT_FORMAT): Remove.
2058         (DOUBLEST_SCAN_FORMAT): Remove.
2059         (extract_typed_floating): Remove.
2060         (store_typed_floating): Remove.
2061         (convert_typed_floating): Remove.
2062
2063         * dfp.c (decimal_from_doublest): Remove.
2064         (decimal_to_doublest): Remove.
2065         * dfp.h: Do not include "doublest.h".
2066         (decimal_from_doublest): Remove.
2067         (decimal_to_doublest): Remove.
2068
2069         * value.c: Do not include "doublest.h" and "dfp.h".
2070         (value_as_double): Remove.
2071         (unpack_double): Remove.
2072         (value_from_double): Remove.
2073         (value_from_decfloat): Remove.
2074         * value.h: Do not include "doublest.h".
2075         (value_as_double): Remove.
2076         (unpack_double): Remove.
2077         (value_from_double): Remove.
2078         (value_from_decfloat): Remove.
2079
2080 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2081
2082         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2083         (i386_extract_return_value): Use target_float_convert.
2084         (i386_store_return_value): Likewise.
2085         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2086         (i387_value_to_register): Likewise.
2087         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2088         (ia64_register_to_value): Use target_float_convert.
2089         (ia64_value_to_register): Likewise.
2090         (ia64_extract_return_value): Likewise.
2091         (ia64_store_return_value): Likewise.
2092         (ia64_push_dummy_call): Likewise.
2093         * m68k-tdep.c: Include "target-float.h".
2094         (m68k_register_to_value): Use target_float_convert.
2095         (m68k_value_to_register): Likewise.
2096         (m68k_svr4_extract_return_value): Likewise.
2097         (m68k_svr4_store_return_value): Likewise.
2098         * ppc-sysv-tdep.c: Include "target-float.h".
2099         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2100         (do_ppc_sysv_return_value): Likewise.
2101         (ppc64_sysv_abi_push_freg): Likewise.
2102         (ppc64_sysv_abi_return_value_base): Likewise.
2103         * rs6000-aix-tdep.c: Include "target-float.h".
2104         (rs6000_push_dummy_call): Use target_float_convert.
2105         (rs6000_return_value): Likewise.
2106         * rs6000-lynx178-tdep.c: Include "target-float.h".
2107         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2108         (rs6000_lynx178_return_value): Likewise.
2109         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2110         (rs6000_register_to_value): Use target_float_convert.
2111         (rs6000_value_to_register): Likewise.
2112         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2113         (arm_extract_return_value): Use target_float_convert.
2114         (arm_store_return_value): Likewise.
2115         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2116         (sh_register_convert_to_virtual): Use target_float_convert.
2117         (sh_register_convert_to_raw): Likewise.
2118         * sh64-tdep.c: Include "target-float.h".
2119         (sh64_extract_return_value): Use target_float_convert.
2120         (sh64_register_convert_to_virtual): Likewise.
2121         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
2122
2123 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2124
2125         * target-float.c (floatformat_to_host_double): New function.
2126         (floatformat_from_host_double): Likewise.
2127         (target_float_to_host_double): Likewise.
2128         (target_float_from_host_double): Likewise.
2129         * target-float.h (target_float_to_host_double): Add prototype.
2130         (target_float_from_host_double): Likewise.
2131
2132         * guile/scm-value.c: Include "target-float.h".
2133         (gdbscm_value_to_real): Use target_float_to_host_double.
2134         Handle integer source values via value_as_long.
2135         * guile/scm-math.c: Include "target-float.h".  Do not include
2136         "doublest.h", "dfp.h", and "expression.h".
2137         (vlscm_convert_typed_number): Use target_float_from_host_double.
2138         (vlscm_convert_number): Likewise.
2139
2140         * python/py-value.c (valpy_float): Use target_float_to_host_double.
2141         (convert_value_from_python): Use target_float_from_host_double.
2142
2143 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2144
2145         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2146         (cast_from_fixed): Likewise.
2147         (ada_scaling_type): New function.
2148         (ada_delta): Return value instead of DOUBLEST.  Perform target
2149         arithmetic instead of host arithmetic.
2150         (scaling_factor): Rename to ...
2151         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
2152         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
2153         (ada_fixed_to_float): Remove.
2154         (ada_float_to_fixed): Remove.
2155         * ada-lang.h (ada_fixed_to_float): Remove.
2156         (ada_float_to_fixed): Remove.
2157         (ada_delta): Return value instead of DOUBLEST.
2158         (ada_scaling_factor): Add prototype.
2159
2160         * ada-typeprint.c: Include "target-float.h".
2161         (print_fixed_point_type): Perform target arithmetic instead of
2162         host arithmetic.
2163         * ada-valprint.c: Include "target-float.h".
2164         (ada_val_print_num): Perform target arithmetic instead of
2165         host arithmetic for fixed-point types.
2166
2167 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2168
2169         * target-float.c: Include <math.h>.
2170         (floatformat_binop): New function.
2171         (floatformat_compare): Likewise.
2172         (target_float_binop): Likewise.
2173         (target_float_compare): Likewise.
2174         * target-float.h: Include "expression.h".
2175         (target_float_binop): Add prototype.
2176         (target_float_compare): Likewise.
2177
2178         * valarith.c: Do not include "doublest.h" and "dfp.h".
2179         Include "common/byte-vector.h".
2180         (value_args_as_decimal): Remove, replace by ...
2181         (value_args_as_target_float): ... this function.  Handle both
2182         binary and decimal target floating-point formats.
2183         (scalar_binop): Handle both binary and decimal FP using
2184         value_args_as_target_float and target_float_binop.
2185         (value_equal): Handle both binary and decimal FP using
2186         value_args_as_target_float and target_float_compare.
2187         (value_less): Likewise.
2188         (value_pos): Handle all scalar types as simple copy.
2189         (value_neg): Handle all scalar types via BINOP_SUB from 0.
2190         * dfp.c (decimal_binop): Throw error instead of internal_error
2191         when called with an unsupported operation code.
2192
2193 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2194
2195         * target-float.c (target_float_to_string): New function.
2196         (target_float_from_string): New function.
2197         * target-float.h (target_float_to_string): Add prototype.
2198         (target_float_from_string): Add prototype.
2199
2200         * valprint.c: Include "target-float.h".  Do not include
2201         "doublest.h" and "dfp.h".
2202         (print_floating): Use target_float_to_string.
2203         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
2204         (printf_floating): Use target_float_to_string.
2205         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2206         (print_i387_value): Use target_float_to_string.
2207         * mips-tdep.c: Include "target-float.h".
2208         (mips_print_fp_register): Use target_float_to_string.
2209         * sh64-tdep.c: Include "target-float.h".
2210         (sh64_do_fp_register): Use target_float_to_string.
2211
2212         * parse.c: Include "target-float.h".  Do not include
2213         "doublest.h" and "dfp.h".
2214         (parse_float): Use target_float_from_string.
2215         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
2216         (define_symbol): Use target_float_from_string.
2217         * gdbarch-selftests.c: Include "target-float.h".
2218         (register_to_value_test): Use target_float_from_string.
2219
2220 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2221
2222         * Makefile.c (SFILES): Add target-float.c.
2223         (HFILES_NO_SRCDIR): Add target-float.h.
2224         (COMMON_OBS): Add target-float.o.
2225         * target-float.h: New file.
2226         * target-float.c: New file.
2227
2228         * doublest.c (floatformat_classify): Fix detection of float_zero.
2229
2230         * gdbtypes.c (is_floating_type): New function.
2231         * gdbtypes.h (is_floating_type): Add prototype.
2232
2233         * value.c: Do not include "floatformat.h".
2234         (unpack_double): Use target_float_is_valid.
2235         (is_floating_value): New function.
2236         * value.h (is_floating_value): Add prototype-
2237
2238         * valarith.c: Include "target-float.h".
2239         (value_logical_not): Use target_float_is_zero.
2240
2241         * python/py-value.c: Include "target-float.h".
2242         (valpy_nonzero): Use target_float_is_zero.
2243
2244 2017-11-04  Tom Tromey  <tom@tromey.com>
2245
2246         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2247
2248 2017-11-04  Tom Tromey  <tom@tromey.com>
2249
2250         * breakpoint.c (set_momentary_breakpoint): Return
2251         breakpoint_up.
2252         (until_break_command): Update.
2253         (new_until_break_fsm): Change argument types to
2254         breakpoint_up.
2255         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2256         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2257         Remove.
2258         * infcmd.c (finish_forward): Update.
2259         * breakpoint.h (set_momentary_breakpoint)
2260         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2261         (make_cleanup_delete_breakpoint): Remove.
2262         (struct breakpoint_deleter): New.
2263         (breakpoint_up): New typedef.
2264         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2265         (insert_exception_resume_breakpoint): Update.
2266         (insert_exception_resume_from_probe): Update.
2267         (insert_longjmp_resume_breakpoint): Update.
2268         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2269         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2270         * infcall.c (call_function_by_hand_dummy): Update
2271
2272 2017-11-04  Tom Tromey  <tom@tromey.com>
2273
2274         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2275
2276 2017-11-04  Tom Tromey  <tom@tromey.com>
2277
2278         * linux-tdep.c (linux_core_info_proc_mappings): Use
2279         gdb::def_vector.
2280         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
2281         "size" argument.
2282         (linux_corefile_thread): Update.
2283         (linux_make_corefile_notes): Remove unused variable.
2284
2285 2017-11-04  Tom Tromey  <tom@tromey.com>
2286
2287         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2288         gdb::byte_vector.
2289
2290 2017-11-04  Tom Tromey  <tom@tromey.com>
2291
2292         * objfiles.c (do_free_objfile_cleanup): Remove.
2293         * compile/compile-object-load.c (compile_object_load): Update.
2294         * objfiles.h (make_cleanup_free_objfile): Remove.
2295
2296 2017-11-04  Tom Tromey  <tom@tromey.com>
2297
2298         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2299         (adi_read_versions): Change "tags" to "gdb_byte *".
2300         (adi_print_versions): Likewise.
2301
2302 2017-11-04  Tom Tromey  <tom@tromey.com>
2303
2304         * breakpoint.c
2305         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2306         from start_rbreak_breakpoints.
2307         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2308         * breakpoint.h (class scoped_rbreak_breakpoints): New.
2309         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2310         * symtab.c (do_end_rbreak_breakpoints): Remove.
2311         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2312
2313 2017-11-04  Tom Tromey  <tom@tromey.com>
2314
2315         * cp-namespace.c (reset_directive_searched): Remove.
2316         (cp_lookup_symbol_via_imports): Use scoped_restore.
2317         * cp-support.c (reset_directive_searched): Remove.
2318         (make_symbol_overload_list_using): Use scoped_restore.
2319         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2320         (reset_directive_searched): Remove.
2321
2322 2017-11-04  Tom Tromey  <tom@tromey.com>
2323
2324         * symfile.c (find_separate_debug_file_by_debuglink): Use
2325         unique_xmalloc_ptr.
2326
2327 2017-11-04  Tom Tromey  <tom@tromey.com>
2328
2329         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2330         type of "info".
2331         (compute_stack_depth): Likewise.
2332         (do_compile_dwarf_expr_to_c): Use std::vector.
2333
2334 2017-11-04  Tom Tromey  <tom@tromey.com>
2335
2336         * compile/compile-object-load.c (link_callbacks_einfo): Use
2337         std::string.
2338
2339 2017-11-04  Tom Tromey  <tom@tromey.com>
2340
2341         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2342         Use scoped_free_pendings.
2343         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2344         scoped_free_pendings.
2345         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2346         (xcoff_initial_scan): Likewise.
2347         * buildsym.c (reset_symtab_globals): Update comment.
2348         (scoped_free_pendings): Rename from really_free_pendings.
2349         (prepare_for_building): Update comment.
2350         (buildsym_init): Likewise.
2351         * buildsym.h (class scoped_free_pendings): New class.
2352         (really_free_pendings): Don't declare.
2353
2354 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
2355
2356         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2357         output when converting a zero value to a special byteorder format.
2358
2359 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2360
2361         * frame.c (do_frame_register_read): Remove aspace.
2362         * jit.c (jit_frame_sniffer): Likwise.
2363         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2364         * regcache.c (regcache::regcache): Pass nullptr.
2365         (regcache_print): Caller updated.
2366         * regcache.h (regcache::regcache): Remove one constructor
2367         parameter aspace.
2368
2369 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2370
2371         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2372
2373 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2374
2375         * breakpoint.c (insert_single_step_breakpoints): Update.
2376         * frame.c (struct frame_info) <aspace>: Add const.
2377         (frame_save_as_regcache): Add const.
2378         (get_frame_address_space): Return const address_space *.
2379         * frame.h (get_frame_address_space): Update declaration.
2380         * infrun.c (struct step_over_info) <aspace>: Add const.
2381         (set_step_over_info): Make aspace const.
2382         (displaced_step_prepare_throw): Change variable const.
2383         (resume): Likewise.
2384         (proceed): Likewise.
2385         (adjust_pc_after_break): Likewise.
2386         (save_waitstatus): Likewise.
2387         (handle_signal_stop): Likewise.
2388         (keep_going_pass_signal): Likewise.
2389         * jit.c (jit_frame_sniffer): Add const.
2390         * mips-tdep.c (mips_single_step_through_delay): Likewise.
2391         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2392         * record-full.c (record_full_wait_1): Likewise.
2393         * regcache.c (regcache::regcache): Change parameter to const.
2394         * regcache.h (regcache::regcache): Likewise.
2395         (regcache::aspace): Return const address_space *.
2396         (regcache) <m_aspace>: Add const.
2397
2398 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2399
2400         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2401         * frame.c (create_sentinel_frame): Likewise.
2402         * infrun.c (displaced_step_prepare_throw): Likewise.
2403         (resume): Likewise.
2404         (thread_still_needs_step_over_bp): Likewise.
2405         (proceed): Likewise.
2406         (do_target_wait): Likewise.
2407         (adjust_pc_after_break): Likewise.
2408         (handle_syscall_event): Likewise.
2409         (save_waitstatus): Likewise.
2410         (handle_inferior_event_1): Likewise.
2411         (handle_signal_stop): Likewise.
2412         (keep_going_pass_signal): Likewise.
2413         * linux-nat.c (status_callback): Likewise.
2414         (save_stop_reason): Likewise.
2415         (resume_stopped_resumed_lwps): Likewise.
2416         * record-full.c (record_full_exec_insn): Likewise.
2417         (record_full_wait_1): Likewise.
2418         * regcache.c (get_regcache_aspace): Remove.
2419         * regcache.h (get_regcache_aspace): Remove.
2420
2421 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2422
2423         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2424         (init_regcache_descr): Use gdbarch_num_regs.
2425         (regcache::regcache): Likewise.
2426         (regcache::get_register_status): Likewise.
2427         (regcache::assert_raw_regnum): Likewise.
2428         (regcache::cooked_read): Likewise.
2429         (regcache::cooked_read_value): Likewise.
2430         (regcache::cooked_write): Likewise.
2431         (regcache::dump): Likewise.
2432         (regcache::num_raw_registers): New method.
2433         * regcache.h (class regcache) <num_raw_registers>: New.
2434
2435 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2436
2437         * regcache.c (regcache::assert_regnum): New method.
2438         (regcache::invalidate): Call assert_regnum.
2439         (regcache::raw_update): Likewise.
2440         (regcache::raw_write): Likewise.
2441         (regcache::raw_read_part): Likewise.
2442         (regcache::raw_write_part): Likewise.
2443         (regcache::raw_supply): Likewise.
2444         (regcache::raw_supply_integer): Likewise.
2445         (regcache::raw_supply_zeroed): Likewise.
2446         (regcache::raw_collect): Likewise.
2447         (regcache::raw_collect_integer): Likewise.
2448         * regcache.h (regcache::assert_regnum): Declare.
2449
2450 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2451
2452         * regcache.c (regcache::dump): Remove code.
2453
2454 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2455
2456         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2457         Remove.
2458         <sizeof_cooked_register_status>: Remove.
2459         (init_regcache_descr): Update.
2460         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2461         (regcache::save): Likewise.
2462         (regcache::dump): Likewise.
2463
2464 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
2465
2466         * ft32-tdep.c (ft32_fetch_instruction): New function.
2467         (ft32_analyze_prologue): Use ft32_fetch_instruction().
2468
2469 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
2470
2471         * cli/cli-script.c (execute_control_command): Rename to ...
2472         (execute_control_command_1): ... this.
2473         (execute_control_command): New function.
2474
2475 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
2476
2477         * tracepoint.c (tfind_command): Remove const_cast.
2478
2479 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
2480
2481         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2482
2483 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
2484
2485         * common/common-utils.h (in_inclusive_range): New function.
2486         * arm-tdep.c (arm_record_extension_space): Use
2487         in_inclusive_range.
2488         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2489         * cris-tdep.c (cris_spec_reg_applicable): Use
2490         in_inclusive_range.
2491
2492 2017-10-30  Pedro Alves  <palves@redhat.com>
2493             Simon Marchi <simon.marchi@ericsson.com>
2494
2495         * remote.c (remote_set_syscall_catchpoint): Build a std::string
2496         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2497
2498 2017-10-30  Pedro Alves  <palves@redhat.com>
2499
2500         * common/common-utils.c (string_appendf, string_vappendf): New
2501         functions.
2502         * common/common-utils.h (string_appendf, string_vappendf): New
2503         declarations.
2504         * unittests/common-utils-selftests.c (string_appendf_func)
2505         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2506         (string_vappendf_tests): New functions.
2507         (_initialize_common_utils_selftests): Register "string_appendf" and
2508         "string_vappendf tests".
2509
2510 2017-10-30  Pedro Alves  <palves@redhat.com>
2511
2512         * unittests/common-utils-selftests.c (format_func): New typedef.
2513         (string_printf_tests, string_vprintf_tests): Tests factored out
2514         and merged to ...
2515         (test_format_func): ... this new function.
2516         (string_printf_tests, string_vprintf_tests): Reimplement on top of
2517         test_format_func.
2518
2519 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2520
2521         * darwin-nat.c: Remove include of gdb.h.
2522
2523 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2524
2525         * xtensa-xtregs.c: Fix formatting issues.
2526
2527 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2528
2529         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2530
2531 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
2532
2533         PR python/21213
2534         * python/py-infthread.c (thpy_get_inferior): Increment reference
2535         of inferior before returning it.
2536
2537 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2538
2539         * unittests/common-utils-selftests.c (format): Add
2540         ATTRIBUTE_PRINTF.
2541
2542 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2543
2544         * xml-syscall.c (struct syscall_desc): Add constructor.
2545         <name>: Change type to std::string.
2546         (syscall_desc_up): New typedef.
2547         (syscall_desc_p): Remove typeder.
2548         (DEF_VEC_P(syscall_desc_p)): Remove.
2549         (struct syscall_group_desc): Add constructor.
2550         <name>: Change type to std::string.
2551         <syscalls>: Change type to std::vector.
2552         (syscall_group_desc_up): New typedef.
2553         (syscall_group_desc_p): Remove typedef.
2554         (DEF_VEC_P(syscall_group_desc_p)): Remove.
2555         (struct syscalls_info) <syscalls>: Change type to std::vector of
2556         unique_ptr.
2557         <groups>: Likewise.
2558         <my_gdb_datadir>: Change type to std::string.
2559         (syscalls_info_up): New typedef.
2560         (allocate_syscalls_info): Remove.
2561         (syscalls_info_free_syscalls_desc): Remove.
2562         (syscalls_info_free_syscall_group_desc): Remove.
2563         (free_syscalls_info): Remove.
2564         (make_cleanup_free_syscalls_info): Remove.
2565         (syscall_group_create_syscall_group_desc): Adjust.
2566         (syscall_group_add_syscall): Adjust.
2567         (syscall_create_syscall_desc): Adjust.
2568         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2569         (init_syscalls_info): Adjust.
2570         (syscall_group_get_group_by_name): Adjust.
2571         (xml_get_syscall_number): Adjust.
2572         (xml_get_syscall_name): Adjust.
2573         (xml_list_of_syscalls): Adjust.
2574         (xml_list_syscalls_by_group): Adjust.
2575         (xml_list_of_groups): Adjust.
2576
2577 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2578
2579         * probe.h: Don't include gdb_vecs.h.
2580         (DEF_VEC_P (probe_p)): Remove.
2581         (find_probes_in_objfile): Return an std::vector.
2582         * probe.c (find_probes_in_objfile): Likewise.
2583         * breakpoint.c (breakpoint_objfile_data)
2584         <longjmp_probes>: Change type to std::vector.
2585         <exception_probes>: Likewise.
2586         (free_breakpoint_probes): Don't manually free vectors.
2587         (create_longjmp_master_breakpoint): Adjust.
2588         (create_exception_master_breakpoint): Adjust.
2589         * solib-svr4.c (svr4_create_probe_breakpoints): Change
2590         parameter type, adjust.
2591         (svr4_create_solib_event_breakpoints): Adjust.
2592
2593 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2594
2595         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2596         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2597         with new.
2598         (free_breakpoint_probes): Rename to ...
2599         (free_breakpoint_objfile_data): ... this, and call delete on
2600         bp_objfile_data..
2601
2602 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2603
2604         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2605         (loaded_script_ptr): Remove typedef.
2606         (DEF_VEC_P (loaded_script_ptr)): Remove.
2607         (struct collect_matching_scripts_data): Add constructor.
2608         <scripts_p>: Change type to (pointer to) std::vector.
2609         (collect_matching_scripts_data): Adjust.
2610         (sort_scripts_by_name): Make suitable for std::sort.
2611         (print_scripts): Don't sort vector, adjust to std::vector.
2612         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2613
2614 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2615
2616         * symfile.c (filename_language): Make struct, not typedef.  Add
2617         constructor.
2618         <ext>: Change type to std::string.
2619         (DEF_VEC_O (filename_language)): Remove.
2620         (filename_language_table): Change type to std::vector.
2621         (add_filename_language): Adjust.
2622         (set_ext_lang_command): Adjust.
2623         (info_ext_lang_command): Adjust.
2624         (deduce_language_from_filename): Adjust.
2625         (class scoped_restore_filename_language_table): Remove.
2626         (test_filename_language): Use scoped_restore.
2627         (test_set_ext_lang_command): Use scoped_restore, adjust to
2628         std::vector change.
2629
2630 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
2631
2632         * symfile.c: Include selftest.h.
2633         (class scoped_restore_filename_language_table): New.
2634         (test_filename_language): New test.
2635         (test_set_ext_lang_command): New test.
2636         (_initialize_symfile): Register tests.
2637
2638 2017-10-27  Keith Seitz  <keiths@redhat.com>
2639
2640         * breakpoint.c (print_breakpoint_location): Use the symbol saved
2641         in the bp_location, falling back to find_pc_sect_function when
2642         needed.
2643         (add_location_to_breakpoint): Save sal->symbol.
2644         * breakpoint.h (struct bp_location) <symbol>: New field.
2645         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2646         * symtab.h (struct symtab_and_line) <symbol>: New field.
2647
2648 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2649
2650         PR gdb/13669
2651         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2652         to rewind obstack.
2653
2654 2017-10-26  Pedro Alves  <palves@redhat.com>
2655
2656         * remote.c (remote_async_terminal_ours_p): Delete.
2657         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2658         Remove references to 'remote_async_terminal_ours_p'.
2659
2660 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2661
2662         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2663
2664 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2665
2666         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2667         aspace const.
2668         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2669         Likewise.
2670         * breakpoint.c (bpstat_check_location): Remove cast.
2671         (breakpoint_hit_catch_fork): Make aspce const.
2672         (breakpoint_hit_catch_solib): Likewise.
2673         (breakpoint_hit_catch_exec): Likewise.
2674         (breakpoint_hit_ranged_breakpoint): Likewise.
2675         (breakpoint_hit_watchpoint): Likewise.
2676         (base_breakpoint_breakpoint_hit): Likewise.
2677         (bkpt_breakpoint_hit): Likewise.
2678         (dprintf_breakpoint_hit): Likewise.
2679         (tracepoint_breakpoint_hit): Likewise.
2680         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2681
2682 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2683
2684         * breakpoint.c (breakpoint_location_address_match): Change
2685         "struct address_space *" to "const address_space".
2686         (breakpoint_location_address_range_overlap): Likewise.
2687         (breakpoint_here_p): Likewise.
2688         (breakpoint_in_range_p): Likewise.
2689         (moribund_breakpoint_here_p): Likewise.
2690         (bp_location_inserted_here_p): Likewise.
2691         (software_breakpoint_inserted_here_p): Likewise.
2692         (hardware_breakpoint_inserted_here_p): Likewise.
2693         (hardware_watchpoint_inserted_in_range): Likewise.
2694         (bpstat_check_location): Likewise.
2695         (bpstat_stop_status): Likewise.
2696         (breakpoint_address_match): Likewise.
2697         (breakpoint_address_match_range): Likewise.
2698         (breakpoint_location_address_match): Likewise.
2699         (breakpoint_location_address_range_overlap): Likewise.
2700         (insert_single_step_breakpoint): Likewise.
2701         (breakpoint_has_location_inserted_here): Likewise.
2702         (single_step_breakpoint_inserted_here_p): Likewise.
2703         (pc_at_non_inline_function): Likewise.
2704         * breakpoint.h (bpstat_stop_status): Update declaration.
2705         (breakpoint_here_p): Likewise.
2706         (breakpoint_in_range_p): Likewise.
2707         (moribund_breakpoint_here_p): Likewise.
2708         (breakpoint_inserted_here_p): Likewise.
2709         (software_breakpoint_inserted_here_p): Likewise.
2710         (hardware_breakpoint_inserted_here_p): Likewise.
2711         (breakpoint_has_location_inserted_here): Likewise.
2712         (single_step_breakpoint_inserted_here_p): Likewise.
2713         (hardware_watchpoint_inserted_in_range): Likewise.
2714         (breakpoint_address_match): Likewise.
2715         (insert_single_step_breakpoint): Likewise.
2716         (pc_at_non_inline_function): Likewise.
2717         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2718         * record.c (record_check_stopped_by_breakpoint): Likewise.
2719         * record.h (record_check_stopped_by_breakpoint): Likewise.
2720         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2721
2722 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2723
2724         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2725         regcache->arch () instead get_regcache_arch.
2726         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2727         Likewise.
2728         (aarch64_fbsd_store_inferior_registers): Likewise.
2729         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2730         (store_gregs_to_thread): Likewise.
2731         (fetch_fpregs_from_thread): Likewise.
2732         (store_fpregs_to_thread): Likewise.
2733         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2734         (aarch64_store_return_value): Likewise.
2735         (aarch64_software_single_step): Likewise.
2736         * aix-thread.c (aix_thread_wait): Likewise.
2737         (supply_reg32): Likewise.
2738         (supply_sprs64): Likewise.
2739         (supply_sprs32): Likewise.
2740         (fill_gprs64): Likewise.
2741         (fill_gprs32): Likewise.
2742         (fill_sprs64): Likewise.
2743         (fill_sprs32): Likewise.
2744         (store_regs_user_thread): Likewise.
2745         (store_regs_kernel_thread): Likewise.
2746         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2747         (alphabsd_store_inferior_registers): Likewise.
2748         * alpha-tdep.c (alpha_extract_return_value): Likewise.
2749         (alpha_store_return_value): Likewise.
2750         (alpha_deal_with_atomic_sequence): Likewise.
2751         (alpha_next_pc): Likewise.
2752         (alpha_software_single_step): Likewise.
2753         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2754         (amd64bsd_store_inferior_registers): Likewise.
2755         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2756         Likewise.
2757         (amd64_linux_store_inferior_registers): Likewise.
2758         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2759         (amd64_collect_native_gregset): Likewise.
2760         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2761         (amd64obsd_collect_uthread): Likewise.
2762         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2763         (amd64_collect_fpregset): Likewise.
2764         (amd64_supply_fxsave): Likewise.
2765         (amd64_supply_xsave): Likewise.
2766         (amd64_collect_fxsave): Likewise.
2767         (amd64_collect_xsave): Likewise.
2768         * arc-tdep.c (arc_write_pc): Likewise.
2769         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2770         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2771         (arm_fbsd_store_inferior_registers): Likewise.
2772         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2773         (store_vfp_regs): Likewise.
2774         (arm_linux_fetch_inferior_registers): Likewise.
2775         (arm_linux_store_inferior_registers): Likewise.
2776         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2777         (arm_linux_sigreturn_next_pc): Likewise.
2778         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2779         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2780         (fetch_register): Likewise.
2781         (store_register): Likewise.
2782         * arm-tdep.c (arm_is_thumb): Likewise.
2783         (displaced_in_arm_mode): Likewise.
2784         (bx_write_pc): Likewise.
2785         (arm_get_next_pcs_addr_bits_remove): Likewise.
2786         (arm_software_single_step): Likewise.
2787         (arm_extract_return_value): Likewise.
2788         (arm_store_return_value): Likewise.
2789         (arm_write_pc): Likewise.
2790         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2791         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2792         (bsd_uthread_store_registers): Likewise.
2793         * core-regset.c (fetch_core_registers): Likewise.
2794         * corelow.c (get_core_registers): Likewise.
2795         * cris-tdep.c (cris_store_return_value): Likewise.
2796         (cris_extract_return_value): Likewise.
2797         (find_step_target): Likewise.
2798         (find_step_target): Likewise.
2799         (cris_software_single_step): Likewise.
2800         * ctf.c (ctf_fetch_registers): Likewise.
2801         * darwin-nat.c (cancel_breakpoint): Likewise.
2802         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2803         * frv-tdep.c (frv_extract_return_value): Likewise.
2804         * ft32-tdep.c (ft32_store_return_value): Likewise.
2805         (ft32_extract_return_value): Likewise.
2806         * go32-nat.c (fetch_register): Likewise.
2807         (go32_fetch_registers): Likewise.
2808         (go32_store_registers): Likewise.
2809         (store_register): Likewise.
2810         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2811         (h8300_store_return_value): Likewise.
2812         * hppa-linux-nat.c (fetch_register): Likewise.
2813         (store_register): Likewise.
2814         (hppa_linux_fetch_inferior_registers): Likewise.
2815         (hppa_linux_store_inferior_registers): Likewise.
2816         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2817         (i386_darwin_store_inferior_registers): Likewise.
2818         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2819         (gnu_store_registers): Likewise.
2820         * i386-linux-nat.c (fetch_register): Likewise.
2821         (store_register): Likewise.
2822         (supply_gregset): Likewise.
2823         (fill_gregset): Likewise.
2824         (i386_linux_fetch_inferior_registers): Likewise.
2825         (i386_linux_store_inferior_registers): Likewise.
2826         (i386_linux_resume): Likewise.
2827         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2828         Likewise.
2829         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2830         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2831         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2832         (i386obsd_collect_uthread): Likewise.
2833         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2834         (i386_supply_gregset): Likewise.
2835         (i386_collect_gregset): Likewise.
2836         (i386_supply_fpregset): Likewise.
2837         (i386_collect_fpregset): Likewise.
2838         (i386_mpx_bd_base): Likewise.
2839         * i386-v4-nat.c (supply_fpregset): Likewise.
2840         (fill_fpregset): Likewise.
2841         * i387-tdep.c (i387_supply_fsave): Likewise.
2842         (i387_collect_fsave): Likewise.
2843         (i387_supply_fxsave): Likewise.
2844         (i387_collect_fxsave): Likewise.
2845         (i387_supply_xsave): Likewise.
2846         (i387_collect_xsave): Likewise.
2847         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2848         (ia64_linux_store_registers): Likewise.
2849         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2850         (ia64_extract_return_value): Likewise.
2851         (ia64_store_return_value): Likewise.
2852         (find_func_descr): Likewise.
2853         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2854         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2855         (inf_ptrace_store_registers): Likewise.
2856         * infrun.c (use_displaced_stepping): Likewise.
2857         (displaced_step_prepare_throw): Likewise.
2858         (resume): Likewise.
2859         (proceed): Likewise.
2860         (do_target_wait): Likewise.
2861         (adjust_pc_after_break): Likewise.
2862         (handle_inferior_event_1): Likewise.
2863         (handle_signal_stop): Likewise.
2864         (save_infcall_suspend_state): Likewise.
2865         (restore_infcall_suspend_state): Likewise.
2866         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2867         * jit.c (jit_frame_prev_register): Likewise.
2868         * linux-nat.c (save_stop_reason): Likewise.
2869         (linux_nat_wait_1): Likewise.
2870         (resume_stopped_resumed_lwps): Likewise.
2871         * linux-record.c (record_linux_sockaddr): Likewise.
2872         (record_linux_msghdr): Likewise.
2873         (record_linux_system_call): Likewise.
2874         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2875         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2876         (lm32_store_return_value): Likewise.
2877         * m32c-tdep.c (m32c_read_flg): Likewise.
2878         (m32c_pseudo_register_read): Likewise.
2879         (m32c_pseudo_register_write): Likewise.
2880         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2881         (m32r_linux_collect_gregset): Likewise.
2882         * m32r-tdep.c (m32r_store_return_value): Likewise.
2883         (m32r_extract_return_value): Likewise.
2884         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2885         (m68kbsd_collect_fpregset): Likewise.
2886         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2887         * m68k-linux-nat.c (fetch_register): Likewise.
2888         (old_fetch_inferior_registers): Likewise.
2889         (old_store_inferior_registers): Likewise.
2890         (store_regs): Likewise.
2891         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2892         (m68k_svr4_store_return_value): Likewise.
2893         * m88k-tdep.c (m88k_store_arguments): Likewise.
2894         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2895         (mi_cmd_data_write_register_values): Likewise.
2896         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2897         (mips_fbsd_store_inferior_registers): Likewise.
2898         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2899         (mips_fbsd_supply_gregs): Likewise.
2900         (mips_fbsd_collect_fpregs): Likewise.
2901         (mips_fbsd_collect_gregs): Likewise.
2902         (mips_fbsd_supply_fpregset): Likewise.
2903         (mips_fbsd_collect_fpregset): Likewise.
2904         (mips_fbsd_supply_gregset): Likewise.
2905         (mips_fbsd_collect_gregset): Likewise.
2906         * mips-linux-nat.c (supply_gregset): Likewise.
2907         (fill_gregset): Likewise.
2908         (supply_fpregset): Likewise.
2909         (fill_fpregset): Likewise.
2910         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2911         (mips_fill_gregset): Likewise.
2912         (mips_supply_fpregset): Likewise.
2913         (mips_fill_fpregset): Likewise.
2914         (mips64_supply_gregset): Likewise.
2915         (micromips_linux_sigframe_validate): Likewise.
2916         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2917         (mipsnbsd_fetch_inferior_registers): Likewise.
2918         (mipsnbsd_store_inferior_registers): Likewise.
2919         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2920         (mipsnbsd_supply_gregset): Likewise.
2921         (mipsnbsd_iterate_over_regset_sections): Likewise.
2922         (mipsnbsd_supply_reg): Likewise.
2923         (mipsnbsd_supply_fpreg): Likewise.
2924         * mips-tdep.c (mips_in_frame_stub): Likewise.
2925         (mips_dummy_id): Likewise.
2926         (is_octeon_bbit_op): Likewise.
2927         (micromips_bc1_pc): Likewise.
2928         (extended_mips16_next_pc): Likewise.
2929         (mips16_next_pc): Likewise.
2930         (deal_with_atomic_sequence): Likewise.
2931         * moxie-tdep.c (moxie_process_readu): Likewise.
2932         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2933         * nto-procfs.c (procfs_store_registers): Likewise.
2934         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2935         (ppcfbsd_store_inferior_registers): Likewise.
2936         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2937         (fetch_altivec_register): Likewise.
2938         (get_spe_registers): Likewise.
2939         (fetch_spe_register): Likewise.
2940         (fetch_altivec_registers): Likewise.
2941         (fetch_all_gp_regs): Likewise.
2942         (fetch_all_fp_regs): Likewise.
2943         (store_vsx_register): Likewise.
2944         (store_altivec_register): Likewise.
2945         (set_spe_registers): Likewise.
2946         (store_spe_register): Likewise.
2947         (store_altivec_registers): Likewise.
2948         (store_all_gp_regs): Likewise.
2949         (store_all_fp_regs): Likewise.
2950         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2951         (ppc_linux_collect_gregset): Likewise.
2952         (ppc_canonicalize_syscall): Likewise.
2953         (ppc_linux_record_signal): Likewise.
2954         (ppu2spu_prev_register): Likewise.
2955         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2956         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2957         (ppcobsd_store_registers): Likewise.
2958         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2959         Likewise.
2960         (ppc_ravenscar_generic_store_registers): Likewise.
2961         * procfs.c (procfs_fetch_registers): Likewise.
2962         (procfs_store_registers): Likewise.
2963         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2964         (ravenscar_store_registers): Likewise.
2965         (ravenscar_prepare_to_store): Likewise.
2966         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2967         * record-full.c (record_full_wait_1): Likewise.
2968         (record_full_registers_change): Likewise.
2969         (record_full_store_registers): Likewise.
2970         (record_full_core_fetch_registers): Likewise.
2971         (record_full_save): Likewise.
2972         (record_full_goto_insn): Likewise.
2973         * regcache.c (regcache_register_size): Likewise.
2974         (get_regcache_arch): Remove.
2975         (regcache_read_pc): Likewise.
2976         * regcache.h (get_regcache_arch): Remove.
2977         * remote-sim.c (gdbsim_fetch_register): Likewise.
2978         (gdbsim_store_register): Likewise.
2979         * remote.c (fetch_register_using_p): Likewise.
2980         (send_g_packet): Likewise.
2981         (remote_prepare_to_store): Likewise.
2982         (store_registers_using_G): Likewise.
2983         * reverse.c (save_bookmark_command): Likewise.
2984         (goto_bookmark_command): Likewise.
2985         * rs6000-aix-tdep.c (branch_dest): Likewise.
2986         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2987         (fetch_register): Likewise.
2988         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2989         (ppc_collect_reg): Likewise.
2990         (ppc_collect_gregset): Likewise.
2991         (ppc_collect_fpregset): Likewise.
2992         (ppc_collect_vsxregset): Likewise.
2993         (ppc_collect_vrregset): Likewise.
2994         (ppc_displaced_step_hw_singlestep): Likewise.
2995         (rs6000_pseudo_register_read): Likewise.
2996         (rs6000_pseudo_register_write): Likewise.
2997         * s390-linux-nat.c (supply_gregset): Likewise.
2998         (fill_gregset): Likewise.
2999         (s390_linux_fetch_inferior_registers): Likewise.
3000         * s390-linux-tdep.c (s390_write_pc): Likewise.
3001         (s390_software_single_step): Likewise.
3002         (s390_all_but_pc_registers_record): Likewise.
3003         (s390_linux_syscall_record): Likewise.
3004         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3005         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3006         (shnbsd_store_inferior_registers): Likewise.
3007         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3008         (sh_extract_return_value_fpu): Likewise.
3009         (sh_store_return_value_nofpu): Likewise.
3010         (sh_corefile_supply_regset): Likewise.
3011         (sh_corefile_collect_regset): Likewise.
3012         * sh64-tdep.c (sh64_extract_return_value): Likewise.
3013         (sh64_store_return_value): Likewise.
3014         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3015         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3016         (sparc_store_inferior_registers): Likewise.
3017         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3018         (sparc_ravenscar_prepare_to_store): Likewise.
3019         * sparc-tdep.c (sparc32_store_arguments): Likewise.
3020         (sparc_analyze_control_transfer): Likewise.
3021         (sparc_step_trap): Likewise.
3022         (sparc_software_single_step): Likewise.
3023         (sparc32_gdbarch_init): Likewise.
3024         (sparc_supply_rwindow): Likewise.
3025         (sparc_collect_rwindow): Likewise.
3026         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3027         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3028         (sparc64nbsd_collect_gregset): Likewise.
3029         (sparc64nbsd_supply_fpregset): Likewise.
3030         (sparc64nbsd_collect_fpregset): Likewise.
3031         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3032         (sparc64_supply_gregset): Likewise.
3033         (sparc64_collect_gregset): Likewise.
3034         (sparc64_supply_fpregset): Likewise.
3035         (sparc64_collect_fpregset): Likewise.
3036         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3037         * spu-tdep.c (spu_unwind_sp): Likewise.
3038         (spu2ppu_prev_register): Likewise.
3039         (spu_memory_remove_breakpoint): Likewise.
3040         * stack.c (return_command): Likewise.
3041         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3042         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3043         * tracefile.c (trace_save_ctf): Likewise.
3044         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3045         (do_windows_store_inferior_registers): Likewise.
3046         (windows_resume): Likewise.
3047         * xtensa-linux-nat.c (fill_gregset): Likewise.
3048         (supply_gregset_reg): Likewise.
3049         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3050         (xtensa_register_read_masked): Likewise.
3051         (xtensa_supply_gregset): Likewise.
3052         (xtensa_extract_return_value): Likewise.
3053         (xtensa_store_return_value): Likewise.
3054
3055 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
3056
3057         * doublest.c (floatformat_from_string): New function.
3058         * doublest.h (floatformat_from_string): Add prototype.
3059
3060         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3061         (OP_FLOAT): ... this.
3062         * expression.h: Do not include "doublest.h".
3063         (union exp_element): Replace doubleconst and decfloatconst by
3064         new element floatconst.
3065         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3066         (ada_evaluate_subexp): Likewise.
3067         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3068         OP_DOUBLE and OP_DECFLOAT.
3069         * expprint.c (print_subexp_standard): Likewise.
3070         (dump_subexp_body_standard): Likewise.
3071         * breakpoint.c (watchpoint_exp_is_const): Likewise.
3072
3073         * parse.c: Include "dfp.h".
3074         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3075         (write_exp_elt_floatcst): New function.
3076         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3077         and OP_DECFLOAT.
3078         (operator_check_standard): Likewise.
3079         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
3080         Return target format buffer instead of host DOUBLEST.
3081         Use floatformat_from_string and decimal_from_string to parse
3082         either binary or decimal floating-point types.
3083         (parse_c_float): Remove.
3084         * parser-defs.h: Do not include "doublest.h".
3085         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3086         (write_exp_elt_floatcst): Add prototype.
3087         (parse_float): Update prototype.
3088         (parse_c_float): Remove.
3089
3090         * c-exp.y: Do not include "dfp.h".
3091         (typed_val_float): Use byte buffer instead of DOUBLEST.
3092         (typed_val_decfloat): Remove.
3093         (DECFLOAT): Remove.
3094         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3095         (parse_number): Update to new parse_float interface.
3096         Parse suffixes and determine type before calling parse_float.
3097         Handle decimal and binary FP types the same way.
3098
3099         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3100         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3101         (parse_number): Update to new parse_float interface.
3102         Parse suffixes and determine type before calling parse_float.
3103
3104         * f-exp.y: Replace dval by typed_val_float.
3105         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3106         (parse_number): Use parse_float instead of atof.
3107
3108         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3109         (parse_go_float): Remove.
3110         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3111         (parse_number): Call parse_float instead of parse_go_float.
3112         Parse suffixes and determine type before calling parse_float.
3113
3114         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3115         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3116         (parse_number): Update to new parse_float interface.
3117         Parse suffixes and determine type before calling parse_float.
3118
3119         * m2-exp.y: Replace dval by byte buffer val.
3120         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3121         (parse_number): Call parse_float instead of atof.
3122
3123         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3124         (lex_number): Call parse_float instead of strtod.
3125         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3126         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3127         Use write_exp_elt_floatcst.
3128         (unit_testing): Remove static variable.
3129         (rust_type): Do not check unit_testing.
3130         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
3131
3132         * ada-exp.y (type_float, type_double): Remove.
3133         (typed_val_float): Use byte buffer instead of DOUBLEST.
3134         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3135         * ada-lex.l (processReal): Use parse_float instead of sscanf.
3136
3137 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
3138
3139         * aarch64-tdep.h (enum aarch64_regnum): Remove.
3140         * arch/aarch64.h: New file.
3141
3142 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3143
3144         * dfp.h (decimal_from_string): Use const reference for argument.
3145         * dfp.c (decimal_from_string): Likewise.
3146
3147 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3148
3149         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3150         * sh64-tdep.c (sh64_do_fp_register): Likewise.
3151         * mips-tdep.c (mips_print_fp_register): Likewise.
3152
3153 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3154
3155         * common/format.h (enum argclass): Replace decfloat_arg by
3156         dec32float_arg, dec64float_arg, and dec128float_arg.
3157         * common/format.c (parse_format_string): Update to return
3158         new decimal float argument classes.
3159
3160         * printcmd.c (printf_decfloat): Rename to ...
3161         (printf_floating): ... this.  Add argclass argument, and use it
3162         instead of parsing the format string again.  Add support for
3163         binary floating-point values, using floatformat_to_string.
3164         Convert value to the target format if it doesn't already match.
3165         (ui_printf): Call printf_floating instead of printf_decfloat,
3166         also for double_arg / long_double_arg.  Pass argclass.
3167
3168         * dfp.c (decimal_to_string): Add format string argument.
3169         * dfp.h (decimal_to_string): Likewise.
3170
3171         * doublest.c (floatformat_to_string): Add format string argument.
3172         * doublest.h (floatformat_to_string): Likewise.
3173
3174 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3175
3176         * doublest.c (floatformat_precision): New routine.
3177         (floatformat_to_string): Likewise.
3178         * doublest.c (floatformat_to_string): Add prototype.
3179
3180         * printcmd.c (print_scalar_formatted): Only call print_floating
3181         on floating-point types.
3182         * valprint.c: Do not include "floatformat.h".
3183         (generic_val_print_decfloat): Remove.
3184         (generic_val_print): Call generic_val_print_float for both
3185         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3186         (print_floating): Use floatformat_to_string.  Handle decimal float.
3187         (print_decimal_floating): Remove, merge into floatformat_to_string.
3188         * value.h (print_decimal_floating): Remove.
3189
3190         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3191
3192 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3193
3194         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3195
3196 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3197
3198         * memattr.h: Don't include vec.h.
3199         (struct mem_attrib): Initialize fields.
3200         <unknown>: New static method.
3201         (struct mem_region): Add constructors, operator<, initialize
3202         fields.
3203         * memattr.c: Include algorithm.
3204         (default_mem_attrib, unknown_mem_attrib): Remove.
3205         (user_mem_region_list): New global.
3206         (target_mem_region_list, mem_region_list): Change type to
3207         std::vector<mem_region>.
3208         (mem_use_target): Now a function.
3209         (target_mem_regions_valid): Change type to bool.
3210         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3211         (require_user_regions): Adjust.
3212         (require_target_regions): Adjust.
3213         (create_mem_region): Adjust.
3214         (lookup_mem_region): Adjust.
3215         (invalidate_target_mem_regions): Adjust.
3216         (mem_clear): Rename to...
3217         (user_mem_clear): ... this, and adjust.
3218         (mem_command): Adjust.
3219         (info_mem_command): Adjust.
3220         (mem_enable, enable_mem_command, mem_disable,
3221         disable_mem_command): Adjust.
3222         (mem_delete): Adjust.
3223         (delete_mem_command): Adjust.
3224         * memory-map.h (parse_memory_map): Return an std::vector.
3225         * memory-map.c (parse_memory_map): Likewise.
3226         (struct memory_map_parsing_data): Add constructor.
3227         <memory_map>: Point to std::vector.
3228         (memory_map_start_memory): Adjust.
3229         (memory_map_end_memory): Adjust.
3230         (memory_map_end_property): Adjust.
3231         (clear_result): Remove.
3232         * remote.c (remote_memory_map): Return an std::vector.
3233         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3234         Remove.
3235         (target_debug_print_mem_region_vector): New.
3236         * target-delegates.c: Regenerate.
3237         * target.h (mem_region_vector): New typedef.
3238         (to_memory_map): Return mem_region_vector.
3239         (target_memory_map): Return an std::vector.
3240         * target.c (target_memory_map): Return an std::vector.
3241         (flash_erase_command): Adjust.
3242
3243 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3244
3245         * memory-map.c (struct memory_map_parsing_data) <property_name>:
3246         Change type to std::string.
3247         (memory_map_start_property): Adjust.
3248         (memory_map_end_property): Adjust.
3249
3250 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3251
3252         * infrun.h: Include common/byte-vector.h.
3253         (struct displaced_step_closure): New struct.
3254         (struct buf_displaced_step_closure): New struct.
3255         * infrun.c (displaced_step_closure::~displaced_step_closure):
3256         Provide default implementation.
3257         (displaced_step_clear): Deallocate step closure with delete.
3258         * aarch64-tdep.c (displaced_step_closure): Rename to ...
3259         (aarch64_displaced_step_closure): ... this, extend
3260         displaced_step_closure.
3261         (aarch64_displaced_step_data) <dsc>: Change type to
3262         aarch64_displaced_step_closure.
3263         (aarch64_displaced_step_copy_insn): Adjust to type change, use
3264         unique_ptr.
3265         (aarch64_displaced_step_fixup): Add cast for displaced step
3266         closure.
3267         * amd64-tdep.c (displaced_step_closure): Rename to ...
3268         (amd64_displaced_step_closure): ... this, extend
3269         displaced_step_closure.
3270         <insn_buf>: Change type to std::vector<gdb_byte>.
3271         <max_len>: Remove.
3272         (fixup_riprel): Change type of DSC parameter, adjust to type
3273         change of insn_buf.
3274         (fixup_displaced_copy): Change type of DSC parameter.
3275         (amd64_displaced_step_copy_insn): Instantiate
3276         amd64_displaced_step_closure.
3277         (amd64_displaced_step_fixup): Add cast for closure type, adjust
3278         to type change of insn_buf.
3279         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3280         parameter DSC.
3281         (arm_linux_copy_svc): Likewise.
3282         (cleanup_kernel_helper_return): Likewise.
3283         (arm_catch_kernel_helper_return): Likewise.
3284         (arm_linux_displaced_step_copy_insn): Instantiate
3285         arm_displaced_step_closure.
3286         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3287         (displaced_read_reg): Change type of parameter DSC.
3288         (branch_write_pc): Likewise.
3289         (load_write_pc): Likewise.
3290         (alu_write_pc): Likewise.
3291         (displaced_write_reg): Likewise.
3292         (arm_copy_unmodified): Likewise.
3293         (thumb_copy_unmodified_32bit): Likewise.
3294         (thumb_copy_unmodified_16bit): Likewise.
3295         (cleanup_preload): Likewise.
3296         (install_preload): Likewise.
3297         (arm_copy_preload): Likewise.
3298         (thumb2_copy_preload): Likewise.
3299         (install_preload_reg): Likewise.
3300         (arm_copy_preload_reg): Likewise.
3301         (cleanup_copro_load_store): Likewise.
3302         (install_copro_load_store): Likewise.
3303         (arm_copy_copro_load_store) Likewise.
3304         (thumb2_copy_copro_load_store): Likewise.
3305         (cleanup_branch): Likewise.
3306         (install_b_bl_blx): Likewise.
3307         (arm_copy_b_bl_blx): Likewise.
3308         (thumb2_copy_b_bl_blx): Likewise.
3309         (thumb_copy_b): Likewise.
3310         (install_bx_blx_reg): Likewise.
3311         (arm_copy_bx_blx_reg): Likewise.
3312         (thumb_copy_bx_blx_reg): Likewise.
3313         (cleanup_alu_imm): Likewise.
3314         (arm_copy_alu_imm): Likewise.
3315         (thumb2_copy_alu_imm): Likewise.
3316         (cleanup_alu_reg): Likewise.
3317         (install_alu_reg): Likewise.
3318         (arm_copy_alu_reg): Likewise.
3319         (thumb_copy_alu_reg): Likewise.
3320         (cleanup_alu_shifted_reg): Likewise.
3321         (install_alu_shifted_reg): Likewise.
3322         (arm_copy_alu_shifted_reg): Likewise.
3323         (cleanup_load): Likewise.
3324         (cleanup_store): Likewise.
3325         (arm_copy_extra_ld_st): Likewise.
3326         (install_load_store): Likewise.
3327         (thumb2_copy_load_literal): Likewise.
3328         (thumb2_copy_load_reg_imm): Likewise.
3329         (arm_copy_ldr_str_ldrb_strb): Likewise.
3330         (cleanup_block_load_all): Likewise.
3331         (cleanup_block_store_pc): Likewise.
3332         (cleanup_block_load_pc): Likewise.
3333         (arm_copy_block_xfer): Likewise.
3334         (thumb2_copy_block_xfer): Likewise.
3335         (cleanup_svc): Likewise.
3336         (install_svc): Likewise.
3337         (arm_copy_svc): Likewise.
3338         (thumb_copy_svc): Likewise.
3339         (arm_copy_undef): Likewise.
3340         (thumb_32bit_copy_undef): Likewise.
3341         (arm_copy_unpred): Likewise.
3342         (arm_decode_misc_memhint_neon): Likewise.
3343         (arm_decode_unconditional): Likewise.
3344         (arm_decode_miscellaneous): Likewise.
3345         (arm_decode_dp_misc): Likewise.
3346         (arm_decode_ld_st_word_ubyte): Likewise.
3347         (arm_decode_media): Likewise.
3348         (arm_decode_b_bl_ldmstm): Likewise.
3349         (arm_decode_ext_reg_ld_st): Likewise.
3350         (thumb2_decode_dp_shift_reg): Likewise.
3351         (thumb2_decode_ext_reg_ld_st): Likewise.
3352         (arm_decode_svc_copro): Likewise.
3353         (thumb2_decode_svc_copro): Likewise.
3354         (install_pc_relative): Likewise.
3355         (thumb_copy_pc_relative_16bit): Likewise.
3356         (thumb_decode_pc_relative_16bit): Likewise.
3357         (thumb_copy_pc_relative_32bit): Likewise.
3358         (thumb_copy_16bit_ldr_literal): Likewise.
3359         (thumb_copy_cbnz_cbz): Likewise.
3360         (thumb2_copy_table_branch): Likewise.
3361         (cleanup_pop_pc_16bit_all): Likewise.
3362         (thumb_copy_pop_pc_16bit): Likewise.
3363         (thumb_process_displaced_16bit_insn): Likewise.
3364         (decode_thumb_32bit_ld_mem_hints): Likewise.
3365         (thumb_process_displaced_32bit_insn): Likewise.
3366         (thumb_process_displaced_insn): Likewise.
3367         (arm_process_displaced_insn): Likewise.
3368         (arm_displaced_init_closure): Likewise.
3369         (arm_displaced_step_fixup): Add cast for closure.
3370         * arm-tdep.h: Include infrun.h.
3371         (displaced_step_closure): Rename to ...
3372         (arm_displaced_step_closure): ... this, extend
3373         displaced_step_closure.
3374         <u::svc::copy_svc_os>: Change type of parameter DSC.
3375         <cleanup>: Likewise.
3376         (arm_process_displaced_insn): Likewise.
3377         (arm_displaced_init_closure): Likewise.
3378         (displaced_read_reg): Likewise.
3379         (displaced_write_reg): Likewise.
3380         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3381         Adjust.
3382         * i386-tdep.h: Include infrun.h.
3383         (i386_displaced_step_closure): New typedef.
3384         * i386-tdep.c (i386_displaced_step_copy_insn): Use
3385         i386_displaced_step_closure.
3386         (i386_displaced_step_fixup): Adjust.
3387         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3388         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3389         and unique_ptr.
3390         (ppc_displaced_step_fixup): Adjust.
3391         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3392         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3393         and unique_ptr.
3394         (s390_displaced_step_fixup): Adjust.
3395
3396 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3397
3398         * interps.h (interp_resume, interp_suspend, interp_set_temp):
3399         Remove declarations.
3400
3401 2017-10-20  Tom Tromey  <tom@tromey.com>
3402
3403         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3404         std::vector.
3405         (gdb_bfd_record_inclusion): Update.
3406         (bfdp): Remove typedef.
3407
3408 2017-10-20  Tom Tromey  <tom@tromey.com>
3409
3410         * gdb_bfd.c (gdb_bfd_ref): Use new.
3411         (struct gdb_bfd_data): Add constructor, destructor, and member
3412         initializers.
3413         (gdb_bfd_unref): Use delete.
3414
3415 2017-10-20  Tom Tromey  <tom@tromey.com>
3416
3417         * exec.c (exec_file_attach): Use new_bfd_ref.
3418         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3419         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3420         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3421         new_bfd_ref.
3422         * gdb_bfd.h (new_bfd_ref): New function.
3423
3424 2017-10-20  Pedro Alves  <palves@redhat.com>
3425
3426         * main.c (captured_command_loop): Add attribute noinline.
3427
3428 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
3429
3430         * interps.c (struct interp_factory): Add constructor.
3431         (interp_factory_p): Remove typedef.
3432         (DEF_VEC_P(interp_factory_p)): Remove.
3433         (interpreter_factories): Change type to std::vector.
3434         (interp_factory_register): Adjust.
3435         (interp_lookup): Adjust.
3436         (interpreter_completer): Adjust.
3437
3438 2017-10-19  Tom Tromey  <tom@tromey.com>
3439
3440         * break-catch-syscall.c (catch_syscall_completer): Use
3441         std::string, gdb::unique_xmalloc_ptr.
3442
3443 2017-10-19  Tom Tromey  <tom@tromey.com>
3444
3445         * infcall.c (call_function_by_hand_dummy): Use std::string.
3446
3447 2017-10-19  Tom Tromey  <tom@tromey.com>
3448
3449         * mi/mi-main.c (mi_cmd_execute): Update.
3450         * top.h (prepare_execute_command): Return scoped_value_mark.
3451         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3452         Add move constructor.
3453         * top.c (prepare_execute_command): Return scoped_value_mark.
3454         (execute_command): Update.
3455
3456 2017-10-19  Pedro Alves  <palves@redhat.com>
3457
3458         * xml-support.c (xml_fetch_content_from_file): Check fread's
3459         return.
3460
3461 2017-10-19  Pedro Alves  <palves@redhat.com>
3462
3463         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3464         async.
3465         (handle_error_fd): New function.
3466         (ser_base_async): Add/delete an event loop file handler for
3467         error_fd.
3468
3469 2017-10-19  Pedro Alves  <palves@redhat.com>
3470
3471         * xml-support.c (xml_fetch_content_from_file): Don't read in
3472         chunks.  Instead use fseek to determine the file's size, and read
3473         it in one go.
3474
3475 2017-11-18  Keith Seitz  <keiths@redhat.com>
3476
3477         * c-exp.y (oper): Canonicalize conversion operators of user-defined
3478         types.
3479         Add whitespace to front of type name.
3480
3481 2017-10-18  Keith Seitz  <keiths@redhat.com>
3482
3483         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3484         DW_AT_accessibility.
3485
3486 2017-10-18  Yao Qi  <yao.qi@linaro.org>
3487
3488         * features/tic6x-c62x-linux.c: Remove.
3489
3490 2017-10-17  Tom Tromey  <tom@tromey.com>
3491
3492         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3493         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3494         (do_mixed_source_and_assembly): Likewise.
3495
3496 2017-10-17  Tom Tromey  <tom@tromey.com>
3497
3498         * regcache.c (regcache::xfer_part): Remove assertion.
3499
3500 2017-10-17  Pedro Alves  <palves@redhat.com>
3501
3502         * xml-support.c (xml_fetch_content_from_file): Call
3503         unique_ptr::release() instead unique_ptr::get() when passing
3504         through xrealloc.
3505
3506 2017-10-17  Yao Qi  <yao.qi@linaro.org>
3507
3508         * regcache.c (regcache::xfer_part): Remove parameters read and
3509         write, add parameter is_raw.  All callers are updated.
3510
3511 2017-10-16  Keith Seitz  <keiths@redhat.com>
3512
3513         * c-typeprint.c (enum access_specifier): Moved here from
3514         c_type_print_base.
3515         (output_access_specifier): New function.
3516         (c_type_print_base): Consider typedefs when assessing
3517         whether access labels are needed.
3518         Use output_access_specifier as needed.
3519         Output access specifier for typedefs, if needed.
3520         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3521         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3522         fields.
3523         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3524         accessor macros.
3525
3526 2017-10-16  Tom Tromey  <tom@tromey.com>
3527
3528         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3529         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3530         * target.c (target_fileio_read_stralloc): Update.
3531         * sparc64-tdep.c (adi_is_addr_mapped): Update.
3532         * target.h (target_fileio_read_stralloc): Return
3533         unique_xmalloc_ptr.
3534
3535 2017-10-16  Tom Tromey  <tom@tromey.com>
3536
3537         * xml-syscall.c (xml_init_syscalls_info): Update.
3538         * xml-support.c (xinclude_start_include): Update.
3539         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3540         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3541         (xml_fetch_content_from_file): Likewise.
3542         * osdata.c (get_osdata): Update.
3543         * target.h (target_read_stralloc, target_get_osdata): Return
3544         unique_xmalloc_ptr.
3545         * solib-aix.c (solib_aix_get_library_list): Update.
3546         * solib-target.c (solib_target_current_sos): Update.
3547         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3548         * xml-tdesc.c (fetch_available_features_from_target): Update.
3549         (target_fetch_description_xml): Update.
3550         (file_read_description_xml): Update.
3551         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3552         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3553         (remote_pid_to_exec_file): Update.
3554         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3555         (target_get_osdata): Likewise.
3556
3557 2017-10-16  Tom Tromey  <tom@tromey.com>
3558
3559         * remote.c (remote_register_number_and_offset): Use std::vector.
3560         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3561         (putpkt_binary): Use gdb::def_vector.
3562         (compare_sections_command): Use gdb::byte_vector.
3563
3564 2017-10-16  Tom Tromey  <tom@tromey.com>
3565
3566         * ppc-linux-nat.c (hwdebug_insert_point): Use
3567         gdb::unique_xmalloc_ptr, XDUP.
3568
3569 2017-10-16  Tom Tromey  <tom@tromey.com>
3570
3571         * probe.c (parse_probes): Use std::string.
3572         (info_probes_for_ops, enable_probes_command)
3573         (disable_probes_command): Remove cleanups.
3574
3575 2017-10-16  Tom Tromey  <tom@tromey.com>
3576
3577         * buildsym.c (block_compar): Remove.
3578         (end_symtab_get_static_block): Use std::vector.
3579
3580 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
3581
3582         * memrange.h (struct mem_range): Define operator< and operator==.
3583         (mem_range_s): Remove.
3584         (DEF_VEC_O (mem_range_s)): Remove.
3585         (normalize_mem_ranges): Change parameter type to std::vector.
3586         * memrange.c (compare_mem_ranges): Remove.
3587         (normalize_mem_ranges): Change parameter type to std::vector,
3588         adjust to vector change.
3589         * exec.c (section_table_available_memory): Return vector, remove
3590         parameter.
3591         (section_table_read_available_memory): Adjust to std::vector
3592         change.
3593         * remote.c (remote_read_bytes): Adjust to std::vector
3594         change.
3595         * tracepoint.h (traceframe_available_memory): Change parameter
3596         type to std::vector.
3597         * tracepoint.c (traceframe_available_memory): Change parameter
3598         type to std::vector, adjust.
3599         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3600         std::vector change.
3601         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3602         unittests/memrange-selftests.c.
3603         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3604         * gdb/unittests/memrange-selftests.c: New file.
3605
3606 2017-10-16  Pedro Alves  <palves@redhat.com>
3607
3608         * elfread.c (probe_key_free): Rename range-for variable.
3609         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3610         (find_probe_by_pc, collect_probes): Rename range-for variable.
3611
3612 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3613
3614         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3615         * features/tic6x-c62x.c: Remove.
3616         * features/tic6x-c64x-linux.c: Remove.
3617         * features/tic6x-c64x.c: Remove.
3618         * features/tic6x-c64xp-linux.c: Remove.
3619         * features/tic6x-c64xp.c: Remove.
3620         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3621         initialize_tdesc_tic6x_*_linux functions.
3622         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3623         initialize_tdesc_tic6x_* functions.
3624
3625 2017-10-16  Yao Qi  <yao.qi@linaro.org>
3626
3627         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3628         tic6x-c62x.
3629         * regformats/tic6x-c62x.dat: Remove.
3630         * regformats/tic6x-c64x.dat: Remove.
3631         * regformats/tic6x-c64xp.dat: Remove.
3632
3633 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
3634
3635         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3636         (the !HAVE_LIBEXPAT version).
3637
3638 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3639
3640         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3641         const.
3642
3643 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3644
3645         * target.h: Include tracepoint.h.
3646         (enum trace_find_type): Move to tracepoint.h.
3647         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3648         * tracepoint.h: Don't include target.h
3649         (enum trace_find_type): Move from target.h.
3650         (parse_traceframe_info): Return a unique ptr.
3651         * tracepoint.c (current_traceframe_info): Change type to unique
3652         ptr.
3653         (free_traceframe_info): Remove.
3654         (clear_traceframe_info): Don't manually free
3655         current_traceframe_info.
3656         (free_result): Remove.
3657         (parse_traceframe_info): Return a unique ptr.
3658         (get_traceframe_info): Adjust to unique ptr.
3659         * ctf.c (ctf_traceframe_info): Return a unique ptr.
3660         * remote.c (remote_traceframe_info): Return a unique ptr.
3661         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3662         ptr.
3663         * target-debug.h (target_debug_print_traceframe_info_up): New
3664         macro.
3665         * target-delegates.c: Regenerate.
3666
3667 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3668
3669         * memrange.h (struct mem_range): Add constructors.
3670         * tracepoint.h (struct traceframe_info) <memory>: Change type to
3671         std::vector<mem_range>.
3672         * tracepoint.c (free_traceframe_info): Don't manually free
3673         vector.
3674         (traceframe_info_start_memory): Adjust to vector change.
3675         (traceframe_available_memory): Likewise.
3676         * tracefile-tfile.c (build_traceframe_info): Likewise.
3677         * ctf.c (ctf_traceframe_info): Likewise.
3678
3679 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3680
3681         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3682         std::vector<int>.
3683         * tracepoint.c (free_traceframe_info): Deallocate with delete.
3684         (traceframe_info_start_tvar): Adjust to vector change.
3685         (parse_traceframe_info): Allocate with new.
3686         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3687         vector change.
3688         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3689         change.
3690         tfile_traceframe_info): Allocate with new.
3691         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3692         change.
3693
3694 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
3695
3696         * tracepoint.c (traceframe_info): Rename to...
3697         (current_traceframe_info): ...this.
3698         (clear_traceframe_info): Adjust.
3699         (get_traceframe_info): Adjust.
3700
3701 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3702
3703         * nat/linux-osdata.c: Include algorithm.
3704         (compare_processes): Remove.
3705         (struct pid_pgid_entry): New struct.
3706         (linux_xfer_osdata_processgroups): Use std::vector instead of
3707         XNEWVEC.
3708
3709 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
3710
3711         * objfiles.h: Don't include symfile.h.
3712         (struct partial_symbol): Remove forward-declaration.
3713         (struct objfile) <global_psymbols, static_psymbols>: Change type
3714         to std::vector<partial_symbol *>.
3715         * objfiles.c (objfile::objfile): Don't memset those fields.
3716         (objfile::~objfile): Don't free those fields.
3717         * psympriv.h (struct psymbol_allocation_list): Remove
3718         forward-declaration.
3719         (add_psymbol_to_list): Change psymbol_allocation_list parameter
3720         to std::vector.
3721         (start_psymtab_common): Change parameters to std::vector.
3722         * psymtab.c: Include algorithm.
3723         (require_partial_symbols): Call shrink_to_fit.
3724         (find_pc_sect_psymbol): Adjust to vector change.
3725         (match_partial_symbol): Likewise.
3726         (lookup_partial_symbol): Likewise.
3727         (psym_relocate): Likewise.
3728         (dump_psymtab): Likewise.
3729         (recursively_search_psymtabs): Likewise.
3730         (compare_psymbols): Remove.
3731         (sort_pst_symbols): Adjust to vector change.
3732         (start_psymtab_common): Likewise.
3733         (end_psymtab_common): Likewise.
3734         (psymbol_bcache_full): De-constify return value.
3735         (add_psymbol_to_bcache): Likewise.
3736         (extend_psymbol_list): Remove.
3737         (append_psymbol_to_list): Adjust to vector change.
3738         (add_psymbol_to_list): Likewise.
3739         (init_psymbol_list): Likewise.
3740         (maintenance_info_psymtabs): Likewise.
3741         (maintenance_check_psymtabs): Likewise.
3742         * symfile.h (struct psymbol_allocation_list): Remove.
3743         * symfile.c (reread_symbols): Adjust to vector change.
3744         * dbxread.c (start_psymtab): Change type of parameters.
3745         (dbx_symfile_read): Adjust to vector change.
3746         (read_dbx_symtab): Likewise.
3747         (start_psymtab): Change type of parameters.
3748         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3749         (create_partial_symtab): Likewise.
3750         (add_partial_symbol): Likewise.
3751         (write_one_signatured_type): Likewise.
3752         (recursively_write_psymbols): Likewise.
3753         * mdebugread.c (parse_partial_symbols): Likewise.
3754         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3755         (scan_xcoff_symtab): Adjust to vector change.
3756         (xcoff_initial_scan): Likewise.
3757
3758 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
3759
3760         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3761
3762 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3763
3764         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3765         Remove s390x-*-expedite, add s390x-expedite.
3766
3767 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3768
3769         * features/s390-gs-linux64.c: Regenerated.
3770         * features/s390x-gs-linux64.c: Regenerated.
3771
3772 2017-10-13  Tom Tromey  <tom@tromey.com>
3773
3774         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3775         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3776         delete.
3777         * symfile.c (symbol_file_add_with_addrs): Use new.
3778         (symbol_file_add_separate): Update comment.
3779         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3780         * jit.c (jit_object_close_impl): Use new.
3781         (jit_unregister_code): Use delete.
3782         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3783         (~objfile): Rename from free_objfile.
3784         (free_objfile_separate_debug, do_free_objfile_cleanup)
3785         (free_all_objfiles, objfile_purge_solibs): Use delete.
3786         * objfiles.h (struct objfile): Add constructor and destructor.
3787         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3788         (allocate_objfile, free_objfile): Don't declare.
3789         (struct objstats): Add initializers.
3790
3791 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3792
3793         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3794         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3795         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3796         * gdbarch.h: Regenerate.
3797         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3798         Adjust comment.
3799         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3800         (i386_displaced_step_fixup): Adjust comment.
3801         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3802
3803 2017-10-12  Tom Tromey  <tom@tromey.com>
3804
3805         * prologue-value.h (pv_area::store_would_trash): Return bool.
3806         (pv_area::find_reg): Likewise.
3807         * prologue-value.c (pv_area::store_would_trash): Return bool.
3808         (pv_area::find_reg): Likewise.
3809
3810 2017-10-12  Tom Tromey  <tom@tromey.com>
3811
3812         * s390-linux-tdep.c (s390_store, s390_load)
3813         (s390_check_for_saved, s390_analyze_prologue): Update.
3814         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3815         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3816         * prologue-value.h (class pv_area): Move from prologue-value.c.
3817         Change names of members.  Add constructor, destructor, member
3818         functions.
3819         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3820         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3821         (pv_area_fetch, pv_area_scan): Don't declare.
3822         * prologue-value.c (struct pv_area::area_entry): Now member of
3823         pv_area.
3824         (struct pv_area): Move to prologue-value.h.
3825         (pv_area::pv_area): Rename from make_pv_area.
3826         (pv_area::~pv_area): Rename from free_pv_area.
3827         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3828         (clear_entries, find_entry, overlaps, store_would_trash, store)
3829         (fetch, find_reg, scan): Now member of pv_area.
3830         Remove "area" argument.  Update.
3831         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3832         Update.
3833         * mn10300-tdep.c (push_reg, check_for_saved)
3834         (mn10300_analyze_prologue): Update.
3835         * mep-tdep.c (is_arg_spill, check_for_saved)
3836         (mep_analyze_prologue): Update.
3837         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3838         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3839         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3840         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3841         Update.
3842         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3843         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3844
3845 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3846
3847         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3848         * linux-nat.c (linux_nat_delete_thread): New variable.
3849         (lwp_free): Invoke linux_nat_delete_thread if set.
3850         (linux_nat_set_delete_thread): New function.
3851         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3852         thread delete callback.
3853         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3854         (_initialize_arm_linux_nat): Assign thread delete callback.
3855         * s390-linux-nat.c (s390_delete_thread): New function.
3856         (_initialize_s390_nat): Assign thread delete callback.
3857         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3858         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3859         function.
3860         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3861         declaration.
3862         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3863         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3864
3865 2017-10-09  Tom Tromey  <tom@tromey.com>
3866
3867         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3868         std::string.
3869         * tui/tui-layout.c (enum tui_status): Use std::string.
3870
3871 2017-10-11  Tom Tromey  <tom@tromey.com>
3872
3873         * gdbthread.h (thread_command): Constify.
3874         * inferior.h (detach_command): Constify.
3875         * top.h (set_history, show_history): Constify.
3876         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3877         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3878         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3879         * printcmd.c (set_command): Constify.
3880         (non_const_set_command): New function.
3881         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3882         * breakpoint.c (enable_command, disable_command, delete_command)
3883         (catch_command, tcatch_command, set_breakpoint_cmd)
3884         (show_breakpoint_cmd): Constify.
3885         * macrocmd.c (macro_command): Constify.
3886         * infcmd.c (unset_command, kill_command, detach_command)
3887         (info_proc_cmd): Constify.
3888         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3889         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3890         (info_auto_load_cmd): Constify.
3891         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3892         (unset_tdesc_cmd): Constify.
3893         * ada-lang.c (set_ada_command, show_ada_command)
3894         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3895         * guile/guile.c (set_guile_command, show_guile_command)
3896         (info_guile_command): Constify.
3897         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3898         Constify.
3899         * skip.c (skip_command): Constify.
3900         * compile/compile.c (_initialize_compile): Constify.
3901         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3902         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3903         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3904         (maint_btrace_pt_show_cmd): Constify.
3905         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3906         Constify.
3907         * python/python.c (user_show_python, user_set_python): Constify.
3908         * mips-tdep.c (set_mips_command, show_mips_command)
3909         (set_mipsfpu_command): Constify.
3910         * record-btrace.c (cmd_record_btrace_start)
3911         (cmd_set_record_btrace, cmd_show_record_btrace)
3912         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3913         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3914         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3915         Constify.
3916         * symfile.c (overlay_command): Constify.
3917         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3918         * cli/cli-logging.c (set_logging_command, show_logging_command):
3919         Constify.
3920         * cli/cli-dump.c (dump_command, append_command)
3921         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3922         (tekhex_dump_command, binary_dump_command)
3923         (binary_append_command): Constify.
3924         * cli/cli-decode.c (struct cmd_list_element): Change type of
3925         "fun".
3926         * cli/cli-cmds.c (info_command, show_command, set_debug)
3927         (show_debug): Constify.
3928         (show_command): Add non-const overload.
3929         * top.c (set_history, show_history): Constify.
3930         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3931         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3932         * target.c (target_command): Constify.
3933         * sparc64-tdep.c (info_adi_command): Constify.
3934         * record-full.c (cmd_record_full_start): Constify.
3935         (set_record_full_command): Constify.  Fix typo.
3936         (show_record_full_command): Constify.
3937         * thread.c (thread_command, thread_apply_command): Constify.
3938         * memattr.c (dummy_cmd): Constify.
3939         * value.c (function_command): Constify.
3940         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3941         * probe.c (info_probes_command): Constify.
3942         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3943         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3944         (show_thread_cmd, set_thread_default_cmd)
3945         (show_thread_default_cmd): Constify.
3946         (check_empty): Constify.
3947         * tracepoint.c (tfind_command): Constify.
3948         * cp-support.c (maint_cplus_command): Constify.
3949         * windows-tdep.c (info_w32_command): Constify.
3950         * record.c (cmd_record_start, set_record_command)
3951         (show_record_command, info_record_command, cmd_record_goto):
3952         Constify.
3953         * ravenscar-thread.c (set_ravenscar_command)
3954         (show_ravenscar_command): Constify.
3955         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3956         Constify.
3957         (add_internal_problem_command): Remove casts.
3958         * arc-tdep.c (maintenance_print_arc_command): Constify.
3959         * valprint.c (set_print, show_print, set_print_raw)
3960         (show_print_raw): Constify.
3961         * maint.c (maintenance_command, maintenance_info_command)
3962         (maintenance_print_command, maintenance_set_cmd)
3963         (maintenance_show_cmd, set_per_command_cmd)
3964         (show_per_command_cmd, maintenance_check_command): Constify.
3965         * language.c (set_check, show_check): Constify.
3966         * typeprint.c (show_print_type, set_print_type): Constify.
3967         * go32-nat.c (go32_info_dos_command): Constify.
3968
3969 2017-10-11  Tom Tromey  <tom@tromey.com>
3970
3971         * breakpoint.c (prepare_re_set_context): Remove.
3972         (breakpoint_re_set_one): Update.  Don't use cleanups.
3973         (breakpoint_re_set): Use scoped_restore, std::string, and
3974         scoped_restore_current_language.
3975
3976 2017-10-11  Tom Tromey  <tom@tromey.com>
3977
3978         * breakpoint.c (commands_command_1): Use std::string.
3979         (cleanup_executing_breakpoints): Remove.
3980         (bpstat_do_actions_1): Use scoped_restore.
3981         (bpstat_check_watchpoint): Use std::string.
3982         (decode_static_tracepoint_spec): Likewise.
3983         (break_range_command): Likewise.
3984         (watch_command_1): Likewise.
3985         (compare_breakpoints): Change argument types.
3986         (clear_command): Use std::vector.
3987         (cleanup_executing_breakpoints): Remove.
3988         (update_global_location_list): Use unique_xmalloc_ptr.
3989         (strace_command): Remove unused declaration.
3990
3991 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3992
3993         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3994         * NEWS: Mention new FreeBSD/arm native configuration.
3995         * configure.host: Add arm*-*-freebsd*.
3996         * configure.nat: Likewise.
3997         * arm-fbsd-nat.c: New file.
3998
3999 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4000
4001         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4002         (ALLDEPFILES): Add arm-fbsd-tdep.c.
4003         * NEWS: Mention new FreeBSD/arm target.
4004         * configure.tgt: Add arm*-*-freebsd*.
4005         * arm-fbsd-tdep.c: New file.
4006         * arm-fbsd-tdep.h: New file.
4007
4008 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4009
4010         * linux-tdep.c (linux_make_corefile_notes): Remove call to
4011         `gdbarch_elfcore_write_linux_prpsinfo'.
4012         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4013         method.
4014         (elf_internal_linux_prpsinfo): Remove declaration.
4015         * gdbarch.h: Regenerate.
4016         * gdbarch.c: Regenerate.
4017
4018 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4019
4020         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4021         `set_gdbarch_elfcore_write_linux_prpsinfo'.
4022
4023 2017-10-11  Pedro Alves  <palves@redhat.com>
4024
4025         * breakpoint.c (reattach_breakpoints): Delete.
4026         * breakpoint.h (reattach_breakpoints): Delete.
4027
4028 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
4029
4030         * symfile.c (registered_sym_fns): Make struct, not typedef.
4031         (DEF_VEC_O (registered_sym_fns)): Remove.
4032         (symtab_fns): Change type to std::vector.
4033         (add_symtab_fns): Adjust.
4034         (find_sym_fns): Adjust.
4035
4036 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4037
4038         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4039         * arc-tdep.h (arc_arch_is_em): New function.
4040         (arc_arch_is_hs): Likewise.
4041
4042 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
4043
4044         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4045         parentheses in the declaration.
4046         (macro_lookup_inclusion): Likewise.
4047         (macro_lookup_definition): Likewise.
4048         * p-lang.h (pascal_builtin_types): Likewise.
4049         * tui/tui-data.c (tui_win_list): Likewise.
4050         * tui/tui-data.h (tui_win_list): Likewise.
4051         * utils.h (make_cleanup_free_section_addr_info): Likewise.
4052
4053 2017-10-11  Mark Rages  <markrages@gmail.com>
4054
4055         * target-memory.c (block_boundaries): Fix for block address not
4056         aligned on block size.
4057
4058 2017-10-10  Pedro Alves <palves@redhat.com>
4059             Tom Tromey  <tom@tromey.com>
4060
4061         * breakpoint.c (struct captured_breakpoint_query_args)
4062         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4063         (print_breakpoint): New.
4064         * breakpoint.h (print_breakpoint): Declare.
4065         * common/common-exceptions.h (enum return_reason): Remove
4066         references to catch_exceptions.
4067         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4068         Delete.
4069         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4070         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4071         * gdb.h: Delete.
4072         * gdbthread.h (thread_select): Declare.
4073         * mi/mi-cmd-break.c: Don't include gdb.h.
4074         (breakpoint_notify): Use print_breakpoint.
4075         * mi/mi-cmd-catch.c: Don't include gdb.h.
4076         * mi/mi-interp.c: Don't include gdb.h.
4077         (mi_print_breakpoint_for_event): New.
4078         (mi_breakpoint_created, mi_breakpoint_modified): Use
4079         mi_print_breakpoint_for_event.
4080         * mi/mi-main.c: Don't include gdb.h.
4081         (mi_cmd_thread_select): Parse the global thread ID here.  Use
4082         thread_select instead of gdb_thread_select.
4083         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4084         of using gdb_list_thread_ids.
4085         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
4086         FILEIO_ENOSYS here.
4087         (remote_fileio_request): Use TRY/CATCH instead of
4088         catch_exceptions.
4089         * symfile-mem.c (struct symbol_file_add_from_memory_args)
4090         (symbol_file_add_from_memory_wrapper): Delete.
4091         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4092         * thread.c: Don't include gdb.h.
4093         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4094         (thread_alive): Use thread_select.
4095         (do_captured_thread_select): Delete, parts salvaged as ...
4096         (thread_select): ... this new function.
4097         (gdb_thread_select): Delete.
4098
4099 2017-10-10  Pedro Alves  <palves@redhat.com>
4100             Tom Tromey  <tom@tromey.com>
4101
4102         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4103         and reverse logic.
4104         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4105         No longer macros.  Instead ...
4106         (enum wp_check_result): They're now values of this new
4107         enumeration.
4108         (watchpoint_check): Change return type to wp_check_result and
4109         parameter type to bpstat.
4110         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4111         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4112         catch_errors.  Reverse logic of watchpoint_check call.
4113         (breakpoint_re_set_one): Now returns void and takes a breakpoint
4114         pointer as parameter.
4115         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4116         * common/common-exceptions.c (throw_exception_sjlj): Update
4117         comments to avoid mentioning catch_errors.
4118         * exceptions.c (catch_errors): Delete.
4119         * exceptions.h: Update comments to avoid mentioning catch_errors.
4120         (catch_errors_ftype, catch_errors): Delete.
4121         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4122         (hook_stop_stub): Delete.
4123         (restore_selected_frame): Change return type to void, and
4124         parameter type to const frame_id &.
4125         (restore_infcall_control_state): Use TRY/CATCH instead of
4126         catch_errors.
4127         * main.c (captured_command_loop): Return void and remove
4128         parameter.  Remove references to catch_errors.
4129         (captured_main): Use TRY/CATCH instead of catch_errors.
4130         * objc-lang.c (objc_submethod_helper_data)
4131         (find_objc_msgcall_submethod_helper): Delete.
4132         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4133         catch_errors.
4134         * record-full.c (record_full_message): Return void.
4135         (record_full_message_args, record_full_message_wrapper): Delete.
4136         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4137         instead of catch_errors.
4138         * solib-aix.c (solib_aix_open_symbol_file_object): Change
4139         parameter type to int.
4140         * solib-darwin.c (open_symbol_file_object): Ditto.
4141         * solib-dsbt.c (open_symbol_file_object): Ditto.
4142         * solib-frv.c (open_symbol_file_object): Ditto.
4143         * solib-svr4.c (open_symbol_file_object): Ditto.
4144         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4145         * solib.c (update_solib_list): Use TRY/CATCH instead of
4146         catch_errors.
4147         * solist.h (struct target_so_ops) <open_symbol_file_object>:
4148         Change type.
4149         * symmisc.c (struct print_symbol_args): Remove.
4150         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4151         (print_symbol): Change type.
4152         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4153         and remove parameters.
4154         (catch_errors): New.
4155         (get_windows_debug_event): Adjust.
4156
4157 2017-10-09  Tom Tromey  <tom@tromey.com>
4158
4159         * mi/mi-main.c (free_splay_tree): Remove.
4160         (list_available_thread_groups): Use splay_tree_up.
4161         * common/gdb_splay_tree.h: New file.
4162
4163 2017-10-09  Tom Tromey  <tom@tromey.com>
4164
4165         * mi/mi-main.c (do_nothing): Remove.
4166         (list_available_thread_groups): Update.
4167
4168 2017-10-09  Pedro Alves  <palves@redhat.com>
4169
4170         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4171         reading registers when switching context.
4172
4173 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
4174
4175         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4176         (fbsd_convert_siginfo): Likewise.
4177         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4178
4179 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
4180
4181         * configure.ac (try_guile_versions): Remove guile-2.2.
4182         * configure: Regenerate.
4183
4184 2017-10-09  Tom Tromey  <tom@tromey.com>
4185
4186         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4187         (COMPILE.pre): Use $(CXX).
4188
4189 2017-10-09  Pedro Alves  <palves@redhat.com>
4190
4191         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4192         Use bool.
4193         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4194         * cp-support.h (cp_remove_params): Now returns a
4195         gdb::unique_xmalloc_ptr.
4196         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4197         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4198         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4199         returning a gdb::unique_xmalloc_ptr.
4200         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4201         * stack.c (find_frame_funname): Adjust to cp_remove_params
4202         returning a gdb::unique_xmalloc_ptr.
4203
4204 2017-10-08  Tom Tromey  <tom@tromey.com>
4205
4206         * dwarf2read.c (dwarf2_get_dwz_file): Use
4207         gdb::unique_xmalloc_ptr.
4208         (find_slot_in_mapped_hash): Likewise.
4209         (dwarf2_physname): Likewise.
4210         (create_dwo_unit_in_dwp_v1): Use std::string.
4211         (create_dwo_unit_in_dwp_v2): Likewise.
4212         (lookup_dwo_cutu): Likewise.
4213         (inherit_abstract_dies): Use std::vector.
4214         (read_array_type): Likewise.
4215         (dwarf_decode_macros): Remove unused declaration.
4216         (unsigned_int_compar): Remove.
4217         (dwarf2_build_psymtabs_hard): Use scoped_restore.
4218         (psymtabs_addrmap_cleanup): Remove.
4219
4220 2017-10-08  Tom Tromey  <tom@tromey.com>
4221
4222         * frame-unwind.c (frame_unwind_try_unwinder): Update.
4223         * frame.h (frame_cleanup_after_sniffer): Declare.
4224         (frame_prepare_for_sniffer): Return void.
4225         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
4226         type of argument.
4227         (frame_prepare_for_sniffer): Return void.
4228
4229 2017-10-08  Tom Tromey  <tom@tromey.com>
4230
4231         * utils.h (make_cleanup_value_free): Remove.
4232         * utils.c (do_value_free, struct cleanup): Remove.
4233         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4234         Use gdb_value_up.
4235         * value.h (struct value_deleter): New.
4236         (gdb_value_up): New typedef.
4237
4238 2017-10-08  Tom Tromey  <tom@tromey.com>
4239
4240         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4241         (make_cleanup_free_search_symbols): Remove.
4242         (search_symbols): Return std::vector.
4243         (symbol_search::compare_search_syms): Now member of
4244         symbol_search.  Change arguments.
4245         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
4246         (symtab_symbol_info, rbreak_command): Update.
4247         * symtab.h (struct symbol_search) <next>: Remove.
4248         Add constructors.
4249         (symbol_search::operator<): New function.
4250         (symbol_search::operator==): New function.
4251         (search_symbols): Remove std::vector.
4252         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4253         (symbol_search::compare_search_syms): Declare.
4254
4255 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4256
4257         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4258         arch/aarch64-insn.o.
4259         Remove one rule.
4260         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4261
4262 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4263
4264         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4265         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4266         arch/arm-linux.o respectively.
4267         * configure.tgt: Likewise.
4268
4269 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4270
4271         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4272         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4273
4274 2017-10-06  Pedro Alves  <palves@redhat.com>
4275
4276         * windows-nat.c: Include <algorithm>.
4277
4278 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4279
4280         * configure.tgt (i386_tobjs): New variable.
4281         (amd64_tobjs): New variable.
4282         Set $cpu_obs and $os_obs.
4283
4284 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4285
4286         * Makefile.in (CONFIG_SRC_SUBDIR): New.
4287         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4288         (clean): Remove object files and dependency files.
4289         (distclean): Remove the directory.
4290         * configure.ac: Invoke AC_CONFIG_COMMANDS.
4291         * configure: Re-generated.
4292         * configure.tgt: Replace amd64.o with arch/amd64.o.
4293
4294 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
4295
4296         PR build/22188
4297         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4298         and SETEND.
4299
4300 2017-10-05  Pedro Alves  <palves@redhat.com>
4301
4302         * linux-nat.c (linux_child_follow_fork): When following the parent
4303         and detaching the child, consult the parent thread's architecture
4304         instead of the child's.
4305
4306 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4307
4308         * ax.h: Do not include "doublest.h".
4309         (union agent_val): Remove.
4310
4311 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4312
4313         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4314         (decimal_to_string): Return std::string object.
4315         (decimal_from_string): Accept std::string object.  Return bool.
4316         (decimal_from_integral, decimal_from_doublest): Remove.
4317         (decimal_from_longest): Add prototype.
4318         (decimal_from_ulongest): Likewise.
4319         (decimal_to_longest): Likewise.
4320         (decimal_from_doublest): Likewise.
4321         * dfp.c: Do not include "gdbtypes.h" or "value.h".
4322         (MAX_DECIMAL_STRING): Move here.
4323         (decimal_to_string): Return std::string object.
4324         (decimal_from_string): Accept std::string object.  Return bool.
4325         (decimal_from_integral): Remove, replace by ...
4326         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4327         (decimal_to_longest): New function.
4328         (decimal_from_floating): Remove, replace by ...
4329         (decimal_from_doublest): ... this new function.
4330         (decimal_to_doublest): Update to new decimal_to_string interface.
4331
4332         * value.c (unpack_long): Use decimal_to_longest.
4333         * valops.c (value_cast): Use decimal_from_doublest instead of
4334         decimal_from_floating.  Use decimal_from_[u]longest isntead of
4335         decimal_from_integral.
4336         * valarith.c (value_args_as_decimal): Likewise.
4337         * valprint.c (print_decimal_floating): Update to new
4338         decimal_to_string interface.
4339         * printcmd.c (printf_decfloat): Likewise.
4340         * c-exp.y (parse_number): Update to new decimal_from_string interface.
4341
4342 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4343
4344         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
4345         * gdbtypes.c: Include "floatformat.h".
4346         * value.c: Likewise.
4347         * m68k-tdep.c: Likewise.
4348
4349         * findvar.c: Do not include "floatformat.h".
4350         * amd64-darwin-tdep.c: Likewise.
4351         * arm-linux-tdep.c: Likewise.
4352         * i386-darwin-tdep.c: Likewise.
4353         * i387-tdep.c: Likewise.
4354         * m68k-linux-tdep.c: Likewise.
4355         * mep-tdep.c: Likewise.
4356         * mips-tdep.c: Likewise.
4357         * nios2-tdep.c: Likewise.
4358         * s390-linux-tdep.c: Likewise.
4359         * sparc-obsd-tdep.c: Likewise.
4360         * sparc-tdep.c: Likewise.
4361         * sparc64-tdep.c: Likewise.
4362         * spu-tdep.c: Likewise.
4363         * tic6x-tdep.c: Likewise.
4364         * tilegx-tdep.c: Likewise.
4365         * vax-tdep.c: Likewise.
4366         * xstormy16-tdep.c: Likewise.
4367         * xtensa-tdep.c: Likewise.
4368
4369         * top.c: Do not include "doublest.h".
4370         * aarch64-tdep.c: Likewise.
4371         * alpha-tdep.c: Likewise.
4372         * arm-linux-tdep.c: Likewise.
4373         * m68k-linux-tdep.c: Likewise.
4374         * tilegx-tdep.c: Likewise.
4375         * xstormy16-tdep.c: Likewise.
4376
4377 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
4378
4379         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4380         (mipsn32_fbsd_sigframe): Define.
4381         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4382         for FreeBSD/mipsn32.
4383
4384 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
4385
4386         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4387         AT_HWCAP.
4388
4389 2017-10-05  Tristan Gingold  <tgingold@free.fr>
4390
4391         * MAINTAINERS (Misc): Update my email address.
4392
4393 2017-10-04  Pedro Alves  <palves@redhat.com>
4394
4395         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
4396         it instead of target_gdbarch.
4397         (get_remote_state, get_remote_packet_size): Adjust
4398         get_remote_arch_state calls, passing down target_gdbarch
4399         explicitly.
4400         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4401         'gdbarch' and use it instead of target_gdbarch.
4402         (get_memory_packet_size): Adjust get_remote_arch_state calls,
4403         passing down target_gdbarch explicitly.
4404         (struct stop_reply) <arch>: New field.
4405         (remote_parse_stop_reply): Use the stopped thread's architecture,
4406         not the current inferior's.  Save the architecture in the
4407         stop_reply.
4408         (process_stop_reply): Use the stop reply's architecture.
4409         (process_g_packet, remote_fetch_registers)
4410         (remote_prepare_to_store, store_registers_using_G)
4411         (remote_store_registers): Adjust get_remote_arch_state calls,
4412         using the regcache's architecture.
4413         (remote_get_trace_status): Adjust get_remote_arch_state calls,
4414         passing down target_gdbarch explicitly.
4415         * spu-multiarch.c (spu_thread_architecture): Defer to the target
4416         beneath instead of calling target_gdbarch.
4417         * target.c (default_thread_architecture): Use the specified
4418         inferior's architecture, instead of the current inferior's
4419         architecture (via target_gdbarch).
4420
4421 2017-10-04  Pedro Alves  <palves@redhat.com>
4422
4423         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4424         case.
4425         (regcache_print): Handle !target_has_registers here instead.
4426
4427 2017-10-04  Pedro Alves  <palves@redhat.com>
4428
4429         * frame.c (create_test_frame): Delete.
4430         * frame.h (create_test_frame): Delete.
4431         * gdbarch-selftests.c: Include gdbthread.h and target.h.
4432         (class regcache_test): Delete.
4433         (test_target_has_registers, test_target_has_stack)
4434         (test_target_has_memory, test_target_prepare_to_store)
4435         (test_target_store_registers): New functions.
4436         (test_target_ops): New class.
4437         (register_to_value_test): Error out if there's already a
4438         process_stratum (or higher) target pushed.  Create a fuller mock
4439         environment, with mock target_ops, inferior, address space, thread
4440         and inferior_ptid.
4441         * progspace.c (struct address_space): Move to ...
4442         * progspace.h (struct address_space): ... here.
4443         * regcache.h (regcache::~regcache, regcache::raw_write)
4444         [GDB_SELF_TEST]: No longer virtual.
4445
4446 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
4447
4448         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4449
4450 2017-10-04  Pedro Alves  <palves@redhat.com>
4451
4452         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4453         out of 'between TRY and CATCH'.
4454
4455 2017-10-04  Pedro Alves  <palves@redhat.com>
4456
4457         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4458         * common/common-exceptions.h (TRY): Open an outermost scope.
4459         Expand intro comment.
4460         (CATCH): Reindent.
4461         (END_CATCH): Close the outermost scope.
4462         * completer.c (complete_line_internal): Add missing END_CATCH.
4463
4464 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4465
4466         * NEWS (Changes since GDB 8.0): Add entry about new
4467         'set-cwd-on-gdbserver' feature.
4468         (New remote packets): Add entry for QSetWorkingDir.
4469         * common/common-inferior.h (set_inferior_cwd): New prototype.
4470         * infcmd.c (set_inferior_cwd): Remove "static".
4471         (show_cwd_command): Expand text to include remote debugging.
4472         * remote.c: Add PACKET_QSetWorkingDir.
4473         (remote_protocol_features) <QSetWorkingDir>: New entry for
4474         PACKET_QSetWorkingDir.
4475         (extended_remote_set_inferior_cwd): New function.
4476         (extended_remote_create_inferior): Call
4477         "extended_remote_set_inferior_cwd".
4478         (_initialize_remote): Call "add_packet_config_cmd" for
4479         QSetWorkingDir.
4480
4481 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4482
4483         * NEWS (New commands): Mention "set/show cwd".
4484         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4485         "cd" command's help text.
4486         * common/common-inferior.h (get_inferior_cwd): New prototype.
4487         * infcmd.c (inferior_cwd_scratch): New global variable.
4488         (set_inferior_cwd): New function.
4489         (get_inferior_cwd): Likewise.
4490         (set_cwd_command): Likewise.
4491         (show_cwd_command): Likewise.
4492         (_initialize_infcmd): Add "set/show cwd" commands.
4493         * inferior.h (class inferior) <cwd>: New field.
4494         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4495         (fork_inferior): Change inferior's cwd before its execution.
4496         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4497         to CreateProcess.
4498
4499 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4500
4501         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4502         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4503         (COMMON_OBS): Add gdb_tilde_expand.o.
4504         * common/gdb_tilde_expand.c: New file.
4505         * common/gdb_tilde_expand.h: Likewise.
4506
4507 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
4508
4509         * gdbarch.sh (objfile): Remove duplicate declaration.
4510         * gdbarch.h: Regenerate.
4511
4512 2017-10-03  Tom Tromey  <tom@tromey.com>
4513
4514         * utils.c (internal_vproblem): Use string_vprintf.
4515
4516 2017-10-03  Tom Tromey  <tom@tromey.com>
4517
4518         * printcmd.c (info_symbol_command): Use std::string.
4519
4520 2017-10-03  Tom Tromey  <tom@tromey.com>
4521
4522         * top.c (gdb_safe_append_history): Use std::string.
4523
4524 2017-10-03  Tom Tromey  <tom@tromey.com>
4525
4526         * event-top.c (stdin_event_handler): Update.
4527         * main.c (captured_main_1): Update.
4528         * top.h (make_delete_ui_cleanup): Remove.
4529         (struct ui): Add constructor and destructor.
4530         (new_ui, delete_ui): Remove.
4531         * top.c (make_delete_ui_cleanup): Remove.
4532         (new_ui_command): Use std::unique_ptr.
4533         (delete_ui_cleanup): Remove.
4534         (ui::ui): Rename from new_ui.  Update.
4535         (free_ui): Remove.
4536         (ui::~ui): Rename from delete_ui.  Update.
4537
4538 2017-10-03  Tom Tromey  <tom@tromey.com>
4539
4540         * symfile.c (load_progress): Use gdb::byte_vector.
4541
4542 2017-10-03  Tom Tromey  <tom@tromey.com>
4543
4544         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4545         declaration.
4546         * printcmd.c (x_command): Remove unused declaration.
4547         * symfile.c (symbol_file_command): Remove unused declaration.
4548
4549 2017-10-03  Tom Tromey  <tom@tromey.com>
4550
4551         * utils.c (internal_vproblem): Use std::string.
4552         (defaulted_query): Likewise.
4553
4554 2017-10-03  Tom Tromey  <tom@tromey.com>
4555
4556         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4557         * top.c (execute_command_to_string): Update.
4558         * utils.c (make_cleanup_restore_page_info): Remove.
4559         (do_restore_page_info_cleanup): Remove.
4560         (set_batch_flag_and_restore_page_info):
4561         New.
4562         (make_cleanup_restore_page_info): Remove.
4563         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4564         (~set_batch_flag_and_restore_page_info): New
4565         (make_cleanup_restore_uinteger): Remove.
4566         (make_cleanup_restore_integer): Remove.
4567         (struct restore_integer_closure): Remove.
4568         (restore_integer): Remove.
4569         * utils.h (struct set_batch_flag_and_restore_page_info): New
4570         class.
4571         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4572         (make_cleanup_restore_page_info): Remove.
4573         (make_cleanup_restore_uinteger) Remove.
4574         (make_cleanup_restore_integer) Remove.
4575
4576 2017-10-03  Tom Tromey  <tom@tromey.com>
4577
4578         * record-full.h (record_full_gdb_operation_disable_set): Return
4579         scoped_restore_tmpl<int>.
4580         * infrun.c (adjust_pc_after_break): Update.
4581         (handle_signal_stop): Update.
4582         * record-full.c (record_full_gdb_operation_disable_set): Return
4583         scoped_restore_tmpl<int>.
4584         (record_full_wait_1, record_full_insert_breakpoint)
4585         (record_full_remove_breakpoint, record_full_save)
4586         (record_full_goto_insn): Update.
4587
4588 2017-10-02  Tom Tromey  <tom@tromey.com>
4589
4590         PR rust/22236:
4591         * rust-lang.c (rust_val_print_str): New function.
4592         (val_print_struct): Call it.
4593         (rust_subscript): Preserve name of slice type.
4594
4595 2017-10-02  Tom Tromey  <tom@tromey.com>
4596
4597         * rust-lang.c (rust_subscript): Handle slices in
4598         EVAL_AVOID_SIDE_EFFECTS case.
4599
4600 2017-10-02  Tom Tromey  <tom@tromey.com>
4601
4602         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4603
4604 2017-10-02  Tom Tromey  <tom@tromey.com>
4605
4606         * rust-lang.h (rust_slice_type): Add "extern".
4607
4608 2017-10-02  Tom Tromey  <tom@tromey.com>
4609             Pedro Alves  <palves@redhat.com>
4610
4611         * ada-lang.h (ada_exc_info::operator<): Make const.
4612         (ada_exc_info::operator==): Make const.
4613         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4614         Make const.
4615
4616 2017-09-29  Tom Tromey  <tom@tromey.com>
4617
4618         * target.c (read_whatever_is_readable): Change type of "result".
4619         Update.
4620         (free_memory_read_result_vector): Remove.
4621         (read_memory_robust): Change return type.  Update.
4622         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
4623         bin2hex, std::string.
4624         * target.h (memory_read_result_s): Remove typedef.
4625         (free_memory_read_result_vector): Remove.
4626         (read_memory_robust): Return std::vector.
4627
4628 2017-09-29  Tom Tromey  <tom@tromey.com>
4629
4630         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4631
4632 2017-09-29  Tom Tromey  <tom@tromey.com>
4633
4634         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4635         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
4636         operator< and operator==.
4637         (ada_exceptions_list): Return a std::vector.
4638         * ada-lang.c (ada_exc_info::operator<): Rename from
4639         compare_ada_exception_info.
4640         (ada_exc_info::operator==): New.
4641         (sort_remove_dups_ada_exceptions_list): Change type of
4642         "exceptions".
4643         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4644         (ada_add_global_exceptions): Likewise.
4645         (ada_exceptions_list_1): Return a std::vector.
4646         (ada_exceptions_list): Likewise.
4647
4648 2017-09-29  Tom Tromey  <tom@tromey.com>
4649
4650         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4651         'std::set *'.
4652         (print_one_inferior): Update.
4653         (free_vector_of_ints): Remove.
4654         (list_available_thread_groups): Change "ids" to std::set.
4655         (mi_cmd_list_thread_groups): Update.
4656         (struct collect_cores_data) <core>: Now a std::set.
4657         (collect_cores): Update.
4658         (unique): Remove.
4659         (print_one_inferior): Update.
4660
4661 2017-09-29  Tom Tromey  <tom@tromey.com>
4662
4663         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4664         (mi_execute_async_cli_command): Likewise.
4665         (mi_cmd_trace_frame_collected): Use field_fmt.
4666
4667 2017-09-29  Tom Tromey  <tom@tromey.com>
4668
4669         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4670         gdb::byte_vector.
4671
4672 2017-09-29  Tom Tromey  <tom@tromey.com>
4673
4674         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4675
4676 2017-09-29  Tom Tromey  <tom@tromey.com>
4677
4678         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4679
4680 2017-09-29  Tom Tromey  <tom@tromey.com>
4681
4682         * varobj.h (varobj_gen_name): Return std::string.
4683         * varobj.c (varobj_gen_name): Return std::string.
4684         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4685         (mi_cmd_var_delete): Don't copy "name".
4686
4687 2017-09-29  Tom Tromey  <tom@tromey.com>
4688
4689         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4690         (mi_cmd_break_insert_1): Update.
4691
4692 2017-09-29  Tom Tromey  <tom@tromey.com>
4693
4694         * target.h (make_scoped_defer_target_commit_resume): Update.
4695         * target.c (make_scoped_defer_target_commit_resume): Rename from
4696         make_cleanup_defer_target_commit_resume.  Return a
4697         scoped_restore.
4698         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4699
4700 2017-09-29  Tom Tromey  <tom@tromey.com>
4701
4702         * main.c (captured_main_1): Remove unused declaration.
4703         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4704
4705 2017-09-29  Tom Tromey  <tom@tromey.com>
4706
4707         * symtab.c (search_symbols): Remove unused outer cleanup.
4708         (make_source_files_completion_list): Remove unused declaration.
4709
4710 2017-09-29  Tom Tromey  <tom@tromey.com>
4711
4712         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4713
4714 2017-09-29  Tom Tromey  <tom@tromey.com>
4715
4716         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4717         gdb::byte_vector.
4718
4719 2017-09-29  Tom Tromey  <tom@tromey.com>
4720
4721         * complaints.c (vcomplaint): Use std::string.
4722
4723 2017-09-29  Tom Tromey  <tom@tromey.com>
4724
4725         * tracepoint.c (trace_variable_command): Use std::string.
4726         (encode_actions_1): Remove unused declarations.
4727         (create_tsv_from_upload): Use std::string.
4728
4729 2017-09-29  Tom Tromey  <tom@tromey.com>
4730
4731         * cp-support.c (gdb_demangle): Use std::string.
4732
4733 2017-09-29  Tom Tromey  <tom@tromey.com>
4734
4735         * stack.c (parse_frame_specification): Use std::string
4736         (info_frame_command): Use gdb::unique_xmalloc_ptr.
4737
4738 2017-09-29  Tom Tromey  <tom@tromey.com>
4739
4740         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4741
4742 2017-09-29  Tom Tromey  <tom@tromey.com>
4743
4744         * utils.c (vfprintf_maybe_filtered): Use std::string.
4745         (vfprintf_unfiltered): Likewise.
4746
4747 2017-09-29  Tom Tromey  <tom@tromey.com>
4748
4749         * event-top.c (top_level_prompt): Return std::string.
4750         (display_gdb_prompt): Update.
4751
4752 2017-09-29  Tom Tromey  <tom@tromey.com>
4753
4754         * unittests/common-utils-selftests.c (format): New function.
4755         (string_vprintf_tests): New function.
4756         (_initialize_common_utils_selftests): Register new tests.
4757         * common/common-utils.c (string_vprintf): New function.
4758         * common/common-utils.h (string_vprintf): Declare.
4759
4760 2017-09-29  Pedro Alves  <palves@redhat.com>
4761
4762         * common/rsp-low.c (unpack_varlen_hex): Constify.
4763         * common/rsp-low.h (unpack_varlen_hex): Constify.
4764         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4765         Constify.
4766         * remote.c (remote_set_permissions, read_ptid)
4767         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4768         (remote_static_tracepoint_marker_at)
4769         (remote_static_tracepoint_markers_by_strid)
4770         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4771         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4772         (parse_tracepoint_definition, parse_tsv_definition)
4773         (parse_static_tracepoint_marker_definition): Constify.
4774         * tracepoint.h (parse_static_tracepoint_marker_definition)
4775         (parse_trace_status, parse_tracepoint_status)
4776         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4777
4778 2017-09-29  Pedro Alves  <palves@redhat.com>
4779
4780         * remote.c (target_buf, target_buf_size): Delete.
4781         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4782         Use the connection's packet buffer instead.
4783         All callers adjusted.
4784         (_initialize_remote): Remove references to target_buf and
4785         target_buf_size.
4786
4787 2017-09-28  Pedro Alves  <palves@redhat.com>
4788
4789         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4790         unittests/common-utils-selftests.c.
4791         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4792         (COMMON_OBS): Remove utils-selftests.o.
4793         * utils-selftests.c: Move to ...
4794         * unittests/common-utils-selftests.c: ... here and rename self
4795         test to "string_printf".
4796
4797 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4798
4799         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4800         having NULL cus or tus.
4801
4802 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4803
4804         * arm-tdep.c: (convert_from_extended): Remove.
4805         (convert_to_extended): Likewise.
4806         (arm_extract_return_value): Use convert_typed_floating.
4807         (arm_store_return_value): Likewise.
4808
4809         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4810         * sh-tdep.c: Do not include "floatformat.h".
4811         (sh_littlebyte_bigword_type): New function.
4812         (sh_register_convert_to_virtual): Use convert_typed_floating.
4813         (sh_register_convert_to_raw): Likewise.
4814         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4815         (sh64_littlebyte_bigword_type): New function.
4816         (sh64_extract_return_value): Use convert_typed_floating.
4817         (sh64_register_convert_to_virtual): Likewise.
4818         (sh64_register_convert_to_raw): Likewise.
4819
4820 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4821
4822         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4823         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4824
4825         * gdbtypes.h (union type_specific): Make field floatformat hold
4826         just a single struct floatformat, not an array.
4827         (floatformat_from_type): Move here.
4828         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4829         changed TYPE_FLOATFORMAT definition.
4830         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4831         (recursive_dump_type): Likewise.
4832         (init_float_type): Install correct floatformat for byte order.
4833         (arch_float_type): Likewise.
4834
4835 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4836
4837         * gdbtypes.c (init_type): Change incoming argument from
4838         length-in-bytes to length-in-bits.  Assert length is a
4839         multiple of TARGET_CHAR_BITS.
4840         (arch_type, arch_flags_type): Likewise.
4841         (init_integer_type): Update call to init_type.
4842         (init_character_type): Likewise.
4843         (init_boolean_type): Likewise.
4844         (init_float_type): Likewise.
4845         (init_decfloat_type): Likewise.
4846         (init_complex_type): Likewise.
4847         (init_pointer_type): Likewise.
4848         (objfile_type): Likewise.
4849         (arch_integer_type): Update call to arch_type.
4850         (arch_character_type): Likewise.
4851         (arch_boolean_type): Likewise.
4852         (arch_float_type): Likewise.
4853         (arch_decfloat_type): Likewise.
4854         (arch_complex_type): Likewise.
4855         (arch_pointer_type): Likewise.
4856         (gdbtypes_post_init): Likewise.
4857
4858         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4859         (read_base_type): Likewise.
4860         * mdebugread.c (basic_type): Likewise.
4861         * stabsread.c (dbx_init_float_type): Likewise.
4862         (rs6000_builtin_type): Likewise.
4863         (read_range_type): Likewise.  Also, fix call to init_integer_type
4864         with erroneous length argument.
4865
4866         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4867         * d-lang.c (build_d_types): Likewise.
4868         * f-lang.c (build_fortran_types): Likewise.
4869         * go-lang.c (build_go_types): Likewise.
4870         * opencl-lang.c (build_opencl_types): Likewise.
4871         * jit.c (finalize_symtab): Likewise.
4872         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4873         (build_std_type_info_type): Likewise.
4874         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4875         update call to arch_flags_type.
4876
4877         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4878         arch_type.
4879         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4880         * windows-tdep.c (windows_get_tlb_type): Likewise.
4881
4882         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4883         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4884         * m32c-tdep.c (make_types): Likewise.
4885         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4886         (rl78_psw_type): Update call to arch_flags_type.
4887         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4888         * rx-tdep.c (rx_psw_type): Likewise.
4889         (rx_fpsw_type): Likewise.
4890         * sparc-tdep.c (sparc_psr_type): Likewise.
4891         (sparc_fsr_type): Likewise.
4892         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4893         (sparc64_ccr_type): Likewise.
4894         (sparc64_fsr_type): Likewise.
4895         (sparc64_fprs_type): Likewise.
4896
4897 2017-09-27  Tom Tromey  <tom@tromey.com>
4898
4899         * findcmd.c (find_command): Constify.
4900
4901 2017-09-27  Tom Tromey  <tom@tromey.com>
4902
4903         * ada-tasks.c (task_command_1, task_command): Constify.
4904
4905 2017-09-27  Tom Tromey  <tom@tromey.com>
4906
4907         * symtab.c (maintenance_print_symbol_cache)
4908         (maintenance_flush_symbol_cache)
4909         (maintenance_print_symbol_cache_statistics): Constify.
4910
4911 2017-09-27  Tom Tromey  <tom@tromey.com>
4912
4913         * inferior.c (detach_inferior_command, kill_inferior_command)
4914         (inferior_command): Constify.
4915
4916 2017-09-27  Tom Tromey  <tom@tromey.com>
4917
4918         * regcache.c (regcache_print, maintenance_print_registers)
4919         (maintenance_print_raw_registers)
4920         (maintenance_print_cooked_registers)
4921         (maintenance_print_register_groups)
4922         (maintenance_print_remote_registers): Constify.
4923
4924 2017-09-27  Tom Tromey  <tom@tromey.com>
4925
4926         * printcmd.c (map_display_numbers, undisplay_command)
4927         (enable_disable_display_command, enable_display_command)
4928         (disable_display_command): Constify.
4929
4930 2017-09-27  Tom Tromey  <tom@tromey.com>
4931
4932         * breakpoint.h (delete_command): Don't declare.
4933         * breakpoint.c (delete_command, enable_once_command)
4934         (enable_count_command, enable_delete_command, breakpoint_1)
4935         (maintenance_info_breakpoints, stopin_command, stopat_command)
4936         (delete_command, delete_trace_command, save_breakpoints)
4937         (save_breakpoints_command, save_tracepoints_command): Constify.
4938
4939 2017-09-27  Tom Tromey  <tom@tromey.com>
4940
4941         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4942         (skip_ws, extract_identifier, macro_define_command)
4943         (macro_undef_command, macro_list_command): Constify.
4944
4945 2017-09-27  Tom Tromey  <tom@tromey.com>
4946
4947         * infcmd.c (environment_info, set_environment_command)
4948         (unset_environment_command, path_info, info_proc_cmd_1)
4949         (info_proc_cmd_mappings, info_proc_cmd_stat)
4950         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4951         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4952
4953 2017-09-27  Tom Tromey  <tom@tromey.com>
4954
4955         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4956         Constify.
4957
4958 2017-09-27  Tom Tromey  <tom@tromey.com>
4959
4960         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4961
4962 2017-09-27  Tom Tromey  <tom@tromey.com>
4963
4964         * demangle.c (demangle_command): Constify.
4965
4966 2017-09-27  Tom Tromey  <tom@tromey.com>
4967
4968         * progspace.c (maintenance_info_program_spaces_command):
4969         Constify.
4970
4971 2017-09-27  Tom Tromey  <tom@tromey.com>
4972
4973         * compile/compile.c (check_raw_argument, compile_file_command)
4974         (compile_code_command, compile_print_command): Constify.
4975
4976 2017-09-27  Tom Tromey  <tom@tromey.com>
4977
4978         * reggroups.c (maintenance_print_reggroups): Constify.
4979
4980 2017-09-27  Tom Tromey  <tom@tromey.com>
4981
4982         * dwarf2read.c (save_gdb_index_command): Constify.
4983
4984 2017-09-27  Tom Tromey  <tom@tromey.com>
4985
4986         * stap-probe.c (info_probes_stap_command): Constify.
4987
4988 2017-09-27  Tom Tromey  <tom@tromey.com>
4989
4990         * fork-child.c (unset_exec_wrapper_command): Constify.
4991
4992 2017-09-27  Tom Tromey  <tom@tromey.com>
4993
4994         * btrace.c (get_uint, get_context_size, no_chunk)
4995         (maint_btrace_packet_history_cmd)
4996         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4997         (maint_info_btrace_cmd): Constify.
4998
4999 2017-09-27  Tom Tromey  <tom@tromey.com>
5000
5001         * reverse.c (delete_bookmark_command): Constify.
5002
5003 2017-09-27  Tom Tromey  <tom@tromey.com>
5004
5005         * remote.c (set_memory_packet_size)
5006         (set_memory_write_packet_size, show_memory_write_packet_size)
5007         (set_memory_read_packet_size, show_memory_read_packet_size)
5008         (compare_sections_command, packet_command, remote_put_command)
5009         (remote_get_command, remote_delete_command): Constify.
5010
5011 2017-09-27  Tom Tromey  <tom@tromey.com>
5012
5013         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5014         (set_mipsfpu_double_command, set_mipsfpu_none_command)
5015         (set_mipsfpu_auto_command): Constify.
5016
5017 2017-09-27  Tom Tromey  <tom@tromey.com>
5018
5019         * cli/cli-cmds.h (cd_command): Constify.
5020         * cli/cli-cmds.c (cd_command): Constify.
5021
5022 2017-09-27  Tom Tromey  <tom@tromey.com>
5023
5024         * thread.c (thread_name_command, thread_find_command): Constify.
5025
5026 2017-09-27  Tom Tromey  <tom@tromey.com>
5027
5028         * probe.c (enable_probes_command, disable_probes_command):
5029         Constify.
5030
5031 2017-09-27  Tom Tromey  <tom@tromey.com>
5032
5033         * symfile.c (symbol_file_command): Constify.
5034         * gdbcore.h (deprecated_file_changed_hook): Constify.
5035         * exec.c (deprecated_file_changed_hook, exec_file_command)
5036         (file_command): Constify.
5037         * defs.h (symbol_file_command): Constify.
5038
5039 2017-09-27  Tom Tromey  <tom@tromey.com>
5040
5041         * remote-fileio.c (set_system_call_allowed)
5042         (show_system_call_allowed): Constify.
5043
5044 2017-09-27  Tom Tromey  <tom@tromey.com>
5045
5046         * tracepoint.c (delete_trace_variable_command)
5047         (tfind_end_command, tfind_start_command, tfind_pc_command)
5048         (tfind_tracepoint_command, tfind_line_command)
5049         (tfind_range_command, tfind_outside_command): Constify.
5050
5051 2017-09-27  Tom Tromey  <tom@tromey.com>
5052
5053         * ax-gdb.c (maint_agent_printf_command, agent_command)
5054         (agent_eval_command): Constify.
5055
5056 2017-09-27  Tom Tromey  <tom@tromey.com>
5057
5058         * tracepoint.c (info_scope_command): Constify.
5059         * python/python.c (gdbpy_decode_line): Constify.
5060         * python/py-breakpoint.c (bppy_init): Constify.
5061         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5062         * location.h: (new_linespec_location)
5063         (string_to_event_location_basic, string_to_event_location):
5064         Constify.
5065         * location.c (new_linespec_location)
5066         (string_to_event_location_basic, string_to_event_location):
5067         Constify.
5068         * linespec.h (decode_line_with_current_source)
5069         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5070         * linespec.c (linespec_lex_to_end)
5071         (decode_line_with_current_source)
5072         (decode_line_with_last_displayed): Constify.
5073         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5074         Constify.
5075         * cli/cli-cmds.c (edit_command, list_command): Constify.
5076         * breakpoint.h (until_break_command, watch_command_wrapper)
5077         (awatch_command_wrapper, rwatch_command_wrapper)
5078         (init_ada_exception_breakpoint): Constify.
5079         * breakpoint.c (break_command_1, dprintf_command)
5080         (break_range_command, watch_command_wrapper)
5081         (rwatch_command_wrapper, awatch_command_wrapper)
5082         (until_break_command, init_ada_exception_breakpoint)
5083         (strace_marker_create_sals_from_location, trace_command)
5084         (ftrace_command, strace_command, struct tracepoint): Constify.
5085         * ax-gdb.c (agent_command_1): Constify.
5086         * ada-lang.c (ada_exception_sal): Constify.
5087
5088 2017-09-27  Tom Tromey  <tom@tromey.com>
5089
5090         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5091         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5092         (get_context_size, no_chunk, get_insn_history_modifiers)
5093         (cmd_record_insn_history, get_call_history_modifiers)
5094         (cmd_record_call_history): Constify.
5095
5096 2017-09-27  Tom Tromey  <tom@tromey.com>
5097
5098         * source.c (show_substitute_path_command)
5099         (unset_substitute_path_command, set_substitute_path_command):
5100         Constify.
5101
5102 2017-09-27  Tom Tromey  <tom@tromey.com>
5103
5104         * typeprint.c (maintenance_print_type): Constify.
5105         * maint.c (maintenance_dump_me, maintenance_demangle)
5106         (maintenance_time_display, maintenance_info_sections)
5107         (maintenance_print_statistics, maintenance_deprecate)
5108         (maintenance_undeprecate): Constify.
5109         (maintenance_do_deprecate): Constify.  Use std::string.
5110         (maintenance_selftest): Constify.
5111         * gdbtypes.h (maintenance_print_type): Constify.
5112
5113 2017-09-27  Tom Tromey  <tom@tromey.com>
5114
5115         * hppa-tdep.c (unwind_command): Constify.
5116
5117 2017-09-27  Tom Tromey  <tom@tromey.com>
5118
5119         * target-descriptions.c (unset_tdesc_filename_cmd)
5120         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5121         Constify.
5122
5123 2017-09-27  Tom Tromey  <tom@tromey.com>
5124
5125         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5126
5127 2017-09-27  Tom Tromey  <tom@tromey.com>
5128
5129         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5130
5131 2017-09-27  Tom Tromey  <tom@tromey.com>
5132
5133         * tui/tui-regs.c (tui_reg_command): Constify.
5134
5135 2017-09-27  Tom Tromey  <tom@tromey.com>
5136
5137         * skip.c (skip_file_command, skip_function_command)
5138         (skip_enable_command, skip_disable_command, skip_delete_command):
5139         Constify.
5140
5141 2017-09-27  Tom Tromey  <tom@tromey.com>
5142
5143         * record-btrace.c (cmd_record_btrace_bts_start)
5144         (cmd_record_btrace_pt_start): Constify.
5145
5146 2017-09-27  Tom Tromey  <tom@tromey.com>
5147
5148         * symmisc.c (maintenance_print_symbols)
5149         (maintenance_print_msymbols, maintenance_print_objfiles)
5150         (maintenance_info_symtabs, maintenance_check_symtabs)
5151         (maintenance_expand_symtabs, maintenance_info_line_tables):
5152         Constify.
5153
5154 2017-09-27  Tom Tromey  <tom@tromey.com>
5155
5156         * top.c (new_ui_command): Constify.
5157
5158 2017-09-27  Tom Tromey  <tom@tromey.com>
5159
5160         * symfile.c (add_symbol_file_command)
5161         (remove_symbol_file_command, list_overlays_command)
5162         (map_overlay_command, unmap_overlay_command)
5163         (overlay_auto_command, overlay_manual_command)
5164         (overlay_off_command, overlay_load_command): Constify.
5165
5166 2017-09-27  Tom Tromey  <tom@tromey.com>
5167
5168         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5169         (info_spu_mailbox_command, info_spu_dma_command)
5170         (info_spu_proxydma_command): Constify.
5171
5172 2017-09-27  Tom Tromey  <tom@tromey.com>
5173
5174         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5175
5176 2017-09-27  Tom Tromey  <tom@tromey.com>
5177
5178         * cli/cli-script.c (user_defined_command): Constify.
5179
5180 2017-09-27  Tom Tromey  <tom@tromey.com>
5181
5182         * cli/cli-dump.c (dump_memory_command, dump_value_command)
5183         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5184         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5185         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5186         (dump_binary_value, append_binary_memory, append_binary_value):
5187         Constify.
5188         (struct dump_context) <func>: Constify.
5189         (add_dump_command): Update.
5190
5191 2017-09-27  Tom Tromey  <tom@tromey.com>
5192
5193         * cli/cli-cmds.c (show_version, show_configuration)
5194         (source_command, show_user): Constify.
5195
5196 2017-09-27  Tom Tromey  <tom@tromey.com>
5197
5198         * target.c (maintenance_print_target_stack): Constify.
5199
5200 2017-09-27  Tom Tromey  <tom@tromey.com>
5201
5202         * interps.c (interpreter_exec_cmd): Constify.
5203
5204 2017-09-27  Tom Tromey  <tom@tromey.com>
5205
5206         * record-full.c (cmd_record_full_restore): Constify.
5207
5208 2017-09-27  Tom Tromey  <tom@tromey.com>
5209
5210         * memattr.c (enable_mem_command, disable_mem_command)
5211         (delete_mem_command): Constify.
5212
5213 2017-09-27  Tom Tromey  <tom@tromey.com>
5214
5215         * value.c (show_convenience): Constify.
5216
5217 2017-09-27  Tom Tromey  <tom@tromey.com>
5218
5219         * gdbcore.h (core_file_command): Update.
5220         * corefile.c (core_file_command): Constify.
5221
5222 2017-09-27  Tom Tromey  <tom@tromey.com>
5223
5224         * user-regs.c (maintenance_print_user_registers): Constify.
5225
5226 2017-09-27  Tom Tromey  <tom@tromey.com>
5227
5228         * cp-namespace.c (maintenance_cplus_namespace): Constify.
5229
5230 2017-09-27  Tom Tromey  <tom@tromey.com>
5231
5232         * cp-support.c (first_component_command): Constify.
5233
5234 2017-09-27  Tom Tromey  <tom@tromey.com>
5235
5236         * psymtab.c (maintenance_print_psymbols)
5237         (maintenance_info_psymtabs, maintenance_check_psymtabs):
5238         Constify.
5239
5240 2017-09-27  Tom Tromey  <tom@tromey.com>
5241
5242         * windows-tdep.c (display_tib): Constify.
5243
5244 2017-09-27  Tom Tromey  <tom@tromey.com>
5245
5246         * linux-fork.c (delete_checkpoint_command)
5247         (detach_checkpoint_command): Constify.
5248
5249 2017-09-27  Tom Tromey  <tom@tromey.com>
5250
5251         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5252
5253 2017-09-27  Tom Tromey  <tom@tromey.com>
5254
5255         * arc-tdep.c (dump_arc_instruction_command): Constify.
5256
5257 2017-09-27  Tom Tromey  <tom@tromey.com>
5258
5259         * valprint.c (set_radix, show_radix): Constify.
5260
5261 2017-09-27  Tom Tromey  <tom@tromey.com>
5262
5263         * dtrace-probe.c (info_probes_dtrace_command): Constify.
5264
5265 2017-09-27  Tom Tromey  <tom@tromey.com>
5266
5267         * command.h (not_just_help_class_command): Update.
5268         * cli/cli-decode.h (not_just_help_class_command): Update.
5269         * cli/cli-decode.c (not_just_help_class_command): Constify.
5270
5271 2017-09-27  Tom Tromey  <tom@tromey.com>
5272
5273         * gdb_bfd.c (maintenance_info_bfds): Constify.
5274
5275 2017-09-27  Tom Tromey  <tom@tromey.com>
5276
5277         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5278         overloads.
5279         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
5280         (do_const_cfunc): New function.
5281         (cmd_cfunc_eq): New overload.
5282         (cli_user_command_p): Check do_const_cfunc.
5283         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5284         const_cfunc.
5285         * command.h (add_cmd): Add const overload and no-function
5286         overload.
5287         (set_cmd_cfunc): Add const overload.
5288         (cmd_const_cfunc_ftype): Declare.
5289         (cmd_cfunc_eq): Add const overload.
5290         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5291         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5292         overload.
5293
5294 2017-09-27  Tom Tromey  <tom@tromey.com>
5295
5296         * macroexp.c (get_next_token_for_substitution): New function.
5297         (substitute_args): Call it.  Check for __VA_OPT__.
5298
5299 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5300             Pedro Alves <palves@redhat.com>
5301
5302         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5303         producer_is_icc_lt_14.
5304         (producer_is_icc_lt_14): New function.
5305         (check_producer): Add code for checking version of ICC.
5306         (producer_is_icc): Move to producer.c.
5307         (read_structure_type): Restrict ICC workaround to ICC<14.
5308         * producer.c: Include selftest.h.
5309         (producer_is_icc, producer_parsing_tests, _initialize_producer):
5310         New functions.
5311         * producer.h (producer_is_icc): New declaration.
5312
5313 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5314
5315         * Makefile.in (SFILES): Add producer.c.
5316         (COMMON_OBS): Add producer.o
5317         * amd64-tdep.c (producer.h): Add new include.
5318         * dwarf2read.c (producer.h): Add new include.
5319         * producer.c: New file.
5320         * producer.h: New file.
5321         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5322         producer.c.
5323         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5324         producer.h.
5325
5326 2017-09-26  Matthias Klose  <doko@ubuntu.com>
5327
5328         * configure.ac: Search ncursesw before ncurses.
5329         Check ncursesw/ncurses.h before ncurses/ncurses.h.
5330         * gdb_curses.h: Include <ncursesw/ncurses.h>
5331         * config.in, configure: Regenerate.
5332
5333 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5334
5335         PR gdb/22185
5336         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5337         obsolete.
5338         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5339         Remove i386sol2 support.
5340         * configure.nat <i386sol2>: Remove.
5341         <sol2-64>: Fold into ...
5342         <sol2>: ... this.
5343         Move common settings to default section.
5344         Add sol-thread.o.
5345         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5346         x86_64-*-solaris2.1[0-9]*>: Rename to ...
5347         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5348         <i[34567]86-*-solaris*>: Remove.
5349         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5350
5351         * configure.ac: Remove wctype in libw check.
5352         (_MSE_INT_H): Don't define on Solaris 7-9.
5353         <solaris*>: Remove libthread_db.so.1 check.
5354         * configure: Regenerate.
5355         * config.in: Regenerate.
5356
5357         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5358         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5359         (gdb_ps_size_t): Remove.
5360         Use base types in users.
5361         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5362
5363         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5364
5365 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5366
5367         PR build/22206
5368         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5369         (adi_is_addr_mapped): Likewise.
5370         (PSR_ICC): Don't redefine.
5371         (PSR_IMPL): Likewise.
5372
5373 2017-09-25  Tom Tromey  <tom@tromey.com>
5374
5375         * regcache.c (regcache::dump): Use string_printf.
5376
5377 2017-09-25  Tom Tromey  <tom@tromey.com>
5378
5379         * regcache.c (class regcache_invalidator): New.
5380         (struct register_to_invalidate): Remove.
5381         (make_cleanup_regcache_invalidate): Remove.
5382         (regcache::raw_write): Use regcache_invalidator.
5383
5384 2017-09-25  Tom Tromey  <tom@tromey.com>
5385
5386         * spu-tdep.c (spu2ppu_sniffer): Update.
5387         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5388         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5389         Remove.
5390         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5391         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5392         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5393         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5394         (frame_pop): Update.
5395
5396 2017-09-25  Tom Tromey  <tom@tromey.com>
5397
5398         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5399         * regcache.h (regcache_xfree): Don't declare.
5400         * regcache.c (regcache_xfree): Remove.
5401         (do_regcache_xfree): Use delete.
5402         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5403         * linux-fork.c (free_fork): Use delete.
5404         (fork_save_infrun_state): Likewise.
5405         * jit.c (jit_dealloc_cache): Use delete.
5406         * infrun.c (discard_infcall_suspend_state): Use delete.
5407
5408 2017-09-25  Tom Tromey  <tom@tromey.com>
5409
5410         * regcache.h (regcache_xmalloc): Don't declare.
5411         (regcache_raw_set_cached_value): Update comment.
5412         * regcache.c (regcache_xmalloc): Remove.
5413         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5414         * jit.c (jit_frame_sniffer): Use new.
5415         * frame.c (frame_save_as_regcache): Use new.
5416
5417 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5418
5419         * NEWS: Advertise support for guarded-storage registers on IBM z.
5420
5421 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5422
5423         * s390-linux-nat.c (have_regset_gs): New static variable.
5424         (s390_linux_fetch_inferior_registers): Handle guarded-storage
5425         control block and guarded-storage broadcast control regsets.
5426         (s390_read_description): Detect whether the target has
5427         guarded-storage support, return appropriate tdesc.
5428         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5429         (features/s390x-gs-linux64.c): Likewise.
5430         (struct gdbarch_tdep) <have_gs>: New field.
5431         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5432         (s390_gsbc_regset): New variables.
5433         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5434         and s390_gsbc_regset, if applicable.
5435         (s390_core_read_description): Check whether core file was from a
5436         target with guarded-storage support; include appropriate regsets.
5437         (s390_gdbarch_init): Add registers for guarded-storage support.
5438         (_initialize_s390_tdep): Initialize new target descriptions that
5439         include registers for guarded-storage support.
5440         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5441         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5442         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5443         (S390_NUM_REGS): Adjust macro definition.
5444         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5445         (tdesc_s390x_gs_linux64): New declarations.
5446
5447 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5448
5449         * features/s390-gs-linux64.xml: New file.
5450         * features/s390-gs.xml: New file.
5451         * features/s390-gsbc.xml: New file.
5452         * features/s390x-gs-linux64.xml: New file.
5453         * features/Makefile (WHICH): Add s390-gs-linux64 and
5454         s390x-gs-linux64.
5455         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5456         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5457         * features/s390-gs-linux64.c: New generated file.
5458         * features/s390x-gs-linux64.c: New file.
5459         * regformats/s390-gs-linux64.dat: New file.
5460         * regformats/s390x-gs-linux64.dat: New file.
5461
5462 2017-09-23  Tom Tromey  <tom@tromey.com>
5463
5464         * defs.h (make_cleanup_override_quit_handler): Don't declare.
5465
5466 2017-09-22  Tom Tromey  <tom@tromey.com>
5467
5468         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5469         type to scoped_restore_tmpl.
5470         <scoped_input_handler>: Initialize m_quit_handler directly.
5471
5472 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5473
5474         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5475         (cd_command): Likewise.  Free "current_directory" before
5476         assigning to it.
5477         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5478         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5479         * top.c (gdb_dirbuf): Remove global declaration.
5480         * top.h (gdb_dirbuf): Likewise.
5481
5482 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5483
5484         * gnulib/aclocal.m4: Regenerate.
5485         * gnulib/config.in: Regenerate.
5486         * gnulib/configure: Regenerate.
5487         * gnulib/import/Makefile.am: Regenerate.
5488         * gnulib/import/Makefile.in: Regenerate.
5489         * gnulib/import/assure.h: New file.
5490         * gnulib/import/at-func.c: Likewise
5491         * gnulib/import/chdir-long.c: New file.
5492         * gnulib/import/chdir-long.h: New file.
5493         * gnulib/import/cloexec.c: New file.
5494         * gnulib/import/cloexec.h: New file.
5495         * gnulib/import/close.c: New file.
5496         * gnulib/import/closedir.c: New file.
5497         * gnulib/import/dirent-private.h: New file.
5498         * gnulib/import/dup-safer.c: New file.
5499         * gnulib/import/dup.c: New file.
5500         * gnulib/import/dup2.c: New file.
5501         * gnulib/import/error.c: New file.
5502         * gnulib/import/error.h: New file.
5503         * gnulib/import/exitfail.c: New file.
5504         * gnulib/import/exitfail.h: New file.
5505         * gnulib/import/fchdir.c: New file.
5506         * gnulib/import/fcntl.c: New file.
5507         * gnulib/import/fcntl.in.h: New file.
5508         * gnulib/import/fd-hook.c: New file.
5509         * gnulib/import/fd-hook.h: New file.
5510         * gnulib/import/fd-safer.c: New file.
5511         * gnulib/import/fdopendir.c: New file.
5512         * gnulib/import/filename.h: New file.
5513         * gnulib/import/filenamecat-lgpl.c: New file.
5514         * gnulib/import/filenamecat.h: New file.
5515         * gnulib/import/fstat.c: New file.
5516         * gnulib/import/fstatat.c: New file.
5517         * gnulib/import/getcwd-lgpl.c: New file.
5518         * gnulib/import/getcwd.c: New file.
5519         * gnulib/import/getdtablesize.c: New file.
5520         * gnulib/import/getlogin_r.c: New file.
5521         * gnulib/import/getprogname.c: New file.
5522         * gnulib/import/getprogname.h: New file.
5523         * gnulib/import/gettext.h: New file.
5524         * gnulib/import/glob-libc.h: New file.
5525         * gnulib/import/glob.c: New file.
5526         * gnulib/import/glob.in.h: New file.
5527         * gnulib/import/intprops.h: New file.
5528         * gnulib/import/m4/chdir-long.m4: New file.
5529         * gnulib/import/m4/close.m4: New file.
5530         * gnulib/import/m4/closedir.m4: New file.
5531         * gnulib/import/m4/d-ino.m4: New file.
5532         * gnulib/import/m4/d-type.m4: New file.
5533         * gnulib/import/m4/dup.m4: New file.
5534         * gnulib/import/m4/dup2.m4: New file.
5535         * gnulib/import/m4/error.m4: New file.
5536         * gnulib/import/m4/fchdir.m4: New file.
5537         * gnulib/import/m4/fcntl.m4: New file.
5538         * gnulib/import/m4/fcntl_h.m4: New file.
5539         * gnulib/import/m4/fdopendir.m4: New file.
5540         * gnulib/import/m4/filenamecat.m4: New file.
5541         * gnulib/import/m4/fstat.m4: New file.
5542         * gnulib/import/m4/fstatat.m4: New file.
5543         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5544         * gnulib/import/m4/getcwd-path-max.m4: New file.
5545         * gnulib/import/m4/getcwd.m4: New file.
5546         * gnulib/import/m4/getdtablesize.m4: New file.
5547         * gnulib/import/m4/getlogin_r.m4: New file.
5548         * gnulib/import/m4/getprogname.m4: New file.
5549         * gnulib/import/m4/glob.m4: New file.
5550         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5551         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5552         * gnulib/import/m4/mempcpy.m4: New file.
5553         * gnulib/import/m4/memrchr.m4: New file.
5554         * gnulib/import/m4/mode_t.m4: New file.
5555         * gnulib/import/m4/msvc-inval.m4: New file.
5556         * gnulib/import/m4/msvc-nothrow.m4: New file.
5557         * gnulib/import/m4/open.m4: New file.
5558         * gnulib/import/m4/openat.m4: New file.
5559         * gnulib/import/m4/opendir.m4: New file.
5560         * gnulib/import/m4/readdir.m4: New file.
5561         * gnulib/import/m4/realloc.m4: New file.
5562         * gnulib/import/m4/rewinddir.m4: New file.
5563         * gnulib/import/m4/save-cwd.m4: New file.
5564         * gnulib/import/m4/strdup.m4: New file.
5565         * gnulib/import/m4/strerror.m4: New file.
5566         * gnulib/import/m4/unistd-safer.m4: New file.
5567         * gnulib/import/mempcpy.c: New file.
5568         * gnulib/import/memrchr.c: New file.
5569         * gnulib/import/msvc-inval.c: New file.
5570         * gnulib/import/msvc-inval.h: New file.
5571         * gnulib/import/msvc-nothrow.c: New file.
5572         * gnulib/import/msvc-nothrow.h: New file.
5573         * gnulib/import/open.c: New file.
5574         * gnulib/import/openat-die.c: New file.
5575         * gnulib/import/openat-priv.h: New file.
5576         * gnulib/import/openat-proc.c: New file.
5577         * gnulib/import/openat.c: New file.
5578         * gnulib/import/openat.h: New file.
5579         * gnulib/import/opendir.c: New file.
5580         * gnulib/import/pipe-safer.c: New file.
5581         * gnulib/import/readdir.c: New file.
5582         * gnulib/import/realloc.c: New file.
5583         * gnulib/import/rewinddir.c: New file.
5584         * gnulib/import/save-cwd.c: New file.
5585         * gnulib/import/save-cwd.h: New file.
5586         * gnulib/import/strdup.c: New file.
5587         * gnulib/import/strerror-override.c: New file.
5588         * gnulib/import/strerror-override.h: New file.
5589         * gnulib/import/strerror.c: New file.
5590         * gnulib/import/unistd--.h: New file.
5591         * gnulib/import/unistd-safer.h: New file.
5592         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5593         "getcwd" and "glob".
5594         * ser-tcp.c: Undefine "close" before redefining it.
5595
5596 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5597
5598         * guile/scm-value.c (gdbscm_value_address): Initialize address,
5599         get rid of res_val.
5600
5601 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5602
5603         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5604         <sol2,sparc>: Likewise.
5605         <sol2-64,i386>: Likewise.
5606
5607         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5608         -Wdeprecated-declarations on *-*-solaris*.
5609         * configure: Regenerate.
5610
5611         * procfs.c: Include "nat/inferior.h".
5612         (procfs_info_proc): Fix typo.
5613
5614 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5615
5616         * remote.c (vector): Include.
5617         (struct private_thread_info): Add field, thread_handle.
5618         (free_private_thread_info): Deallocate storage associated with
5619         thread handle.
5620         (get_private_info_thread): Initialize `thread_handle' field.
5621         (struct thread_item): Add field, thread_handle.
5622         (clear_threads_listing_context): Deallocate storage associated
5623         with thread handle.
5624         (start_thread): Add support for "handle" attribute.
5625         (thread_attributes): Add "handle".
5626         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5627         field.
5628         (remote_update_thread_list): Update thread_handle.
5629         (remote_thread_handle_to_thread_info): New function.
5630         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5631
5632 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5633
5634         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5635         function.
5636         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5637         * python/python-internal.h (thread_object_type): Declare.
5638
5639 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
5640
5641         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5642         (target_thread_handle_to_thread_info): Declare.
5643         * target.c (target_thread_handle_to_thread_info): New function.
5644         * target-delegates.c: Regenerate.
5645         * gdbthread.h (find_thread_by_handle): Declare.
5646         * thread.c (find_thread_by_handle): New function.
5647         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5648         function.
5649         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5650
5651 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5652
5653         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5654
5655 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
5656
5657         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5658
5659 2017-09-21  Yao Qi  <yao.qi@linaro.org>
5660
5661         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5662         to gdb_target_obs.
5663
5664 2017-09-20  Tom Tromey  <tom@tromey.com>
5665
5666         * breakpoint.c (struct counted_command_line): Remove.
5667         (breakpoint_commands): Update.
5668         (alloc_counted_command_line, incref_counted_command_line)
5669         (decref_counted_command_line, do_cleanup_counted_command_line)
5670         (make_cleanup_decref_counted_command_line): Remove.
5671         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5672         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5673         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5674         (save_breakpoints): Update.
5675         * breakpoint.h (counted_command_line): Now a typedef to
5676         shared_ptr.
5677         (struct breakpoint) <commands>: Now a counted_command_line.
5678         (struct bpstats) <command>: Likewise.
5679
5680 2017-09-20  Tom Tromey  <tom@tromey.com>
5681
5682         * breakpoint.c (struct commands_info, do_map_commands_command):
5683         Remove.
5684         (commands_command_1): Update.
5685         (iterate_over_related_breakpoints): Take a function_view.
5686         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5687         (delete_command): Update.
5688         (map_breakpoint_numbers): Take a function_view.
5689         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5690         (disable_command): Update.
5691         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5692         (enable_command): Update.
5693         (struct disp_data, do_enable_breakpoint_disp)
5694         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5695         (do_map_enable_delete_breakpoint): Remove.
5696         (enable_once_command, enable_count_command, enable_delete_command)
5697         (delete_trace_variable_command): Update.
5698
5699 2017-09-20  Tom Tromey  <tom@tromey.com>
5700
5701         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
5702         (bpstat_clear): Use delete.
5703         (bpstats): New constructors.
5704         (bpstat_copy, bpstat_stop_status): Use new.
5705         (dprintf_after_condition_true): Update.
5706         * breakpoint.h (bpstats::bpstats): Add constructors.
5707         (bpstats::~bpstats): Add destructor.
5708
5709 2017-09-20  Pedro Alves  <palves@redhat.com>
5710
5711         * eval.c (make_params): Delete, refactored as ...
5712         (class fake_method): ... this new type's ctor.
5713         (fake_method::~fake_method): New.
5714         (evaluate_subexp_standard): Use 'fake_method'.
5715
5716 2017-09-20  Tom Tromey  <tom@tromey.com>
5717
5718         * windows-nat.c (get_windows_debug_event, windows_wait)
5719         (do_initial_windows_stuff, windows_attach): Update.
5720         * utils.c (vwarning, internal_vproblem): Update.
5721         (ui_unregister_input_event_handler_cleanup)
5722         (prepare_to_handle_input): Remove.
5723         (class scoped_input_handler): New.
5724         (defaulted_query, prompt_for_continue): Update.
5725         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5726         Update.
5727         * top.c (undo_terminal_modifications_before_exit): Update.
5728         * target/target.h (target_terminal_init, target_terminal_inferior)
5729         (target_terminal_ours): Don't declare.
5730         (class target_terminal): New.
5731         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5732         (target_terminal_ours_for_output)
5733         (make_cleanup_restore_target_terminal): Don't declare.
5734         (target_terminal_info): Remove.
5735         * target.c (enum terminal_state, terminal_state): Remove.
5736         (target_terminal::terminal_state): Define.
5737         (target_terminal::init): Rename from target_terminal_init.
5738         (target_terminal::inferior): Rename from
5739         target_terminal_inferior.
5740         (target_terminal::ours): Rename from target_terminal_ours.
5741         (target_terminal::ours_for_output): Rename from
5742         target_terminal_ours_for_output.
5743         (target_terminal::info): New method.
5744         (cleanup_restore_target_terminal)
5745         (make_cleanup_restore_target_terminal): Remove.
5746         * solib.c (handle_solib_event): Update.
5747         * remote.c (remote_serial_quit_handler): Update.
5748         (remote_terminal_inferior, remote_wait_as): Update.
5749         * record-full.c (record_full_wait_1): Update.
5750         * nto-procfs.c (procfs_create_inferior): Update.
5751         * nat/fork-inferior.c (startup_inferior): Update.
5752         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5753         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5754         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5755         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5756         (mi_breakpoint_created, mi_breakpoint_deleted)
5757         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5758         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5759         (mi_user_selected_context_changed, report_initial_inferior):
5760         Update.
5761         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5762         (linux_nat_terminal_inferior): Update.
5763         * infrun.c (follow_fork_inferior)
5764         (handle_vfork_child_exec_or_exit, do_target_resume)
5765         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5766         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5767         Update.
5768         * inflow.c (child_terminal_init, info_terminal_command): Update.
5769         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5770         (attach_command): Update.
5771         * infcall.c (call_thread_fsm_should_stop): Update.
5772         * gnu-nat.c (gnu_attach): Update.
5773         * extension.c (struct active_ext_lang_state)
5774         (restore_active_ext_lang): Update.
5775         * exceptions.c (print_flush): Update.
5776         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5777         (struct quit_handler_cleanup_data, restore_quit_handler)
5778         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5779         Remove.
5780         * cp-support.c (gdb_demangle): Update.
5781         * breakpoint.c (update_inserted_breakpoint_locations)
5782         (insert_breakpoint_locations, handle_jit_event)
5783         (disable_breakpoints_in_unloaded_shlib): Update.
5784         * annotate.c (annotate_breakpoints_invalid)
5785         (annotate_frames_invalid): Update.
5786
5787 2017-09-20  Tom Tromey  <tom@tromey.com>
5788
5789         * main.c (catch_command_errors): Rename from
5790         catch_command_errors_const.
5791         (captured_main_1): Update.
5792
5793 2017-09-20  Pedro Alves  <palves@redhat.com>
5794
5795         * cli/cli-cmds.c (list_command): Use print_sal_location.
5796         (print_sal_location): New function.
5797         (ambiguous_line_spec): Use print_sal_location.
5798         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5799         * symtab.c (find_function_start_sal): Likewise.
5800         * symtab.h (symtab_and_line::symbol): New field.
5801
5802 2017-09-20  Pedro Alves  <palves@redhat.com>
5803
5804         * linespec.c (minsym_found): Handle non-text minsyms.
5805         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5806
5807 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5808
5809         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5810         backslash.
5811
5812 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5813
5814         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5815         vmovups instead vmovaps.
5816         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5817
5818 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5819
5820         * NEWS (Changes since GDB 8.0): Add starti.
5821         * infcmd.c (enum run_break): New.
5822         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5823         case.
5824         (run_command): Use enum run_how.
5825         (start_command): Likewise.
5826         (starti_command): New function.
5827         (RUN_ARGS_HELP): New macro.
5828         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5829         commands.  Add starti command.
5830
5831 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5832
5833         * Makefile.in (monitor.o): Remove the rule.
5834
5835 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5836
5837         * annotate.h (struct annotate_arg_emitter): Use
5838         DISABLE_COPY_AND_ASSIGN.
5839         * common/refcounted-object.h (refcounted_object): Likewise.
5840         * completer.h (struct completion_result): Likewise.
5841         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5842         * filename-seen-cache.h (filename_seen_cache): Likewise.
5843         * gdbcore.h (thread_section_name): Likewise.
5844         * gdb_regex.h (compiled_regex): Likewise.
5845         * gdbthread.h (scoped_restore_current_thread): Likewise.
5846         * inferior.h (scoped_restore_current_inferior): Likewise.
5847         * jit.c (jit_reader): Likewise.
5848         * linespec.h (struct linespec_result): Likewise.
5849         * mi/mi-parse.h (struct mi_parse): Likewise.
5850         * nat/fork-inferior.c (execv_argv): Likewise.
5851         * progspace.h (scoped_restore_current_program_space): Likewise.
5852         * python/python-internal.h (class gdbpy_enter): Likewise.
5853         * regcache.h (regcache): Likewise.
5854         * target-descriptions.c (struct tdesc_reg): Likewise.
5855         (struct tdesc_type): Likewise.
5856         (struct tdesc_feature): Likewise.
5857         * ui-out.h (ui_out_emit_type): Likewise.
5858
5859 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5860
5861         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5862         label abort_expression.
5863
5864 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         * common/buffer.c (buffer_xml_printf): Adjust.
5867         * common/xml-utils.c (xml_escape_text): Change return type to
5868         std::string, update code accordingly.
5869         * common/xml-utils.h (xml_escape_text): Change return type to
5870         std::string.
5871         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5872         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5873         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5874         Adjust.
5875
5876 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5879         (SUBDIR_UNITTESTS_OBS): Add new object file.
5880         * unittests/xml-utils-selftests.c: New file.
5881
5882 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5883
5884         * common/selftest.h (selftest): New struct/interface.
5885         (register_test): Add name parameter, add new overload.
5886         (run_tests): Add filter parameter.
5887         (for_each_selftest_ftype): New typedef.
5888         (for_each_selftest): New declaration.
5889         * common/selftest.c (tests): Change type to
5890         map<string, unique_ptr<selftest>>.
5891         (simple_selftest): New struct.
5892         (register_test): New function.
5893         (register_test): Add name parameter and use it.
5894         (run_tests): Add filter parameter and use it.  Add prints.
5895         Adjust to vector -> map change.
5896         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5897         registering selftests.
5898         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5899         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5900         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5901         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5902         * findvar.c (_initialize_findvar): Likewise.
5903         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5904         * maint.c (maintenance_selftest): Update call to run_tests.
5905         (maintenance_info_selftests): New function.
5906         (_initialize_maint_cmds): Register "maintenance info selftests"
5907         command.  Update "maintenance selftest" doc.
5908         * regcache.c (_initialize_regcache): Add names when registering
5909         selftests.
5910         * rust-exp.y (_initialize_rust_exp): Likewise.
5911         * selftest-arch.c (gdbarch_selftest): New struct.
5912         (gdbarch_tests): Remove.
5913         (register_test_foreach_arch): Add name parameter.  Call
5914         register_test.
5915         (tests_with_arch): Remove, move most content to
5916         gdbarch_selftest::operator().
5917         (_initialize_selftests_foreach_arch): Remove.
5918         * selftest-arch.h (register_test_foreach_arch): Add name
5919         parameter.
5920         (run_tests_with_arch): New declaration.
5921         * utils-selftests.c (_initialize_utils_selftests): Add names
5922         when registering selftests.
5923         * utils.c (_initialize_utils): Likewise.
5924         * unittests/array-view-selftests.c
5925         (_initialize_array_view_selftests): Likewise.
5926         * unittests/environ-selftests.c (_initialize_environ_selftests):
5927         Likewise.
5928         * unittests/function-view-selftests.c
5929         (_initialize_function_view_selftests): Likewise.
5930         * unittests/offset-type-selftests.c
5931         (_initialize_offset_type_selftests): Likewise.
5932         * unittests/optional-selftests.c
5933         (_initialize_optional_selftests): Likewise.
5934         * unittests/scoped_restore-selftests.c
5935         (_initialize_scoped_restore_selftests): Likewise.
5936         * NEWS: Document "maintenance selftest" and "maint info
5937         selftests".
5938
5939 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5940
5941         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5942         scoped_restore.
5943
5944 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5945
5946         * mi/mi-main.c (mi_load_progress): Make uiout variable
5947         a unique_ptr.
5948
5949 2017-09-15  Pedro Alves  <palves@redhat.com>
5950
5951         * compile/compile-c-types.c (convert_enum, convert_int)
5952         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5953
5954 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5955
5956         * dwarf2read.c (copy_string): Remove.
5957         (parse_macro_definition): Replace copy_string with savestring.
5958
5959 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5960
5961         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5962         gdb_target_obs.
5963         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5964         Likewise.
5965         (i[34567]86-*-linux*): Likewise.
5966
5967 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5968
5969         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5970         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5971         <stack>: Change type to std::vector.
5972         <stack_len, stack_allocated>: Remove.
5973         <grow_stack>: Remove.
5974         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5975         (dwarf_expr_context::~dwarf_expr_context): Remove.
5976         (dwarf_expr_context::grow_stack): Remove.
5977         (dwarf_expr_context::push): Adjust.
5978         (dwarf_expr_context::pop): Adjust.
5979         (dwarf_expr_context::fetch): Adjust.
5980         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5981         (dwarf_expr_context::stack_empty_p): Adjust.
5982         (dwarf_expr_context::execute_stack_op): Adjust.
5983
5984 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5985
5986         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5987         return type to bool.
5988         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5989
5990 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5991
5992         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5993         Change type to bool.
5994         (dwarf_stack_value) <in_stack_memory>: Likewise.
5995         (dwarf_expr_context) <push_address>: Change parameter type to
5996         bool.
5997         <fetch_in_stack_memory>: Change return type to bool.
5998         <push>: Change parameter type to bool.
5999         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6000         to bool.
6001         (dwarf_expr_context::push_address): Likewise.
6002         (dwarf_expr_context::fetch_in_stack_memory): Change return type
6003         to bool.
6004         (dwarf_expr_context::execute_stack_op): Adjust.
6005         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6006
6007 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6008
6009         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6010         (struct dwarf_expr_context) <n_pieces>: Remove.
6011         <pieces>: Change type to std::vector.
6012         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6013         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6014         pieces.
6015         (dwarf_expr_context::add_piece): Adjust.
6016         * dwarf2loc.c (struct piece_closure): Initialize fields.
6017         <n_pieces>: Remove.
6018         <pieces>: Change type to std::vector.
6019         (allocate_piece_closure): Adjust, change parameter to
6020         std::vector rvalue and std::move it to piece_closure.
6021         (rw_pieced_value): Adjust.
6022         (check_pieced_synthetic_pointer): Adjust.
6023         (indirect_synthetic_pointer): Adjust.
6024         (coerce_pieced_ref): Adjust.
6025         (free_pieced_value_closure):  Adjust.  Use delete to free
6026         piece_closure.
6027         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
6028         to allocate_piece_closure.
6029         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6030
6031 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6032
6033         * probe.h (probe_ops_cp): Remove typedef.
6034         (DEF_VEC_P (probe_ops_cp)): Remove.
6035         (all_probe_ops): Change type to std::vector.
6036         * probe.c (info_probes_for_ops): Adjust to vector change.
6037         (probe_linespec_to_ops): Likewise.
6038         (all_probe_ops): Change type to std::vector.
6039         (_initialize_probe): Adjust to vector change.
6040         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6041         * elfread.c (elf_get_probes): Likewise.
6042         * stap-probe.c (_initialize_stap_probe): Likewise.
6043
6044 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6045
6046         * probe.h (struct bound_probe): Define constructors.
6047         * probe.c (bound_probe_s): Remove typedef.
6048         (DEF_VEC_O (bound_probe_s)): Remove VEC.
6049         (collect_probes): Change return type to std::vector, remove
6050         cleanup.
6051         (compare_probes): Return bool, change parameter type.  Change
6052         semantic to "less than".
6053         (gen_ui_out_table_header_info): Change parameter to std::vector
6054         and update.
6055         (exists_probe_with_pops): Likewise.
6056         (info_probes_for_ops): Update to std::vector change.
6057         (enable_probes_command): Likewise.
6058         (disable_probes_command): Likewise.
6059
6060 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6061
6062         * probe.h (struct probe_ops) <get_probes>: Change parameter from
6063         vec to std::vector.
6064         * probe.c (parse_probes_in_pspace): Update.
6065         (find_probes_in_objfile): Update.
6066         (find_probe_by_pc): Update.
6067         (collect_probes): Update.
6068         (probe_any_get_probes): Update.
6069         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6070         return type to reference to std::vector.
6071         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6072         std::vector and update.
6073         (dtrace_process_dof): Likewise.
6074         (dtrace_get_probes): Likewise.
6075         * elfread.c (elf_get_probes): Change return type to std::vector,
6076         store an std::vector in bfd_data.
6077         (probe_key_free): Update to std::vector.
6078         * stap-probe.c (handle_stap_probe): Change parameter to
6079         std::vector and update.
6080         (stap_get_probes): Likewise.
6081         * symfile-debug.c (debug_sym_get_probes): Change return type to
6082         std::vector and update.
6083
6084 2017-09-11  Tom Tromey  <tom@tromey.com>
6085
6086         * breakpoint.c (program_breakpoint_here_p): Update.
6087         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6088         from make_show_memory_breakpoints_cleanup.  Return a
6089         scoped_restore_tmpl<int>.
6090         (restore_show_memory_breakpoints): Remove.
6091         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6092         * mem-break.c (memory_validate_breakpoint): Update.
6093         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6094         (ia64_memory_remove_breakpoint): Update.
6095         (ia64_breakpoint_from_pc): Update.
6096         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6097         from make_show_memory_breakpoints_cleanup.
6098
6099 2017-09-11  Tom Tromey  <tom@tromey.com>
6100
6101         * d-namespace.c (d_lookup_symbol): Use std::string.
6102         (find_symbol_in_baseclass): Likewise.
6103
6104 2017-09-11  Tom Tromey  <tom@tromey.com>
6105
6106         * ctf.c (ctf_start): Use std::string.
6107
6108 2017-09-11  Tom Tromey  <tom@tromey.com>
6109
6110         * ada-lang.c (is_known_support_routine): Update.
6111         (ada_unhandled_exception_name_addr_from_raise): Update.
6112         * guile/scm-frame.c (gdbscm_frame_name): Update.
6113         * python/py-frame.c (frapy_name): Update.
6114         (frapy_function): Update.
6115         * stack.h (find_frame_funname): Update.
6116         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6117         (print_frame): Update.
6118
6119 2017-09-11  Tom Tromey  <tom@tromey.com>
6120
6121         * findcmd.c (put_bits): Take a gdb::byte_vector.
6122         (parse_find_args): Return gdb::byte_vector.  "args" now const.
6123         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
6124         cleanups.
6125         (find_command): Update.
6126
6127 2017-09-11  Tom Tromey  <tom@tromey.com>
6128
6129         * cli/cli-script.c (class scoped_restore_hook_in): New.
6130         (clear_hook_in_cleanup): Remove.
6131         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6132         scoped_restore_hook_in.
6133
6134 2017-09-11  Tom Tromey  <tom@tromey.com>
6135
6136         * cli/cli-script.c (restore_interp): Remove.
6137         (read_command_lines): Use scoped_restore_interp.
6138         * interps.c (scoped_restore_interp::set_temp): Rename from
6139         interp_set_temp.
6140         * interps.h (class scoped_restore_interp): New.
6141         (interp_set_temp): Remove.
6142
6143 2017-09-11  Tom Tromey  <tom@tromey.com>
6144
6145         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6146         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6147         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6148         scoped_restore.
6149         (mi_cmd_break_insert_1): Update.
6150         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6151         scoped_restore.
6152
6153 2017-09-11  Tom Tromey  <tom@tromey.com>
6154
6155         * demangle.c (demangle_command): Update.
6156         * breakpoint.c (disable_command): Update.
6157         (enable_command): Update.
6158         (find_location_by_number): Make "number" const.  Use
6159         get_number_trailer.
6160         * cli/cli-utils.c (extract_arg): Return std::string.
6161         * probe.c (parse_probe_linespec): Update.  Change types.
6162         (collect_probes): Take string arguments.
6163         (parse_probe_linespec): Likewise.
6164         (info_probes_for_ops): Update.
6165         (enable_probes_command): Update.
6166         (disable_probes_command): Update.
6167         * break-catch-sig.c (catch_signal_split_args): Update.
6168         * mi/mi-parse.c (mi_parse): Update.
6169
6170 2017-09-11  Tom Tromey  <tom@tromey.com>
6171
6172         * language.h (language_enum): Make argument const.
6173         * language.c (language_enum): Make argument const.
6174
6175 2017-09-11  Tom Tromey  <tom@tromey.com>
6176
6177         * common/common-utils.h (skip_to_space): Remove macro, redeclare
6178         as function.
6179         (skip_to_space): Rename from skip_to_space_const.
6180         * common/common-utils.c (skip_to_space): New function.
6181         (skip_to_space): Rename from skip_to_space_const.
6182         * cli/cli-utils.h (get_number): Rename from get_number_const.
6183         (extract_arg): Rename from extract_arg_const.
6184         * cli/cli-utils.c (get_number): Rename from get_number_const.
6185         (extract_arg): Rename from extract_arg_const.
6186         (number_or_range_parser::get_number): Use ::get_number.
6187         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6188         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6189         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6190         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6191         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6192         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6193         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6194         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6195
6196 2017-09-11  Tom Tromey  <tom@tromey.com>
6197
6198         * python/python.c (do_start_initialization): Use
6199         py-event-types.def to initialize types.
6200         Define all object type structures.
6201         * python/python-internal.h: Don't declare event initialization
6202         functions.
6203         * python/py-threadevent.c (thread_event_object_type): Don't
6204         define.
6205         * python/py-stopevent.c (stop_event_object_type): Don't define.
6206         * python/py-signalevent.c (signal_event_object_type): Don't
6207         declare or define.
6208         * python/py-newobjfileevent.c (new_objfile_event_object_type)
6209         (clear_objfiles_event_object_type): Don't declare or define.
6210         * python/py-infevents.c (inferior_call_pre_event_object_type)
6211         (inferior_call_post_event_object_type)
6212         (register_changed_event_object_type)
6213         (memory_changed_event_object_type): Don't declare or define.
6214         * python/py-inferior.c (new_thread_event_object_type)
6215         (new_inferior_event_object_type)
6216         (inferior_deleted_event_object_type): Don't declare or define.
6217         * python/py-exitedevent.c (exited_event_object_type): Don't
6218         declare or define.
6219         * python/py-evts.c (gdbpy_initialize_py_events): Use
6220         py-all-events.def.
6221         * python/py-events.h (thread_event_object_type): Don't declare.
6222         (events_object): Use py-all-events.def.
6223         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
6224         py-event-types.def.
6225         * python/py-event-types.def: New file.
6226         * python/py-continueevent.c (create_continue_event_object): Don't
6227         declare or define.
6228         * python/py-bpevent.c (breakpoint_event_object_type): Don't
6229         declare or define.
6230         * python/py-all-events.def: New file.
6231
6232 2017-09-11  Tom Tromey  <tom@tromey.com>
6233
6234         * python/py-threadevent.c (create_thread_event_object): Return
6235         gdbpy_ref.
6236         * python/py-stopevent.h (create_stop_event_object)
6237         (create_breakpoint_event_object, create_signal_event_object):
6238         Update.
6239         * python/py-stopevent.c (create_stop_event_object): Return
6240         gdbpy_ref.
6241         (emit_stop_event): Update.
6242         * python/py-signalevent.c (create_signal_event_object): Return
6243         gdbpy_ref.
6244         * python/py-infevents.c (create_inferior_call_event_object):
6245         Update.
6246         * python/py-event.h (create_event_object)
6247         (create_thread_event_object): Update.
6248         * python/py-event.c (create_event_object): Return gdbpy_ref.
6249         * python/py-continueevent.c: Return gdbpy_ref.
6250         * python/py-bpevent.c (create_breakpoint_event_object): Return
6251         gdbpy_ref.
6252
6253 2017-09-11  Tom Tromey  <tom@tromey.com>
6254
6255         PR python/15622:
6256         * NEWS: Add entry.
6257         * python/python.c (do_start_initialization): Initialize new event
6258         types.
6259         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6260         (gdbpy_initialize_inferior_deleted_event)
6261         (gdbpy_initialize_new_thread_event): Declare.
6262         * python/py-threadevent.c (create_thread_event_object): Add option
6263         "thread" parameter.
6264         * python/py-inferior.c (new_thread_event_object_type)
6265         (new_inferior_event_object_type)
6266         (inferior_deleted_event_object_type): Declare.
6267         (python_new_inferior, python_inferior_deleted): New functions.
6268         (add_thread_object): Emit new_thread event.
6269         (gdbpy_initialize_inferior): Attach new functions to corresponding
6270         observers.
6271         (new_thread, new_inferior, inferior_deleted): Define new event
6272         types.
6273         * python/py-evts.c (gdbpy_initialize_py_events): Add new
6274         registries.
6275         * python/py-events.h (events_object) <new_inferior,
6276         inferior_deleted, new_thread>: New fields.
6277         * python/py-event.h (create_thread_event_breakpoint): Add optional
6278         "thread" parameter.
6279
6280 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6281
6282         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6283         check current_ui instead.
6284         (internal_vproblem): Likewise.
6285
6286 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
6287
6288         * thread.c (print_thread_info_1): Remove unnecessary calls to
6289         uiout->is_mi_like_p.
6290
6291 2017-09-09  Tom Tromey  <tom@tromey.com>
6292
6293         * namespace.h (add_using_directive): Update.
6294         * namespace.c (add_using_directive): Change type of excludes to
6295         std::vector.
6296         * dwarf2read.c (read_import_statement): Use std::vector.
6297         (read_namespace): Update.
6298         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6299
6300 2017-09-09  Tom Tromey  <tom@tromey.com>
6301
6302         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6303
6304 2017-09-09  Tom Tromey  <tom@tromey.com>
6305
6306         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6307
6308 2017-09-09  Tom Tromey  <tom@tromey.com>
6309
6310         * stack.c (func_command): Use gdb::def_vector.
6311
6312 2017-09-09  Tom Tromey  <tom@tromey.com>
6313
6314         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6315         ui_out_emit_list, ui_out_emit_tuple.
6316         (mi_cmd_var_update): Likewise.
6317
6318 2017-09-09  Tom Tromey  <tom@tromey.com>
6319
6320         * mi/mi-interp.c (mi_user_selected_context_changed): Use
6321         ui_out_redirect_pop.
6322         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6323         ui_out_redirect_pop.
6324         * utils.c (do_ui_out_redirect_pop)
6325         (make_cleanup_ui_out_redirect_pop): Remove.
6326         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6327         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6328         * ui-out.h (ui_out_redirect_pop): New class.
6329
6330 2017-09-09  Tom Tromey  <tom@tromey.com>
6331
6332         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6333         (list_available_thread_groups, mi_cmd_list_thread_groups)
6334         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6335         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6336         Likewise.
6337
6338 2017-09-09  Tom Tromey  <tom@tromey.com>
6339
6340         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6341         ui_out_emit_tuple.
6342
6343 2017-09-09  Tom Tromey  <tom@tromey.com>
6344
6345         * target.c (flash_erase_command): Use ui_out_emit_tuple.
6346         * stack.c (print_frame): Use ui_out_emit_tuple.
6347         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6348         (info_spu_mailbox_command, info_spu_dma_command)
6349         (info_spu_proxydma_command): Likewise.
6350         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6351         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6352         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6353         ui_out_emit_tuple.
6354         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6355
6356 2017-09-09  Tom Tromey  <tom@tromey.com>
6357
6358         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6359         (class ui_out_emit_table): Update comment.
6360         * ui-out.c (do_cleanup_table_end)
6361         (make_cleanup_ui_out_table_begin_end): Remove.
6362         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6363         (info_spu_dma_cmdlist): Likewise.
6364         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6365         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6366         ui_out_emit_table.
6367
6368 2017-09-09  Tom Tromey  <tom@tromey.com>
6369
6370         * thread.c (print_thread_info_1): Use ui_out_emit_table,
6371         ui_out_emit_list, gdb::optional.
6372
6373 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
6374
6375         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6376         prototype.
6377         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6378         prototype.
6379         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6380         prototype.
6381         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6382         * ada-exp.y: Remove _initialize_ada_exp prototype.
6383         * ada-lang.c: Remove _initialize_ada_language prototype.
6384         * ada-tasks.c: Remove _initialize_tasks prototype.
6385         * addrmap.c: Remove _initialize_addrmap prototype.
6386         * agent.c: Remove _initialize_agent prototype.
6387         * aix-thread.c: Remove _initialize_aix_thread prototype.
6388         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6389         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6390         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6391         prototype.
6392         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6393         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6394         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6395         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6396         prototype.
6397         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6398         prototype.
6399         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6400         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6401         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6402         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6403         prototype.
6404         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6405         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6406         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6407         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6408         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6409         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6410         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6411         prototype.
6412         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6413         prototype.
6414         * annotate.c: Remove _initialize_annotate prototype.
6415         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6416         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6417         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6418         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6419         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6420         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6421         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6422         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6423         prototype.
6424         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6425         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6426         * auto-load.c: Remove _initialize_auto_load prototype.
6427         * auxv.c: Remove _initialize_auxv prototype.
6428         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6429         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6430         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6431         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6432         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6433         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6434         prototype.
6435         * break-catch-throw.c: Remove _initialize_break_catch_throw
6436         prototype.
6437         * breakpoint.c: Remove _initialize_breakpoint prototype.
6438         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6439         * btrace.c: Remove _initialize_btrace prototype.
6440         * charset.c: Remove _initialize_charset prototype.
6441         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6442         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6443         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6444         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6445         * cli/cli-script.c: Remove _initialize_cli_script prototype.
6446         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6447         * coffread.c: Remove _initialize_coffread prototype.
6448         * compile/compile.c: Remove _initialize_compile prototype.
6449         * complaints.c: Remove _initialize_complaints prototype.
6450         * completer.c: Remove _initialize_completer prototype.
6451         * copying.awk: Remove _initialize_copying prototype.
6452         * copying.c: Regenerate.
6453         * core-regset.c: Remove _initialize_core_regset prototype.
6454         * corefile.c: Remove _initialize_core prototype.
6455         * corelow.c: Remove _initialize_corelow prototype.
6456         * cp-abi.c: Remove _initialize_cp_abi prototype.
6457         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6458         * cp-support.c: Remove _initialize_cp_support prototype.
6459         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6460         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6461         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6462         * ctf.c: Remove _initialize_ctf prototype.
6463         * d-lang.c: Remove _initialize_d_language prototype.
6464         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6465         prototype.
6466         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6467         * dbxread.c: Remove _initialize_dbxread prototype.
6468         * dcache.c: Remove _initialize_dcache prototype.
6469         * demangle.c: Remove _initialize_demangler prototype.
6470         * disasm-selftests.c: Remove _initialize_disasm_selftests
6471         prototype.
6472         * disasm.c: Remove _initialize_disasm prototype.
6473         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6474         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6475         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6476         prototype.
6477         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6478         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6479         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6480         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6481         * elfread.c: Remove _initialize_elfread prototype.
6482         * exec.c: Remove _initialize_exec prototype.
6483         * extension.c: Remove _initialize_extension prototype.
6484         * f-lang.c: Remove _initialize_f_language prototype.
6485         * f-valprint.c: Remove _initialize_f_valprint prototype.
6486         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6487         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6488         * filesystem.c: Remove _initialize_filesystem prototype.
6489         * findcmd.c: Remove _initialize_mem_search prototype.
6490         * fork-child.c: Remove _initialize_fork_child prototype.
6491         * frame-base.c: Remove _initialize_frame_base prototype.
6492         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6493         * frame.c: Remove _initialize_frame prototype.
6494         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6495         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6496         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6497         * gcore.c: Remove _initialize_gcore prototype.
6498         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6499         * gdbarch.c: Regenerate.
6500         * gdbarch.sh: Remove _initialize_gdbarch prototype.
6501         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6502         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6503         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6504         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6505         * go-lang.c: Remove _initialize_go_language prototype.
6506         * go32-nat.c: Remove _initialize_go32_nat prototype.
6507         * guile/guile.c: Remove _initialize_guile prototype.
6508         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6509         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6510         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6511         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6512         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6513         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6514         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6515         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6516         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6517         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6518         prototype.
6519         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6520         prototype.
6521         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6522         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6523         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6524         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6525         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6526         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6527         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6528         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6529         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6530         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6531         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6532         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6533         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6534         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6535         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6536         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6537         prototype.
6538         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6539         prototype.
6540         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6541         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6542         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6543         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6544         * infcall.c: Remove _initialize_infcall prototype.
6545         * infcmd.c: Remove _initialize_infcmd prototype.
6546         * inferior.c: Remove _initialize_inferiors prototype.
6547         * inflow.c: Remove _initialize_inflow prototype.
6548         * infrun.c: Remove _initialize_infrun prototype.
6549         * interps.c: Remove _initialize_interpreter prototype.
6550         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6551         * jit.c: Remove _initialize_jit prototype.
6552         * language.c: Remove _initialize_language prototype.
6553         * linux-fork.c: Remove _initialize_linux_fork prototype.
6554         * linux-nat.c: Remove _initialize_linux_nat prototype.
6555         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6556         * linux-thread-db.c: Remove _initialize_thread_db prototype.
6557         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6558         * m2-lang.c: Remove _initialize_m2_language prototype.
6559         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6560         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6561         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6562         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6563         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6564         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6565         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6566         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6567         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6568         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6569         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6570         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6571         * machoread.c: Remove _initialize_machoread prototype.
6572         * macrocmd.c: Remove _initialize_macrocmd prototype.
6573         * macroscope.c: Remove _initialize_macroscope prototype.
6574         * maint.c: Remove _initialize_maint_cmds prototype.
6575         * mdebugread.c: Remove _initialize_mdebugread prototype.
6576         * memattr.c: Remove _initialize_mem prototype.
6577         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6578         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6579         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6580         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6581         * mi/mi-main.c: Remove _initialize_mi_main prototype.
6582         * microblaze-linux-tdep.c: Remove
6583         _initialize_microblaze_linux_tdep prototype.
6584         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6585         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6586         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6587         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6588         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6589         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6590         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6591         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6592         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6593         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6594         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6595         prototype.
6596         * mipsread.c: Remove _initialize_mipsread prototype.
6597         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6598         prototype.
6599         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6600         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6601         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6602         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6603         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6604         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6605         prototype.
6606         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6607         * nto-procfs.c: Remove _initialize_procfs prototype.
6608         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6609         * objc-lang.c: Remove _initialize_objc_language prototype.
6610         * objfiles.c: Remove _initialize_objfiles prototype.
6611         * observer.c: Remove observer_test_first_notification_function,
6612         observer_test_second_notification_function,
6613         observer_test_third_notification_function, and
6614         _initialize_observer prototypes.
6615         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6616         * osabi.c: Remove _initialize_gdb_osabi prototype.
6617         * osdata.c: Remove _initialize_osdata prototype.
6618         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6619         * parse.c: Remove _initialize_parse prototype.
6620         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6621         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6622         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6623         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6624         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6625         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6626         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6627         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6628         * printcmd.c: Remove _initialize_printcmd prototype.
6629         * probe.c: Remove _initialize_probe prototype.
6630         * proc-api.c: Remove _initialize_proc_api prototype.
6631         * proc-events.c: Remove _initialize_proc_events prototype.
6632         * proc-service.c: Remove _initialize_proc_service prototype.
6633         * procfs.c: Remove _initialize_procfs prototype.
6634         * psymtab.c: Remove _initialize_psymtab prototype.
6635         * python/python.c: Remove _initialize_python prototype.
6636         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6637         * record-btrace.c: Remove _initialize_record_btrace prototype.
6638         * record-full.c: Remove _initialize_record_full prototype.
6639         * record.c: Remove _initialize_record prototype.
6640         * regcache.c: Remove _initialize_regcache prototype.
6641         * reggroups.c: Remove _initialize_reggroup prototype.
6642         * remote-notif.c: Remove _initialize_notif prototype.
6643         * remote-sim.c: Remove _initialize_remote_sim prototype.
6644         * remote.c: Remove _initialize_remote prototype.
6645         * reverse.c: Remove _initialize_reverse prototype.
6646         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6647         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6648         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6649         prototype.
6650         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6651         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6652         * rust-exp.y: Remove _initialize_rust_exp prototype.
6653         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6654         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6655         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6656         * score-tdep.c: Remove _initialize_score_tdep prototype.
6657         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6658         prototype.
6659         * ser-go32.c: Remove _initialize_ser_dos prototype.
6660         * ser-mingw.c: Remove _initialize_ser_windows prototype.
6661         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6662         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6663         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6664         * serial.c: Remove _initialize_serial prototype.
6665         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6666         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6667         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6668         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6669         * skip.c: Remove _initialize_step_skip prototype.
6670         * sol-thread.c: Remove _initialize_sol_thread prototype.
6671         * solib-aix.c: Remove _initialize_solib_aix prototype.
6672         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6673         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6674         * solib-frv.c: Remove _initialize_frv_solib prototype.
6675         * solib-spu.c: Remove _initialize_spu_solib prototype.
6676         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6677         * solib-target.c: Remove _initialize_solib_target prototype.
6678         * solib.c: Remove _initialize_solib prototype.
6679         * source.c: Remove _initialize_source prototype.
6680         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6681         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6682         prototype.
6683         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6684         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6685         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6686         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6687         prototype.
6688         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6689         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6690         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6691         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6692         prototype.
6693         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6694         prototype.
6695         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6696         prototype.
6697         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6698         prototype.
6699         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6700         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6701         prototype.
6702         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6703         prototype.
6704         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6705         prototype.
6706         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6707         prototype.
6708         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6709         prototype.
6710         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6711         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6712         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6713         * stabsread.c: Remove _initialize_stabsread prototype.
6714         * stack.c: Remove _initialize_stack prototype.
6715         * stap-probe.c: Remove _initialize_stap_probe prototype.
6716         * std-regs.c: Remove _initialize_frame_reg prototype.
6717         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6718         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6719         * symfile.c: Remove _initialize_symfile prototype.
6720         * symmisc.c: Remove _initialize_symmisc prototype.
6721         * symtab.c: Remove _initialize_symtab prototype.
6722         * target-dcache.c: Remove _initialize_target_dcache prototype.
6723         * target-descriptions.c: Remove _initialize_target_descriptions
6724         prototype.
6725         * thread.c: Remove _initialize_thread prototype.
6726         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6727         prototype.
6728         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6729         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6730         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6731         prototype.
6732         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6733         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6734         * tracefile.c: Remove _initialize_tracefile prototype.
6735         * tracepoint.c: Remove _initialize_tracepoint prototype.
6736         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6737         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6738         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6739         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6740         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6741         * tui/tui-win.c: Remove _initialize_tui_win prototype.
6742         * tui/tui.c: Remove _initialize_tui prototype.
6743         * typeprint.c: Remove _initialize_typeprint prototype.
6744         * user-regs.c: Remove _initialize_user_regs prototype.
6745         * utils.c: Remove _initialize_utils prototype.
6746         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6747         * valarith.c: Remove _initialize_valarith prototype.
6748         * valops.c: Remove _initialize_valops prototype.
6749         * valprint.c: Remove _initialize_valprint prototype.
6750         * value.c: Remove _initialize_values prototype.
6751         * varobj.c: Remove _initialize_varobj prototype.
6752         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6753         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6754         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6755         * windows-nat.c: Remove _initialize_windows_nat,
6756         _initialize_check_for_gdb_ini, and _initialize_loadable
6757         prototypes.
6758         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6759         * xcoffread.c: Remove _initialize_xcoffread prototype.
6760         * xml-support.c: Remove _initialize_xml_support prototype.
6761         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6762         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6763         prototype.
6764         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6765         prototype.
6766         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6767
6768 2017-09-08  Keith Seitz  <keiths@redhat.com>
6769
6770         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6771         field.
6772
6773 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6774
6775         * f-valprint.c (f_val_print): Remove check for one byte
6776         sized integers. Remove printing of character type.
6777
6778 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6779             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6780             Bernhard Heckel  <bernhard.heckel@intel.com>
6781
6782         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6783         to maintain proper indentation when printing pointers/refs.
6784
6785 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6786
6787         GDB 8.0.1 released.
6788
6789 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6790
6791         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6792
6793 2017-09-05  Tom Tromey  <tom@tromey.com>
6794
6795         * parse.c (funcall_chain): Now a std::vector.
6796         (start_arglist, end_arglist): Simplify.
6797         (free_funcalls): Remove.
6798         (parse_exp_in_context_1): Remove cleanup.
6799
6800 2017-09-05  Tom Tromey  <tom@tromey.com>
6801
6802         * go-exp.y (go_parse): Don't create a cleanup.
6803
6804 2017-09-05  Tom Tromey  <tom@tromey.com>
6805
6806         * d-exp.y (PrimaryExpression): Use std::string.
6807         (d_parse): Don't create a cleanup.
6808
6809 2017-09-05  Tom Tromey  <tom@tromey.com>
6810
6811         * utils.c (do_clear_parser_state): Remove.
6812         (make_cleanup_clear_parser_state): Remove.
6813         * p-exp.y (pascal_parse): Use scoped_restore.
6814         * m2-exp.y (m2_parse): Use scoped_restore.
6815         * f-exp.y (f_parse): Use scoped_restore.
6816         * d-exp.y (d_parse): Use scoped_restore.
6817         * c-exp.y (c_parse): Use scoped_restore.
6818         * ada-exp.y (ada_parse): Use scoped_restore.
6819         * utils.h (make_cleanup_clear_parser_state): Remove.
6820
6821 2017-09-06  Keith Seitz  <keiths@redhat.com>
6822
6823         * dwarf2read.c (dw2_linkage_name_attr): New function.
6824         (dw2_linkage_name): New function.
6825         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6826         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6827         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6828
6829 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6830
6831         * config/djgpp/djconfig.sh: Correct shell portability issue.
6832
6833 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6834
6835         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6836
6837 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6838
6839         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6840         * NEWS: Mention new FreeBSD/mips native configuration.
6841         * configure.host: Add aarch64*-*-freebsd*.
6842         * configure.nat: Likewise.
6843         * aarch64-fbsd-nat.c: New file.
6844
6845 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6846
6847         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6848         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6849         * NEWS: Mention new FreeBSD/aarch64 target.
6850         * configure.tgt: Add aarch64*-*-freebsd*.
6851         * aarch64-fbsd-tdep.c: New file.
6852         * aarch64-fbsd-tdep.h: New file.
6853
6854 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6855
6856         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6857
6858 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6859
6860         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6861         of TLS symbols.
6862
6863 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6864
6865         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6866         call.
6867
6868 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6869
6870         * infrun.c (follow_exec): Call add_thread after
6871         target_find_description.
6872
6873 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6874
6875         * infrun.c (handle_inferior_event_1): When exec'ing, read
6876         stop_pc after follow_exec.
6877
6878 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6879
6880         * remote.c (process_g_packet): Update error message.
6881
6882 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6883
6884         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6885         targets.
6886
6887 2017-09-05  Pedro Alves  <palves@redhat.com>
6888
6889         * eval.c (eval_call, evaluate_funcall): New functions, factored
6890         out from ...
6891         (evaluate_subexp_standard): ... this.
6892
6893 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6894
6895         * amd64-tdep.c (amd64_target_description): Create target
6896         descriptions.
6897         (_initialize_amd64_tdep): Don't call functions
6898         initialize_tdesc_amd64_*.  Add self tests.
6899         * arch/amd64.c (amd64_create_target_description): Add parameter
6900         is_linux.  Call set_tdesc_osabi if is_linux is true.
6901         * arch/amd64.h (amd64_create_target_description): Update the
6902         declaration.
6903         * arch/i386.c (i386_create_target_description): Add parameter
6904         is_linux.  Call set_tdesc_osabi if is_linux is true.
6905         * arch/i386.h (i386_create_target_description): Update
6906         declaration.
6907         * configure.tgt: Add i386.o to gdb_target_obs.
6908         * features/Makefile (XMLTOC): Remove i386/*.xml.
6909         * features/i386/amd64-avx-avx512.c: Remove.
6910         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6911         * features/i386/amd64-avx-mpx.c: Remove.
6912         * features/i386/amd64-avx.c: Remove.
6913         * features/i386/amd64-mpx.c: Remove.
6914         * features/i386/amd64.c: Remove.
6915         * features/i386/i386-avx-avx512.c: Remove.
6916         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6917         * features/i386/i386-avx-mpx.c: Remove.
6918         * features/i386/i386-avx.c: Remove.
6919         * features/i386/i386-mmx.c: Remove.
6920         * features/i386/i386-mpx.c: Remove.
6921         * features/i386/i386.c: Remove.
6922         * i386-tdep.c: Don't include features/i386/i386*.c., include
6923         target-descriptions.h and arch/i386.h.
6924         (i386_target_description): Create target descriptions.
6925         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6926         functions.  Do self tests.
6927
6928 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6929
6930         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6931         * features/i386/amd64-avx-avx512-linux.c: Removed.
6932         * features/i386/amd64-avx-linux.c: Removed.
6933         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6934         * features/i386/amd64-avx-mpx-linux.c: Removed.
6935         * features/i386/amd64-linux.c: Removed.
6936         * features/i386/amd64-mpx-linux.c: Removed.
6937         * features/i386/x32-avx-avx512-linux.c: Removed.
6938         * features/i386/x32-avx-linux.c: Removed.
6939         * features/i386/x32-linux.c: Removed.
6940
6941 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6942
6943         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6944         features/i386/*.c.
6945         (amd64_linux_read_description): Call
6946         amd64_create_target_description.
6947         * arch/amd64.c: New file.
6948         * arch/amd64.h: New file.
6949         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6950         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6951
6952 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6953
6954         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6955         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6956         (amd64_linux_read_description): Create target descriptions.
6957         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6958         functions.  Add unit tests.
6959         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6960         x32-core.xml.
6961         * features/i386/64bit-avx.c: Generated.
6962         * features/i386/64bit-avx512.c: Generated.
6963         * features/i386/64bit-core.c: Generated.
6964         * features/i386/64bit-linux.c: Generated.
6965         * features/i386/64bit-mpx.c: Generated.
6966         * features/i386/64bit-pkeys.c: Generated.
6967         * features/i386/64bit-segments.c: Generated.
6968         * features/i386/64bit-sse.c: Generated.
6969         * features/i386/x32-core.c: Generated.
6970         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6971         c files for amd64-linux and x32-linux.
6972
6973 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6974
6975         * amd64-linux-tdep.c (amd64_linux_read_description): New
6976         function.
6977         (amd64_linux_core_read_description): Call
6978         amd64_linux_read_description.
6979         (amd64_linux_init_abi): Likewise.
6980         (amd64_x32_linux_init_abi): Likewise.
6981         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6982         * x86-linux-nat.c (x86_linux_read_description): Call
6983         amd64_linux_read_description.
6984
6985 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6986
6987         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6988         comments.
6989
6990 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6991
6992         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6993         * features/i386/i386-avx-avx512-linux.c: Remove.
6994         * features/i386/i386-avx-linux.c: Remove.
6995         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6996         * features/i386/i386-avx-mpx-linux.c: Remove.
6997         * features/i386/i386-linux.c: Remove.
6998         * features/i386/i386-mmx-linux.c: Remove.
6999         * features/i386/i386-mpx-linux.c: Remove.
7000
7001 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7002
7003         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7004         (SFILES): Add arch/i386.c.
7005         (HFILES_NO_SRCDIR): Add arch/i386.h.
7006         * arch/i386.c: New file.
7007         * arch/i386.h: New file.
7008         * arch/tdesc.h (allocate_target_description): Declare.
7009         (set_tdesc_architecture): Declare.
7010         (set_tdesc_osabi): Declare.
7011         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7012         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7013         include arch/i386.h.
7014         (i386_linux_read_description): Remove code and call
7015         i386_create_target_description.
7016         (set_tdesc_architecture): New function.
7017         (set_tdesc_osabi): New function.
7018         * target-descriptions.h (allocate_target_description): Remove.
7019
7020 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7021
7022         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7023         * target-descriptions.c (tdesc_create_feature): Likewise, and
7024         adjust code.
7025         * features/i386/32bit-avx.c: Re-generated.
7026         * features/i386/32bit-avx512.c: Re-generated.
7027         * features/i386/32bit-core.c: Re-generated.
7028         * features/i386/32bit-linux.c: Re-generated.
7029         * features/i386/32bit-mpx.c: Re-generated.
7030         * features/i386/32bit-pkeys.c: Re-generated.
7031         * features/i386/32bit-sse.c: Re-generated.
7032
7033 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7034
7035         * regformats/regdef.h (struct reg): Override operator == and !=.
7036
7037 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7038
7039         * arch/tdesc.h: New file.
7040         * regformats/regdat.sh: Generate code using tdesc_create_reg.
7041         * target-descriptions.c: Update comments.
7042         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
7043         declarations.
7044         * features/i386/32bit-avx.c: Re-generated.
7045         * features/i386/32bit-avx512.c: Re-generated.
7046         * features/i386/32bit-core.c: Re-generated.
7047         * features/i386/32bit-linux.c: Re-generated.
7048         * features/i386/32bit-mpx.c: Re-generated.
7049         * features/i386/32bit-pkeys.c: Re-generated.
7050         * features/i386/32bit-sse.c: Re-generated.
7051
7052 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7053
7054         * regformats/regdat.sh: Update generated code.
7055
7056 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7057
7058         * regformats/regdat.sh: Adjust code order.
7059
7060 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7061
7062         * expprint.c (dump_subexp_body_standard): Use constant format
7063         string in fprintf_filtered call.
7064
7065 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7066
7067         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7068         NetBSD/i386.
7069         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7070
7071 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7072
7073         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7074
7075 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7076
7077         * bsd-kvm.o: Define _KMEMUSER.
7078         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7079         * configure: Regenerate.
7080
7081 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7082
7083         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7084         * i386-fbsd-nat.c: Likewise.
7085
7086 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7087
7088         * unittests/array-view-selftests.c: Add include of <array>.
7089
7090 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7091
7092         * spu-tdep.c (flush_ea_cache): Add missing argument to
7093         call_function_by_hand.
7094
7095 2017-09-04  Pedro Alves  <palves@redhat.com>
7096
7097         * NEWS (Safer support for debugging with no debug info): New.
7098
7099 2017-09-04  Pedro Alves  <palves@redhat.com>
7100
7101         * c-exp.y (function_method, function_method_void): Add current
7102         instance flags to TYPE_INSTANCE.
7103         * dwarf2read.c (check_modifier): New.
7104         (compute_delayed_physnames): Assert that only C++ adds delayed
7105         physnames.  Mark fn_fields as const/volatile depending on
7106         physname.
7107         * eval.c (make_params): New type_instance_flags parameter.  Use
7108         it as the new type's instance flags.
7109         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7110         flags element and pass it to make_params.
7111         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7112         instance flags element.
7113         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7114         * gdbtypes.h: Include "enum-flags.h".
7115         (type_instance_flags): New enum-flags type.
7116         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7117         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7118         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7119         (follow_type_instance_flags): New function.
7120         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7121         * parser-defs.h (follow_type_instance_flags): Declare.
7122         * valops.c (value_struct_elt_for_reference): const/volatile must
7123         match too.
7124
7125 2017-09-04  Pedro Alves  <palves@redhat.com>
7126
7127         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7128         function/method scopes; lookup the nested name as a function local
7129         static variable.
7130
7131 2017-09-04  Pedro Alves  <palves@redhat.com>
7132
7133         (%type <voidval>): Add function_method.
7134         * c-exp.y (exp): New production for calls with no arguments.
7135         (function_method, function_method_void_or_typelist): New
7136         productions.
7137         (exp): New production for "method()::static_var".
7138         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7139         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7140         Handle OP_FUNC_STATIC_VAR.
7141         * parse.c (operator_length_standard):
7142         Handle OP_FUNC_STATIC_VAR.
7143
7144 2017-09-04  Pedro Alves  <palves@redhat.com>
7145
7146         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7147         handling.
7148         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7149         Ditto.
7150         * parse.c (operator_length_standard, operator_check_standard):
7151         Ditto.
7152         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7153
7154 2017-09-04  Pedro Alves  <palves@redhat.com>
7155
7156         * ax-gdb.c: Include "typeprint.h".
7157         (gen_expr_for_cast): New function.
7158         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7159         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7160         type is unknown.
7161         * dwarf2read.c (new_symbol_full): Fallback to int instead of
7162         nodebug_data_symbol.
7163         * eval.c: Include "typeprint.h".
7164         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7165         Error out if symbol has unknown type.
7166         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7167         evaluate_subexp_for_cast.
7168         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7169         OP_VAR_MSYM_VALUE.
7170         (evaluate_subexp_for_cast): New function.
7171         * gdbtypes.c (init_nodebug_var_type): New function.
7172         (objfile_type): Use it to initialize types of variables with no
7173         debug info.
7174         * typeprint.c (error_unknown_type): New.
7175         * typeprint.h (error_unknown_type): New declaration.
7176         * compile/compile-c-types.c (convert_type_basic): Handle
7177         TYPE_CODE_ERROR; warn and fallback to int for variables with
7178         unknown type.
7179
7180 2017-09-04  Pedro Alves  <palves@redhat.com>
7181
7182         * eval.c (evaluate_var_value): New function, factored out from ...
7183         (evaluate_subexp_standard): ... here.
7184
7185 2017-09-04  Pedro Alves  <palves@redhat.com>
7186
7187         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7188         Remove useless assignments to 'op'.
7189
7190 2017-09-04  Pedro Alves  <palves@redhat.com>
7191
7192         * eval.c (eval_skip_value): New function.
7193         (evaluate_subexp_standard): Use it.
7194
7195 2017-09-04  Pedro Alves  <palves@redhat.com>
7196
7197         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7198         function name from symbol/minsym and pass it to
7199         error_call_unknown_return_type.
7200
7201 2017-09-04  Pedro Alves  <palves@redhat.com>
7202
7203         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7204         * ax-gdb.c (gen_msym_var_ref): New function.
7205         (gen_expr): Handle OP_VAR_MSYM_VALUE.
7206         * eval.c (evaluate_var_msym_value): New function.
7207         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7208         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7209         to call_function_by_hand.
7210         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7211         Handle OP_VAR_MSYM_VALUE.
7212         (union exp_element) <msymbol>: New field.
7213         * minsyms.h (struct type): Forward declare.
7214         (find_minsym_type_and_address): Declare.
7215         * parse.c (write_exp_elt_msym): New function.
7216         (write_exp_msymbol): Delete, refactored as ...
7217         (find_minsym_type_and_address): ... this new function.
7218         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7219         (operator_length_standard, operator_check_standard): Handle
7220         OP_VAR_MSYM_VALUE.
7221         * std-operator.def (OP_VAR_MSYM_VALUE): New.
7222
7223 2017-09-04  Pedro Alves  <palves@redhat.com>
7224
7225         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7226         TYPE_GNU_IFUNC specially here.  Throw error if return type is
7227         unknown.
7228         * ada-typeprint.c (print_func_type): Handle functions with unknown
7229         return type.
7230         * c-typeprint.c (c_type_print_base): Handle functions and methods
7231         with unknown return type.
7232         * compile/compile-c-symbols.c (convert_symbol_bmsym)
7233         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7234         * compile/compile-c-types.c: Include "objfiles.h".
7235         (convert_func): For functions with unknown return type, warn and
7236         default to int.
7237         * compile/compile-object-run.c (compile_object_run): Adjust call
7238         to call_function_by_hand_dummy.
7239         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7240         call_function_by_hand.
7241         * eval.c (evaluate_subexp_standard): Adjust calls to
7242         call_function_by_hand.  Handle functions and methods with unknown
7243         return type.  Pass expect_type to call_function_by_hand.
7244         * f-typeprint.c (f_type_print_base): Handle functions with unknown
7245         return type.
7246         * gcore.c (call_target_sbrk): Adjust call to
7247         call_function_by_hand.
7248         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7249         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
7250         an integer address type instead of nodebug.
7251         * guile/scm-value.c (gdbscm_value_call): Adjust call to
7252         call_function_by_hand.
7253         * infcall.c (error_call_unknown_return_type): New function.
7254         (call_function_by_hand): New "default_return_type" parameter.
7255         Pass it down.
7256         (call_function_by_hand_dummy): New "default_return_type"
7257         parameter.  Use it instead of defaulting to int.  If there's no
7258         default and the return type is unknown, throw an error.  If
7259         there's a default return type, and the called function has no
7260         debug info, then assume the function is prototyped.
7261         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7262         New "default_return_type" parameter.
7263         (error_call_unknown_return_type): New declaration.
7264         * linux-fork.c (call_lseek): Cast return type of lseek.
7265         (inferior_call_waitpid, checkpoint_command): Adjust calls to
7266         call_function_by_hand.
7267         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7268         calls to call_function_by_hand.
7269         * m2-typeprint.c (m2_procedure): Handle functions with unknown
7270         return type.
7271         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7272         (value_nsstring, print_object_command): Adjust calls to
7273         call_function_by_hand.
7274         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7275         functions with unknown return type.
7276         (pascal_type_print_func_varspec_suffix): New function.
7277         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7278         TYPE_CODE_METHOD>: Use it.
7279         * python/py-value.c (valpy_call): Adjust call to
7280         call_function_by_hand.
7281         * rust-lang.c (rust_evaluate_funcall): Adjust call to
7282         call_function_by_hand.
7283         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7284         call_function_by_hand.
7285         * valops.c (value_allocate_space_in_inferior): Adjust call to
7286         call_function_by_hand.
7287         * typeprint.c (type_print_unknown_return_type): New function.
7288         * typeprint.h (type_print_unknown_return_type): New declaration.
7289
7290 2017-09-04  Pedro Alves  <palves@redhat.com>
7291
7292         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7293         types with more than one parameter as prototyped.
7294
7295 2017-09-04  Pedro Alves  <palves@redhat.com>
7296
7297         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7298         (disassemble_command): Use gdb_disassembly_flags instead of bare
7299         int.
7300         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7301         (dump_insns, do_mixed_source_and_assembly_deprecated)
7302         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7303         Use gdb_disassembly_flags instead of bare int.
7304         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7305         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7306         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7307         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
7308         (enum gdb_disassembly_flag): ... values of this new enumeration.
7309         (gdb_disassembly_flags): Define.
7310         (gdb_disassembly)
7311         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7312         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7313         gdb_disassembly_flags instead of bare int.
7314         * record-btrace.c (btrace_insn_history)
7315         (record_btrace_insn_history, record_btrace_insn_history_range)
7316         (record_btrace_insn_history_from): Use gdb_disassembly_flags
7317         instead of bare int.
7318         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7319         Use gdb_disassembly_flags instead of bare int.
7320         * target-debug.h (target_debug_print_gdb_disassembly_flags):
7321         Define.
7322         * target-delegates.c: Regenerate.
7323         * target.c (target_insn_history, target_insn_history_from)
7324         (target_insn_history_range): Use gdb_disassembly_flags instead of
7325         bare int.
7326         * target.h: Include "disasm.h".
7327         (struct target_ops) <to_insn_history, to_insn_history_from,
7328         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7329         int.
7330         (target_insn_history, target_insn_history_from)
7331         (target_insn_history_range): Use gdb_disassembly_flags instead of
7332         bare int.
7333
7334 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7335
7336         * cli/cli-script.c (build_command_line): For if/while commands,
7337         check whether args is empty.
7338
7339 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7340
7341         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7342         (enum command_control_type): Likewise.
7343         (struct command_line): Likewise.
7344         (free_command_lines): Likewise.
7345         (struct command_lines_deleter): Likewise.
7346         (command_line_up): Likewise.
7347         (read_command_lines): Likewise.
7348         (read_command_lines_1): Likewise.
7349         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7350         (enum command_control_type): Likewise.
7351         (struct command_line): Likewise.
7352         (free_command_lines): Likewise.
7353         (struct command_lines_deleter): Likewise.
7354         (command_line_up): Likewise.
7355         (read_command_lines): Likewise.
7356         (read_command_lines_1): Likewise.
7357         * breakpoint.h: Include cli/cli-script.h.
7358         * extension-priv.h: Likewise.
7359         * gdbcmd.h: Likewise.
7360
7361 2017-09-04  Pedro Alves  <palves@redhat.com>
7362
7363         * ada-lang.c (is_known_support_routine): Move sal declaration to
7364         where it is initialized.
7365         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7366         (parse_breakpoint_sals, decode_static_tracepoint_spec)
7367         (clear_command, update_static_tracepoint): Remove init_sal
7368         references.  Move declarations closer to initializations.
7369         * cli/cli-cmds.c (list_command): Move sal declarations closer to
7370         initializations.
7371         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7372         references.  Move sal declarations closer to initializations.
7373         * frame.c (find_frame_sal): Return a symtab_and_line via function
7374         return instead of output parameter.  Remove init_sal references.
7375         * frame.h (find_frame_sal): Return a symtab_and_line via function
7376         return instead of output parameter.
7377         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7378         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7379         instead of memset.
7380         (gdbscm_find_pc_line): Remove init_sal reference.
7381         * infcall.c (call_function_by_hand_dummy): Remove init_sal
7382         references.  Move declarations closer to initializations.
7383         * infcmd.c (set_step_frame): Update.  Move declarations closer to
7384         initializations.
7385         (finish_backward): Remove init_sal references.  Move declarations
7386         closer to initializations.
7387         * infrun.c (process_event_stop_test, handle_step_into_function)
7388         (insert_hp_step_resume_breakpoint_at_frame)
7389         (insert_step_resume_breakpoint_at_caller): Likewise.
7390         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7391         (symbol_to_sal): Likewise.
7392         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7393         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7394         to its initialization.
7395         * reverse.c (save_bookmark_command): Use new/delete.  Remove
7396         init_sal references.  Move declarations closer to initializations.
7397         * source.c (get_current_source_symtab_and_line): Remove brace
7398         initialization.
7399         (set_current_source_symtab_and_line): Now takes the sal by const
7400         reference.  Remove brace initialization.
7401         (line_info): Remove init_sal reference.
7402         * source.h (set_current_source_symtab_and_line): Now takes a
7403         symtab_and_line via const reference.
7404         * stack.c (set_current_sal_from_frame): Adjust.
7405         (print_frame_info): Adjust.
7406         (get_last_displayed_sal): Return the sal via function return
7407         instead of via output parameter.  Simplify.
7408         (frame_info): Adjust.
7409         * stack.h (get_last_displayed_sal): Return the sal via function
7410         return instead of via output parameter.
7411         * symtab.c (init_sal): Delete.
7412         (find_pc_sect_line): Remove init_sal references.  Move
7413         declarations closer to initializations.
7414         (find_function_start_sal): Remove init_sal references.  Move
7415         declarations closer to initializations.
7416         * symtab.h (struct symtab_and_line): In-class initialize all
7417         fields.
7418         * tracepoint.c (set_traceframe_context)
7419         (print_one_static_tracepoint_marker): Remove init_sal references.
7420         Move declarations closer to initializations.
7421         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7422         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
7423         declarations closer to initializations.
7424         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7425         init_sal references.  Adjust.
7426
7427 2017-09-04  Pedro Alves  <palves@redhat.com>
7428
7429         * ax-gdb.c (agent_command_1): Use range-for.
7430         * break-catch-throw.c (re_set_exception_catchpoint): Update.
7431         * breakpoint.c: Include "common/array-view.h".
7432         (init_breakpoint_sal, create_breakpoint_sal): Change sals
7433         parameter from struct symtabs_and_lines to
7434         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
7435         (breakpoint_sals_to_pc): Change sals parameter from struct
7436         symtabs_and_lines to std::vector reference.
7437         (check_fast_tracepoint_sals): Change sals parameter from struct
7438         symtabs_and_lines to std::array_view.  Use range-for.
7439         (decode_static_tracepoint_spec): Return a std::vector instead of
7440         symtabs_and_lines.  Update.
7441         (create_breakpoint): Update.
7442         (break_range_command, until_break_command, clear_command): Update.
7443         (base_breakpoint_decode_location, bkpt_decode_location)
7444         (bkpt_probe_create_sals_from_location)
7445         (bkpt_probe_decode_location, tracepoint_decode_location)
7446         (tracepoint_probe_decode_location)
7447         (strace_marker_create_sals_from_location): Return a std::vector
7448         instead of symtabs_and_lines.
7449         (strace_marker_create_breakpoints_sal): Update.
7450         (strace_marker_decode_location): Return a std::vector instead of
7451         symtabs_and_lines.  Update.
7452         (update_breakpoint_locations): Change struct symtabs_and_lines
7453         parameters to gdb::array_view.  Adjust.
7454         (location_to_sals): Return a std::vector instead of
7455         symtabs_and_lines.  Update.
7456         (breakpoint_re_set_default): Use std::vector instead of struct
7457         symtabs_and_lines.
7458         (decode_location_default): Return a std::vector instead of
7459         symtabs_and_lines.  Update.
7460         * breakpoint.h: Include "common/array-view.h".
7461         (struct breakpoint_ops) <decode_location>: Now returns a
7462         std::vector instead of returning a symtabs_and_lines via output
7463         parameter.
7464         (update_breakpoint_locations): Change sals parameters to use
7465         gdb::array_view.
7466         * cli/cli-cmds.c (edit_command, list_command): Update to use
7467         std::vector and gdb::array_view.
7468         (ambiguous_line_spec): Adjust to use gdb::array_view and
7469         range-for.
7470         (compare_symtabs): Rename to ...
7471         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
7472         const reference and adjust.
7473         (filter_sals): Rewrite using std::vector and standard algorithms.
7474         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7475         (jump_command): Update to use std::vector.
7476         * linespec.c (struct linespec_state) <canonical_names>: Update
7477         comment.
7478         (add_sal_to_sals_basic): Delete.
7479         (add_sal_to_sals, filter_results, convert_results_to_lsals)
7480         (decode_line_2, create_sals_line_offset)
7481         (convert_address_location_to_sals, convert_linespec_to_sals)
7482         (convert_explicit_location_to_sals, parse_linespec)
7483         (event_location_to_sals, decode_line_full, decode_line_1)
7484         (decode_line_with_current_source)
7485         (decode_line_with_last_displayed, decode_objc)
7486         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7487         (linespec_result::~linespec_result): Adjust to use std::vector
7488         instead of symtabs_and_lines.
7489         * linespec.h (linespec_sals::sals): Now a std::vector.
7490         (struct linespec_result): Use std::vector, bool, and in-class
7491         initialization.
7492         (decode_line_1, decode_line_with_current_source)
7493         (decode_line_with_last_displayed): Return std::vector.
7494         * macrocmd.c (info_macros_command): Use std::vector.
7495         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7496         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7497         std::vector.
7498         * probe.h (parse_probes): Return a std::vector.
7499         * python/python.c (gdbpy_decode_line): Use std::vector and
7500         gdb::array_view.
7501         * source.c (select_source_symtab, line_info): Use std::vector.
7502         * stack.c (func_command): Use std::vector.
7503         * symtab.h (struct symtabs_and_lines): Delete.
7504         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7505
7506 2017-09-04  Pedro Alves  <palves@redhat.com>
7507
7508         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7509         unittests/array-view-selftests.c.
7510         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7511         * common/array-view.h: New file.
7512         * unittests/array-view-selftests.c: New file.
7513
7514 2017-09-04  Pedro Alves  <palves@redhat.com>
7515
7516         * cli/cli-cmds.c (edit_command): Pass message to
7517         ambiguous_line_spec.
7518         (list_command): Pass message to ambiguous_line_spec.  Say
7519         "first"/"last" instead of "start" and "end" to be consistent with
7520         the manual.
7521         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
7522         them to print formatted message.
7523
7524 2017-09-04  Pedro Alves  <palves@redhat.com>
7525
7526         * btrace.c (ftrace_add_pt): Pass btrace_insn to
7527         ftrace_update_insns by reference instead of pointer.
7528
7529 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7530
7531         * i386-go32-tdep.c: Include x86-xstate.h.
7532         (i386_go32_init_abi): Call i386_target_description.
7533         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7534         if xcr0 is X86_XSTATE_X87_MASK.
7535         * i386-tdep.h (tdesc_i386): Remove the declaration.
7536         (tdesc_i386_mmx): Likewise.
7537
7538 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7539
7540         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7541         X86_XSTATE_SSE_MASK instead of 0.
7542
7543 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7544
7545         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7546         i386_target_description.
7547         * i386-fbsd-nat.c (i386fbsd_read_description): Call
7548         i386_target_description.
7549         * i386-tdep.c (i386_gdbarch_init): Likewise.
7550
7551 2017-09-04  Yao Qi  <yao.qi@linaro.org>
7552
7553         * amd64-darwin-tdep.c: Include "x86-xstate.h".
7554         (x86_darwin_init_abi_64): Call amd64_target_description.
7555         * amd64-dicos-tdep.c: Likewise.
7556         * amd64-fbsd-nat.c: Likewise.
7557         * amd64-fbsd-tdep.c: Likewise.
7558         * amd64-nbsd-tdep.c: Likewise.
7559         * amd64-obsd-tdep.c: Likewise.
7560         * amd64-sol2-tdep.c: Likewise.
7561         * amd64-windows-tdep.c: Likewise.
7562         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7563
7564 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7565
7566         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7567         (btrace_function) <insn>: Change type to use std::vector.
7568         * btrace.c (ftrace_debug, ftrace_call_num_insn,
7569         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7570         ftrace_update_insns, ftrace_compute_global_level_offset,
7571         btrace_stitch_bts, btrace_clear, btrace_insn_get,
7572         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7573         change to std::vector.
7574         (ftrace_update_insns): Adjust to change to std::vector, change
7575         type of INSN parameter.
7576         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7577         * record-btrace.c (btrace_call_history_insn_range,
7578         btrace_compute_src_line_range,
7579         record_btrace_frame_prev_register): Adjust to change to
7580         std::vector.
7581         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7582         to change to std::vector.
7583
7584 2017-09-03  Tom Tromey  <tom@tromey.com>
7585
7586         * corefile.c (reopen_exec_file): Use std::string.
7587
7588 2017-09-03  Tom Tromey  <tom@tromey.com>
7589
7590         * compile/compile.c (compile_register_name_mangled): Return
7591         std::string.
7592         * compile/compile-loc2c.c (pushf_register_address): Update.
7593         (pushf_register): Update.
7594         * compile/compile-c-types.c (convert_array): Update.
7595         * compile/compile-c-symbols.c (generate_vla_size): Update.
7596         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7597         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7598         (convert_one_symbol): Update.
7599         (generate_c_for_for_one_variable): Update.
7600         * compile/compile-c-support.c (c_get_range_decl_name): Return a
7601         std::string.
7602         (generate_register_struct): Update.
7603         * compile/compile-internal.h (c_get_range_decl_name): Return a
7604         std::string.
7605         (compile_register_name_mangled): Return std::string.
7606
7607 2017-09-03  Tom Tromey  <tom@tromey.com>
7608
7609         * utils.c (perror_string): Return a std::string.
7610         (throw_perror_with_name, perror_warning_with_name): Update.
7611
7612 2017-09-03  Tom Tromey  <tom@tromey.com>
7613
7614         * demangle.c (demangle_command): Use std::string,
7615         unique_xmalloc_ptr.
7616
7617 2017-09-03  Tom Tromey  <tom@tromey.com>
7618
7619         * cli/cli-setshow.c (do_set_command): Use std::string.
7620
7621 2017-09-03  Tom Tromey  <tom@tromey.com>
7622
7623         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7624
7625 2017-09-03  Tom Tromey  <tom@tromey.com>
7626
7627         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7628
7629 2017-09-03  Tom Tromey  <tom@tromey.com>
7630
7631         * mi/mi-cmd-env.c (env_execute_cli_command): Use
7632         gdb::unique_xmalloc_ptr.
7633
7634 2017-09-03  Tom Tromey  <tom@tromey.com>
7635
7636         * thread.c (print_thread_info_1): Use string_printf.
7637         (thread_apply_command, thread_apply_all_command): Use
7638         std::string.
7639
7640 2017-09-03  Tom Tromey  <tom@tromey.com>
7641
7642         * valprint.c (val_print_string): Update.
7643         * gdbcore.h (memory_error_message): Return std::string.
7644         * corefile.c (memory_error_message): Return std::string.
7645         (memory_error): Update.
7646         * breakpoint.c (insert_bp_location): Update.
7647
7648 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
7649
7650         * target/waitstatus.h (target_waitstatus_to_string): Change
7651         return type to std::string.
7652         * target/waitstatus.c (target_waitstatus_to_string): Return
7653         std::string.
7654         * target.h (target_waitstatus_to_string): Remove declaration.
7655         * infrun.c (resume, clear_proceed_status_thread,
7656         print_target_wait_results, do_target_wait, save_waitstatus,
7657         stop_all_threads): Adjust.
7658         * record-btrace.c (record_btrace_wait): Adjust.
7659         * target-debug.h
7660         (target_debug_print_struct_target_waitstatus_p): Adjust.
7661
7662 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7663
7664         PR gdb/22046
7665         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7666         detection.
7667
7668 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
7669
7670         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7671         for setting/unsetting environment variables on the remote target.
7672         (New remote packets): Add entries for QEnvironmentHexEncoded,
7673         QEnvironmentUnset and QEnvironmentReset.
7674         * common/environ.c (gdb_environ::operator=): Extend method to
7675         handle m_user_set_env_list and m_user_unset_env_list.
7676         (gdb_environ::clear): Likewise.
7677         (match_var_in_string): Change type of first parameter from 'char
7678         *' to 'const char *'.
7679         (gdb_environ::set): Extend method to handle
7680         m_user_set_env_list and m_user_unset_env_list.
7681         (gdb_environ::unset): Likewise.
7682         (gdb_environ::clear_user_set_env): New method.
7683         (gdb_environ::user_set_envp): Likewise.
7684         (gdb_environ::user_unset_envp): Likewise.
7685         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7686         m_user_unset_env_list on move constructor/assignment.
7687         (unset): Add new default parameter 'update_unset_list = true'.
7688         (clear_user_set_env): New method.
7689         (user_set_envp): Likewise.
7690         (user_unset_envp): Likewise.
7691         (m_user_set_env_list): New std::set.
7692         (m_user_unset_env_list): Likewise.
7693         * common/rsp-low.c (hex2str): New function.
7694         (bin2hex): New overload for bin2hex function.
7695         * common/rsp-low.c (hex2str): New prototype.
7696         (str2hex): New overload prototype.
7697         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7698         QEnvironmentUnset and QEnvironmentReset.
7699         (remote_protocol_features): Add QEnvironmentHexEncoded,
7700         QEnvironmentUnset and QEnvironmentReset packets.
7701         (send_environment_packet): New function.
7702         (extended_remote_environment_support): Likewise.
7703         (extended_remote_create_inferior): Call
7704         extended_remote_environment_support.
7705         (_initialize_remote): Add QEnvironmentHexEncoded,
7706         QEnvironmentUnset and QEnvironmentReset packet configs.
7707         * unittests/environ-selftests.c (gdb_selftest_env_var):
7708         New variable.
7709         (test_vector_initialization): New function.
7710         (test_init_from_host_environ): Likewise.
7711         (test_reinit_from_host_environ): Likewise.
7712         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7713         Likewise.
7714         (test_unset_set_empty_vector): Likewise.
7715         (test_vector_clear): Likewise.
7716         (test_std_move): Likewise.
7717         (test_move_constructor):
7718         (test_self_move): Likewise.
7719         (test_set_unset_reset): Likewise.
7720         (run_tests): Rewrite in terms of the functions above.
7721
7722 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
7723
7724         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7725         (adi_available): Use a temp variable of type CORE_ADDR as argument
7726         3 when calling target_auxv_search.
7727         (adi_normalize_address): Use masks and xor operators to calculate
7728         normalized address.
7729         (adi_read_versions, adi_write_versions, adi_print_versions)
7730         (do_examine, do_assign): Use paddress.
7731
7732 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
7733
7734         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7735         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7736         out of loop and add supply of FIR.
7737         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7738         add collect of FIR.
7739
7740 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
7741
7742         PR gdb/21827
7743         * cli/cli-script.c (define_command): Don't convert command name
7744         to lower case.
7745
7746 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
7747
7748         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7749         Update all callers accordingly. Remove all code blocks handling
7750         the case where DISPP is not NULL.
7751
7752 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7753
7754         PR symtab/22003
7755         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7756         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7757         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7758
7759 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7760
7761         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7762         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7763         (read_comp_units_from_section): New parameter abbrev_section, use
7764         read_and_check_comp_unit_head, allocate signatured_type if needed.
7765         (create_all_comp_units): Update read_comp_units_from_section caller.
7766
7767 2017-08-23  Pedro Alves  <palves@redhat.com>
7768
7769         PR remote/21852
7770         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7771         to null_ptid and switch to thread without reading the registers
7772         after adding the inferior.
7773
7774 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7775
7776         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7777         compile-gcc.
7778         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7779         (compile_to_object): Implement compile_gcc.
7780         (_initialize_compile): Install "set compile-gcc".  Initialize
7781         compile_gcc.
7782
7783 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7784
7785         * compile/compile.c (compile_to_object): Conditionally call
7786         set_verbose.  Conditionally call compile or compile_v0.
7787
7788 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7789
7790         * sparc64-tdep.h: (adi_normalize_address): New export.
7791         * sparc-nat.h: (open_adi_tag_fd): New export.
7792         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7793         * sparc64-linux-tdep.c:
7794         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7795         (sparc64_linux_handle_segmentation_fault): New function.
7796         (sparc64_linux_init_abi): Register
7797         sparc64_linux_handle_segmentation_fault
7798         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7799         (sparc64_addr_bits_remove): New function.
7800         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7801         (MAX_PROC_NAME_SIZE): New macro.
7802         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7803         (sparc64adilist): New variable.
7804         (adi_proc_list): New variable.
7805         (find_adi_info): New function.
7806         (add_adi_info): New function.
7807         (get_adi_info_proc): New function.
7808         (get_adi_info): New function.
7809         (info_adi_command): New function.
7810         (read_maps_entry): New function.
7811         (adi_available): New function.
7812         (adi_normalize_address): New function.
7813         (adi_align_address): New function.
7814         (adi_convert_byte_count): New function.
7815         (adi_tag_fd): New function.
7816         (adi_is_addr_mapped): New function.
7817         (adi_read_versions): New function.
7818         (adi_write_versions): New function.
7819         (adi_print_versions): New function.
7820         (do_examine): New function.
7821         (do_assign): New function.
7822         (adi_examine_command): New function.
7823         (adi_assign_command): New function.
7824         (_initialize_sparc64_adi_tdep): New function.
7825
7826 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7827
7828         * breakpoint.c (breakpoints_info): Rename to ...
7829         (info_breakpoints_command): ... this.
7830         (watchpoints_info): Rename to ...
7831         (info_watchpoints_command): ... this.
7832         (tracepoints_info): Rename to ...
7833         (info_tracepoints_command): ... this.
7834         (_initialize_breakpoint): Adjust.
7835         * dcache.c (dcache_info): Rename to ...
7836         (info_display_command): ... this.
7837         (_initialize_dcache): Adjust.
7838         * frame.h (args_info): Rename to ...
7839         (info_args_command): ... this.
7840         (locals_info): Rename to ...
7841         (info_locals_command): ... this.
7842         * infcmd.c (nofp_registers_info): Rename to ...
7843         (info_registers_command): ... this.
7844         (float_info): Rename to ...
7845         (info_float_command): ... this.
7846         (program_info): Rename to ...
7847         (info_program_command): ... this.
7848         (all_registers_info): Rename to ...
7849         (info_all_registers_command): ... this.
7850         (vector_info): Rename to ...
7851         (info_vector_command): ... this.
7852         (float_info): Rename to ...
7853         (info_float_command): ... this.
7854         (_initialize_infcmd): Adjust.
7855         * inferior.h (term_info): Rename to ...
7856         (info_terminal_command): ... this.
7857         * inflow.c (term_info): Rename to ...
7858         (info_terminal_command): ... this.
7859         (_initialize_inflow): Adjust.
7860         * infrun.c (signals_info): Rename to ...
7861         (info_signals_command): ... this.
7862         (_initialize_infrun): Adjust.
7863         * objc-lang.c (classes_info): Rename to ...
7864         (info_classes_command): ... this.
7865         (selectors_info): Rename to ...
7866         (info_selectors_command): ... this.
7867         (_initialize_objc_language): Adjust.
7868         * printcmd.c (sym_info): Rename to ...
7869         (info_symbol_command): ... this.
7870         (address_info): Rename to ...
7871         (info_address_command): ... this.
7872         (display_info): Rename to ...
7873         (info_display_command): ... this.
7874         (_initialize_printcmd): Adjust.
7875         * reverse.c (bookmarks_info): Rename to ...
7876         (info_breakpoints_command): ... this.
7877         (_initialize_reverse): Adjust.
7878         * ser-go32.c (dos_info): Rename to ...
7879         (info_serial_command): ... this.
7880         (_initialize_ser_dos): Adjust.
7881         * skip.c (skip_info): Rename to ...
7882         (info_skip_command): ... this.
7883         (_initialize_step_skip): Adjust.
7884         * source.c (line_info): Rename to ...
7885         (info_line_command): ... this.
7886         (source_info): Rename to ...
7887         (info_source_command)
7888         * stack.c (frame_info): Rename to ...
7889         (info_frame_command): ... this.
7890         (locals_info): Rename to ...
7891         (info_locals_command): ... this.
7892         (args_info): Rename to ...
7893         (info_args_command): ... this.
7894         (_initialize_stack): Adjust.
7895         * symtab.c (sources_info): Rename to ...
7896         (info_sources_command): ... this.
7897         (variables_info): Rename to ...
7898         (info_variables_command): ... this.
7899         (functions_info): Rename to ...
7900         (info_functions_command): ... this.
7901         (types_info): Rename to ...
7902         (info_types_command): ... this.
7903         (_initialize_symtab): Adjust.
7904         * target.c (target_info): Rename to ...
7905         (info_target_command): ... this.
7906         (initialize_targets): Adjust.
7907         * tracepoint.c (tvariables_info): Rename to ...
7908         (info_tvariables_command): ... this.
7909         (scope_info): Rename to ...
7910         (info_scope_command): ... this.
7911         (trace_dump_actions): Adjust.
7912         (_initialize_tracepoint): Adjust.
7913
7914 2017-08-22  Tom Tromey  <tom@tromey.com>
7915
7916         * breakpoint.h (install_breakpoint): Update.
7917         * breakpoint.c (add_solib_catchpoint): Update.
7918         (install_breakpoint): Change argument to a std::unique_ptr.
7919         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7920         (create_breakpoint_sal, create_breakpoint): Update.
7921         (watch_command_1, catch_exec_command_1)
7922         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7923         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7924         Return the breakpoint.
7925         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7926         (new_single_step_breakpoint): Update.
7927         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7928         std::unique_ptr.
7929         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7930         std::unique_ptr.
7931         * break-catch-sig.c (create_signal_catchpoint): Use
7932         std::unique_ptr.
7933         * ada-lang.c (create_ada_exception_catchpoint): Use
7934         std::unique_ptr.
7935
7936 2017-08-22  Tom Tromey  <tom@tromey.com>
7937
7938         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7939
7940 2017-08-22  Tom Tromey  <tom@tromey.com>
7941
7942         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7943         (lookup_partial_symbol): Update.
7944
7945 2017-08-22  Tom Tromey  <tom@tromey.com>
7946
7947         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7948         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7949         (find_and_open_source, symtab_to_fullname): Update.
7950         * psymtab.c (psymtab_to_fullname): Update.
7951
7952 2017-08-22  Tom Tromey  <tom@tromey.com>
7953
7954         * exec.c (exec_file_attach): Update.
7955         * linux-thread-db.c (try_thread_db_load): Update.
7956         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7957         * utils.c (gdb_realpath): Change return type.
7958         (gdb_realpath_keepfile): Update.
7959         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7960         (_initialize_utils): Register the new self test.
7961         * source.c (openp): Update.
7962         (find_and_open_source): Update.
7963         * nto-tdep.c (nto_find_and_open_solib): Update.
7964         * main.c (set_gdb_data_directory): Update.
7965         (captured_main_1): Update.
7966         * dwarf2read.c (dwarf2_get_dwz_file): Update
7967         (dw2_map_symbol_filenames): Update.
7968         * auto-load.c (auto_load_safe_path_vec_update): Update.
7969         (filename_is_in_auto_load_safe_path_vec): Change type of
7970         "filename_realp".
7971         (auto_load_objfile_script): Update.
7972         (file_is_auto_load_safe): Update.  Use std::string.
7973         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7974
7975 2017-08-22  Tom Tromey  <tom@tromey.com>
7976
7977         * utils.c (gdb_realpath_keepfile): Return a
7978         gdb::unique_xmalloc_ptr.
7979         * exec.c (exec_file_attach): Update.
7980         * utils.h (gdb_realpath_keepfile): Return a
7981         gdb::unique_xmalloc_ptr.
7982
7983 2017-08-22  Tom Tromey  <tom@tromey.com>
7984
7985         * compile/compile.c (compile_file_command): Use
7986         gdb::unique_xmalloc_ptr, std::string.
7987         * utils.c (gdb_abspath): Change return type.
7988         * source.c (openp): Update.
7989         * objfiles.c (allocate_objfile): Update.
7990         * main.c (set_gdb_data_directory): Update.
7991         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7992
7993 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7994
7995         * cli-cmds.c (list_commands): List actual code around more than
7996         one location.
7997
7998 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7999
8000         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8001
8002 2017-08-21  Pedro Alves  <palves@redhat.com>
8003
8004         PR gdb/19487
8005         * c-exp.y (variable production): Handle function aliases.
8006         * minsyms.c (msymbol_is_text): New function.
8007         * minsyms.h (msymbol_is_text): Declare.
8008         * symtab.c (find_function_alias_target): New function.
8009         * symtab.h (find_function_alias_target): Declare.
8010
8011 2017-08-21  Pedro Alves  <palves@redhat.com>
8012
8013         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8014         typedefs.
8015         * typeprint.c (whatis_exp): If handling "whatis", and expression
8016         is OP_TYPE, strip one typedef level.  Otherwise don't strip
8017         typedefs here.
8018         * valops.c (value_cast): Save "to" type before resolving
8019         stubs/typedefs.  Use that type as resulting value's type.
8020
8021 2017-08-18  Tom Tromey  <tom@tromey.com>
8022             Pedro Alves  <palves@redhat.com>
8023
8024         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8025         * sol-thread.c (sol_thread_resume, sol_thread_wait)
8026         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8027         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8028         * proc-service.c (ps_xfer_memory): Use scoped_restore.
8029         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8030         (linux_get_siginfo_data): Add "thread" argument.  Use
8031         scoped_restore.
8032         * linux-nat.c (linux_child_follow_fork)
8033         (check_stopped_by_watchpoint): Use scoped_restore.
8034         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8035         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8036         (restore_inferior_ptid, save_inferior_ptid): Remove.
8037         * btrace.c (btrace_fetch): Use scoped_restore.
8038         * bsd-uthread.c (bsd_uthread_fetch_registers)
8039         (bsd_uthread_store_registers): Use scoped_restore.
8040         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8041         scoped_restore.
8042         * aix-thread.c (aix_thread_resume, aix_thread_wait)
8043         (aix_thread_xfer_partial): Use scoped_restore.
8044         * inferior.h (save_inferior_ptid): Remove.
8045
8046 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8047
8048         PR tdep/21818
8049         * arm-tdep.c (gdb_print_insn_arm): Mark
8050         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8051
8052 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8053
8054         * NEWS: Mention GDBserver's new option "--selftest".
8055         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8056         * selftest.c: Move it to common/selftest.c.
8057         * selftest.h: Move it to common/selftest.h.
8058         * selftest-arch.c (reset): New function.
8059         (tests_with_arch): Call reset.
8060
8061 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8062
8063         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
8064         instead of exception_fprintf and printf_filtered.
8065
8066 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8067
8068         * selftest.c (register_self_test): Rename it to
8069         selftests::register_test.
8070         (run_self_tests): selftest::run_tests.
8071         * selftest.h: Update declarations.
8072         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8073         selftests::register_test_foreach_arch.
8074         * selftest-arch.h: Update declaration.
8075         * aarch64-tdep.c: Update.
8076         * arm-tdep.c: Likewise.
8077         * disasm-selftests.c: Likewise.
8078         * dwarf2loc.c: Likewise.
8079         * dwarf2-frame.c: Likewise.
8080         * findvar.c: Likewise.
8081         * gdbarch-selftests.c: Likewise.
8082         * maint.c (maintenance_selftest): Likewise.
8083         * regcache.c: Likewise.
8084         * rust-exp.y: Likewise.
8085         * selftest-arch.c: Likewise.
8086         * unittests/environ-selftests.c: Likewise.
8087         * unittests/function-view-selftests.c: Likewise.
8088         * unittests/offset-type-selftests.c: Likewise.
8089         * unittests/optional-selftests.c: Likewise.
8090         * unittests/scoped_restore-selftests.c: Likewise.
8091         * utils-selftests.c: Likewise.
8092
8093 2017-08-17  Pedro Alves  <palves@redhat.com>
8094
8095         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8096         local.
8097
8098 2017-08-17  Pedro Alves  <palves@redhat.com>
8099
8100         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8101         field.
8102         (reset_die_in_process): Delete, replaced by ...
8103         (process_die_scope): ... this new class.  Make it responsible for
8104         freeing cu->line_header too.
8105         (process_die): Use process_die_scope.
8106         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8107         cu->line_header_die_owner.  Don't release the line header if it's
8108         owned by the CU.
8109         (setup_type_unit_groups): Make the CU/DIE own the line header.
8110         Don't release the line header here.
8111
8112 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
8113
8114         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8115
8116 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8117
8118         * NEWS: Mention new shortcuts for nexti and stepi in TUI
8119         Single-Key mode
8120
8121 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8122
8123         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8124         mode command list.
8125
8126 2017-08-15  Stafford Horne  <shorne@gmail.com>
8127
8128         * MAINTAINERS (Write After Approval): Add Stafford Horne.
8129
8130 2017-08-15  Stafford Horne  <shorne@gmail.com>
8131
8132         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8133
8134 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8135
8136         PR gdb/21954
8137         * infcmd.c (unset_environment_command): Use the 'clear' method on
8138         the environment instead of resetting it.
8139
8140 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
8141
8142         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8143         platforms.
8144
8145 2017-08-14  Tom Tromey  <tom@tromey.com>
8146
8147         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8148         (print_binary_chars): Likewise.
8149         (BITS_IN_BYTES): Remove.
8150
8151 2017-08-14  Tom Tromey  <tom@tromey.com>
8152
8153         PR gdb/21675
8154         * valprint.c (LOW_ZERO): Change value to 034.
8155         (print_octal_chars): Add static_asserts for octal constants.
8156         * printcmd.c (print_scalar_formatted): Add 'd' case.
8157
8158 2017-08-11  Tom Tromey  <tom@tromey.com>
8159
8160         * symfile.c (add_symbol_file_command): Use std::vector.
8161
8162 2017-08-14  Tom Tromey  <tom@tromey.com>
8163
8164         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8165         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8166         std::move.
8167         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8168
8169 2017-08-11  Pedro Alves  <palves@redhat.com>
8170
8171         * infrun.c (process_event_stop_test): Adjust
8172         function_name_is_marked_for_skip call.
8173         * skip.c: Include <list>.
8174         (skiplist_entry): Make it a class with private fields, and
8175         getters/setters.
8176         (skiplist_entry_chain): Delete.
8177         (skiplist_entries): New.
8178         (skiplist_entry_count): Delete.
8179         (highest_skiplist_entry_num): New.
8180         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8181         (add_skiplist_entry): Delete.
8182         (skiplist_entry::skiplist_entry): New.
8183         (skiplist_entry::add_entry): New.
8184         (skip_file_command, skip_function): Adjust.
8185         (compile_skip_regexp): Delete.
8186         (skip_command): Don't compile regexp here.  Adjust to use
8187         skiplist_entry::add_entry.
8188         (skip_info): Adjust to use range-for and getters.
8189         (skip_enable_command, skip_disable_command): Adjust to use
8190         range-for and setters.
8191         (skip_delete_command): Adjust to use std::list.
8192         (add_skiplist_entry): Delete.
8193         (skip_file_p): Delete, refactored as ...
8194         (skiplist_entry::do_skip_file_p): ... this new method.
8195         (skip_gfile_p): Delete, refactored as ...
8196         (skiplist_entry::do_gskip_file_p): ... this new method.
8197         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8198         (skiplist_entry::skip_function_p): ... this new method.
8199         (function_name_is_marked_for_skip): Now returns bool, and takes
8200         the function sal by const reference.  Adjust to use range-for and
8201         skiplist_entry methods.
8202         (_initialize_step_skip): Remove references to
8203         skiplist_entry_chain, skiplist_entry_count.
8204         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8205         takes the function sal by const reference.
8206
8207 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8208
8209         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8210         (dwarf2_frame_cache): Remove reset_cache_cleanup.
8211         (dwarf2_frame_cache):
8212         * frame-unwind.c (frame_unwind_try_unwinder): Catch
8213         RETURN_MASK_ALL and set *this_case to NULL.
8214         * frame-unwind.h: Update comments.
8215
8216 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8217
8218         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8219         (dwarf2_frame_state_copy_regs): Remove.
8220         (dwarf2_frame_state_free_regs): Remove.
8221         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8222         (dwarf2_restore_rule): Call method .alloc_regs instead of
8223         dwarf2_frame_state_alloc_regs.
8224         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
8225         constructor.  Call std::move.
8226         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8227         (dwarf2_frame_cache): Likewise.
8228
8229         [GDB_SELF_TEST]: Include selftest.h and
8230         selftest-arch.h.
8231         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8232         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8233         execute_cfa_program_test.
8234
8235         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8236         copy ctor, assignment operator, move assignment.
8237         <alloc_regs>: New method.
8238         <swap>: New method.
8239         (struct dwarf2_frame_state): Delete dtor.
8240         (dwarf2_frame_state_alloc_regs): Remove declaration.
8241         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8242         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8243
8244 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8245
8246         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8247         (dwarf2_frame_state::dwarf2_frame_state): New.
8248         (dwarf2_frame_state::~dwarf2_frame_state): New.
8249         (dwarf2_fetch_cfa_info): Update.
8250         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
8251         rather than a pointer.  Update code.
8252         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8253         dtor.
8254         <data_align, code_align, retaddr_column>: Change them to const.
8255         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8256         to bool.
8257
8258 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8259
8260         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8261         <loc.exp>: New field.
8262         * dwarf2-frame.c (execute_cfa_program): Update.
8263         (dwarf2_frame_prev_register): Update.
8264
8265 2017-08-10  Pedro Alves  <palves@redhat.com>
8266
8267         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8268
8269 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8270
8271         * fbsd-nat.c (struct fbsd_fork_info): Remove.
8272         (fbsd_pending_children): Use std::list.
8273         (fbsd_remember_child): Likewise.
8274         (fbsd_is_child_pending): Likewise.
8275         (fbsd_pending_vfork_done): Use std::forward_list.
8276         (fbsd_add_vfork_done): Likewise.
8277         (fbsd_is_vfork_done_pending): Likewise.
8278         (fbsd_next_vfork_done): Likewise.
8279
8280 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8281
8282         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8283         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8284         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8285         for `mapfilename'.
8286         (fbsd_xfer_partial): Use gdb::byte_vector.
8287         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8288
8289 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8290
8291         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8292         "filestuff.h".
8293         (fbsd_find_memory_regions): Fix `mapfile' initialization.
8294
8295 2017-08-09  Tom Tromey  <tom@tromey.com>
8296
8297         * skip.c (skiplist_entry): New constructor.
8298         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8299         (skiplist_entry::file_is_glob): Now bool.
8300         (skiplist_entry::file, skiplist_entry::function): Now
8301         std::string.
8302         (make_skip_entry): Return a unique_ptr.  Use new.
8303         (free_skiplist_entry, free_skiplist_entry_cleanup)
8304         (make_free_skiplist_entry_cleanup): Remove.
8305         (skip_command, skip_disable_command, add_skiplist_entry)
8306         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8307         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8308         (function_name_is_marked_for_skip): Update.
8309         (skip_delete_command): Update.  Use delete.
8310
8311 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
8312
8313         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8314         (aarch64_linux_core_read_description): New function.
8315         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8316
8317 2017-08-09  Pedro Alves  <palves@redhat.com>
8318
8319         * cp-name-parser.y (cp_comp_to_string): Return a
8320         gdb::unique_xmalloc_ptr<char>.
8321         * cp-support.c (replace_typedefs_qualified_name)
8322         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8323         (cp_canonicalize_string_full): Use op= instead of explicit
8324         convertion.
8325         (cp_class_name_from_physname, method_name_from_physname)
8326         (cp_func_name, cp_remove_params): Adjust to use
8327         gdb::unique_xmalloc_ptr<char>.
8328         * cp-support.h (cp_comp_to_string): Return a
8329         gdb::unique_xmalloc_ptr<char>.
8330         * python/py-type.c (typy_lookup_type): Adjust to use
8331         gdb::unique_xmalloc_ptr<char>.
8332
8333 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
8334
8335         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8336
8337 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
8338             Yao Qi  <yao.qi@linaro.org>
8339
8340         * cp-support.c (cp_canonicalize_string_full): Use
8341         gdb::unique_xmalloc_ptr<char>.
8342         (cp_canonicalize_string): Likewise.
8343
8344 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8345
8346         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8347         * regformats/i386/amd64-avx-avx512.dat: Remove.
8348         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8349         * regformats/i386/amd64-avx-mpx.dat:Remove.
8350         * regformats/i386/amd64-avx.dat: Remove.
8351         * regformats/i386/amd64-mpx.dat: Remove.
8352         * regformats/i386/i386-avx-avx512.dat: Remove.
8353         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8354         * regformats/i386/i386-avx-mpx.dat: Remove.
8355         * regformats/i386/i386-mmx.dat: Remove.
8356         * regformats/i386/i386-mpx.dat: Remove.
8357
8358 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8359
8360         * amd64-tdep.h (tdesc_x32): Remove the declaration.
8361         * amd64-tdep.c: Don't include features/i386/x32*.c.
8362         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8363         functions.
8364         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8365         and i386/x32-avx-avx512.
8366         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8367         and i386/x32.xml.
8368         * features/i386/x32-avx-avx512.c: Removed.
8369         * features/i386/x32-avx-avx512.xml: Removed.
8370         * features/i386/x32-avx.c: Removed.
8371         * features/i386/x32-avx.xml: Removed.
8372         * features/i386/x32.c: Removed.
8373         * features/i386/x32.xml: Removed.
8374         * regformats/i386/x32-avx-avx512.dat: Removed.
8375         * regformats/i386/x32-avx.dat: Removed.
8376         * regformats/i386/x32.dat: Removed.
8377
8378 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8379
8380         PR breakpoints/21886
8381         * mem-break.c (default_memory_insert_breakpoint): Use
8382         `->placed_address' rather than `->reqstd_address' for the
8383         breakpoint location.
8384
8385 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8386
8387         * arch-utils.c (default_print_insn): Remove arch/mach/endian
8388         assertions.
8389
8390 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8391
8392         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8393         a union of `tdep_info', `tdesc_data' and `id'.
8394         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8395         rather than `info.tdep_info'.
8396         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8397         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8398         * i386-tdep.c (i386_gdbarch_init): Likewise.
8399         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8400         * mips-tdep.c (mips_gdbarch_init): Likewise.
8401         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8402         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8403         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8404         `info.tdep_info'.
8405         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8406         `info.tdep_info'.
8407         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8408         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8409         `info.tdep_info'.
8410         * spu-tdep.c (spu_gdbarch_init): Likewise.
8411         * gdbarch.h: Regenerate.
8412
8413 2017-08-07  Leszek Swirski  <leszeks@google.com>
8414
8415         PR symtab/20899
8416         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8417
8418 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
8419
8420         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8421         (gdbsim_open): Rename gdb_argv args object to argv.
8422
8423 2017-08-05  Tom Tromey  <tom@tromey.com>
8424
8425         * compile/compile-object-load.c (compile_object_load): Use
8426         gdb::unique_xmalloc_ptr.
8427         * cli/cli-dump.c (scan_filename): Rename from
8428         scan_filename_with_cleanup.  Change return type.
8429         (scan_expression): Rename from scan_expression_with_cleanup.
8430         Change return type.
8431         (dump_memory_to_file, dump_value_to_file, restore_command):
8432         Use gdb::unique_xmalloc_ptr.  Update.
8433         * cli/cli-cmds.c (find_and_open_script): Use
8434         gdb::unique_xmalloc_ptr.
8435         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8436         * symmisc.c (maintenance_print_symbols)
8437         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8438         * symfile.c (symfile_bfd_open, generic_load)
8439         (add_symbol_file_command, remove_symbol_file_command): Use
8440         gdb::unique_xmalloc_ptr.
8441         * source.c (openp): Use gdb::unique_xmalloc_ptr.
8442         * psymtab.c (maintenance_print_psymbols): Use
8443         gdb::unique_xmalloc_ptr.
8444         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8445         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8446         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8447         (reload_shared_libraries_1): Likewise.
8448
8449 2017-08-05  Tom Tromey  <tom@tromey.com>
8450
8451         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8452         (rust_op_vector, rust_set_vector): New typedefs.
8453         (current_parser): New global.
8454         (work_obstack): Change to pointer type.  Update all users.
8455         (rust_ast, pstate): Remove globals.
8456         (struct rust_parser): New.
8457         (%union) <params, field_inits>: Change type.
8458         (start, tuple_expr, unit_expr, struct_expr_list, literal)
8459         (field_expr, expr_list, maybe_expr_list, type_list): Update.
8460         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8461         (convert_params_to_types, convert_params_to_expression): Change
8462         type of "params".
8463         (ast_string): Change type of "fields".
8464         (rust_parse): Make a rust_parser.  Remove cleanups.
8465         (rust_lex_tests): Make and install an auto_obstack.
8466
8467 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8468
8469         * configure.srv (ipa_x32_linux_regobj): New.
8470         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8471         instead of X86_TDESC_AVX512.
8472         (initialize_low_tracepoint): Call
8473         init_registers_x32_avx_avx512_linux.
8474
8475 2017-08-04  Yao Qi  <yao.qi@linaro.org>
8476
8477         * utils.h (gdb_argv): Add namespace std for nullptr_t.
8478
8479 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8480
8481         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8482
8483 2017-08-03  Tom Tromey  <tom@tromey.com>
8484
8485         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8486         Remove.
8487         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8488
8489 2017-08-03  Tom Tromey  <tom@tromey.com>
8490
8491         * python/py-param.c (compute_enum_values): Use gdb_argv.
8492
8493 2017-08-03  Tom Tromey  <tom@tromey.com>
8494
8495         * utils.h (struct gdb_argv_deleter): New.
8496         (gdb_argv): New class.
8497         * utils.c (gdb_argv::reset): New method.
8498         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8499         * tracefile.c (tsave_command): Use gdb_argv.
8500         * top.c (new_ui_command): Use gdb_argv.
8501         * symmisc.c (maintenance_print_symbols)
8502         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8503         * symfile.c (symbol_file_command, generic_load)
8504         (remove_symbol_file_command): Use gdb_argv.
8505         * stack.c (backtrace_command): Use gdb_argv.
8506         * source.c (add_path, show_substitute_path_command)
8507         (unset_substitute_path_command, set_substitute_path_command):
8508         Use gdb_argv.
8509         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
8510         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8511         * remote.c (extended_remote_run, remote_put_command)
8512         (remote_get_command, remote_delete_command): Use gdb_argv.
8513         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8514         (gdbsim_open): Use gdb_argv.
8515         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8516         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8517         * procfs.c (procfs_info_proc): Use gdb_argv.
8518         * interps.c (interpreter_exec_cmd): Use gdb_argv.
8519         * infrun.c (handle_command): Use gdb_argv.
8520         * inferior.c (add_inferior_command, clone_inferior_command):
8521         Use gdb_argv.
8522         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8523         * exec.c (exec_file_command): Use gdb_argv.
8524         * cli/cli-cmds.c (alias_command): Use gdb_argv.
8525         * compile/compile.c (build_argc_argv): Use gdb_argv.
8526
8527 2017-08-03  Tom Tromey  <tom@tromey.com>
8528
8529         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8530
8531 2017-08-03  Tom Tromey  <tom@tromey.com>
8532
8533         * python/python.c (compute_python_string): Return std::string.
8534         (gdbpy_eval_from_control_command): Update.
8535         (do_start_initialization): Use std::string.
8536         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8537         xstrprintf.
8538         * python/py-breakpoint.c (local_setattro): Use string_printf, not
8539         xstrprintf.
8540
8541 2017-08-03  Tom Tromey  <tom@tromey.com>
8542
8543         * top.h (do_restore_instream_cleanup): Remove.
8544         * top.c (do_restore_instream_cleanup): Remove.
8545         (read_command_file): Use scoped_restore.
8546         * cli/cli-script.c (execute_user_command): Use scoped_restore.
8547
8548 2017-08-03  Tom Tromey  <tom@tromey.com>
8549
8550         * cli/cli-script.c (execute_user_command)
8551         (execute_control_command): Use scoped_restore.
8552
8553 2017-08-03  Tom Tromey  <tom@tromey.com>
8554
8555         * cli/cli-script.c (do_restore_user_call_depth): Remove.
8556         (execute_user_command): Remove user_call_depth; use
8557         user_args_stack's size instead.
8558
8559 2017-08-03  Tom Tromey  <tom@tromey.com>
8560
8561         * top.h (in_user_command): Remove.
8562         * top.c (in_user_command): Remove.
8563         * cli/cli-script.c (do_restore_user_call_depth)
8564         (execute_user_command): Update.
8565
8566 2017-08-03  Tom Tromey  <tom@tromey.com>
8567
8568         * valops.c (search_struct_method): Use gdb::byte_vector.
8569         * valarith.c (value_concat): Use std::vector.
8570         * target.c (memory_xfer_partial): Use gdb::byte_vector.
8571         (simple_search_memory): Likewise.
8572         * printcmd.c (find_string_backward): Use gdb::byte_vector.
8573         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8574         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8575         * elfread.c (elf_rel_plt_read): Use std::string.
8576         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8577         * cli/cli-dump.c (restore_section_callback): Use
8578         gdb::byte_vector.
8579
8580 2017-08-03  Tom Tromey  <tom@tromey.com>
8581
8582         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8583
8584 2017-08-03  Tom Tromey  <tom@tromey.com>
8585
8586         * tui/tui-regs.c (tui_restore_gdbout): Remove.
8587         (tui_register_format): Use scoped_restore.
8588
8589 2017-08-03  Tom Tromey  <tom@tromey.com>
8590
8591         * reverse.c (exec_direction_default): Remove.
8592         (exec_reverse_once): Use scoped_restore.
8593         * remote.c (restore_remote_timeout): Remove.
8594         (remote_flash_erase, remote_flash_write, remote_flash_done)
8595         (readchar, remote_serial_write): Use scoped_restore.
8596         * cli/cli-script.c (struct source_cleanup_lines_args)
8597         (source_cleanup_lines): Remove.
8598         (script_from_file): Use scoped_restore.
8599         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8600         (source_command): Use scoped_restore.
8601
8602 2017-08-03  Tom Tromey  <tom@tromey.com>
8603
8604         * utils.h (make_cleanup_free_so): Remove.
8605         * utils.c (do_free_so, make_cleanup_free_so): Remove.
8606         * solist.h (struct so_deleter): New.
8607         (so_list_up): New typedef.
8608         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8609
8610 2017-08-03  Tom Tromey  <tom@tromey.com>
8611
8612         * utils.h (make_cleanup_restore_current_language): Remove.
8613         * utils.c (do_restore_current_language)
8614         (make_cleanup_restore_current_language): Remove.
8615         * parse.c (parse_exp_in_context_1)
8616         (parse_expression_with_language): Use
8617         scoped_restore_current_language.
8618         * mi/mi-main.c (mi_cmd_execute): Use
8619         scoped_restore_current_language.
8620         * language.h (scoped_restore_current_language): New class.
8621
8622 2017-08-03  Tom Tromey  <tom@tromey.com>
8623
8624         * compile/compile.c (cleanup_unlink_file): Remove.
8625         (compile_to_object): Use gdb::unlinker.
8626         (eval_compile_command): Likewise.
8627
8628 2017-08-03  Tom Tromey  <tom@tromey.com>
8629
8630         * utils.h (make_cleanup_fclose): Remove.
8631         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8632
8633 2017-08-03  Tom Tromey  <tom@tromey.com>
8634
8635         * top.c (open_terminal_stream): Return gdb_file_up.
8636         (new_ui_command): Update.
8637
8638 2017-08-03  Tom Tromey  <tom@tromey.com>
8639
8640         * source.c (print_source_lines_base, forward_search_command)
8641         (reverse_search_command): Use gdb_file_up.
8642
8643 2017-08-03  Tom Tromey  <tom@tromey.com>
8644
8645         * fbsd-nat.c (fbsd_find_memory_regions): Update.
8646
8647 2017-08-03  Tom Tromey  <tom@tromey.com>
8648
8649         * cli/cli-cmds.c (find_and_open_script): Change return type.
8650         Remove "streamp" and "full_path" parameters.
8651         (source_script_with_search): Update.
8652         * auto-load.c (source_script_file): Update.
8653         * cli/cli-cmds.h (find_and_open_script): Change type.
8654         (open_script): New struct.
8655
8656 2017-08-03  Tom Tromey  <tom@tromey.com>
8657
8658         * xml-support.c (xml_fetch_content_from_file): Update.
8659         * ui-file.c (stdio_file::open): Update.
8660         * tracefile-tfile.c (tfile_start): Update.
8661         * remote.c (remote_file_put, remote_file_get): Update.
8662         * nat/linux-procfs.c (linux_proc_get_int)
8663         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8664         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8665         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8666         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8667         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8668         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8669         * linux-nat.c (linux_proc_pending_signals): Update.
8670         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8671         (file_closer): Remove.
8672         * compile/compile.c (compile_to_object): Update.
8673         * common/filestuff.h (struct gdb_file_deleter): New.
8674         (gdb_file_up): New typedef.
8675         (gdb_fopen_cloexec): Change return type.
8676         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8677         * cli/cli-dump.c (fopen_with_cleanup): Remove.
8678         (dump_binary_file, restore_binary_file): Update.
8679         * auto-load.c (auto_load_objfile_script_1): Update.
8680
8681 2017-08-03  Tom Tromey  <tom@tromey.com>
8682
8683         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8684         (info_static_tracepoint_markers_command): Likewise.
8685         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8686         * skip.c (skip_info): Use ui_out_emit_table.
8687         * progspace.c (print_program_space): Use ui_out_emit_table.
8688         * osdata.c (info_osdata): Use ui_out_emit_table.
8689         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8690         ui_out_emit_table.
8691         * linux-thread-db.c (info_auto_load_libthread_db): Use
8692         ui_out_emit_table.
8693         * inferior.c (print_inferior): Use ui_out_emit_table.
8694         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8695         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8696         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8697         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8698         * ui-out.h (class ui_out_emit_table): New.
8699
8700 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
8701
8702         * mips-tdep.c (mips_fpu_type_str): New function.
8703         (mips_dump_tdep): Call it.
8704
8705 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
8706
8707         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8708         `->mips_fpu_type'.
8709
8710 2017-07-31  Xavier Roirand  <roirand@adacore.com>
8711
8712         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8713
8714 2017-07-27  Xavier Roirand  <roirand@adacore.com>
8715
8716         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8717
8718 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8719
8720         * cli/cli-cmds.c (maintenancechecklist): New variable.
8721         * gdbcmd.h (maintenancechecklist): Declare it.
8722         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8723         Call i386_linux_read_description with different masks.
8724         * maint.c (maintenance_check_command): New function.
8725         (_initialize_maint_cmds): Call add_prefix_cmd.
8726         * target-descriptions.c (tdesc_reg): override operator != and ==.
8727         (tdesc_type): Likewise.
8728         (tdesc_feature): Likewise.
8729         (target_desc): Likewise.
8730         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8731         (maintenance_check_xml_descriptions): New function.
8732         (_initialize_target_descriptions) Add command "xml-descriptions".
8733         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8734
8735 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8736
8737         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8738         Include features/i386/32bit-*.c.
8739         (i386_linux_read_description): Generate target description if it
8740         doesn't exist.
8741         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8742         functions.
8743         * features/i386/32bit-linux.c: Re-generated.
8744         * features/i386/32bit-sse.c: Likewise.
8745         * target-descriptions.c (print_c_feature::visit): Print code to
8746         set register number if needed.
8747         (print_c_feature) <m_next_regnum>: New field.
8748
8749 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8750
8751         * features/Makefile (CFILES): Rename with TDESC_CFILES.
8752         (FEATURE_XMLFILES): New.
8753         (FEATURE_CFILES): New.
8754         New rules.
8755         (clean-cfiles): Remove generated c files.
8756         * features/i386/32bit-avx.c: Generated.
8757         * features/i386/32bit-avx512.c: Generated.
8758         * features/i386/32bit-core.c: Generated.
8759         * features/i386/32bit-linux.c: Generated.
8760         * features/i386/32bit-mpx.c: Generated.
8761         * features/i386/32bit-pkeys.c: Generated.
8762         * features/i386/32bit-sse.c: Generated.
8763         * target-descriptions.c: Include algorithm.
8764         (tdesc_element_visitor): Add method visit_end.
8765         (print_c_tdesc): Implement visit_end.
8766         (print_c_tdesc:: m_filename_after_features): Move it to
8767         protected.
8768         (print_c_feature): New class.
8769         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8770         name starts with "i386/32bit-".
8771
8772 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8773
8774         * target-descriptions.c (tdesc_element_visitor): New class.
8775         (tdesc_element): New class.
8776         (tdesc_reg): Inherit from tdesc_element.
8777         (tdesc_reg::accept): New function.
8778         (tdesc_type): Inherit from tdesc_element.
8779         (tdesc_type::accept): New function.
8780         (tdesc_feature): Inherit from tdesc_element.
8781         (tdesc_feature::accept): New function.
8782         (target_desc): Inherit from tdesc_element.
8783         (target_desc::target_desc): New.
8784         (target_desc::~target_desc): New.
8785         (target_desc::accept): New.
8786         (allocate_target_description): Use new.
8787         (free_target_description): Use delete.
8788         (print_c_tdesc): New class.
8789         (maint_print_c_tdesc_cmd): Adjust.
8790
8791         * features/aarch64.c: Re-generated.
8792         * features/arc-arcompact.c: Re-generated.
8793         * features/arc-v2.c: Re-generated.
8794         * features/arm/arm-with-iwmmxt.c: Re-generated.
8795         * features/arm/arm-with-m.c: Re-generated.
8796         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8797         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8798         * features/arm/arm-with-neon.c: Re-generated.
8799         * features/arm/arm-with-vfpv2.c: Re-generated.
8800         * features/arm/arm-with-vfpv3.c: Re-generated.
8801         * features/i386/amd64-avx-avx512.c: Re-generated.
8802         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8803         * features/i386/amd64-avx.c: Re-generated.
8804         * features/i386/amd64-avx-linux.c: Re-generated.
8805         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8806         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8807         * features/i386/amd64-avx-mpx.c: Re-generated.
8808         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8809         * features/i386/amd64.c: Re-generated.
8810         * features/i386/amd64-linux.c: Re-generated.
8811         * features/i386/amd64-mpx.c: Re-generated.
8812         * features/i386/amd64-mpx-linux.c: Re-generated.
8813         * features/i386/i386-avx-avx512.c: Re-generated.
8814         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8815         * features/i386/i386-avx.c: Re-generated.
8816         * features/i386/i386-avx-linux.c: Re-generated.
8817         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8818         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8819         * features/i386/i386-avx-mpx.c: Re-generated.
8820         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8821         * features/i386/i386.c: Re-generated.
8822         * features/i386/i386-linux.c: Re-generated.
8823         * features/i386/i386-mmx.c: Re-generated.
8824         * features/i386/i386-mmx-linux.c: Re-generated.
8825         * features/i386/i386-mpx.c: Re-generated.
8826         * features/i386/i386-mpx-linux.c: Re-generated.
8827         * features/i386/x32-avx-avx512.c: Re-generated.
8828         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8829         * features/i386/x32-avx.c: Re-generated.
8830         * features/i386/x32-avx-linux.c: Re-generated.
8831         * features/i386/x32.c: Re-generated.
8832         * features/i386/x32-linux.c: Re-generated.
8833         * features/microblaze.c: Re-generated.
8834         * features/microblaze-with-stack-protect.c: Re-generated.
8835         * features/mips64-dsp-linux.c: Re-generated.
8836         * features/mips64-linux.c: Re-generated.
8837         * features/mips-dsp-linux.c: Re-generated.
8838         * features/mips-linux.c: Re-generated.
8839         * features/nds32.c: Re-generated.
8840         * features/nios2.c: Re-generated.
8841         * features/nios2-linux.c: Re-generated.
8842         * features/rs6000/powerpc-32.c: Re-generated.
8843         * features/rs6000/powerpc-32l.c: Re-generated.
8844         * features/rs6000/powerpc-403.c: Re-generated.
8845         * features/rs6000/powerpc-403gc.c : Re-generated.
8846         * features/rs6000/powerpc-405.c: Re-generated.
8847         * features/rs6000/powerpc-505.c: Re-generated.
8848         * features/rs6000/powerpc-601.c: Re-generated.
8849         * features/rs6000/powerpc-602.c: Re-generated.
8850         * features/rs6000/powerpc-603.c: Re-generated.
8851         * features/rs6000/powerpc-604.c: Re-generated.
8852         * features/rs6000/powerpc-64.c: Re-generated.
8853         * features/rs6000/powerpc-64l.c: Re-generated.
8854         * features/rs6000/powerpc-7400.c: Re-generated.
8855         * features/rs6000/powerpc-750.c: Re-generated.
8856         * features/rs6000/powerpc-860.c: Re-generated.
8857         * features/rs6000/powerpc-altivec32.c: Re-generated.
8858         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8859         * features/rs6000/powerpc-altivec64.c: Re-generated.
8860         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8861         * features/rs6000/powerpc-cell32l.c: Re-generated.
8862         * features/rs6000/powerpc-cell64l.c: Re-generated.
8863         * features/rs6000/powerpc-e500.c: Re-generated.
8864         * features/rs6000/powerpc-e500l.c: Re-generated.
8865         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8866         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8867         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8868         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8869         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8870         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8871         * features/rs6000/powerpc-vsx32.c: Re-generated.
8872         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8873         * features/rs6000/powerpc-vsx64.c: Re-generated.
8874         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8875         * features/rs6000/rs6000.c: Re-generated.
8876         * features/s390-linux32.c: Re-generated.
8877         * features/s390-linux32v1.c: Re-generated.
8878         * features/s390-linux32v2.c: Re-generated.
8879         * features/s390-linux64.c: Re-generated.
8880         * features/s390-linux64v1.c: Re-generated.
8881         * features/s390-linux64v2.c: Re-generated.
8882         * features/s390-te-linux64.c: Re-generated.
8883         * features/s390-tevx-linux64.c: Re-generated.
8884         * features/s390-vx-linux64.c: Re-generated.
8885         * features/s390x-linux64.c: Re-generated.
8886         * features/s390x-linux64v1.c: Re-generated.
8887         * features/s390x-linux64v2.c: Re-generated.
8888         * features/s390x-te-linux64.c: Re-generated.
8889         * features/s390x-tevx-linux64.c: Re-generated.
8890         * features/s390x-vx-linux64.c: Re-generated.
8891         * features/sparc/sparc32-solaris.c: Re-generated.
8892         * features/sparc/sparc64-solaris.c: Re-generated.
8893         * features/tic6x-c62x.c: Re-generated.
8894         * features/tic6x-c62x-linux.c: Re-generated.
8895         * features/tic6x-c64x.c: Re-generated.
8896         * features/tic6x-c64x-linux.c: Re-generated.
8897         * features/tic6x-c64xp.c: Re-generated.
8898         * features/tic6x-c64xp-linux.c: Re-generated.
8899
8900 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8901
8902         * i386-linux-tdep.c (i386_linux_read_description): New function.
8903         (i386_linux_core_read_description): Call
8904         i386_linux_read_description.
8905         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8906         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8907         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8908         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8909         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8910         * x86-linux-nat.c (x86_linux_read_description): Call
8911         i386_linux_read_description.
8912
8913 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8914
8915         * NEWS: Mention it.
8916         * features/Makefile (%.c: %.xml): Pass the xml file name to
8917         command "maint print c-tdesc".
8918         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8919         name from 'arg'.
8920
8921 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8922
8923         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8924         in-class initialization.
8925         (tdesc_create_feature): Call new instead of XCNEW.
8926         (free_target_description): Ue delete.
8927
8928 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8929
8930         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8931
8932 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8933
8934         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8935         constant.
8936         (amd64_x32_init_abi): Likewise.
8937         * amd64-tdep.h (amd64_init_abi): Update declaration.
8938         (amd64_x32_init_abi): Likewise.
8939
8940 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8941
8942         PR tdep/21717
8943         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8944         condition for FPSCR.
8945         (arm_linux_store_inferior_registers): Likewise.
8946
8947 2017-07-22  Tom Tromey  <tom@tromey.com>
8948
8949         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8950         <syscalls_counts>: Now a std::vector.
8951         (get_catch_syscall_inferior_data): Use "new".
8952         (catch_syscall_inferior_data_cleanup): Use "delete".
8953         (insert_catch_syscall, remove_catch_syscall)
8954         (clear_syscall_counts): Update.
8955
8956 2017-07-22  Tom Tromey  <tom@tromey.com>
8957
8958         * break-catch-syscall.c (syscall_catchpoint)
8959         <syscalls_to_be_caught>: Now a std::vector<int>
8960         (~syscall_catchpoint): Remove.
8961         (insert_catch_syscall, remove_catch_syscall)
8962         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8963         (print_mention_catch_syscall, print_recreate_catch_syscall):
8964         Update.
8965         (create_syscall_event_catchpoint): Change type of "filter"
8966         parameter.
8967         (catch_syscall_split_args): Return a std::vector.
8968         (catch_syscall_command_1, catching_syscall_number_1): Update.
8969
8970 2017-07-22  Tom Tromey  <tom@tromey.com>
8971
8972         * break-catch-throw.c (struct exception_catchpoint)
8973         <exception_rx>: Now a std::string.
8974         (~exception_catchpoint): Remove.
8975         (print_one_detail_exception_catchpoint): Update.
8976         (handle_gnu_v3_exceptions): Change type of except_rx.
8977         (extract_exception_regexp): Return a std::string.
8978         (catch_exception_command_1): Update.
8979
8980 2017-07-22  Tom Tromey  <tom@tromey.com>
8981
8982         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8983         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8984         std::vector.
8985         <catch_all>: Now a bool.
8986         (~signal_catchpoint): Remove.
8987         (signal_catchpoint_insert_location)
8988         (signal_catchpoint_remove_location)
8989         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8990         (signal_catchpoint_print_mention)
8991         (signal_catchpoint_print_recreate)
8992         (signal_catchpoint_explains_signal): Update.
8993         (create_signal_catchpoint): Change type of "filter" and
8994         "catch_all".
8995         (catch_signal_split_args): Return a std::vector.  Change type of
8996         "catch_all".
8997         (catch_signal_command): Update.
8998
8999 2017-07-20  Pedro Alves  <palves@redhat.com>
9000
9001         * ada-lang.c (ada_language_defn): Make extern.
9002         (_initialize_ada_language): Remove add_language call.
9003         * c-lang.c (c_language_defn, cplus_language_defn)
9004         (asm_language_defn, minimal_language_defn): Make extern.
9005         (_initialize_c_language): Delete.
9006         * completer.c (compare_cstrings): Delete, moved to utils.h.
9007         * d-lang.c (d_language_defn): Make extern.
9008         (_initialize_d_language): Remove add_language calls.
9009         * defs.h (enum language): Add comment.
9010         * f-lang.c (f_language_defn): Make extern.
9011         (_initialize_f_language): Remove add_language call.
9012         * go-lang.c (go_language_defn): Make extern.
9013         (_initialize_go_language): Remove add_language call.
9014         * language.c: Include <algorithm>.
9015         (languages): Redefine as const array.
9016         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9017         (set_language_command): Handle "local".  Use for-range loop.
9018         (set_language): Remove loop.
9019         (language_enum): Rewrite.
9020         (language_def, language_str): Remove loops.
9021         (add_language): Delete.
9022         (add_set_language_command): New, based on add_languages.
9023         (skip_language_trampoline): Adjust.
9024         (local_language_defn): Delete.
9025         (language_gdbarch_post_init): Adjust.
9026         (_initialize_language): Remove add_language calls.  Call
9027         add_set_language_command.
9028         * language.h (add_language): Delete.
9029         (auto_language_defn)
9030         (unknown_language_defn, minimal_language_defn, ada_language_defn)
9031         (asm_language_defn, c_language_defn, cplus_language_defn)
9032         (d_language_defn, f_language_defn, go_language_defn)
9033         (m2_language_defn, objc_language_defn, opencl_language_defn)
9034         (pascal_language_defn, rust_language_defn): Declare.
9035         * m2-lang.c (m2_language_defn): Make extern.
9036         (_initialize_m2_language): Remove add_language call.
9037         * objc-lang.c (objc_language_defn): Make extern.
9038         (_initialize_objc_language): Remove add_language call.
9039         * opencl-lang.c (opencl_language_defn): Make extern.
9040         (_initialize_opencl_language): Remove add_language call.
9041         * p-lang.c (pascal_language_defn): Make extern.
9042         (_initialize_pascal_language): Delete.
9043         * rust-lang.c (rust_language_defn): Make extern.
9044         (_initialize_rust_language): Delete.
9045         * utils.h (compare_cstrings): New static inline function.
9046
9047 2017-07-20  Pedro Alves  <palves@redhat.com>
9048
9049         * ada-lang.c (ada_to_fixed_type_1): Adjust.
9050         (get_var_value): Constify parameters.
9051         (get_int_var_value): Change prototype.
9052         (to_fixed_range_type): Adjust.
9053         * ada-lang.h (get_int_var_value): Change prototype.
9054
9055 2017-07-20  Pedro Alves  <palves@redhat.com>
9056
9057         * dwarf2read.c (dw2_lookup_symbol): Use
9058         SYMBOL_MATCHES_SEARCH_NAME.
9059         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9060
9061 2017-07-20  Pedro Alves  <palves@redhat.com>
9062
9063         * block.c (block_iter_name_step, block_iter_name_first)
9064         (block_iter_name_next): Delete.
9065         (block_lookup_symbol_primary): Adjust to use
9066         dict_iter_match_first/dict_iter_match_next.
9067         * block.h (block_iter_name_first, block_iter_name_next): Delete
9068         declarations.
9069         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9070         dict_iter_match_first/dict_iter_match_next.
9071
9072 2017-07-20  Pedro Alves  <palves@redhat.com>
9073
9074         * cp-support.c (cp_find_first_component_aux): Add missing case for
9075         end of string.
9076
9077 2017-07-18  David Blaikie  <dblaikie@gmail.com>
9078
9079         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9080         of dwo_cu's dwo_file.
9081
9082 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9083
9084         * remote.c (store_registers_using_G): Remove one line comment.
9085
9086 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9087
9088         * regcache.c (regcache_cpy): Simplify it.
9089         (regcache::cpy_no_passthrough): Remove it.
9090         * regcache.h (cpy_no_passthrough): Remove it.
9091         (regcache_dup, regcache_cpy): Update comments.
9092
9093 2017-07-18  Pedro Alves  <palves@redhat.com>
9094
9095         * remote-sim.c (sim_command_completer): Adjust to work with a
9096         completion_tracker instead of a VEC.
9097
9098 2017-07-17  Pedro Alves  <palves@redhat.com>
9099
9100         * completer.c (complete_source_filenames): New function.
9101         (complete_address_and_linespec_locations): New function.
9102         (location_completer): Use complete_address_and_linespec_locations.
9103         (completion_tracker::build_completion_result): Honor the tracker's
9104         request to suppress append.
9105         * completer.h (completion_tracker::suppress_append_ws)
9106         (completion_tracker::set_suppress_append_ws): New methods.
9107         (completion_tracker::m_suppress_append_ws): New field.
9108         (complete_source_filenames): New declaration.
9109         * linespec.c (linespec_complete_what): New.
9110         (struct ls_parser) <complete_what, completion_word,
9111         completion_quote_char, completion_quote_end, completion_tracker>:
9112         New fields.
9113         (string_find_incomplete_keyword_at_end): New.
9114         (linespec_lexer_lex_string): Record quote char.  If in completion
9115         mode, don't throw.
9116         (linespec_lexer_consume_token): Advance the completion word point.
9117         (linespec_lexer_peek_token): Save/restore completion info.
9118         (save_stream_and_consume_token): New.
9119         (set_completion_after_number): New.
9120         (linespec_parse_basic): Set what to complete next depending on
9121         token.  Handle function and label completions specially.
9122         (parse_linespec): Disable objc shortcut in completion mode.  Set
9123         what to complete next depending on token type.  Skip keyword if in
9124         completion mode.
9125         (complete_linespec_component, linespec_complete): New.
9126         * linespec.h (linespec_complete): Declare.
9127
9128 2017-07-17  Pedro Alves  <palves@redhat.com>
9129
9130         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9131         Handle 'operator<' / 'operator<<'.
9132
9133 2017-07-17  Pedro Alves  <palves@redhat.com>
9134
9135         * completer.c (collect_explicit_location_matches): Handle
9136         MATCH_LABEL.
9137         (convert_explicit_location_to_linespec): New, factored out from
9138         ...
9139         (convert_explicit_location_to_sals): ... this.
9140         (complete_label): New.
9141         (linespec_complete_label, find_label_symbols_in_block): New.
9142         (find_label_symbols): Add completion_mode parameter and adjust to
9143         call find_label_symbols_in_block.
9144         * linespec.h (linespec_complete_label): Declare.
9145
9146 2017-07-17  Pedro Alves  <palves@redhat.com>
9147
9148         * ada-lang.c (ada_collect_symbol_completion_matches): Add
9149         complete_symbol_mode parameter.
9150         * cli/cli-cmds.c (complete_command): Get the completion result out
9151         of the handle_brkchars tracker if used a custom word point.
9152         * completer.c: Include "linespec.h".
9153         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9154         (advance_to_expression_complete_word_point): New.
9155         (completion_tracker::completes_to_completion_word): New.
9156         (complete_files_symbols): Pass down
9157         complete_symbol_mode::EXPRESSION.
9158         (explicit_options, probe_options): New.
9159         (collect_explicit_location_matches): Complete on the
9160         explictit_loc->foo instead of word.  Use
9161         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
9162         keyword and options completions.
9163         (backup_text_ptr): Delete.
9164         (skip_keyword): New.
9165         (complete_explicit_location): Remove 'word' parameter.  Add
9166         language, quoted_arg_start and quoted_arg_end parameters.
9167         Rewrite, parsing left to right.
9168         (location_completer): Rewrite.
9169         (location_completer_handle_brkchars): New function.
9170         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9171         (enum complete_line_internal_reason): Adjust comments.
9172         (completion_tracker::discard_completions): New.
9173         (completer_handle_brkchars_func_for_completer): Handle
9174         location_completer.
9175         (gdb_custom_word_point_brkchars)
9176         (gdb_org_rl_basic_quote_characters): New.
9177         (gdb_completion_word_break_characters_throw)
9178         (completion_find_completion_word): Handle trackers that use a
9179         custom word point.
9180         (completion_tracker::advance_custom_word_point_by): New.
9181         (completion_tracker::build_completion_result): Don't rely on
9182         readline appending the quote char.
9183         (gdb_rl_attempted_completion_function_throw): Handle trackers that
9184         use a custom word point.
9185         (gdb_rl_attempted_completion_function): Restore
9186         rl_basic_quote_characters.
9187         * completer.h (class completion_tracker): Extend intro comment.
9188         (completion_tracker::set_quote_char)
9189         (completion_tracker::quote_char)
9190         (completion_tracker::set_use_custom_word_point)
9191         (completion_tracker::use_custom_word_point)
9192         (completion_tracker::custom_word_point)
9193         (completion_tracker::set_custom_word_point)
9194         (completion_tracker::advance_custom_word_point_by)
9195         (completion_tracker::completes_to_completion_word)
9196         (completion_tracker::discard_completions): New methods.
9197         (completion_tracker::m_quote_char)
9198         (completion_tracker::m_use_custom_word_point)
9199         (completion_tracker::m_custom_word_point): New fields.
9200         (advance_to_expression_complete_word_point): Declare.
9201         * f-lang.c (f_collect_symbol_completion_matches): Add
9202         complete_symbol_mode parameter.
9203         * language.h (struct language_defn)
9204         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9205         parameter.
9206         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
9207         (linespec_complete_function): New function.
9208         (linespec_lexer_lex_keyword): Adjust.
9209         * linespec.h (linespec_keywords, linespec_complete_function): New
9210         declarations.
9211         * location.c (find_end_quote): New function.
9212         (explicit_location_lex_one): Add explicit_completion_info
9213         parameter.  Save quoting info.  Don't throw if being called for
9214         completion.  Don't handle Ada operators here.
9215         (is_cp_operator, skip_op_false_positives, first_of)
9216         (explicit_location_lex_one_function): New function.
9217         (string_to_explicit_location): Replace 'dont_throw' parameter with
9218         an explicit_completion_info pointer parameter.  Handle it.  Don't
9219         use explicit_location_lex_one to lex function names.  Use
9220         explicit_location_lex_one_function instead.
9221         * location.h (struct explicit_completion_info): New.
9222         (string_to_explicit_location): Replace 'dont_throw' parameter with
9223         an explicit_completion_info pointer parameter.
9224         * symtab.c (default_collect_symbol_completion_matches_break_on):
9225         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
9226         (default_collect_symbol_completion_matches)
9227         (collect_symbol_completion_matches): Add complete_symbol_mode
9228         parameter.
9229         (collect_symbol_completion_matches_type): Pass down
9230         complete_symbol_mode::EXPRESSION.
9231         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9232         parameter.  Handle LINESPEC mode.
9233         * symtab.h (complete_symbol_mode): New.
9234         (default_collect_symbol_completion_matches_break_on)
9235         (default_collect_symbol_completion_matches)
9236         (collect_symbol_completion_matches)
9237         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9238         parameter.
9239
9240 2017-07-17  Pedro Alves  <palves@redhat.com>
9241
9242         * utils.c (enum class strncmp_iw_mode): New.
9243         (strcmp_iw): Rename to ...
9244         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
9245         parameters.  Handle them.
9246         (strncmp_iw): New.
9247         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9248         * utils.h (strncmp_iw): Declare.
9249         (strcmp_iw): Move describing comments here.
9250
9251 2017-07-17  Pedro Alves  <palves@redhat.com>
9252
9253         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9254         CP_OPERATOR_STR.
9255         * c-typeprint.c (is_type_conversion_operator): Use
9256         CP_OPERATOR_STR.
9257         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9258         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9259         CP_OPERATOR_LEN.
9260         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9261         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9262         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9263         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9264         CP_OPERATOR_STR.
9265         * location.c: Include "cp-support.h".
9266         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9267         CP_OPERATOR_STR.
9268         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9269         CP_OPERATOR_LEN.
9270
9271 2017-07-17  Pedro Alves  <palves@redhat.com>
9272
9273         * cli/cli-cmds.c (complete_command): Use a completion tracker
9274         along with completion_find_completion_word for handle_brkchars
9275         phase.
9276         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9277         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9278         (struct gdb_rl_completion_word_info): New.
9279         (gdb_rl_find_completion_word): New.
9280         (completion_find_completion_word): New.
9281         * completer.h (completion_find_completion_word): Declare.
9282
9283 2017-07-17  Pedro Alves  <palves@redhat.com>
9284
9285         * ada-lang.c (symbol_completion_match): Adjust comments.
9286         (symbol_completion_add): Replace vector parameter with
9287         completion_tracker parameter.  Use it.
9288         (ada_make_symbol_completion_list): Rename to...
9289         (ada_collect_symbol_completion_matches): ... this.  Add
9290         completion_tracker parameter and use it.
9291         (ada_language_defn): Adjust.
9292         * break-catch-syscall.c (catch_syscall_completer): Adjust
9293         prototype and work with completion_tracker instead of VEC.
9294         * breakpoint.c (condition_completer): Adjust prototype and work
9295         with completion_tracker instead of VEC.
9296         * c-lang.c (c_language_defn, cplus_language_defn)
9297         (asm_language_defn, minimal_language_defn): Adjust to renames.
9298         * cli/cli-cmds.c (complete_command): Rework using
9299         completion_tracker.  Catch exceptions when completing.
9300         * cli/cli-decode.c (integer_unlimited_completer)
9301         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9302         with completion_tracker instead of VEC.
9303         * command.h (struct completion_tracker): Forward declare.
9304         (completer_ftype, completer_handle_brkchars_ftype): Change
9305         types.
9306         (complete_on_cmdlist, complete_on_enum): Adjust.
9307         * completer.c: Include <algorithm>.
9308         (struct gdb_completer_state): New.
9309         (current_completion): New global.
9310         (readline_line_completion_function): Delete.
9311         (noop_completer, filename_completer)
9312         (filename_completer_handle_brkchars, complete_files_symbols)
9313         (linespec_location_completer): Adjust to work with a
9314         completion_tracker instead of a VEC.
9315         (string_or_empty): New.
9316         (collect_explicit_location_matches): Adjust to work with a
9317         completion_tracker instead of a VEC.
9318         (explicit_location_completer): Rename to ...
9319         (complete_explicit_location): ... this and adjust to work with a
9320         completion_tracker instead of a VEC.
9321         (location_completer): Adjust to work with a completion_tracker
9322         instead of a VEC.
9323         (add_struct_fields): Adjust to work with a completion_list instead
9324         of VEC.
9325         (expression_completer): Rename to ...
9326         (complete_expression): ... this and adjust to work with a
9327         completion_tracker instead of a VEC.  Use complete_files_symbols.
9328         (expression_completer): Reimplement on top of complete_expression.
9329         (symbol_completer): Adjust to work with a completion_tracker
9330         instead of a VEC.
9331         (enum complete_line_internal_reason): Add describing comments.
9332         (complete_line_internal_normal_command): Adjust to work with a
9333         completion_tracker instead of a VEC.
9334         (complete_line_internal): Rename to ...
9335         (complete_line_internal_1): ... this and adjust to work with a
9336         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
9337         handle_brkchars phase.
9338         (new_completion_tracker): Delete.
9339         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9340         complete_line_internal_1.
9341         (free_completion_tracker): Delete.
9342         (INITIAL_COMPLETION_HTAB_SIZE): New.
9343         (completion_tracker::completion_tracker)
9344         (completion_tracker::~completion_tracker): New.
9345         (maybe_add_completion): Delete.
9346         (completion_tracker::maybe_add_completion)
9347         (completion_tracker::add_completion)
9348         (completion_tracker::add_completions): New.
9349         (throw_max_completions_reached_error): Delete.
9350         (complete_line): Adjust to work with a completion_tracker instead
9351         of a VEC.  Don't create a completion_tracker_t or check for max
9352         completions here.
9353         (command_completer, command_completer_handle_brkchars)
9354         (signal_completer, reg_or_group_completer_1)
9355         (reg_or_group_completer, default_completer_handle_brkchars):
9356         Adjust to work with a completion_tracker.
9357         (gdb_completion_word_break_characters_throw): New.
9358         (gdb_completion_word_break_characters): Reimplement.
9359         (line_completion_function): Delete.
9360         (completion_tracker::recompute_lowest_common_denominator)
9361         (expand_preserving_ws)
9362         (completion_tracker::build_completion_result)
9363         (completion_result::completion_result)
9364         (completion_result::completion_result)
9365         (completion_result::~completion_result)
9366         (completion_result::completion_result)
9367         (completion_result::release_match_list, compare_cstrings)
9368         (completion_result::sort_match_list)
9369         (completion_result::reset_match_list)
9370         (gdb_rl_attempted_completion_function_throw)
9371         (gdb_rl_attempted_completion_function): New.
9372         * completer.h (completion_list, struct completion_result)
9373         (class completion_tracker): New.
9374         (complete_line): Add completion_tracker parameter.
9375         (readline_line_completion_function): Delete.
9376         (gdb_rl_attempted_completion_function): New.
9377         (noop_completer, filename_completer, expression_completer)
9378         (location_completer, symbol_completer, command_completer)
9379         (signal_completer, reg_or_group_completer): Update prototypes.
9380         (completion_tracker_t, new_completion_tracker)
9381         (make_cleanup_free_completion_tracker): Delete.
9382         (enum maybe_add_completion_enum): Delete.
9383         (maybe_add_completion): Delete.
9384         (throw_max_completions_reached_error): Delete.
9385         * corefile.c (complete_set_gnutarget): Adjust to work with a
9386         completion_tracker instead of a VEC.
9387         * cp-abi.c (cp_abi_completer): Adjust to work with a
9388         completion_tracker instead of a VEC.
9389         * d-lang.c (d_language_defn): Adjust.
9390         * disasm.c (disassembler_options_completer): Adjust to work with a
9391         completion_tracker instead of a VEC.
9392         * f-lang.c (f_make_symbol_completion_list): Rename to ...
9393         (f_collect_symbol_completion_matches): ... this.  Adjust to work
9394         with a completion_tracker instead of a VEC.
9395         (f_language_defn): Adjust.
9396         * go-lang.c (go_language_defn): Adjust.
9397         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9398         Adjust to work with a completion_tracker instead of a VEC.
9399         * infrun.c (handle_completer): Likewise.
9400         * interps.c (interpreter_completer): Likewise.
9401         * interps.h (interpreter_completer): Likewise.
9402         * language.c (unknown_language_defn, auto_language_defn)
9403         (local_language_defn): Adjust.
9404         * language.h (language_defn::la_make_symbol_completion_list):
9405         Rename to ...
9406         (language_defn::la_collect_symbol_completion_matches): ... this
9407         and adjust to work with a completion_tracker instead of a VEC.
9408         * m2-lang.c (m2_language_defn): Adjust.
9409         * objc-lang.c (objc_language_defn): Adjust.
9410         * opencl-lang.c (opencl_language_defn): Adjust.
9411         * p-lang.c (pascal_language_defn): Adjust.
9412         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9413         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9414         with a completion_tracker.
9415         * rust-lang.c (rust_language_defn): Adjust.
9416         * symtab.c (free_completion_list, do_free_completion_list)
9417         (return_val, completion_tracker): Delete.
9418         (completion_list_add_name, completion_list_add_symbol)
9419         (completion_list_add_msymbol, completion_list_objc_symbol)
9420         (completion_list_add_fields, add_symtab_completions): Add
9421         completion_tracker parameter and use it.
9422         (default_make_symbol_completion_list_break_on_1): Rename to...
9423         (default_collect_symbol_completion_matches_break_on): ... this.
9424         Add completion_tracker parameter and use it instead of allocating
9425         a completion tracker here.
9426         (default_make_symbol_completion_list_break_on): Delete old
9427         implementation.
9428         (default_make_symbol_completion_list): Delete.
9429         (default_collect_symbol_completion_matches): New.
9430         (make_symbol_completion_list): Delete.
9431         (collect_symbol_completion_matches): New.
9432         (make_symbol_completion_type): Rename to ...
9433         (collect_symbol_completion_matches_type): ... this.  Add
9434         completion_tracker parameter and use it instead of VEC.
9435         (make_file_symbol_completion_list_1): Rename to...
9436         (collect_file_symbol_completion_matches): ... this.  Add
9437         completion_tracker parameter and use it instead of VEC.
9438         (make_file_symbol_completion_list): Delete.
9439         (add_filename_to_list): Use completion_list instead of a VEC.
9440         (add_partial_filename_data::list): Now a completion_list.
9441         (make_source_files_completion_list): Work with a completion_list
9442         instead of a VEC.
9443         * symtab.h: Include "completer.h".
9444         (default_make_symbol_completion_list_break_on)
9445         (default_make_symbol_completion_list, make_symbol_completion_list)
9446         (make_symbol_completion_type, make_file_symbol_completion_list)
9447         (make_source_files_completion_list): Delete.
9448         (default_collect_symbol_completion_matches_break_on)
9449         (default_collect_symbol_completion_matches)
9450         (collect_symbol_completion_matches)
9451         (collect_symbol_completion_matches_type)
9452         (collect_file_symbol_completion_matches)
9453         (make_source_files_completion_list): New.
9454         * top.c (init_main): Don't install a rl_completion_entry_function
9455         hook.  Install a rl_attempted_completion_function hook instead.
9456         * tui/tui-layout.c (layout_completer): Adjust to work with a
9457         completion_tracker.
9458         * tui/tui-regs.c (tui_reggroup_completer):
9459         * tui/tui-win.c (window_name_completer, focus_completer)
9460         (winheight_completer): Adjust to work with a completion_tracker.
9461         * value.c: Include "completer.h".
9462         (complete_internalvar): Adjust to work with a completion_tracker.
9463         * value.h (complete_internalvar): Likewise.
9464
9465 2017-07-17  Pedro Alves  <palves@redhat.com>
9466
9467         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9468         renames.
9469         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9470         comments to completer_ftype's declaration.
9471         <completer_handle_brkchars>: Change type to
9472         completer_handle_brkchars_ftype.
9473         * command.h (completer_ftype): Add describing comment and give
9474         names to parameters.
9475         (completer_ftype_void): Rename to ...
9476         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
9477         (set_cmd_completer_handle_brkchars): Adjust.
9478         * completer.c (filename_completer_handle_brkchars): New function.
9479         (complete_line_internal_normal_command): New function, factored
9480         out from ...
9481         (complete_line_internal): ... here.
9482         (command_completer_handle_brkchars)
9483         (default_completer_handle_brkchars)
9484         (completer_handle_brkchars_func_for_completer): New functions.
9485         * completer.h (set_gdb_completion_word_break_characters): Delete
9486         declaration.
9487         (completer_handle_brkchars_func_for_completer): New declaration.
9488         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9489         completer_handle_brkchars_func_for_completer.
9490
9491 2017-07-17  Pedro Alves  <palves@redhat.com>
9492
9493         * completer.c (symbol_completer): New function, based on
9494         make_symbol_completion_list_fn.
9495         * completer.h (symbol_completer): New declaration.
9496         * guile/scm-cmd.c (cmdscm_completers): Adjust.
9497         * python/py-cmd.c (completers): Adjust.
9498         * symtab.c (make_symbol_completion_list_fn): Delete.
9499         * symtab.h (make_symbol_completion_list_fn): Delete.
9500         * cli/cli-decode.c (add_cmd): Adjust.
9501
9502 2017-07-17  Pedro Alves  <palves@redhat.com>
9503
9504         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9505         * dwarf2read.c: Include "filename-seen-cache.h".
9506         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9507         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9508         * filename-seen-cache.c: New file.
9509         * filename-seen-cache.h: New file.
9510         * symtab.c: Include "filename-seen-cache.h".
9511         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9512         (create_filename_seen_cache, clear_filename_seen_cache)
9513         (delete_filename_seen_cache, filename_seen): Delete, parts moved
9514         to filename-seen-cache.h/filename-seen-cache.c.
9515         (output_source_filename, sources_info)
9516         (maybe_add_partial_symtab_filename)
9517         (make_source_files_completion_list): Adjust to use
9518         filename_seen_cache.
9519
9520 2017-07-17  Pedro Alves  <palves@redhat.com>
9521
9522         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9523         fields.
9524         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9525         dwarf2_debug_sections*)): New.
9526         (dwarf2_per_objfile::dwarf2_per_objfile(const
9527         dwarf2_per_objfile&)): Declare as deleted.
9528         (dwarf2_per_objfile::operator=): Declare as deleted.
9529         (dwarf2_per_objfile::dwarf2_per_objfile)
9530         (dwarf2_per_objfile::~dwarf2_per_objfile)
9531         (dwarf2_per_objfile::free_cached_comp_units): New.
9532         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9533         ctor.  Call dwarf2_per_objfile's ctor manually.
9534         (dwarf2_locate_sections): Deleted/refactored as ...
9535         (dwarf2_per_objfile::locate_sections): ... this new method.
9536         (free_cached_comp_units): Defer to
9537         dwarf2_per_objfile::free_cached_comp_units.
9538         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9539
9540 2017-07-14  Tom Tromey  <tom@tromey.com>
9541
9542         PR rust/21764:
9543         * rust-exp.y (convert_ast_to_expression): Add "want_type"
9544         parameter.
9545         <UNOP_SIZEOF>: Split into separate case.
9546         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
9547
9548 2017-07-14  Tom Tromey  <tom@tromey.com>
9549
9550         PR rust/21763:
9551         * symtab.c (symbol_matches_domain): Add language_rust to special
9552         case.
9553         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9554         treat LOC_TYPEDEF symbols as variables.
9555
9556 2017-07-14  Pedro Alves  <palves@redhat.com>
9557
9558         * symtab.c (make_file_symbol_completion_list_1): Iterate over
9559         symtabs matching all symtabs with SRCFILE as file name instead of
9560         only considering the first hit, with lookup_symtab.
9561
9562 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9563
9564         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9565         operator_name parameters.
9566         (gen_expr): Update function call.
9567
9568 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9569
9570         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9571         parameter.
9572         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9573         Likewise.
9574         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9575         parameter, use agent_expr::gdbarch instead, update function
9576         calls.
9577         (locexpr_tracepoint_var_ref): Likewise.
9578         (loclist_tracepoint_var_ref): Likewise.
9579         * ax-gdb.c (gen_trace_static_fields): Likewise.
9580         (gen_traced_pop): Likewise.
9581         (gen_frame_args_address): Likewise.
9582         (gen_frame_locals_address): Likewise.
9583         (gen_var_ref): Likewise.
9584         (gen_struct_ref_recursive): Likewise.
9585         (gen_static_field): Likewise.
9586         (gen_maybe_namespace_elt): Likewise.
9587         (gen_expr): Likewise.
9588         (gen_trace_for_var): Likewise.
9589         (gen_trace_for_expr): Likewise.
9590         (gen_trace_for_return_address): Likewise.
9591
9592 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9593
9594         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9595         parameter.
9596         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9597
9598 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
9599
9600         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9601         from ax, update calls.
9602         (gen_usual_arithmetic): Likewise.
9603         (gen_integral_promotions): Likewise.
9604         (gen_bitfield_ref): Likewise.
9605         (gen_primitive_field): Likewise.
9606         (gen_struct_ref_recursive): Likewise.
9607         (gen_struct_ref): Likewise.
9608         (gen_maybe_namespace_elt): Likewise.
9609         (gen_struct_elt_for_reference): Likewise.
9610         (gen_namespace_elt): Likewise.
9611         (gen_aggregate_elt_ref): Likewise.
9612         (gen_expr): Get gdbarch from ax, update calls.
9613         (gen_expr_binop_rest): Likewise.
9614
9615 2017-07-13  Pedro Alves  <palves@redhat.com>
9616
9617         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9618         as default tdesc.
9619         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9620         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9621         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9622         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
9623         tdep.
9624         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9625         Get final tdesc from the tdep.
9626         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9627         default tdesc.
9628         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9629         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9630         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9631         Use it as default tdesc.
9632         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9633         down to amd_init_abi.  No longer handle fallback tdesc here.
9634         * amd64-tdep.h (tdesc_x32): Declare.
9635         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9636         parameter.
9637         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9638         as default tdesc.
9639
9640 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9641
9642         * s390-linux-tdep.c (s390_process_record): Add support for
9643         instructions new in arch12.
9644
9645 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9646
9647         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9648         PT_GETFSBASE and PT_GETGSBASE.
9649         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9650         PT_SETGSBASE.
9651
9652 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
9653
9654         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9655         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9656         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9657         those rules.
9658         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9659         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9660         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9661         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9662         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9663         * features/i386/amd64.xml: Add 64bit-segments.xml.
9664         * features/i386/amd64-avx-avx512.c: Regenerated.
9665         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9666         * features/i386/amd64-avx-mpx.c: Regenerated.
9667         * features/i386/amd64-avx.c: Regenerated.
9668         * features/i386/amd64-mpx.c: Regenerated.
9669         * features/i386/amd64.c: Regenerated.
9670         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9671         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9672         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9673         * regformats/i386/amd64-avx.dat: Regenerated.
9674         * regformats/i386/amd64-mpx.dat: Regenerated.
9675         * regformats/i386/amd64.dat: Regenerated.
9676
9677 2017-07-10  Yao Qi  <yao.qi@linaro.org>
9678
9679         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9680         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9681
9682 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
9683
9684         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9685         unsetenv.
9686         * gnulib/aclocal.m4: Regenerate.
9687         * gnulib/config.in: Regenerate.
9688         * gnulib/configure: Regenerate.
9689         * gnulib/import/Makefile.am: Regenerate.
9690         * gnulib/import/Makefile.in: Regenerate.
9691         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9692         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9693         * gnulib/import/m4/environ.m4: New file.
9694         * gnulib/import/m4/setenv.m4: New file.
9695         * gnulib/import/setenv.c: New file.
9696         * gnulib/import/unsetenv.c: New file.
9697
9698 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
9699
9700         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9701         address when op is DW_OP_addr.
9702
9703 2017-07-09  Tom Tromey  <tom@tromey.com>
9704
9705         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9706         check and apply to outer type.
9707
9708 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9709
9710         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9711         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9712         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9713         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9714
9715 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9716
9717         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9718
9719 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9720
9721         * corelow.c (get_core_siginfo): Remove.
9722         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9723         instead of get_core_siginfo.
9724         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9725         * gdbarch.h: Re-generate.
9726         * gdbarch.c: Re-generate.
9727         * linux-tdep.c (linux_core_xfer_siginfo): New.
9728         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9729
9730 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9731
9732         * corelow.c (thread_section_name): Move to ...
9733         * gdbcore.h (thread_section_name): ... here.
9734
9735 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9736
9737         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9738         (struct siginfo32): New.
9739         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9740         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9741         via ptrace(PT_LWPINFO).
9742
9743 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
9744
9745         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9746         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9747         (fbsd_get_siginfo_type): New.
9748         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9749         (_initialize_fbsd_tdep): New.
9750
9751 2017-07-06  David Blaikie  <dblaikie@gmail.com>
9752
9753         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9754         a singular dwo_unit*) to support multiple CUs in the same way that
9755         multiple TUs are supported.
9756         (create_cus_hash_table): Replace create_dwo_cu with a function for
9757         parsing multiple CUs from a DWO file.
9758         (open_and_init_dwo_file): Use create_cus_hash_table rather than
9759         create_dwo_cu.
9760         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9761         htab_find, rather than comparing the signature to a singleton CU in
9762         the dwo_file.
9763
9764 2017-07-06  Pedro Alves  <palves@redhat.com>
9765
9766         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9767
9768 2017-07-04  Pedro Alves  <palves@redhat.com>
9769
9770         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9771         * gdbtypes.h (TYPE_STATIC): Delete.
9772         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9773         is_synchronized, is_native>: Delete.
9774         <dummy>: Bump.
9775         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9776         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9777         (TYPE_FN_FIELD_ABSTRACT): Delete.
9778
9779 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9780
9781         * buffer.h (buffer_finish): Fix spelling mistakes.
9782
9783 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9784
9785         * .dir-locals.el: Automatically switch to C-style comments in
9786         versions of Emacs that support the feature.
9787
9788 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9789             Pedro Alves  <palves@redhat.com>
9790
9791         PR cli/21688
9792         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9793         (process_next_line): New variable 'inline_cmd'.
9794         Adjust 'if' clauses for "python", "compile" and "guile" to use
9795         'command_name_equals' and check for '!inline_cmd'.
9796
9797 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9798
9799         PR cli/21688
9800         * cli/cli-script.c (command_name_equals_not_inline): New function.
9801         (process_next_line): Adjust 'if' clauses for "python", "compile"
9802         and "guile" to use command_name_equals_not_inline.
9803
9804 2017-06-29  Pedro Alves  <palves@redhat.com>
9805
9806         * completer.c (expression_completer): Call
9807         linespec_location_completer instead of location_completer.
9808
9809 2017-06-29  Pedro Alves  <palves@redhat.com>
9810
9811         * completer.c (expression_completer): Remove code that recomputes
9812         'text' from 'word'.
9813
9814 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9815
9816         * regformats/regdat.sh: Generate code with
9817         "ifndef IN_PROCESS_AGENT".
9818
9819 2017-06-28  Pedro Alves  <palves@redhat.com>
9820
9821         * command.h: Include "common/scoped_restore.h".
9822
9823 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9824
9825         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9826         instead of obstack_grow.
9827
9828 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9829
9830         PR gdb/21337
9831         * symfile.c (reread_symbols): Call objfiles_changed just before
9832         read_symbols.
9833
9834 2017-06-27  Pedro Alves  <palves@redhat.com>
9835
9836         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9837         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9838         (completion_list_add_symbol, completion_list_add_msymbol):
9839         ... these new functions.
9840         (add_symtab_completions)
9841         (default_make_symbol_completion_list_break_on_1): Adjust.
9842
9843 2017-06-27  Pedro Alves  <palves@redhat.com>
9844
9845         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9846         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9847         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9848         dtor.
9849         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9850         'storage_obstack' field an auto_obstack.  In-class initialize all
9851         non-bitfield fields.  Make minsyms_read bool.
9852         * symfile.c (read_symbols): Adjust.
9853
9854 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9855
9856         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9857         (gdbsim_store_register): Likewise.
9858
9859 2017-06-27  Pedro Alves  <palves@redhat.com>
9860
9861         * c-exp.y (name_obstack): Now an auto_obstack.
9862         (yylex): Use auto_obstack::clear.
9863         (c_parse): Use auto_obstack::clear instead of reinitializing and
9864         freeing the obstack.
9865         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9866         * d-exp.y (name_obstack): Now an auto_obstack.
9867         (yylex): Use auto_obstack::clear.
9868         (d_parse): Use auto_obstack::clear instead of reinitializing and
9869         freeing the obstack.
9870         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9871         auto_obstack.
9872         * dwarf2read.c (create_addrmap_from_index)
9873         (dwarf2_build_psymtabs_hard)
9874         (update_enumeration_type_from_children): Likewise.
9875         * gdb_obstack.h (auto_obstack): New type.
9876         * go-exp.y (name_obstack): Now an auto_obstack.
9877         (build_packaged_name): Use auto_obstack::clear.
9878         (go_parse): Use auto_obstack::clear instead of reinitializing and
9879         freeing the obstack.
9880         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9881         auto_obstack.
9882         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9883         * rust-exp.y (work_obstack): Now an auto_obstack.
9884         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9885         reinitializing and freeing the obstack.
9886         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9887         (host_char_to_target): Use auto_obstack.
9888         * utils.h (make_cleanup_obstack_free): Delete declaration.
9889         * valprint.c (generic_emit_char, generic_printstr): Use
9890         auto_obstack.
9891
9892 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9893
9894         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9895         thread.
9896         (darwin_init_thread_list): Don't update dummy thread.
9897         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9898
9899 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9900
9901         * record-full.c (netorder16): Remove.
9902
9903 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9904
9905         * common/diagnostics.h: Define macros for GCC.
9906         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9907         * common/vec.h: Include diagnostics.h.
9908         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9909         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9910         warning.
9911
9912 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9913
9914         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9915         New macro.
9916         * ada-lex.l: Ignore deprecated register warnings.
9917
9918 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9919
9920         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9921         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9922
9923 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9924
9925         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9926         its own line.
9927
9928 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9929
9930         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9931
9932 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9933
9934         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9935         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9936         (xtensa_register_read_masked): Likewise.
9937
9938 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9939
9940         * common/environ.c (gdb_environ::unset): Update comment.
9941
9942 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9943
9944         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9945         registers.
9946
9947 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9948
9949         * record-full.c (record_full_exec_insn): Use byte_vector.
9950
9951 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9952
9953         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9954         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9955
9956 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9957
9958         * remote.c (cached_reg): Move from here...
9959         * regcache.h (cached_reg): ...to here.
9960         * python/py-unwind.c (struct reg_info): Remove.
9961         (cached_frame_info): Use cached_reg_t.
9962         (pyuw_prev_register): Likewise.
9963         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9964         (pyuw_dealloc_cache): Free all registers.
9965
9966 2017-06-22  Pedro Alves  <palves@redhat.com>
9967             Simon Marchi  <simon.marchi@ericsson.com>
9968
9969         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9970         warning.
9971         * common/diagnostics.h: New file.
9972
9973 2017-06-22  Pedro Alves  <palves@redhat.com>
9974
9975         * common/agent.h: Add include guards.
9976
9977 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9978
9979         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9980         talk about addressable units instead of bytes.
9981
9982 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9983
9984         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9985         of '::const_iterator'.
9986
9987 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9988
9989         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9990         'unittests/environ-selftests.c'.
9991         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9992         * charset.c (find_charset_names): Declare object 'iconv_env'.
9993         Update code to use 'iconv_env' object.  Remove call to
9994         'free_environ'.
9995         * common/environ.c: Include <utility>.
9996         (make_environ): Delete function.
9997         (free_environ): Delete function.
9998         (gdb_environ::clear): New function.
9999         (gdb_environ::operator=): New function.
10000         (gdb_environ::get): Likewise.
10001         (environ_vector): Delete function.
10002         (set_in_environ): Delete function.
10003         (gdb_environ::set): New function.
10004         (unset_in_environ): Delete function.
10005         (gdb_environ::unset): New function.
10006         (gdb_environ::envp): Likewise.
10007         * common/environ.h: Include <vector>.
10008         (struct gdb_environ): Delete; transform into...
10009         (class gdb_environ): ... this class.
10010         (free_environ): Delete prototype.
10011         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10012         environ_vector): Likewise.
10013         * infcmd.c (run_command_1): Update code to call
10014         'envp' from 'gdb_environ' class.
10015         (environment_info): Update code to call methods from 'gdb_environ'
10016         class.
10017         (unset_environment_command): Likewise.
10018         (path_info): Likewise.
10019         (path_command): Likewise.
10020         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10021         (inferior::inferior): Initialize 'environment' using the host's
10022         information.
10023         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10024         Include "environ.h".
10025         (class inferior) <environment>: Change type from 'struct
10026         gdb_environ' to 'gdb_environ'.
10027         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10028         methods from 'gdb_environ' class.
10029         * solib.c (solib_find_1): Likewise
10030         * unittests/environ-selftests.c: New file.
10031
10032 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10033
10034         * features/i386/i386-linux.xml: Exchange the order of including
10035         32bit-linux.xml and 32bit-sse.xml.
10036         * features/i386/i386-linux.c: Regenerated.
10037
10038 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10039
10040         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10041         Delete copy ctor and assignment operator.
10042         (tdesc_type): Likewise.
10043         (tdesc_feature): Likewise.
10044         (tdesc_free_reg): Remove.
10045         (tdesc_create_reg): Use new.
10046         (tdesc_free_type): Remove.
10047         (tdesc_create_vector): Use new.
10048         (tdesc_create_union): Likewise.
10049         (tdesc_create_flags): Likewise.
10050         (tdesc_create_enum): Likewise.
10051         (tdesc_free_feature): Delete.
10052         (free_target_description): Use delete.
10053
10054 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
10055
10056         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10057         registers.
10058
10059 2017-06-19  Pedro Alves  <palves@redhat.com>
10060
10061         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10062         after gdb::unlinker.
10063
10064 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
10065
10066         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10067         gdb_environ to access an environment variable.
10068
10069 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
10070
10071         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10072         gdb_byte*.
10073
10074 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10075
10076         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10077
10078 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10079
10080         * configure: Re-generate.
10081         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10082
10083 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10084
10085         * configure: Re-generate.
10086         * warning.m4: Pass -Werror to compiler when checking for
10087         supported warning flags.
10088
10089 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10090
10091         * Makefile.in (COMPILE.pre): Add "-x c++".
10092
10093 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
10094             Pedro Alves  <palves@redhat.com>
10095             Yao Qi  <yao.qi@linaro.org>
10096
10097         * defs.h (RequireLongest): New.
10098         (extract_integer): Declare function template.
10099         (extract_signed_integer): Remove the declaration, but define it
10100         static inline.
10101         (extract_unsigned_integer): Likewise.
10102         (store_integer): Declare function template.
10103         (store_signed_integer): Remove the declaration, but define it
10104         static inline.
10105         (store_unsigned_integer): Likewise.
10106         * findvar.c (extract_integer): New function template.
10107         (extract_signed_integer): Remove.
10108         (extract_unsigned_integer): Remove.
10109         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10110         instantiations.
10111         (store_integer): New function template.
10112         (store_signed_integer): Remove.
10113         (store_unsigned_integer): Remove.
10114         (store_integer): Explicit instantiations.
10115         * regcache.c (regcache_raw_read_signed): Update.
10116         (regcache::raw_read): New function.
10117         (regcache::raw_read_signed): Remove.
10118         (regcache::raw_read_unsigned): Remove.
10119         (regcache_raw_read_unsigned): Update.
10120         (regcache_raw_write_unsigned): Update.
10121         (regcache::raw_write_signed): Remove.
10122         (regcache::raw_write): New function.
10123         (regcache_cooked_read_signed): Update.
10124         (regcache::raw_write_unsigned): Remove.
10125         (regcache::cooked_read_signed): Remove.
10126         (regcache_cooked_read_unsigned): Update.
10127         (regcache::cooked_read_unsigned): Remove.
10128         (regcache_cooked_write_signed): Update.
10129         (regcache_cooked_write_unsigned): Update.
10130         * regcache.h (regcache) <raw_read_signed>: Remove.
10131         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10132         <raw_read, raw_write>: New.
10133         <cooked_read_signed, cooked_write_signed>: Remove.
10134         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10135         <cooked_read, cooked_write>: New.
10136         * sh64-tdep.c (sh64_pseudo_register_read): Update.
10137         (sh64_pseudo_register_write): Update.
10138
10139 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
10140
10141         * arc-tdep.c (arc_disassembler_options): New variable.
10142         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10143         of default_print_insn.
10144         (arc_delayed_print_insn): Set info->section when needed,
10145         use default_print_insn to retrieve a disassembler.
10146
10147 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
10148
10149         PR gdb/21574
10150         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10151         to mention $SHELL and startup-with-shell.
10152
10153 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
10154
10155         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10156
10157 2017-06-14  Yao Qi  <yao.qi@linaro.org>
10158
10159         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10160         default_print_insn instead of print_insn_aarch64.
10161         * arm-tdep.c (gdb_print_insn_arm): Call
10162         default_print_insn instead of print_insn_big_arm
10163         and print_insn_little_arm.
10164         * i386-tdep.c (i386_print_insn): Call default_print_insn
10165         instead of print_insn_i386.
10166         * ia64-tdep.c (ia64_print_insn): Call
10167         default_print_insn instead of print_insn_ia64.
10168         * mips-tdep.c (gdb_print_insn_mips): Call
10169         default_print_insn instead of print_insn_big_mips
10170         and print_insn_little_mips.
10171         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10172         instead of print_insn_spu.
10173
10174 2017-06-14  Pedro Alves  <palves@redhat.com>
10175
10176         * ada-lang.c: Include "common/byte-vector.h".
10177         (ada_value_primitive_packed_val): Use gdb::byte_vector.
10178         * charset.c (wchar_iterator::iterate): Resize the vector instead
10179         of reserving it.
10180         * common/byte-vector.h: Include "common/def-vector.h".
10181         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10182         * cli/cli-dump.c: Include "common/byte-vector.h".
10183         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10184         * common/byte-vector.h: New file.
10185         * common/def-vector.h: New file.
10186         * common/default-init-alloc.h: New file.
10187         * dwarf2loc.c: Include "common/byte-vector.h".
10188         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10189         instead of reserving it.
10190         * dwarf2read.c: Include "common/byte-vector.h".
10191         (data_buf::m_vec): Now a gdb::byte_vector.
10192         * gdb_regex.c: Include "common/def-vector.h".
10193         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10194         * mi/mi-main.c: Include "common/byte-vector.h".
10195         (mi_cmd_data_read_memory): Use gdb::byte_vector.
10196         * printcmd.c: Include "common/byte-vector.h".
10197         (print_scalar_formatted): Use gdb::byte_vector.
10198         * valprint.c: Include "common/byte-vector.h".
10199         (maybe_negate_by_bytes, print_decimal_chars): Use
10200         gdb::byte_vector.
10201
10202 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10203
10204         * darwin-nat.c: Include "nat/fork-inferior.h".
10205
10206 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10207
10208         * configure.nat: Factor out Darwin bits that are not
10209         architecture-specific.  Add fork-inferior.o.
10210
10211 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10212
10213         * configure.nat: Factor out AIX bits that are not
10214         architecture-specific.  Add fork-inferior.o.
10215
10216 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10217
10218         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
10219         (read_pieced_value, write_pieced_value): ...here.  Reduce to
10220         wrappers that just call rw_pieced_value.
10221
10222 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10223
10224         * dwarf2loc.c (write_pieced_value): When writing the data for a
10225         memory piece, use write_memory_with_notification instead of
10226         write_memory.
10227
10228 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10229
10230         * valops.c (read_value_memory): Change embedded_offset to
10231         represent a bit offset instead of a byte offset.
10232         * value.h (read_value_memory): Adjust comment.
10233
10234 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10235
10236         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10237         dest_offset_bits and source_offset_bits.
10238         (write_pieced_value): Likewise.
10239
10240 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10241
10242         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10243         given by DW_OP_bit_piece.
10244         (write_pieced_value): Likewise.
10245
10246 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10247
10248         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10249         some other preparations to the places where sufficient information
10250         is available.
10251         (write_pieced_value): Likewise.
10252
10253 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10254
10255         * dwarf2loc.c (bits_to_bytes): New function.
10256         (read_pieced_value): Fix offset calculations for register pieces
10257         on big-endian targets.
10258         (write_pieced_value): Likewise.
10259
10260 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10261
10262         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10263         (write_pieced_value): Likewise.
10264
10265 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10266
10267         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10268         transfer the source value's least significant bits, instead of its
10269         lowest-addressed ones.  Rename type_len to max_offset.
10270         (read_pieced_value): Mirror above changes to write_pieced_value as
10271         applicable.
10272
10273 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10274
10275         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10276         truncate full bytes from dest_offset_bits before using it as an
10277         offset into the buffer.
10278
10279 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10280
10281         * dwarf2loc.c (write_pieced_value): Include transfer size in
10282         byte-wise check.
10283
10284 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10285
10286         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10287         calculation of this_size.
10288
10289 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10290
10291         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10292         when targeting a bit-field.
10293         (write_pieced_value): Likewise.
10294
10295 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10296
10297         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10298         (allocate_piece_closure): Drop addr_size parameter.
10299         (dwarf2_evaluate_loc_desc_full): Adjust call to
10300         allocate_piece_closure.
10301
10302 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10303
10304         PR gdb/21226
10305         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10306         the LSB end, independent of endianness.
10307
10308 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10309
10310         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10311         size capping.
10312
10313 2017-06-13  Yao Qi  <yao.qi@linaro.org>
10314
10315         * mips-linux-nat.c: Move include features/mips*-linux.c to
10316         mips-linux-tdep.c.
10317         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10318         to mips-linux-tdep.c.
10319         * mips-linux-tdep.c: Include features/mips*-linux.c
10320         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10321         functions.
10322         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10323         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10324         (tdesc_mips64_dsp_linux): Declare.
10325
10326 2017-06-12  Tom Tromey  <tom@tromey.com>
10327
10328         * valprint.h (val_print_type_code_int): Remove.
10329         * valprint.c (generic_val_print_int): Always call
10330         val_print_scalar_formatted.
10331         (val_print_type_code_int): Remove.
10332         * printcmd.c (print_scalar_formatted): Handle options->format==0.
10333         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10334         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10335         * ada-valprint.c (ada_val_print_num): Use
10336         val_print_scalar_formatted.
10337
10338 2017-06-12  Tom Tromey  <tom@tromey.com>
10339
10340         * printcmd.c (print_scalar_formatted): Unify the two switches.
10341         Don't convert scalars to LONGEST.
10342
10343 2017-06-12  Tom Tromey  <tom@tromey.com>
10344
10345         PR exp/16225:
10346         * valprint.h (print_decimal_chars): Update.
10347         * valprint.c (maybe_negate_by_bytes): New function.
10348         (print_decimal_chars): Add "is_signed" argument.
10349         * printcmd.c (print_scalar_formatted): Update.
10350
10351 2017-06-12  Tom Tromey  <tom@tromey.com>
10352
10353         PR exp/16225:
10354         * valprint.h (print_binary_chars, print_hex_chars): Update.
10355         * valprint.c (val_print_type_code_int): Update.
10356         (print_binary_chars): Add "zero_pad" argument.
10357         (emit_octal_digit): New function.
10358         (print_octal_chars): Don't zero-pad.
10359         (print_decimal_chars): Likewise.
10360         (print_hex_chars): Add "zero_pad" argument.
10361         * sh64-tdep.c (sh64_do_fp_register): Update.
10362         * regcache.c (regcache::dump): Update.
10363         * printcmd.c (print_scalar_formatted): Update.
10364         * infcmd.c (default_print_one_register_info): Update.
10365
10366 2017-06-12  Pedro Alves  <palves@redhat.com>
10367             Alan Hayward  <alan.hayward@arm.com>
10368
10369         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10370         (mips_eabi_push_dummy_call): Rename local 'regsize' to
10371         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
10372         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10373         Assert that abi_regsize bytes fit in 'ref_valbuf'.
10374
10375 2017-06-12  Pedro Alves  <palves@redhat.com>
10376
10377         * dwarf2read.c (mapped_symtab::data): Now a vector of
10378         symtab_index_entry instead of vector of
10379         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
10380         whether an element's name is NULL instead of checking whether the
10381         element itself is NULL.
10382         (find_slot): Change return type.  Adjust.
10383         (hash_expand, , add_index_entry, uniquify_cu_indices)
10384         (write_hash_table): Adjust.
10385
10386 2017-06-12  Pedro Alves  <palves@redhat.com>
10387
10388         * dwarf2read.c (recursively_count_psymbols): New function.
10389         (write_psymtabs_to_index): Call it to compute number of psyms and
10390         pass estimate size of psyms_seen to unordered_set's ctor.
10391
10392 2017-06-12  Pedro Alves  <palves@redhat.com>
10393
10394         * dwarf2read.c (write_hash_table): Check if key already exists
10395         before emplacing.
10396
10397 2017-06-12  Pedro Alves  <palves@redhat.com>
10398
10399         * dwarf2read.c (data_buf::append_space): Rename to...
10400         (data_buf::grow): ... this, and make private.  Adjust all callers.
10401         (data_buf::append_uint): New method.
10402         (add_address_entry, write_one_signatured_type)
10403         (write_psymtabs_to_index): Use it.
10404
10405 2017-06-12  Pedro Alves  <palves@redhat.com>
10406
10407         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10408         (file_write (FILE *, const std::vector<Elem>&)): Delete.
10409         (data_buf::file_write): Call ::fwrite directly.
10410
10411 2017-06-12  Pedro Alves  <palves@redhat.com>
10412
10413         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10414         std::vector::erase.
10415
10416 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10417
10418         Code cleanup: C++ify .gdb_index producer.
10419         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10420         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10421         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10422         (create_strtab, add_string): Remove.
10423         (file_write, data_buf): New.
10424         (struct symtab_index_entry): Use std::vector for cu_indices.
10425         (struct mapped_symtab): Use std::vector for data.
10426         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10427         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10428         Remove.
10429         (find_slot): Change return type.  Update it to the new data structures.
10430         (hash_expand, add_index_entry): Update it to the new data structures.
10431         (offset_type_compare): Remove.
10432         (uniquify_cu_indices): Update it to the new data structures.
10433         (c_str_view, c_str_view_hasher, vector_hasher): New.
10434         (add_indices_to_cpool): Remove.
10435         (write_hash_table): Update it to the new data structures.
10436         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10437         (eq_psymtab_cu_index): Remove.
10438         (psym_index_map): New typedef.
10439         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10440         reference and std::unordered_map for cu_index_htab.
10441         (add_address_entry, add_address_entry_worker, write_address_map)
10442         (write_psymbols): Update it to the new data structures.
10443         (write_obstack): Remove.
10444         (struct signatured_type_index_data): Change types_list to a data_buf
10445         reference and psyms_seen to a std::unordered_set reference.
10446         (write_one_signatured_type, recursively_write_psymbols)
10447         (write_psymtabs_to_index): Update it to the new data structures.
10448
10449 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
10450
10451         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10452         separate-debug-file commands.
10453         * symfile.h (separate_debug_file_debug): New global.
10454         * symfile.c (separate_debug_file_debug): New global.
10455         (separate_debug_file_exists, find_separate_debug_file): Add
10456         debug output.
10457         (_initialize_symfile): Add "set debug separate-debug-file"
10458         command.
10459         * build-id.c (build_id_to_debug_bfd,
10460         find_separate_debug_file_by_buildid): Add debug output.
10461
10462 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
10463
10464         * gdbarch.sh (displaced_step_free_closure): Remove.
10465         * gdbarch.h, gdbarch.c: Re-generate.
10466         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10467         displaced_step_free_closure.
10468         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10469         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10470         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10471         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10472         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10473         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10474         * arch-utils.h (simple_displaced_step_free_closure): Remove.
10475         * arch-utils.c (simple_displaced_step_free_closure): Remove.
10476         * infrun.c (displaced_step_clear): Call xfree instead of
10477         gdbarch_displaced_step_free_closure.
10478
10479 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
10480
10481         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10482         NULL".
10483
10484 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
10485
10486         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10487         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10488         (mn10300_push_dummy_call): Likewise.
10489
10490 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10491
10492         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10493
10494 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
10495
10496         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10497
10498 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10499
10500         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10501         able to start inferiors using a shell.
10502         (New remote packets): Announce new packet "QStartupWithShell".
10503         * remote.c: Add PACKET_QStartupWithShell.
10504         (extended_remote_create_inferior): Handle new
10505         PACKET_QStartupWithShell.
10506         (remote_protocol_features) <QStartupWithShell>: New entry for
10507         PACKET_QStartupWithShell.
10508         (_initialize_remote): Call "add_packet_config_cmd" for
10509         QStartupShell.
10510
10511 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10512             Pedro Alves  <palves@redhat.com>
10513
10514         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10515         and "nat/fork-inferior.h".
10516         * common/common-inferior.h: New file, with contents from
10517         "gdb/inferior.h".
10518         * commom/common-utils.c: Include "common-utils.h".
10519         (stringify_argv): New function.
10520         * common/common-utils.h (stringify_argv): New prototype.
10521         * configure.nat: Add "fork-inferior.o" as a dependency for
10522         "*linux*", "fbsd*" and "nbsd*" hosts.
10523         * corefile.c (get_exec_file): Update comment.
10524         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10525         instead of "startup_inferior".
10526         (darwin_create_inferior): Call "add_thread_silent" after
10527         "fork_inferior".
10528         * fork-child.c: Cleanup unnecessary includes.
10529         (SHELL_FILE): Move to "common/common-fork-child.c".
10530         (environ): Likewise.
10531         (exec_wrapper): Initialize.
10532         (get_exec_wrapper): New function.
10533         (breakup_args): Move to "common/common-fork-child.c"; rename to
10534         "breakup_args_for_exec".
10535         (escape_bang_in_quoted_argument): Move to
10536         "common/common-fork-child.c".
10537         (saved_ui): New variable.
10538         (prefork_hook): New function.
10539         (postfork_hook): Likewise.
10540         (postfork_child_hook): Likewise.
10541         (gdb_startup_inferior): Likewise.
10542         (fork_inferior): Move to "common/common-fork-child.c".  Update
10543         function to support gdbserver.
10544         (startup_inferior): Likewise.
10545         * gdbcore.h (get_exec_file): Remove declaration.
10546         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10547         instead of "startup_inferior".  Call "add_thread_silent" after
10548         "fork_inferior".
10549         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10550         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10551         instead of "startup_inferior".  Call "add_thread_silent" after
10552         "fork_inferior".
10553         * inferior.h: Include "common-inferior.h".
10554         (trace_start_error): Move to "common/common-utils.h".
10555         (trace_start_error_with_name): Likewise.
10556         (fork_inferior): Move prototype to "nat/fork-inferior.h".
10557         (startup_inferior): Likewise.
10558         (gdb_startup_inferior): New prototype.
10559         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10560         * nat/fork-inferior.h: New file.
10561         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10562         instead of "startup_inferior".  Call "add_thread_silent" after
10563         "fork_inferior".
10564         * target.h (target_terminal_init): Move prototype to
10565         "target/target.h".
10566         (target_terminal_inferior): Likewise.
10567         (target_terminal_ours): Likewise.
10568         * target/target.h (target_terminal_init): New prototype, moved
10569         from "target.h".
10570         (target_terminal_inferior): Likewise.
10571         (target_terminal_ours): Likewise.
10572         * utils.c (gdb_flush_out_err): New function.
10573
10574 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10575
10576         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10577         * common/common-gdbthread.h: New file, with parts from
10578         "gdb/gdbthread.h".
10579         * gdbthread.h: Include "common-gdbthread.h".
10580         (switch_to_thread): Moved to "common/common-gdbthread.h".
10581
10582 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10583
10584         * Makefile.in (SFILES): Add "common/job-control.c".
10585         (HFILES_NO_SRCDIR): Add "common/job-control.h".
10586         (COMMON_OBS): Add "job-control.o".
10587         * common/job-control.c: New file, with contents from
10588         "gdb/inflow.c".
10589         * common/job-control.h: New file, with contents from "terminal.h".
10590         * fork-child.c: Include "job-control.h".
10591         * inflow.c: Include "job-control.h".
10592         (gdb_setpgid): Move to "common/common-inflow.c".
10593         (_initialize_inflow): Move setting of "job_control" to
10594         "handle_job_control".
10595         * terminal.h (job_control): Moved to "common/common-terminal.h".
10596         (gdb_setpgid): Likewise.
10597         * top.c: Include "job_control.h".
10598         * utils.c: Likewise.
10599         (job_control): Moved to "job-control.c".
10600
10601 2017-06-07  Pedro Alves  <palves@redhat.com>
10602
10603         * Makefile.in (SFILES): Add gdb_regex.c.
10604         (COMMON_OBS): Add gdb_regex.o.
10605         * ada-lang.c (ada_add_standard_exceptions)
10606         (ada_add_exceptions_from_frame, name_matches_regex)
10607         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10608         parameter type to compiled_regex.  Adjust.
10609         (ada_exceptions_list): Use compiled_regex.
10610         * break-catch-throw.c (exception_catchpoint::pattern): Now a
10611         std::unique_ptr<compiled_regex>.
10612         (exception_catchpoint::~exception_catchpoint): Remove regfree
10613         call.
10614         (check_status_exception_catchpoint): Adjust to use compiled_regex.
10615         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10616         * breakpoint.c (solib_catchpoint::compiled): Now a
10617         std::unique_ptr<compiled_regex>.
10618         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10619         (check_status_catch_solib): Adjust to use compiled_regex.
10620         (add_solib_catchpoint): Adjust to use compiled_regex.
10621         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10622         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10623         compiled_regex reference.  Adjust to use it.
10624         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10625         declaration.  Include "gdb_regex.h".
10626         (apropos_cmd): Change regex parameter to compiled_regex reference.
10627         * gdb_regex.c: New file.
10628         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10629         declarations.
10630         (class compiled_regex): New.
10631         * linux-tdep.c: Include "common/gdb_optional.h".
10632         (struct mapping_regexes): New, factored out from
10633         mapping_is_anonymous_p, and adjusted to use compiled_regex.
10634         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10635         gdb::optional and remove cleanups.  Adjust to compiled_regex.
10636         * probe.c: Include "common/gdb_optional.h".
10637         (collect_probes): Use compiled_regex and gdb::optional and remove
10638         cleanups.
10639         * skip.c: Include "common/gdb_optional.h".
10640         (skiplist_entry::compiled_function_regexp): Now a
10641         gdb::optional<compiled_regex>.
10642         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10643         (free_skiplist_entry): Remove regfree call.
10644         (compile_skip_regexp, skip_rfunction_p): Adjust to use
10645         compiled_regex and gdb::optional.
10646         * symtab.c: Include "common/gdb_optional.h".
10647         (search_symbols): Use compiled_regex and gdb::optional.
10648         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10649         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
10650         to gdb_regex.c.
10651
10652 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10653
10654         * regcache.c (regcache::save): Avoid buffer use.
10655         (regcache::dump): Likewise.
10656
10657 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10658
10659         * sh-tdep.c (sh_pseudo_register_read): Remove
10660         MAX_REGISTER_SIZE.
10661         (sh_pseudo_register_write): Likewise.
10662         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10663         (sh64_pseudo_register_write): Likewise
10664
10665 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
10666
10667         * aarch64-tdep.c (aarch64_store_return_value): Use
10668         V_REGISTER_SIZE.
10669         (aarch64_pseudo_read_value): Likewise.
10670         (aarch64_pseudo_write): Likewise.
10671
10672 2017-06-06  Yao Qi  <yao.qi@linaro.org>
10673
10674         * regformats/regdef.h (set_register_cache): Remove the
10675         declaration.
10676
10677 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
10678
10679         * frame.c (frame_unwind_register_signed): Use
10680         frame_unwind_register_value.
10681
10682 2017-06-06  Pedro Alves  <palves@redhat.com>
10683
10684         PR breakpoints/21553
10685         * breakpoint.c (create_breakpoints_sal_default)
10686         (init_breakpoint_sal, create_breakpoint_sal): Use
10687         gdb::unique_xmalloc_ptr for string parameters.
10688         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10689         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
10690         (base_breakpoint_create_breakpoints_sal)
10691         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10692         (strace_marker_create_breakpoints_sal)
10693         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10694         string parameters.
10695         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10696         gdb::unique_xmalloc_ptr for string parameters.
10697         (create_breakpoint): Constify 'extra_string' and 'cond_string'
10698         parameters.
10699
10700 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10701
10702         * alpha-tdep.c (alpha_register_to_value): Use
10703         get_frame_register_value.
10704         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10705
10706 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
10707
10708         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10709         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10710         (ia64_value_to_register): Likewise.
10711         (ia64_extract_return_value): Likewise.
10712         (ia64_store_return_value): Likewise.
10713         (ia64_push_dummy_call): Likewise.
10714
10715 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
10716
10717         GDB 8.0 released.
10718
10719 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
10720
10721         * x86-linux-nat.c (struct arch_lwp_info): Remove.
10722
10723 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
10724
10725         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10726         parameter.
10727         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10728
10729 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
10730
10731         * event-loop.c (poll_timers): Unallocate timer using delete
10732         instead of xfree.
10733
10734 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10735
10736         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10737         (struct breakpoint) <~breakpoint>: New.
10738         (struct watchpoint): Inherit from breakpoint.
10739         <~watchpoint>: New.
10740         <base>: Remove.
10741         (struct tracepoint): Inherit from breakpoint.
10742         <base>: Remove.
10743         * breakpoint.c (longjmp_breakpoint_ops): Remove.
10744         (struct longjmp_breakpoint): Inherit from breakpoint.
10745         <~longjmp_breakpoint>: New.
10746         <base>: Remove.
10747         (new_breakpoint_from_type): Remove casts.
10748         (watchpoint_in_thread_scope): Remove reference to base field.
10749         (watchpoint_del_at_next_stop): Likewise.
10750         (update_watchpoint): Likewise.
10751         (watchpoint_check): Likewise.
10752         (bpstat_check_watchpoint): Likewise.
10753         (set_longjmp_breakpoint): Likewise.
10754         (struct fork_catchpoint): Inherit from breakpoint.
10755         <base>: Remove.
10756         (struct solib_catchpoint): Inherit from breakpoint.
10757         <~solib_catchpoint>: New.
10758         <base>: Remove.
10759         (dtor_catch_solib): Change to ...
10760         (solib_catchpoint::~solib_catchpoint): ... this.
10761         (breakpoint_hit_catch_solib): Remove reference to base field.
10762         (add_solib_catchpoint): Likewise.
10763         (create_fork_vfork_event_catchpoint): Likewise.
10764         (struct exec_catchpoint): Inherit from breakpoint.
10765         <~exec_catchpoint>: New.
10766         <base>: Remove.
10767         (dtor_catch_exec): Change to ...
10768         (exec_catchpoint::~exec_catchpoint): ... this.
10769         (dtor_watchpoint): Change to ...
10770         (watchpoint::~watchpoint): ... this.
10771         (watch_command_1): Remove reference to base field.
10772         (catch_exec_command_1): Likewise.
10773         (base_breakpoint_dtor): Change to ...
10774         (breakpoint::~breakpoint): ... this.
10775         (base_breakpoint_ops): Remove dtor field value.
10776         (longjmp_bkpt_dtor): Change to ...
10777         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10778         (strace_marker_create_breakpoints_sal): Remove reference to base
10779         field.
10780         (delete_breakpoint): Don't manually call breakpoint destructor.
10781         (create_tracepoint_from_upload): Remove reference to base field.
10782         (trace_pass_set_count): Likewise.
10783         (initialize_breakpoint_ops): Don't initialize
10784         momentary_breakpoint_ops, don't set dtors.
10785         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10786         <~ada_catchpoint>: New.
10787         <base>: Remove.
10788         (create_excep_cond_exprs): Remove reference to base field.
10789         (dtor_exception): Change to ...
10790         (ada_catchpoint::~ada_catchpoint): ... this.
10791         (dtor_catch_exception): Remove.
10792         (dtor_catch_exception_unhandled): Remove.
10793         (dtor_catch_assert): Remove.
10794         (create_ada_exception_catchpoint): Remove reference to base
10795         field.
10796         (initialize_ada_catchpoint_ops): Don't set dtors.
10797         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10798         breakpoint.
10799         <~signal_catchpoint>: New.
10800         <base>: Remove.
10801         (signal_catchpoint_dtor): Change to ...
10802         (signal_catchpoint::~signal_catchpoint): ... this.
10803         (create_signal_catchpoint): Remove reference to base field.
10804         (initialize_signal_catchpoint_ops): Don't set dtor.
10805         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10806         from breakpoint.
10807         <~syscall_catchpoint>: New.
10808         <base>: Remove.
10809         (dtor_catch_syscall): Change to ...
10810         (syscall_catchpoint::~syscall_catchpoint): ... this.
10811         (create_syscall_event_catchpoint): Remove reference to base
10812         field.
10813         (initialize_syscall_catchpoint_ops): Don't set dtor.
10814         * break-catch-throw.c (struct exception_catchpoint): Inherit
10815         from breakpoint.
10816         <~exception_catchpoint>: New.
10817         <base>: Remove.
10818         (dtor_exception_catchpoint): Change to ...
10819         (exception_catchpoint::~exception_catchpoint): ... this.
10820         (handle_gnu_v3_exceptions): Remove reference to base field.
10821         (initialize_throw_catchpoint_ops): Don't set dtor.
10822         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10823         field.
10824         * remote.c (remote_get_tracepoint_status): Likewise.
10825         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10826         * tracefile.c (tracefile_fetch_registers): Likewise.
10827         * tracepoint.c (actions_command): Likewise.
10828         (validate_actionline): Likewise.
10829         (tfind_1): Likewise.
10830         (get_traceframe_location): Likewise.
10831         (find_matching_tracepoint_location): Likewise.
10832         (parse_tracepoint_status): Likewise.
10833         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10834
10835 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10836
10837         * breakpoint.c (struct longjmp_breakpoint): New struct.
10838         (is_tracepoint_type): Change return type to bool.
10839         (is_longjmp_type): New function.
10840         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10841         (set_raw_breakpoint_without_location): Use
10842         new_breakpoint_from_type.
10843         (set_raw_breakpoint): Likewise.
10844
10845 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10846
10847         * breakpoint.c (new_breakpoint_from_type): New function.
10848         (create_breakpoint_sal): Use new_breakpoint_from_type and
10849         unique_ptr.
10850         (create_breakpoint): Likewise.
10851
10852 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10853
10854         * memattr.c (mem_info_command): Rename to ...
10855         (info_mem_command): ... this.
10856         (mem_enable_command): Rename to ...
10857         (enable_mem_command): ... this.
10858         (mem_disable_command): Rename to ...
10859         (disable_mem_command): ... this.
10860         (mem_delete_command): Rename to ...
10861         (delete_mem_command): ... this.
10862         (_initialize_mem): Adjust function names.
10863
10864 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10865
10866         * btrace.c (handle_pt_insn_events): New.
10867         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10868         STATUS.  Split into this and ...
10869         (handle_pt_insn_event_flags): ... this.
10870
10871 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10872
10873         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10874         and struct pt_insn.resynced.
10875         * configure: Regenerated.
10876         * config.in: Regenerated.
10877
10878 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10879
10880         * btrace.c (ftrace_find_call_by_number): New function.
10881         (ftrace_new_function): Store objects, not pointers.
10882         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10883         ftrace_new_gap, ftrace_update_function,
10884         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10885         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10886         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10887         btrace_ends_with_single_insn, btrace_call_get): Account for
10888         btrace_thread_info::functions now storing objects.
10889         * btrace.h (struct btrace_thread_info): Add constructor.
10890         (struct btrace_thread_info) <functions>: Make std::vector.
10891         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10892         Initialize with default values.
10893         * record-btrace.c (record_btrace_frame_sniffer): Account for
10894         btrace_thread_info::functions now storing objects.
10895
10896 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10897
10898         * btrace.c: Remove typedef bfun_s.
10899         (ftrace_new_gap): Directly add gaps to the list of gaps.
10900         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10901         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10902         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10903         instead of gdb VEC.
10904
10905 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10906
10907         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10908         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10909         with btrace_thread_info::next_segment and
10910         btrace_thread_info::prev_segment.
10911         * btrace.h: Remove struct btrace_func_link.
10912         (struct btrace_function): Replace pair of function segment pointers
10913         with pair of indices.
10914         * python/py-record-btrace.c (btpy_call_prev_sibling,
10915         btpy_call_next_sibling): Replace references to
10916         btrace_thread_info::segment with btrace_thread_info::next_segment and
10917         btrace_thread_info::prev_segment.
10918         * record-btrace.c (record_btrace_frame_this_id): Use
10919         btrace_find_call_by_number.
10920
10921 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10922
10923         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10924         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10925         btrace_insn_next, btrace_insn_prev): Remove references to
10926         btrace_thread_info::flow.
10927         * btrace.h (struct btrace_function): Remove FLOW.
10928
10929 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10930
10931         * btrace.c (ftrace_find_call_by_number): New function.
10932         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10933         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10934         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10935         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10936         index.
10937         * btrace.h (struct btrace_function): Turn UP into an index.
10938         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10939         as an index.
10940         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10941         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10942         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10943
10944 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10945
10946         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10947         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10948         ftrace_update_function, ftrace_compute_global_level_offset,
10949         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10950         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10951         btrace_insn_end, btrace_is_empty): Remove references to
10952         btrace_thread_info::begin and btrace_thread_info::end.
10953         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10954         (struct btrace_thread_info) <functions>: Adjust comment.
10955         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10956         btrace_thread_info::begin.
10957
10958 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10959
10960         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10961         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10962         ftrace_update_function): Remove arguments that implicitly were always
10963         BTINFO->END.
10964         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10965         Don't pass BTINFO->END.
10966
10967 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10968
10969         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10970         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10971         btrace_find_insn_by_number): Replace function segment pointer with
10972         index.
10973         (btrace_insn_cmp): Simplify.
10974         * btrace.h: (struct btrace_insn_iterator) Rename index to
10975         insn_index.  Replace function segment pointer with index into function
10976         segment vector.
10977         * record-btrace.c (record_btrace_call_history): Replace function
10978         segment pointer use with index.
10979         (record_btrace_frame_sniffer): Retrieve function call segment through
10980         vector.
10981         (record_btrace_set_replay): Remove defunc't safety check.
10982
10983 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10984
10985         * btrace.c (btrace_ends_with_single_insn): New function.
10986         (btrace_call_get, btrace_call_number, btrace_call_begin,
10987         btrace_call_end, btrace_call_next, btrace_call_prev,
10988         btrace_find_call_by_number): Use index into call segment vector
10989         instead of pointer.
10990         (btrace_call_cmp): Simplify.
10991         * btrace.h (struct btrace_call_iterator): Replace function call segment
10992         pointer with index into vector.
10993         * record-btrace.c (record_btrace_call_history): Use index instead of
10994         pointer.
10995
10996 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10997
10998         * btrace.c (btrace_insn_begin, btrace_insn_end,
10999         btrace_find_insn_by_number): Add btinfo to iterator.
11000         * btrace.h (struct btrace_insn_iterator): Add btinfo.
11001
11002 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11003
11004         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11005         and save pointers directly.
11006         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11007         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11008         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
11009         changed signature of functions.
11010         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11011         (btrace_fetch): Remove code that adds btrace_function pointers to
11012         vector of btrace_functions.
11013         (btrace_clear): Simplify freeing vector of btrace_functions.
11014
11015 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11016
11017         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11018         Replace VEC_* with std::vector functions.
11019         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11020         (struct btrace_thread_info)<functions>: Change type to std::vector.
11021
11022 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
11023
11024         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
11025         "Removed targets and native configurations" up.  Merge duplicate
11026         "New commands" sub-sections.  Add "New options" sub-sections.
11027
11028 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
11029
11030         * defs.h (copy_integer_to_size): New declaration.
11031         * findvar.c (copy_integer_to_size): New function.
11032         (do_cint_test): New selftest function.
11033         (copy_integer_to_size_test): Likewise.
11034         (_initialize_findvar): Likewise.
11035         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11036         (mips_fbsd_collect_reg): Use raw_collect_integer.
11037         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11038         (mips64_fill_gregset): Use raw_collect_integer
11039         (mips64_fill_fpregset): Use raw_supply_integer.
11040         * regcache.c (regcache::raw_supply_integer): New function.
11041         (regcache::raw_collect_integer): Likewise.
11042         * regcache.h: (regcache::raw_supply_integer): New declaration.
11043         (regcache::raw_collect_integer): Likewise.
11044
11045 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11046
11047         * Makefile.in (SFILES): Add gdbarch-selftests.c.
11048         (COMMON_OBS): Add gdbarch-selftests.o.
11049         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11050         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11051         * gdbarch-selftests.c: New file.
11052         * regcache.h (regcache) <~regcache>: Mark it virtual if
11053         GDB_SELF_TEST.
11054         <raw_write>: Likewise.
11055
11056 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11057
11058         * regcache.c (current_regcache): Change it to
11059         regcache::current_regcache.
11060         (regcache_observer_target_changed): Update.
11061         (regcache_thread_ptid_changed): Make it a regcache static
11062         method.
11063         (regcache_thread_ptid_changed): Update.
11064         (class regcache_access): New.
11065         (current_regcache_test): Update.
11066         (_initialize_regcache): Update.
11067         * regcache.h: Include forward_list.
11068         (regcache): Declare regcache_thread_ptid_changed and declare
11069         registers_changed_ptid as friend.
11070
11071 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11072
11073         * i387-tdep.c (i387_register_to_value): Use register_size
11074         instead of TYPE_LENGTH.
11075         * m68k-tdep.c (m68k_register_to_value): Likewise.
11076
11077 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11078
11079         * i387-tdep.c (i387_convert_register_p): Return false if type
11080         code isn't TYPE_CODE_FLT.
11081
11082 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11083
11084         * alpha-tdep.c (alpha_convert_register_p): Return true if type
11085         length is 4.
11086         (alpha_register_to_value): Remove type length check.
11087         (alpha_value_to_register): Likewise.
11088
11089 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11090
11091         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11092         TYPE_CODE_FLT.
11093
11094 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11095
11096         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11097         TYPE_CODE_FLT or not.
11098
11099 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11100
11101         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11102         * avr-tdep.c (avr_gdbarch_init): Likewise.
11103         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11104         * cris-tdep.c (cris_gdbarch_init): Likewise.
11105         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11106         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11107         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11108         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11109         * mep-tdep.c (mep_gdbarch_init): Likewise.
11110         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11111         * mips-tdep.c (mips_gdbarch_init): Likewise.
11112         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11113         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11114         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11115         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11116         * v850-tdep.c (v850_gdbarch_init): Likewise.
11117
11118 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11119
11120         * selftest-arch.c (tests_with_arch): Call registers_changed
11121         and reinit_frame_cache.
11122         * selftest.c (run_self_tests): Likewise.
11123
11124 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11125
11126         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11127         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11128
11129 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11130
11131         * rl78-tdep.c (rl78_gdbarch_init): Don't call
11132         set_gdbarch_print_insn.
11133
11134 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11135
11136         * h8300-tdep.c (h8300_gdbarch_init): Don't call
11137         set_gdbarch_print_insn.
11138
11139 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11140
11141         * alpha-tdep.c (alpha_gdbarch_init): Don't call
11142         set_gdbarch_print_insn.
11143         * arc-tdep.c (arc_gdbarch_init): Likewise.
11144         * arch-utils.c: include dis-asm.h.
11145         (default_print_insn): New function.
11146         * arch-utils.h (default_print_insn): Declare.
11147         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11148         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11149         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11150         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11151         * frv-tdep.c (frv_gdbarch_init): Likewise.
11152         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11153         * gdbarch.sh (print_insn): Use default_print_insn.
11154         * gdbarch.c: Regenerated.
11155         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11156         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11157         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11158         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11159         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11160         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11161         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11162         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11163         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11164         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11165         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11166         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11167         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11168         * mt-tdep.c (mt_gdbarch_init): Likewise.
11169         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11170         * nios2-tdep.c (nios2_print_insn): Remove.
11171         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11172         * rx-tdep.c (rx_gdbarch_init): Likewise.
11173         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11174         * score-tdep.c (score_print_insn): Remove.
11175         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11176         * sh-tdep.c (sh_gdbarch_init): Likewise.
11177         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11178         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11179         * tic6x-tdep.c (tic6x_print_insn): Remove.
11180         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11181         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11182         * v850-tdep.c (v850_gdbarch_init): Likewise.
11183         * vax-tdep.c (vax_gdbarch_init): Likewise.
11184         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11185         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11186
11187 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11188
11189         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11190         (MIPS_FP0_REGNUM): Remove.
11191         (MIPS_FSR_REGNUM): Remove.
11192         (mips_fbsd_supply_fpregs): Use mips_regnum.
11193         (mips_fbsd_supply_gregs): Likewise.
11194         (mips_fbsd_collect_fpregs): Likewise.
11195         (mips_fbsd_collect_gregs): Likewise.
11196
11197 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11198
11199         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11200         (getpfpregs_supplies): New function.
11201         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11202         getfpregs_supplies.
11203         (mips_fbsd_store_inferior_registers): Likewise.
11204
11205 2017-05-22  Pedro Alves <palves@redhat.com>
11206
11207         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11208         maintainer.
11209
11210 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
11211
11212         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11213         (store_register): Likewise.
11214         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11215         (get_decimal_float_return_value): Likewise.
11216         (do_ppc_sysv_return_value): Likewise.
11217         (ppc64_sysv_abi_push_integer): Likewise.
11218         (ppc64_sysv_abi_push_freg): Likewise.
11219         (ppc64_sysv_abi_return_value_base): Likewise.
11220         (ppc64_sysv_abi_return_value): Likewise.
11221         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11222         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11223         * rs6000-nat.c: Likewise.
11224         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11225         (rs6000_value_to_register): Likewise.
11226         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11227
11228 2017-05-21  Tom Tromey  <tom@tromey.com>
11229
11230         PR rust/21466:
11231         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11232         arrays as "[T]", not "[T; ]".
11233
11234 2017-05-19  Tom Tromey  <tom@tromey.com>
11235
11236         PR rust/21484:
11237         * rust-lang.c (exp_descriptor_rust): New function.
11238         (rust_language_defn): Use it.
11239         * p-lang.c (pascal_language_defn): Update.
11240         * opencl-lang.c (opencl_language_defn): Update.
11241         * objc-lang.c (objc_language_defn): Update.
11242         * m2-lang.c (m2_language_defn): Update.
11243         * language.h (struct language_defn)
11244         <la_watch_location_expression>: New member.
11245         * language.c (unknown_language_defn, auto_language_defn)
11246         (local_language_defn): Update.
11247         * go-lang.c (go_language_defn): Update.
11248         * f-lang.c (f_language_defn): Update.
11249         * d-lang.c (d_language_defn): Update.
11250         * c-lang.h (c_watch_location_expression): Declare.
11251         * c-lang.c (c_watch_location_expression): New function.
11252         (c_language_defn, cplus_language_defn, asm_language_defn)
11253         (minimal_language_defn): Use it.
11254         * breakpoint.c (watch_command_1): Call
11255         la_watch_location_expression.
11256         * ada-lang.c (ada_language_defn): Update.
11257
11258 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11259
11260         PR tui/21482
11261         * gdb_curses.h (NOMACROS): Define.
11262         (NCURSES_NOMACROS): Define.
11263
11264 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11265
11266         PR tui/21482
11267         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11268         arg to char *.
11269         * tui/tui-wingeneral.c (box_win): Likewise.
11270         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11271         (tui_show_source_line): Likewise.
11272         (tui_show_exec_info_content): Likewise.
11273
11274 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11275
11276         * sparc-tdep.c (sparc_structure_return_p)
11277         (sparc_arg_on_registers_p): New functions.
11278         (sparc32_store_arguments): Use them.
11279         * sparc64-tdep.c (sparc64_16_byte_align_p)
11280         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11281         Handle TYPE_CODE_ARRAY.
11282
11283 2017-05-17  Yao Qi  <yao.qi@linaro.org>
11284
11285         * cli/cli-decode.c (add_alias_cmd): New function.
11286         * command.h (add_alias_cmd): Declare.
11287         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11288         instead call add_alias_cmd.
11289
11290 2017-05-17  Pedro Alves  <palves@redhat.com>
11291
11292         * Makefile.in (nat_extra_makefile_frag): Rename to ...
11293         (nat_makefile_frag): ... this.  All references updated.
11294         * configure.ac: Likewise.
11295         * configure.nat: Likewise.  Enhance comments.
11296         * configure: Regenerate.
11297
11298 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11299
11300         * procfs.c (procfs_create_inferior): Change prototype to match
11301         definition.
11302
11303 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
11304
11305         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11306         C++ compiler warning.
11307
11308 2017-05-12  Tom Tromey  <tom@tromey.com>
11309
11310         PR rust/21483:
11311         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11312         recurse, just call value_struct_elt directly.
11313
11314 2017-05-12  Tom Tromey  <tom@tromey.com>
11315
11316         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11317         OP_RUST_ARRAY>: Fix.
11318
11319 2017-05-12  Tom Tromey  <tom@tromey.com>
11320
11321         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11322
11323 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11324
11325         * regcache.c: Include <forward_list>.
11326         (struct regcache_list): Remove.
11327         (current_regcache): Update.
11328         (get_thread_arch_aspace_regcache): Update for std::forward_list.
11329         (regcache_thread_ptid_changed): Likewise.
11330         (registers_changed_ptid): Likewise.
11331         (current_regcache_size): Likewise.
11332
11333 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11334
11335         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11336         (current_regcache_size): New function.
11337         (current_regcache_test): New function.
11338         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11339
11340 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11341
11342         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11343         (print_gp_register_row): Use get_frame_register_value.
11344
11345 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11346
11347         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11348         (mips_supply_fpregset): Likewise.
11349         (mips64_supply_gregset): Likewise.
11350
11351 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11352
11353         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
11354         regcache->raw_supply_zeroed.
11355
11356 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11357
11358         * configure.nat: Rearrange 'case' statements to match
11359         host before cpu.
11360
11361 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11362
11363         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
11364         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11365         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
11366         "@nat_extra_makefile_frag@".
11367         (Makefile): Remove dependency on "@frags@".
11368         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11369         (data-directory/Makefile): Likewise.
11370         * config/aarch64/linux.mh: Deleted; moved contents to
11371         "gdb/configure.nat".
11372         * config/alpha/alpha-linux.mh: Likewise.
11373         * config/alpha/nbsd.mh: Likewise.
11374         * config/arm/linux.mh: Likewise.
11375         * config/arm/nbsdelf.mh: Likewise.
11376         * config/i386/cygwin.mh: Likewise.
11377         * config/i386/cygwin64.mh: Likewise.
11378         * config/i386/darwin.mh: Likewise.
11379         * config/i386/fbsd.mh: Likewise.
11380         * config/i386/fbsd64.mh: Likewise.
11381         * config/i386/go32.mh: Likewise.
11382         * config/i386/i386gnu.mh: Likewise.
11383         * config/i386/i386sol2.mh: Likewise.
11384         * config/i386/linux.mh: Likewise.
11385         * config/i386/linux64.mh: Likewise.
11386         * config/i386/mingw.mh: Likewise.
11387         * config/i386/mingw64.mh: Likewise.
11388         * config/i386/nbsd64.mh: Likewise.
11389         * config/i386/nbsdelf.mh: Likewise.
11390         * config/i386/nto.mh: Likewise.
11391         * config/i386/obsd.mh: Likewise.
11392         * config/i386/obsd64.mh: Likewise.
11393         * config/i386/sol2-64.mh: Likewise.
11394         * config/ia64/linux.mh: Likewise.
11395         * config/m32r/linux.mh: Likewise.
11396         * config/m68k/linux.mh: Likewise.
11397         * config/m68k/nbsdelf.mh: Likewise.
11398         * config/m68k/obsd.mh: Likewise.
11399         * config/m88k/obsd.mh: Likewise.
11400         * config/mips/fbsd.mh: Likewise.
11401         * config/mips/linux.mh: Likewise.
11402         * config/mips/nbsd.mh: Likewise.
11403         * config/mips/obsd64.mh: Likewise.
11404         * config/pa/linux.mh: Likewise.
11405         * config/pa/nbsd.mh: Likewise.
11406         * config/pa/obsd.mh: Likewise.
11407         * config/powerpc/aix.mh: Likewise.
11408         * config/powerpc/fbsd.mh: Likewise.
11409         * config/powerpc/linux.mh: Likewise.
11410         * config/powerpc/nbsd.mh: Likewise.
11411         * config/powerpc/obsd.mh: Likewise.
11412         * config/powerpc/ppc64-linux.mh: Likewise.
11413         * config/powerpc/spu-linux.mh: Likewise.
11414         * config/s390/linux.mh: Likewise.
11415         * config/sh/nbsd.mh: Likewise.
11416         * config/sparc/fbsd.mh: Likewise.
11417         * config/sparc/linux.mh: Likewise.
11418         * config/sparc/linux64.mh: Likewise.
11419         * config/sparc/nbsd64.mh: Likewise.
11420         * config/sparc/nbsdelf.mh: Likewise.
11421         * config/sparc/obsd64.mh: Likewise.
11422         * config/sparc/sol2.mh: Likewise.
11423         * config/tilegx/linux.mh: Likewise.
11424         * config/vax/nbsdelf.mh: Likewise.
11425         * config/vax/obsd.mh: Likewise.
11426         * config/xtensa/linux.mh: Likewise.
11427         * config/i386/i386gnu.mn: New file, with excerpts from
11428         "config/i386/i386gnu.mh".
11429         * configure: Regenerate.
11430         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11431         *.mh files under "gdb/config".
11432         * configure.nat: New file, with contents from the
11433         "gdb/config/*/*.mh" files.
11434
11435 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
11436
11437         * btrace.c (btrace_clear): Free insn vector.
11438
11439 2017-05-05  Pedro Alves  <palves@redhat.com>
11440
11441         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11442         * configure: Regenerate.
11443
11444 2017-05-04  Pedro Alves  <palves@redhat.com>
11445
11446         * Makefile.in (SFILES): Add progspace-and-thread.c.
11447         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11448         (COMMON_OBS): Add progspace-and-thread.o.
11449         * breakpoint.c: Include "progspace-and-thread.h".
11450         (update_inserted_breakpoint_locations)
11451         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11452         Use scoped_restore_current_pspace_and_thread.
11453         (create_std_terminate_master_breakpoint): Use
11454         scoped_restore_current_program_space.
11455         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11456         (print_breakpoint_location): Use
11457         scoped_restore_current_program_space.
11458         (bp_loc_is_permanent): Use
11459         scoped_restore_current_pspace_and_thread.
11460         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11461         (download_tracepoint_locations): Use
11462         scoped_restore_current_pspace_and_thread.
11463         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11464         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11465         (enum step_over_calls_kind): Moved from inferior.h.
11466         (class scoped_restore_current_thread): New class.
11467         * gdbthread.h (make_cleanup_restore_current_thread): Delete
11468         declaration.
11469         (scoped_restore_current_thread): New class.
11470         * infcmd.c: Include "common/gdb_optional.h".
11471         (continue_1, proceed_after_attach): Use
11472         scoped_restore_current_thread.
11473         (notice_new_inferior): Use scoped_restore_current_thread.
11474         * inferior.c: Include "progspace-and-thread.h".
11475         (restore_inferior, save_current_inferior): Delete.
11476         (add_inferior_command, clone_inferior_command): Use
11477         scoped_restore_current_pspace_and_thread.
11478         * inferior.h (scoped_restore_current_inferior): New class.
11479         * infrun.c: Include "progspace-and-thread.h" and
11480         "common/gdb_optional.h".
11481         (follow_fork_inferior): Use
11482         scoped_restore_current_pspace_and_thread.
11483         (scoped_restore_exited_inferior): New class.
11484         (handle_vfork_child_exec_or_exit): Use
11485         scoped_restore_exited_inferior,
11486         scoped_restore_current_pspace_and_thread,
11487         scoped_restore_current_thread and scoped_restore.
11488         (fetch_inferior_event): Use scoped_restore_current_thread.
11489         * linespec.c (decode_line_full, decode_line_1): Use
11490         scoped_restore_current_program_space.
11491         * mi/mi-main.c: Include "progspace-and-thread.h".
11492         (exec_continue): Use scoped_restore_current_thread.
11493         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11494         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11495         * proc-service.c (ps_pglobal_lookup): Use
11496         scoped_restore_current_program_space.
11497         * progspace-and-thread.c: New file.
11498         * progspace-and-thread.h: New file.
11499         * progspace.c (release_program_space, clone_program_space): Use
11500         scoped_restore_current_program_space.
11501         (restore_program_space, save_current_program_space)
11502         (save_current_space_and_thread): Delete.
11503         (switch_to_program_space_and_thread): Moved to
11504         progspace-and-thread.c.
11505         * progspace.h (save_current_program_space)
11506         (save_current_space_and_thread): Delete declarations.
11507         (scoped_restore_current_program_space): New class.
11508         * remote.c (remote_btrace_maybe_reopen): Use
11509         scoped_restore_current_thread.
11510         * symtab.c: Include "progspace-and-thread.h".
11511         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11512         * thread.c (print_thread_info_1): Use
11513         scoped_restore_current_thread.
11514         (struct current_thread_cleanup): Delete.
11515         (do_restore_current_thread_cleanup)
11516         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11517         (scoped_restore_current_thread::~scoped_restore_current_thread):
11518         ... this new dtor.
11519         (make_cleanup_restore_current_thread): Rename/convert to ...
11520         (scoped_restore_current_thread::scoped_restore_current_thread):
11521         ... this new ctor.
11522         (thread_apply_all_command): Use scoped_restore_current_thread.
11523         (thread_apply_command): Use scoped_restore_current_thread.
11524         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11525         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11526
11527 2017-05-04  Pedro Alves  <palves@redhat.com>
11528
11529         * thread.c (make_cleanup_restore_current_thread): Move
11530         find_thread_ptid call before the is_stopped call.  Assert that the
11531         thread is found.  Replace is_stopped call by checking the thread's
11532         state directly.  Remove unnecessary NULL-thread check.
11533
11534 2017-05-04  Pedro Alves  <palves@redhat.com>
11535
11536         * corelow.c (thread_section_name): New class.
11537         (get_core_register_section, get_core_siginfo): Use it.
11538
11539 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11540
11541         * corelow.c (sniff_core_bfd): Remove extra semicolon.
11542         (get_core_register_section): Remove xfree of NULL pointer.
11543
11544 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
11545
11546         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11547         * regcache.c (regcache::raw_supply_zeroed): New function.
11548         * regcache.h (regcache::raw_supply_zeroed): New declaration.
11549
11550 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
11551
11552         * gdbarch.sh: Remove commented out definition of
11553         TARGET_CHAR_BIT.
11554         * gdbarch.h: Re-generate.
11555
11556 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
11557
11558         * configure: Regenerate.
11559
11560 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
11561
11562         * solib-target.c (solib_target_relocate_section_addresses):
11563         Remove num_section_bases, num_bases, segment_bases variables.
11564
11565 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11566
11567         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11568
11569 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11570
11571         * solib-target.c: Include <vector>
11572         (struct lm_info_target) <~lm_info_target>: Remove.
11573         <segment_bases, section_bases>: Change type to
11574         std::vector<CORE_ADDR>.
11575         (library_list_start_segment, library_list_start_section,
11576         library_list_end_library,
11577         solib_target_relocate_section_addresses): Adjust.
11578
11579 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11580
11581         * gdbarch.sh (software_single_step): Change return type to
11582         std::vector<CORE_ADDR>.
11583         * gdbarch.c, gdbarch.h: Re-generate.
11584         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11585         Adjust.
11586         (arm_deal_with_atomic_sequence_raw): Adjust.
11587         (thumb_get_next_pcs_raw): Adjust.
11588         (arm_get_next_pcs_raw): Adjust.
11589         (arm_get_next_pcs): Adjust.
11590         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11591         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11592         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11593         (alpha_software_single_step): Adjust.
11594         * alpha-tdep.h (alpha_software_single_step): Adjust.
11595         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11596         * arm-tdep.c (arm_software_single_step): Adjust.
11597         (arm_breakpoint_kind_from_current_state): Adjust.
11598         * arm-tdep.h (arm_software_single_step): Adjust.
11599         * breakpoint.c (insert_single_step_breakpoint): Adjust.
11600         * cris-tdep.c (cris_software_single_step): Adjust.
11601         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11602         (micromips_deal_with_atomic_sequence): Adjust.
11603         (deal_with_atomic_sequence): Adjust.
11604         (mips_software_single_step): Adjust.
11605         * mips-tdep.h (mips_software_single_step): Adjust.
11606         * moxie-tdep.c (moxie_software_single_step): Adjust.
11607         * nios2-tdep.c (nios2_software_single_step): Adjust.
11608         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11609         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11610         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11611         * s390-linux-tdep.c (s390_software_single_step): Adjust.
11612         * sparc-tdep.c (sparc_software_single_step): Adjust.
11613         * spu-tdep.c (spu_software_single_step): Adjust.
11614         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11615
11616 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
11617
11618         * gdbarch.sh: Use semi-colon as field separator instead of colon.
11619         * gdbarch.h: Re-generate.
11620
11621 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11622
11623         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11624         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11625         * python/py-instruction.c, python/py-instruction.h: New file.
11626         * python/py-record.c: Add py-instruction.h include.
11627         (gdbpy_initialize_record): Make gdb.Instruction a super class of
11628         gdb.RecordInstruction.
11629         * python/python-internal.h: Add gdbpy_initialize_instruction
11630         declaration.
11631         * python/python.c (do_start_initialization): Add
11632         gdbpy_initialize_instruction.
11633
11634 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11635
11636         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11637         Remove.
11638         (btrace_func_from_recpy_func): New function.
11639         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11640         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11641         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11642         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11643         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11644         Also, use new helper functions.
11645         (btpy_list_item): Use new helper functions.
11646         (recpy_bt_function_call_history): Use new type name.
11647         (btpy_call_getset): Remove.
11648         (gdbpy_initialize_btrace): Remove code to initialize
11649         gdb.BtraceFunctionCall.
11650         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11651         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11652         recpy_bt_func_prev, recpy_bt_func_next): New export.
11653         * python/py-record.c (recpy_func_type): New static object.
11654         (recpy_func_new, recpy_func_level, recpy_func_symbol,
11655         recpy_func_instructions, recpy_func_up, recpy_func_prev,
11656         recpy_func_next): New function.
11657         (recpy_element_hash, recpy_element_richcompare): Updated comment.
11658         (recpy_func_getset): New static object.
11659         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11660         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11661
11662 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11663
11664         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11665         (btpy_object, btpy_insn_type, btpy_new): Remove.
11666         (btpy_list_object): Use gdb.RecordInstruction type instead of
11667         gdb.BtraceInstruction type.
11668         (btrace_insn_from_recpy_insn): New function.
11669         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11670         btpy_new.
11671         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11672         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11673         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11674         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11675         instead of btpy_object.
11676         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11677         btpy_insn_data, btpy_insn_decode): Rename to ...
11678         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11679         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11680         recpy_bt_insn_decode): This.  Also, use new helper functions.
11681         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11682         recpy_insn_type.
11683         (btpy_insn_getset): Remove.
11684         (gdbpy_initialize_btrace): Remove code to initialize
11685         gdb.BtraceInstruction.  Use recpy_element_object.
11686         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11687         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11688         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11689         * python/py-record.c (recpy_insn_type): New static object.
11690         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11691         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11692         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11693         New function.
11694         (recpy_insn_getset): New static object.
11695         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11696         * python/py-record.h (recpy_element_object): New typedef.
11697         (recpy_insn_type, recpy_insn_new): New export.
11698
11699 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11700
11701         * py-record-btrace.c (btpy_insn_new): Removed.
11702         (btpy_insn_or_gap_new): New function.
11703         (btpy_insn_error): Removed.
11704         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11705         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11706         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11707         btpy_insn_or_gap_new instead of btpy_insn_new.
11708         (btpy_insn_getset): Remove btpy_insn_error.
11709         * py-record.c (recpy_gap_type): New static object.
11710         (recpy_gap_object): New typedef.
11711         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11712         recpy_gap_reason_string): New function.
11713         (recpy_gap_getset): New static object.
11714         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11715         * py-record.h (recpy_gap_new): New export.
11716
11717 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11718
11719         * python/py-record.c (recpy_ptid): Remove.
11720         (recpy_record_getset): Remove recpy_ptid.
11721
11722 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11723
11724         * btrace.c (btrace_fetch): Set inferior_ptid.
11725         * python/py-record-btrace.c: Add "py-record.h" include.
11726         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11727         recpy_bt_end, recpy_bt_instruction_history,
11728         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11729         in gdb.Record object instead of current ptid.
11730         * python/py-record.c: Include new "py-record.h" file.
11731         (recpy_record_object): Moved to py-record.h.
11732         * python/py-record.h: New file.
11733
11734 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
11735
11736         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11737         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11738         indentation.
11739
11740 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
11741
11742         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11743         the past maintainers section.
11744
11745 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11746
11747         * infcmd.c (get_return_value): Use regcache ctor, and remove
11748         cleanup.
11749
11750 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11751             Pedro Alves  <palves@redhat.com>
11752
11753         * regcache.c (regcache::regcache): New tag dispatch ctor.
11754         (do_cooked_read): Moved above.
11755         (regcache_dup): Use the tag dispatch ctor..
11756         * regcache.h (regcache): Declare ctor, delete copy ctor and
11757         assignment operator, remove friend regcache_dup.
11758
11759 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11760
11761         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11762         call method save instead of regcache_cpy.
11763         * regcache.h (struct regcache): Make regcache_dup a friend.
11764
11765 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11766
11767         * regcache.c (struct regcache): Move to regcache.h
11768         (regcache::arch): New method.
11769         (regcache_get_ptid): Update.
11770         (get_regcache_arch): Call arch method.
11771         (get_regcache_aspace): Call method aspace.
11772         (register_buffer): Change it to method.
11773         (regcache_save): Change it to regcache::save.
11774         (regcache_restore): Likewise.
11775         (regcache_cpy_no_passthrough): Remove the declaration.
11776         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11777         (regcache_cpy_no_passthrough): Change it to method
11778         cpy_no_passthrough.
11779         (regcache_register_status): Change it to method
11780         get_register_status.
11781         (regcache_invalidate): Change it to method invalidate.
11782         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11783         (regcache_raw_update): Change it to method raw_update.
11784         (regcache_raw_read): Likewise.
11785         (regcache_raw_read_signed): Likewise.
11786         (regcache_raw_read_unsigned): Likewise.
11787         (regcache_raw_write_signed): Likewise.
11788         (regcache_raw_write_unsigned): Likewise.
11789         (regcache_cooked_read): Likewise.
11790         (regcache_cooked_read_value): Likewise.
11791         (regcache_cooked_read_signed): Likewise.
11792         (regcache_cooked_read_unsigned): Likewise.
11793         (regcache_cooked_write_signed): Likewise.
11794         (regcache_cooked_write_unsigned): Likewise.
11795         (regcache_raw_set_cached_value): Likewise.
11796         (regcache_raw_write): Likewise.
11797         (regcache_cooked_write): Likewise.
11798         (regcache_xfer_part): Likewise.
11799         (regcache_raw_read_part): Likewise.
11800         (regcache_raw_write_part): Likewise.
11801         (regcache_cooked_read_part): Likewise.
11802         (regcache_cooked_write_part): Likewise.
11803         (regcache_raw_supply): Likewise.
11804         (regcache_raw_collect): Likewise.
11805         (regcache_transfer_regset): Likewise.
11806         (regcache_supply_regset): Likewise.
11807         (regcache_collect_regset): Likewise.
11808         (regcache_debug_print_register): Likewise.
11809         (enum regcache_dump_what): Move it to regcache.h.
11810         (regcache_dump): Change it to method dump.
11811         * regcache.h (enum regcache_dump_what): New.
11812         (class regcache): New.
11813         * target.c (target_fetch_registers): Call method
11814         debug_print_register.
11815         (target_store_registers): Likewise.
11816
11817 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11818
11819         * windows-nat.c (struct lm_info_windows): Initialize field.
11820         (windows_make_so): Allocate lm_info_windows with new.
11821         (windows_free_so): Free lm_info_windows with delete.
11822
11823 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11824
11825         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11826         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11827         cleanup.
11828         (darwin_free_so): Free lm_info_darwin with delete.
11829
11830 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11831
11832         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11833         <l_addr_p>: Change type to bool.
11834         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11835         (svr4_free_so): Free lm_info_svr4 with delete.
11836         (svr4_copy_library_list): Replace memcpy with call to copy
11837         constructor.
11838         (library_list_start_library, svr4_default_sos): Allocate
11839         lm_info_svr4 with new.
11840
11841 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11842
11843         * solib-target.c (struct lm_info_target): Add destructor,
11844         initialize fields.
11845         <name>: Change type to std::string.
11846         (library_list_start_library): Allocate lm_info_target with new.
11847         (solib_target_free_library_list): Free lm_info_target with
11848         delete.
11849         (solib_target_current_sos): Adapt to std::string.
11850         (solib_target_free_so): Free lm_info_target with delete.
11851
11852 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11853
11854         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11855         fields.
11856         (frv_current_sos): Allocate lm_info_frv with new.
11857         (frv_relocate_main_executable): Free lm_info_frv with delete,
11858         allocate with new.
11859         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11860
11861 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11862
11863         * solib-frv.c (struct lm_info_frv): Fix indentation.
11864
11865 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11866
11867         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11868         map field.
11869         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11870         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11871         and allocate with new.
11872         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11873
11874 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11875
11876         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11877         <filename, member_name>: Change type to std::string.
11878         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11879         (library_list_start_library): Allocate lm_info_aix with new.
11880         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11881         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11882         with copy constructor.
11883
11884 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11885
11886         * solist.h (struct lm_info): Remove.
11887         (struct lm_info_base): New class.
11888         (struct so_list) <lm_info>: Change type to lm_info_base *.
11889         * nto-tdep.c (struct lm_info): Remove.
11890         (lm_addr): Adjust.
11891         * solib-aix.c (struct lm_info): Rename to ...
11892         (struct lm_info_aix): ... this.  Extend lm_info_base.
11893         (lm_info_p): Rename to ...
11894         (lm_info_aix_p): ... this, and adjust.
11895         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11896         solib_aix_parse_libraries, library_list_start_library,
11897         solib_aix_free_library_list, solib_aix_parse_libraries,
11898         solib_aix_get_library_list,
11899         solib_aix_relocate_section_addresses, solib_aix_free_so,
11900         solib_aix_get_section_offsets,
11901         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11902         Adjust.
11903         (struct solib_aix_inferior_data) <library_list>: Adjust.
11904         * solib-darwin.c (struct lm_info): Rename to ...
11905         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11906         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11907         * solib-dsbt.c (struct lm_info): Rename to ...
11908         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11909         (struct dsbt_info) <main_executable_lm_info): Adjust.
11910         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11911         dsbt_relocate_section_addresses): Adjust.
11912         * solib-frv.c (struct lm_info): Rename to ...
11913         (struct lm_info_frv): ... this.  Extend lm_info_base.
11914         (main_executable_lm_info): Adjust.
11915         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11916         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11917         find_canonical_descriptor_in_load_object,
11918         frv_fdpic_find_canonical_descriptor): Adjust.
11919         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11920         to lm_info_svr4.
11921         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11922         svr4_clear_so, svr4_copy_library_list,
11923         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11924         svr4_current_sos, svr4_fetch_objfile_link_map,
11925         solist_update_incremental): Adjust.
11926         * solib-svr4.h (struct lm_info_svr4): Move here from
11927         solib-svr4.c.
11928         * solib-target.c (struct lm_info): Rename to ...
11929         (struct lm_info_target): ... this.  Extend lm_info_base.
11930         (lm_info_p): Rename to ...
11931         (lm_info_target_p): ... this.
11932         (solib_target_parse_libraries, library_list_start_segment,
11933         library_list_start_section, library_list_start_library,
11934         library_list_end_library, solib_target_free_library_list,
11935         solib_target_current_sos, solib_target_free_so,
11936         solib_target_relocate_section_addresses): Adjust.
11937         * windows-nat.c (struct lm_info): Rename to ...
11938         (struct lm_info_windows): ... this.  Extend lm_info_base.
11939         (windows_make_so, handle_load_dll, handle_unload_dll,
11940         windows_xfer_shared_libraries): Adjust.
11941
11942 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11943
11944         * solib-darwin.c (struct darwin_so_list): Remove.
11945         (darwin_current_sos): Allocate an so_list object instead of a
11946         darwin_so_list, separately allocate an lm_info object.
11947         (darwin_free_so): Free lm_info.
11948
11949 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11950
11951         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11952         with fprintf_filtered.
11953
11954 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11955
11956         * regcache.c (regcache::regcache): New function.
11957         (regcache::~regcache): New function.
11958         (regcache_xmalloc_1): Remove.
11959         (regcache_xmalloc): Call new regcache.
11960         (regcache_xfree): Call delete regcache.
11961         (get_thread_arch_aspace_regcache): Call new regcache.
11962
11963 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11964
11965         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11966         lwp instead of ptid_get_lwp.
11967
11968 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11969
11970         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11971         lwp_info instead of getting from inferior_ptid.
11972
11973 2017-04-27  Keith Seitz  <keiths@redhat.com>
11974
11975         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11976         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11977         (CV_CONVERSION_BADNESS): Define.
11978         (rank_one_type): Remove overly restrictive rvalue reference
11979         rank checks.
11980         Add cv-qualifier checks and subranks for type equality.
11981         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11982         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11983         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11984
11985 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11986
11987         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11988         count when creating the object.
11989
11990 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11991             Ulrich Weigand  <uweigand@de.ibm.com>
11992
11993         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11994         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11995         is used in AIX.
11996         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11997         (process_xcoff_symbol): Likewise.
11998         (scan_xcoff_symtab): Likewise.
11999
12000 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12001
12002         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12003         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12004         (ia64_access_reg): Use get_frame_register_unsigned.
12005         (ia64_access_rse_reg): Likewise.
12006         (ia64_libunwind_frame_prev_register): Likewise.
12007
12008 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
12009
12010         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12011         * gdbarch.c: Regenerated.
12012         * gdbarch.h: Regenerated.
12013         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12014         visibility external.
12015         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12016         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12017         (enum cfa_how_kind): Move to ...
12018         (struct dwarf2_frame_state_reg_info): Likewise.
12019         (struct dwarf2_frame_state): Likewise.
12020         * dwarf2-frame.h: ... here.
12021         (dwarf2_frame_state_alloc_regs): New declaration.
12022         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12023         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12024
12025 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12026
12027         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12028         regcache_raw_read_unsigned.
12029         (xtensa_pseudo_register_write): Likewise.
12030
12031 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12032
12033         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12034         (nds32_pseudo_register_write): Likewise.
12035
12036 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12037
12038         * regcache.c (struct regcache) <readonly_p>: Change its type
12039         to bool.
12040         (regcache_xmalloc_1): Update parameter type and callers update.
12041
12042 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12043
12044         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12045         set_gdbarch_wchar_bit.
12046         * arm-tdep.c (arm_gdbarch_init): Likewise.
12047
12048 2017-04-25  Pedro Alves  <palves@redhat.com>
12049
12050         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12051         (BothAreRelocatable, memcopy, memmove): Don't define.
12052         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12053         macros.
12054
12055 2017-04-25  Pedro Alves  <palves@redhat.com>
12056
12057         * common/common-defs.h: Include "common/poison.h".
12058         * common/function-view.h: (Not, Or, Requires): Move to traits.h
12059         and adjust.
12060         * common/poison.h: New file.
12061         * common/traits.h: Include <type_traits>.
12062         (Not, Or, Requires): New, moved from common/function-view.h.
12063
12064 2017-04-25  Pedro Alves  <palves@redhat.com>
12065
12066         * breakpoint.h (struct breakpoint): In-class initialize all
12067         fields.  Make boolean fields "bool".
12068         * breakpoint.c (init_raw_breakpoint_without_location): Remove
12069         memset call and initializations no longer necessary.
12070
12071 2017-04-25  Pedro Alves  <palves@redhat.com>
12072
12073         * btrace.c (pt_btrace_insn_flags): Change parameter type to
12074         reference.
12075         (pt_btrace_insn): New function.
12076         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12077
12078 2017-04-25  Pedro Alves  <palves@redhat.com>
12079
12080         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
12081         "base" field and inherit from "bp_location" instead.  Add
12082         non-default ctor.
12083         (allocate_location_exception): Use new non-default ctor.
12084         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12085         (init_bp_location): Convert to ...
12086         (bp_location::bp_location): ... this new ctor, and remove memset
12087         call.
12088         (base_breakpoint_allocate_location): Use the new non-default ctor.
12089         * breakpoint.h (bp_location): Now a class.  Declare default and
12090         non-default ctors.  In-class initialize all members.
12091         (init_bp_location): Remove declaration.
12092
12093 2017-04-25  Pedro Alves  <palves@redhat.com>
12094
12095         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12096         assignment operator.
12097
12098 2017-04-24  Yao Qi  <yao.qi@linaro.org>
12099
12100         * doublest.c (convert_doublest_to_floatformat): Call
12101         floatformat_totalsize_bytes.
12102
12103 2017-04-22  Tom Tromey  <tom@tromey.com>
12104
12105         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12106         ui_out_emit_list.
12107         * stack.c (print_frame): Use ui_out_emit_list.
12108         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12109         ui_out_emit_list.
12110         * mi/mi-main.c (print_one_inferior)
12111         (mi_cmd_data_list_register_names)
12112         (mi_cmd_data_list_register_values, mi_cmd_list_features)
12113         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12114         ui_out_emit_list.
12115         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12116         (mi_output_solib_attribs): Use ui_out_emit_list,
12117         ui_out_emit_tuple.
12118         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12119         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12120         (mi_cmd_stack_list_args, list_args_or_locals): Use
12121         ui_out_emit_list.
12122         * disasm.c (do_assembly_only): Use ui_out_emit_list.
12123         * breakpoint.c (print_solib_event, output_thread_groups): Use
12124         ui_out_emit_list.
12125
12126 2017-04-22  Tom Tromey  <tom@tromey.com>
12127
12128         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12129         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12130         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12131
12132 2017-04-22  Tom Tromey  <tom@tromey.com>
12133
12134         * tracepoint.c (tvariables_info_1)
12135         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12136
12137 2017-04-22  Tom Tromey  <tom@tromey.com>
12138
12139         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12140         annotate_arg_emitter.
12141         * breakpoint.c (print_mention_watchpoint)
12142         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12143         * annotate.h (struct annotate_arg_emitter): New.
12144
12145 2017-04-22  Tom Tromey  <tom@tromey.com>
12146
12147         * record-btrace.c (record_btrace_insn_history)
12148         (record_btrace_insn_history_range, record_btrace_call_history)
12149         (record_btrace_call_history_range): Use ui_out_emit_tuple.
12150         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12151         ui_out_emit_tuple.
12152         * stack.c (print_frame_info): Use ui_out_emit_tuple.
12153         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12154         * skip.c (skip_info): Use ui_out_emit_tuple.
12155         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12156         * progspace.c (print_program_space): Use ui_out_emit_tuple.
12157         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12158         * osdata.c (info_osdata): Use ui_out_emit_tuple.
12159         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12160         ui_out_emit_tuple.
12161         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12162         (output_register, mi_cmd_data_read_memory)
12163         (mi_cmd_data_read_memory_bytes, mi_load_progress)
12164         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12165         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12166         Use ui_out_emit_tuple.
12167         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12168         ui_out_emit_tuple.
12169         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12170         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12171         * linux-thread-db.c (info_auto_load_libthread_db): Use
12172         ui_out_emit_tuple.
12173         * inferior.c (print_inferior): Use ui_out_emit_tuple.
12174         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12175         * disasm.c (do_mixed_source_and_assembly_deprecated)
12176         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12177         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12178         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12179         * breakpoint.c (print_one_breakpoint_location)
12180         (print_one_breakpoint): Use ui_out_emit_tuple.
12181         * auto-load.c (print_script, info_auto_load_cmd): Use
12182         ui_out_emit_tuple.
12183         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12184
12185 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
12186
12187         * thread.c (print_thread_info_1): Remove dead code.
12188
12189 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12190
12191         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12192         GDB_SELF_TEST.
12193         * arm-tdep.c (selftests::arm_record_test): Likewise.
12194
12195 2017-04-21  Yao Qi  <yao.qi@linaro.org>
12196
12197         * regcache.c (regcache_restore): Remove argument 2.  Replace
12198         argument 3 with regcache.  Get register status from
12199         src->register_status and get register contents from
12200         register_buffer (src, regnum).
12201         (regcache_cpy): Update.
12202
12203 2017-04-19  Pedro Alves  <palves@redhat.com>
12204
12205         * gdbthread.h (thread): Add missing closing parenthesis in
12206         comment.
12207
12208 2017-04-19  Pedro Alves  <palves@redhat.com>
12209
12210         * common/refcounted-object.h: New file.
12211         * gdbthread.h: Include "common/refcounted-object.h".
12212         (thread_info): Inherit from refcounted_object and add comments.
12213         (thread_info::incref, thread_info::decref)
12214         (thread_info::m_refcount): Delete.
12215         (thread_info::deletable): Use the refcounted_object::refcount()
12216         method.
12217         * inferior.c (current_inferior_): Add comment.
12218         (set_current_inferior): Increment/decrement refcounts.
12219         (prune_inferiors, remove_inferior_command): Skip inferiors marked
12220         not-deletable instead of comparing with the current inferior.
12221         (initialize_inferiors): Increment the initial inferior's refcount.
12222         * inferior.h (struct inferior): Forward declare.
12223         Include "common/refcounted-object.h".
12224         (current_inferior, set_current_inferior): Move declaration to
12225         before struct inferior's definition, and fix comment.
12226         (inferior): Inherit from refcounted_object.  Add comments.
12227         * thread.c (switch_to_thread_no_regs): Reference the thread's
12228         inferior pointer directly instead of doing a ptid lookup.
12229         (switch_to_no_thread): New function.
12230         (switch_to_thread(thread_info *)): New function, factored out
12231         from ...
12232         (switch_to_thread(ptid_t)): ... this.
12233         (restore_current_thread): Delete.
12234         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12235         fields, and add 'inf' field.
12236         (do_restore_current_thread_cleanup): Check whether old->inf is
12237         alive instead of looking up an inferior by ptid.  Use
12238         switch_to_thread and switch_to_no_thread.
12239         (restore_current_thread_cleanup_dtor): Use old->inf directly
12240         instead of lookup up an inferior by id.  Decref the inferior.
12241         Don't restore 'removable'.
12242         (make_cleanup_restore_current_thread): Same the inferior pointer
12243         in old, instead of the inferior number.  Incref the inferior.
12244         Don't save/clear 'removable'.
12245
12246 2017-04-19  Pedro Alves  <palves@redhat.com>
12247
12248         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12249         unittests/scoped_restore-selftests.c.
12250         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12251         * common/scoped_restore.h (scoped_restore_base): Make "class".
12252         (scoped_restore_base::release): New public method.
12253         (scoped_restore_base::scoped_restore_base): New protected ctor.
12254         (scoped_restore_base::m_saved_var): New protected field.
12255         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12256         scoped_restore_base base class instead of m_saved_var directly.
12257         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12258         (scoped_restore_tmpl::scoped_restore_tmpl(const
12259         scoped_restore_tmpl<T>&)): Likewise.
12260         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12261         method.
12262         (scoped_restore_tmpl::saved_var): New method.
12263         (scoped_restore_tmpl::m_saved_var): Delete.
12264         * inferior.h (inferior::detaching): Now a bool.
12265         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12266         cleanup.
12267         * unittests/scoped_restore-selftests.c: New file.
12268
12269 2017-04-19  Pedro Alves  <palves@redhat.com>
12270
12271         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12272         Re-sort in alphabetic order.
12273
12274 2017-04-18  Pedro Alves  <palves@redhat.com>
12275
12276         * xml-support.c (obstack_xml_printf): Delete.
12277         * xml-support.h (obstack_xml_printf): Delete.
12278
12279 2017-04-18  Pedro Alves  <palves@redhat.com>
12280
12281         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12282         vdebug, verror, body_text, start_element, end_element, name,
12283         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12284         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12285         is_xinclude>: Make private and add m_ prefix.
12286         (gdb_xml_parser::body_text): New method, based on ...
12287         (gdb_xml_body_text): ... this.  Adjust.
12288         (gdb_xml_parser::vdebug): New method, based on ...
12289         (gdb_xml_debug): ... this.  Adjust.
12290         (gdb_xml_parser::verror): New method, based on ...
12291         (gdb_xml_error): ... this.  Adjust.
12292         (gdb_xml_parser::start_element): New method, based on ...
12293         (gdb_xml_start_element): ... this.  Adjust.
12294         (gdb_xml_start_element_wrapper): Defer to
12295         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12296         (gdb_xml_parser::end_element): New method, based on ...
12297         (gdb_xml_end_element_wrapper): ... this.  Adjust.
12298         (gdb_xml_parser::~gdb_xml_parser): Adjust.
12299         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12300         (gdb_xml_parser::use_dtd): New method, based on ...
12301         (gdb_xml_use_dtd): ... this.  Adjust.
12302         (gdb_xml_parser::parse): New method, based on ...
12303         (gdb_xml_parse): ... this.  Adjust.
12304         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12305         (xinclude_start_include): Adjust to call the parser's name method.
12306         (xml_xinclude_default, xml_xinclude_start_doctype)
12307         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12308         method.
12309         (xml_process_xincludes): Adjust to call parser methods.
12310         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12311         declarations.
12312
12313 2017-04-18  Pedro Alves  <palves@redhat.com>
12314
12315         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12316         gdb::optional<std::string>.
12317         * xml-support.c: Include <string>.
12318         (scope_level::scope_level(scope_level &&))
12319         (scope_level::~scope_level): Delete.
12320         (scope_level::body): Now a std::string.
12321         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12322         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12323         parameter.
12324         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12325         (xinclude_parsing_data::output): Now a std::string reference.
12326         (xinclude_start_include): Adjust.
12327         (xml_xinclude_default): Adjust.
12328         (xml_process_xincludes): Add 'output' parameter, and return bool.
12329         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12330         and return bool.
12331         * xml-tdesc.c: Include <unordered_map> and <string>.
12332         (tdesc_xml_cache): Delete.
12333         (tdesc_xml_cache_s): Delete.
12334         (xml_cache): Now an std::unordered_map.
12335         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12336         (target_fetch_description_xml): Change return type to
12337         gdb::optional<std::string>, and adjust.
12338         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12339         (target_fetch_description_xml): Change return type to
12340         gdb::optional<std::string>.
12341
12342 2017-04-18  Pedro Alves  <palves@redhat.com>
12343
12344         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12345         unittests/optional-selftests.c.
12346         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12347         * unittests/optional-selftests.c: New file.
12348         * unittests/optional/assignment/1.cc: New file.
12349         * unittests/optional/assignment/2.cc: New file.
12350         * unittests/optional/assignment/3.cc: New file.
12351         * unittests/optional/assignment/4.cc: New file.
12352         * unittests/optional/assignment/5.cc: New file.
12353         * unittests/optional/assignment/6.cc: New file.
12354         * unittests/optional/assignment/7.cc: New file.
12355         * unittests/optional/cons/copy.cc: New file.
12356         * unittests/optional/cons/default.cc: New file.
12357         * unittests/optional/cons/move.cc: New file.
12358         * unittests/optional/cons/value.cc: New file.
12359         * unittests/optional/in_place.cc: New file.
12360         * unittests/optional/observers/1.cc: New file.
12361         * unittests/optional/observers/2.cc: New file.
12362
12363 2017-04-18  Pedro Alves  <palves@redhat.com>
12364
12365         * common/gdb_optional.h: Include common/traits.h.
12366         (in_place_t): New type.
12367         (in_place): New constexpr variable.
12368         (optional::optional): Remove member initialization of
12369         m_instantiated.
12370         (optional::optional(in_place_t...)): New constructor.
12371         (optional::~optional): Use reset.
12372         (optional::optional(const optional&)): New.
12373         (optional::optional(const optional&&)): New.
12374         (optional::optional(T &)): New.
12375         (optional::optional(T &&)): New.
12376         (operator::operator=(const optional &)): New.
12377         (operator::operator=(optional &&)): New.
12378         (operator::operator= (const T &))
12379         (operator::operator= (T &&))
12380         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
12381         (operator::reset): New.
12382         (operator::m_instantiated):: Add in-class initializer.
12383         * common/traits.h: Include <type_traits>.
12384         (struct And): New types.
12385
12386 2017-04-18  Pedro Alves  <palves@redhat.com>
12387
12388         * xml-support.c: Include <vector>.
12389         (scope_level::scope_level(const gdb_xml_element *))
12390         (scope_level::scope_level(scope_level&&)): New.
12391         (scope_level::~scope_level): New.
12392         (scope_level_s): Delete.
12393         (gdb_xml_parser::scopes): Now a std::vector.
12394         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12395         Use std::vector.
12396         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12397         scope cleanup code.
12398         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12399         of the scopes member.  Use std::vector::emplace_back.
12400
12401 2017-04-18  Pedro Alves  <palves@redhat.com>
12402
12403         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
12404         a bool.
12405         (gdb_xml_end_element): Change type of first parameter.
12406         (gdb_xml_cleanup): Rename to ...
12407         (gdb_xml_parser::~gdb_xml_parser): ... this.
12408         (gdb_xml_create_parser_and_cleanup): Delete with ...
12409         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12410         to this new ctor.
12411         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12412         using gdb_xml_create_parser_and_cleanup.
12413         (xinclude_parsing_data): Add ctor/dtor.
12414         (xml_xinclude_cleanup): Delete.
12415         (xml_process_xincludes): Create a local xinclude_parsing_data
12416         instead of heap-allocating one.  Create a local gdb_xml_parser
12417         instead of heap-allocating one with
12418         gdb_xml_create_parser_and_cleanup.
12419
12420 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
12421
12422         PR threads/20743
12423         * fbsd-nat.c (resume_one_thread_cb): Remove.
12424         (resume_all_threads_cb): Remove.
12425         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12426         iterate_over_threads.
12427
12428 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12429
12430         * NEWS: Create a new section for the next release branch.
12431         Rename the section of the current branch, now that it has
12432         been cut.
12433
12434 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
12435
12436         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12437         * version.in: Bump version to 8.0.50.DATE-git.
12438
12439 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
12440
12441         PR gdb/21385
12442         * windows-nat.c (windows_create_inferior): Declare 'allargs'
12443         independently of the host, and fix build breakage on Cygwin.
12444
12445 2017-04-13  Pedro Alves  <palves@redhat.com>
12446
12447         * inferior.c (free_inferior): Convert to ...
12448         (inferior::~inferior): ... this dtor.
12449         (inferior::inferior): New ctor, factored out from ...
12450         (add_inferior_silent): ... here.  Allocate the inferior with a new
12451         expression.
12452         (delete_inferior): Call delete instead of free_inferior.
12453         * inferior.h (gdb_environ, continuation): Forward declare.
12454         (inferior): Now a class.  Add in-class initialization to all
12455         members.  Make boolean fields bool, except 'detaching'.
12456         (inferior::inferior): New explicit ctor.
12457         (inferior::~inferior): New.
12458
12459 2017-04-13  Pedro Alves  <palves@redhat.com>
12460
12461         * inferior.c (init_inferior_list): Delete.
12462         * inferior.h (init_inferior_list): Delete.
12463
12464 2017-04-13  Pedro Alves  <palves@redhat.com>
12465
12466         PR threads/13217
12467         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12468         (top level): Call it twice, with different thread sets.
12469
12470 2017-04-13  Pedro Alves  <palves@redhat.com>
12471
12472         * thread.c: Include <algorithm>.
12473         (thread_array_cleanup): Delete.
12474         (scoped_inc_dec_ref): New class.
12475         (live_threads_count): New function.
12476         (set_thread_refcount): Delete.
12477         (tp_array_compar_ascending): Now a bool.
12478         (tp_array_compar): Convert to a std::sort comparison function.
12479         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12480         and live_threads_count.
12481
12482 2017-04-13  Pedro Alves  <palves@redhat.com>
12483
12484         * infrun.c (follow_fork_inferior): Also switch the current
12485         inferior.
12486
12487 2017-04-13  Pedro Alves  <palves@redhat.com>
12488
12489         * breakpoint.c (watch_command_1): Save watchpoint-frame info
12490         before calling create_internal_breakpoint.
12491
12492 2017-04-13  Pedro Alves  <palves@redhat.com>
12493
12494         * fork-child.c (execv_argv): New class.
12495         (breakup_args): Refactored as ...
12496         (execv_argv::init_for_no_shell): .. this method of execv_argv.
12497         Copy arguments to storage and replace separators with NULL
12498         terminators in place.
12499         (escape_bang_in_quoted_argument): Adjust to return bool.
12500         (execv_argv::execv_argv): New ctor.
12501         (execv_argv::init_for_shell): New method, factored out from
12502         fork_inferior.  Don't strdup strings into the vector.
12503         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
12504         Remove free_vector_argv call.
12505
12506 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12507
12508         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12509         tdep->rx_psw_type.
12510
12511 2017-04-13  Yao Qi  <yao.qi@linaro.org>
12512
12513         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12514         * rx-tdep.c (rx_gdbarch_init): Likewise.
12515
12516 2017-04-13  Pedro Alves  <palves@redhat.com>
12517
12518         * breakpoint.h (struct breakpoint): Reindent.
12519
12520 2017-04-13  Pedro Alves  <palves@redhat.com>
12521
12522         * breakpoint.c (bp_location): Rename to ...
12523         (bp_locations): ... this.  All references updated.
12524         (bp_location_count): Rename to ...
12525         (bp_locations_count): ... this.  All references updated.
12526         (bp_location_placed_address_before_address_max): Rename to ...
12527         (bp_locations_placed_address_before_address_max): ... this.  All
12528         references updated.
12529         (bp_location_shadow_len_after_address_max): Rename to ...
12530         (bp_locations_shadow_len_after_address_max): ... this.  All
12531         references updated.
12532         (bp_location_compare_addrs): Rename to ...
12533         (bp_locations_compare_addrs): ... this.  All references updated.
12534         (bp_location_compare):Rename to ...
12535         (bp_locations_compare): ... this.  All references updated.
12536         (bp_location_target_extensions_update): Rename to ...
12537         (bp_locations_target_extensions_update): ... this.  All references
12538         updated.
12539
12540 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12541
12542         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12543         * common/common.m4: Check headers 'termios.h', 'termio.h' and
12544         'sgtty.h'.
12545         * common/gdb_termios.h: New file, with parts of "terminal.h".
12546         * inflow.c: Include "gdb_termios.h".
12547         * ser-unix.c: Include "gdb_termios.h".
12548         * terminal.h: Move terminal-related defines to
12549         "common/gdb_termios.h".
12550
12551 2017-04-12  Tom Tromey  <tom@tromey.com>
12552
12553         * probe.c (parse_probes): Update.
12554         * location.h (delete_event_location): Don't declare.
12555         (event_location_deleter::operator()): Update.
12556         * location.c (event_location_deleter::operator()): Rename from
12557         delete_event_location.
12558         * linespec.h (linespec_result) <location>: Change type to
12559         event_location_up.
12560         * linespec.c (canonicalize_linespec, event_location_to_sals)
12561         (decode_objc): Update.
12562         (linespec_result): Don't call delete_event_location.
12563         * breakpoint.c (create_breakpoints_sal)
12564         (bkpt_probe_create_sals_from_location)
12565         (strace_marker_create_sals_from_location): Update.
12566
12567 2017-04-12  Tom Tromey  <tom@tromey.com>
12568
12569         * linespec.h (struct linespec_result): Add constructor and
12570         destructor.
12571         (init_linespec_result, destroy_linespec_result)
12572         (make_cleanup_destroy_linespec_result): Don't declare.
12573         * linespec.c (init_linespec_result): Remove.
12574         (linespec_result::~linespec_result): Rename from
12575         destroy_linespec_result.  Update.
12576         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12577         Remove.
12578         * breakpoint.c (create_breakpoint, break_range_command)
12579         (decode_location_default): Update.
12580         * ax-gdb.c (agent_command_1): Update.
12581
12582 2017-04-12  Tom Tromey  <tom@tromey.com>
12583
12584         * remote.c (remote_download_tracepoint): Update.
12585         * python/py-breakpoint.c (bppy_get_location): Update.
12586         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12587         (gdbscm_breakpoint_location): Update.
12588         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12589         * breakpoint.h (struct breakpoint) <location, location_range_end>:
12590         Change type to event_location_up.
12591         * breakpoint.c (create_overlay_event_breakpoint)
12592         (create_longjmp_master_breakpoint)
12593         (create_std_terminate_master_breakpoint)
12594         (create_exception_master_breakpoint)
12595         (breakpoint_event_location_empty_p, print_breakpoint_location)
12596         (print_one_breakpoint_location, create_thread_event_breakpoint)
12597         (init_breakpoint_sal, create_breakpoint)
12598         (print_recreate_ranged_breakpoint, break_range_command)
12599         (init_ada_exception_breakpoint, say_where): Update.
12600         (base_breakpoint_dtor): Don't call delete_event_location.
12601         (bkpt_print_recreate, tracepoint_print_recreate)
12602         (dprintf_print_recreate, update_static_tracepoint)
12603         (breakpoint_re_set_default): Update.
12604
12605 2017-04-12  Tom Tromey  <tom@tromey.com>
12606
12607         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12608         type of "to_do".  Update.
12609         (compute_stack_depth): Use std::vector.
12610
12611 2017-04-12  Tom Tromey  <tom@tromey.com>
12612
12613         * printcmd.c (find_instruction_backward): Use std::vector.
12614
12615 2017-04-12  Tom Tromey  <tom@tromey.com>
12616
12617         * symfile.c (objfilep): Remove typedef.
12618         (reread_symbols): Use a std::vector.
12619
12620 2017-04-12  Tom Tromey  <tom@tromey.com>
12621
12622         * mi/mi-main.c (exec_direction_forward): Remove.
12623         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12624         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12625         scoped_restore.
12626         * guile/guile.c (guile_repl_command, guile_command)
12627         (gdbscm_execute_gdb_command): Use scoped_restore.
12628         * go-exp.y (go_parse): Use scoped_restore.
12629         * d-exp.y (d_parse): Use scoped_restore.
12630         * cli/cli-decode.c (cmd_func): Use scoped_restore.
12631         * c-exp.y (c_parse): Use scoped_restore.
12632
12633 2017-04-12  Tom Tromey  <tom@tromey.com>
12634
12635         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12636         (mi_parse): Update return type.
12637         (mi_parse_free): Remove.
12638         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12639         (mi_parse::~mi_parse): Rename from mi_parse_free.
12640         (mi_parse_cleanup): Remove.
12641         (mi_parse): Return a unique_ptr.  Use new.
12642         * mi/mi-main.c (mi_execute_command): Update.
12643
12644 2017-04-12  Tom Tromey  <tom@tromey.com>
12645
12646         * location.c (explicit_location_lex_one): Return a
12647         unique_xmalloc_ptr.
12648         (string_to_explicit_location): Update.  Remove cleanups.
12649
12650 2017-04-12  Tom Tromey  <tom@tromey.com>
12651
12652         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12653         (compare_value_and_voffset): Change type.  Update.
12654         (compute_vtable_size): Change type of "offset_vec".
12655         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
12656         (gnuv3_get_typeid): Remove extraneous declaration.
12657
12658 2017-04-12  Tom Tromey  <tom@tromey.com>
12659
12660         * charset.h (wchar_iterator): Fix comment.
12661
12662 2017-04-12  Tom Tromey  <tom@tromey.com>
12663
12664         * charset.c (iconv_wrapper): New class.
12665         (cleanup_iconv): Remove.
12666         (convert_between_encodings): Use it.
12667
12668 2017-04-12  Tom Tromey  <tom@tromey.com>
12669
12670         * symfile.h (increment_reading_symtab): Update type.
12671         * symfile.c (decrement_reading_symtab): Remove.
12672         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12673         * psymtab.c (psymtab_to_symtab): Update.
12674         * dwarf2read.c (dw2_instantiate_symtab): Update.
12675
12676 2017-04-12  Tom Tromey  <tom@tromey.com>
12677
12678         * jit.c (struct jit_reader): Declare separately.  Add constructor
12679         and destructor.  Change type of "handle".
12680         (loaded_jit_reader): Define separately.
12681         (jit_reader_load): Update.  New "new".
12682         (jit_reader_unload_command): Use "delete".
12683         * gdb-dlfcn.h (struct dlclose_deleter): New.
12684         (gdb_dlhandle_up): New typedef.
12685         (gdb_dlopen, gdb_dlsym): Update types.
12686         (gdb_dlclose): Remove.
12687         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12688         (gdb_dlsym): Change type of "handle".
12689         (make_cleanup_dlclose): Remove.
12690         (dlclose_deleter::operator()): Rename from gdb_dlclose.
12691         * compile/compile-c-support.c (load_libcc): Update.
12692
12693 2017-04-12  Tom Tromey  <tom@tromey.com>
12694
12695         * symtab.h (find_pcs_for_symtab_line): Change return type.
12696         * symtab.c (find_pcs_for_symtab_line): Change return type.
12697         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12698         type of "vec".  Update.
12699         (ltpy_get_pcs_for_line): Update.
12700         * linespec.c (decode_digits_ordinary): Update.
12701
12702 2017-04-12  Tom Tromey  <tom@tromey.com>
12703
12704         * tracepoint.c (actions_command): Update.
12705         * python/python.c (python_command, python_interactive_command):
12706         Update.
12707         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12708         * guile/guile.c (guile_command): Update.
12709         * defs.h (read_command_lines, read_command_lines_1): Return
12710         command_line_up.
12711         (command_lines_deleter): New struct.
12712         (command_line_up): New typedef.
12713         * compile/compile.c (compile_code_command)
12714         (compile_print_command): Update.
12715         * cli/cli-script.h (get_command_line, copy_command_lines): Return
12716         command_line_up.
12717         (make_cleanup_free_command_lines): Remove.
12718         * cli/cli-script.c (get_command_line, read_command_lines_1)
12719         (copy_command_lines): Return command_line_up.
12720         (while_command, if_command, read_command_lines, define_command)
12721         (document_command): Update.
12722         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12723         Remove.
12724         * breakpoint.h (breakpoint_set_commands): Change type of
12725         "commands".
12726         * breakpoint.c (breakpoint_set_commands): Change type of
12727         "commands".  Update.
12728         (do_map_commands_command, update_dprintf_command_list)
12729         (create_tracepoint_from_upload): Update.
12730
12731 2017-04-12  Tom Tromey  <tom@tromey.com>
12732
12733         * tracepoint.c (scope_info): Update.
12734         * spu-tdep.c (spu_catch_start): Update.
12735         * python/python.c (gdbpy_decode_line): Update.
12736         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12737         * python/py-breakpoint.c (bppy_init): Update.
12738         * probe.c (parse_probes): Update.
12739         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12740         * location.h (event_location_deleter): New struct.
12741         (event_location_up): New typedef.
12742         (new_linespec_location, new_address_location, new_probe_location)
12743         (new_explicit_location, copy_event_location)
12744         (string_to_event_location, string_to_event_location_basic)
12745         (string_to_explicit_location): Update return type.
12746         (make_cleanup_delete_event_location): Remove.
12747         * location.c (new_linespec_location, new_address_location)
12748         (new_probe_location, new_explicit_location, copy_event_location):
12749         Return event_location_up.
12750         (delete_event_location_cleanup)
12751         (make_cleanup_delete_event_location): Remove.
12752         (string_to_explicit_location, string_to_event_location_basic)
12753         (string_to_event_location): Return event_location_up.
12754         * linespec.c (canonicalize_linespec, event_location_to_sals)
12755         (decode_line_with_current_source)
12756         (decode_line_with_last_displayed, decode_objc): Update.
12757         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12758         * completer.c (location_completer): Update.
12759         * cli/cli-cmds.c (edit_command, list_command): Update.
12760         * breakpoint.c (create_overlay_event_breakpoint)
12761         (create_longjmp_master_breakpoint)
12762         (create_std_terminate_master_breakpoint)
12763         (create_exception_master_breakpoint)
12764         (create_thread_event_breakpoint): Update.
12765         (init_breakpoint_sal): Update.  Remove some dead code.
12766         (create_breakpoint_sal): Change type of "location".  Update.
12767         (create_breakpoints_sal, create_breakpoint, break_command_1)
12768         (dprintf_command, break_range_command, until_break_command)
12769         (init_ada_exception_breakpoint)
12770         (strace_marker_create_sals_from_location)
12771         (update_static_tracepoint, trace_command, ftrace_command)
12772         (strace_command, create_tracepoint_from_upload): Update.
12773         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12774         * ax-gdb.c (agent_command_1): Update.
12775
12776 2017-04-12  Pedro Alves  <palves@redhat.com>
12777
12778         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12779         * configure.tgt: Handle i[34567]86-*-go32* and
12780         i[34567]86-*-msdosdjgpp*.
12781         * i386-tdep.c (i386_svr4_reg_to_regnum):
12782         Make extern.
12783         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12784         i386-go32-tdep.c.
12785         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12786         * i386-go32-tdep.c: New file.
12787         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12788         declarations.
12789
12790 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12791
12792         * aix-thread.c (pd_status2str): Change return type to const char *.
12793
12794 2017-04-12  Pedro Alves  <palves@redhat.com>
12795
12796         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12797         calls to set_gdbarch_gnu_triplet_regexp.
12798
12799 2017-04-12  Pedro Alves  <palves@redhat.com>
12800
12801         PR gdb/21323
12802         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12803         New enum value.
12804         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12805         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12806         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12807         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12808         * gdbarch.h, gdbarch.c: Regenerate.
12809         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12810         gdbarch_wchar_bit and gdbarch_wchar_signed.
12811         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12812         * arm-tdep.c (arm_gdbarch_init): Likewise.
12813         * avr-tdep.c (avr_gdbarch_init): Likewise.
12814         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12815         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12816         * i386-tdep.c (i386_go32_init_abi): Likewise.
12817         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12818         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12819         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12820         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12821         * sh-tdep.c (sh_gdbarch_init): Likewise.
12822         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12823         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12824         * windows-tdep.c (windows_init_abi): Likewise.
12825         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12826
12827 2017-04-12  Pedro Alves  <palves@redhat.com>
12828
12829         PR c++/21323
12830         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12831         cplus_primitive_type_char32_t>: New enum values.
12832         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12833         and cplus_primitive_type_char32_t.
12834         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12835         32, use the archtecture's built-in type for char16_t and char32_t,
12836         respectively.  Otherwise, fallback to init_integer_type as before,
12837         but make the type unsigned, and issue a complaint.
12838         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12839
12840 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12841
12842         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12843         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12844
12845 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12846
12847         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12848         'const char *'.
12849
12850 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12851
12852         * common/common-utils.c (free_vector_argv): New function.
12853         * common/common-utils.h: Include <vector>.
12854         (free_vector_argv): New prototype.
12855         * darwin-nat.c (darwin_create_inferior): Rewrite function
12856         prototype in order to constify "exec_file" and accept a
12857         "std::string" for "allargs".
12858         * fork-child.c: Include <vector>.
12859         (breakup_args): Rewrite function, using C++.
12860         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12861         and accept "std::string" for "allargs".  Update the code to
12862         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12863         and "execvp".
12864         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12865         order to constify "exec_file" and accept a "std::string" for
12866         "allargs".
12867         * go32-nat.c (go32_create_inferior): Likewise.
12868         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12869         * infcmd.c (run_command_1): Constify "exec_file".  Use
12870         "std::string" for inferior arguments.
12871         * inferior.h (fork_inferior): Update prototype.
12872         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12873         prototype in order to constify "exec_file" and accept a
12874         "std::string" for "allargs".
12875         * nto-procfs.c (procfs_create_inferior): Likewise.
12876         * procfs.c (procfs_create_inferior): Likewise.
12877         * remote-sim.c (gdbsim_create_inferior): Likewise.
12878         * remote.c (extended_remote_run): Update code to accept
12879         "std::string" as argument.
12880         (extended_remote_create_inferior): Rewrite function prototype in
12881         order to constify "exec_file" and accept a "std::string" for
12882         "allargs".
12883         * rs6000-nat.c (super_create_inferior): Likewise.
12884         (rs6000_create_inferior): Likewise.
12885         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12886         * windows-nat.c (windows_create_inferior): Likewise.
12887
12888 2017-04-11  Pedro Alves  <palves@redhat.com>
12889
12890         * thread.c: Fix whitespace throughout.
12891
12892 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12893
12894         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12895
12896 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12897
12898         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12899
12900 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12901
12902         PR gdb/21364
12903         * osdata.c (info_osdata): Check if 'type' is an empty string
12904         instead of NULL.
12905
12906 2017-04-10  Pedro Alves  <palves@redhat.com>
12907
12908         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12909         (ptid_to_global_thread_id, in_thread_list)
12910         (do_captured_list_thread_ids, set_resumed, set_running)
12911         (set_executing, set_stop_requested, finish_thread_state)
12912         (validate_registers_access, can_access_registers_ptid)
12913         (print_thread_info_1, switch_to_thread)
12914         (do_restore_current_thread_cleanup)
12915         (make_cleanup_restore_current_thread, thread_command)
12916         (thread_name_command): Use operator== instead of ptid_equal.
12917
12918 2017-04-10  Pedro Alves  <palves@redhat.com>
12919
12920         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12921         (current_thread_cleanup_chain): Delete.
12922         (restore_current_thread_cleanup_dtor)
12923         (make_cleanup_restore_current_thread): Remove references to
12924         current_thread_cleanup_chain.
12925
12926 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12927
12928         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12929         REG_UNKNOWN.
12930
12931 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12932
12933         PR gdb/19942
12934         * gdbthread.h (thread_info::deletable): New method.
12935         (thread_info::incref): New method.
12936         (thread_info::decref): New method.
12937         (thread_info::refcount): Move it to private.
12938         * infrun.c (save_stop_context): Call inc_refcount.
12939         (release_stop_context_cleanup): Likewise.
12940         * thread.c (set_thread_exited): New function.
12941         (init_thread_list): Delete "tp" only it is deletable, otherwise
12942         call set_thread_exited.
12943         (delete_thread_1): Call set_thread_exited.
12944         (current_thread_cleanup) <inferior_pid>: Remove.
12945         <thread>: New field.
12946         (restore_current_thread_ptid_changed): Removed.
12947         (do_restore_current_thread_cleanup): Adjust.
12948         (restore_current_thread_cleanup_dtor): Don't call
12949         find_thread_ptid.
12950         (set_thread_refcount): Use dec_refcount.
12951         (make_cleanup_restore_current_thread): Adjust.
12952         (thread_apply_all_command): Call inc_refcount.
12953         (_initialize_thread): Don't call
12954         observer_attach_thread_ptid_changed.
12955
12956 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12957
12958         * thread.c (delete_thread_1): Hoist code on marking thread as
12959         exited.
12960
12961 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12962
12963         * windows-nat.c (windows_detach): Initialize ptid with
12964         minus_one_ptid.
12965
12966 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12967
12968         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12969
12970 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12971
12972         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12973         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12974         (bfin_pseudo_register_write): Likewise
12975
12976 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12977
12978         * common/ptid.h (struct ptid): Change to...
12979         (class ptid_t): ... this.
12980         <ptid_t>: New constructors.
12981         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12982         matches>: New methods.
12983         <make_null, make_minus_one>: New static methods.
12984         <pid>: Rename to...
12985         <m_pid>: ...this.
12986         <lwp>: Rename to...
12987         <m_lwp>: ...this.
12988         <tid>: Rename to...
12989         <m_tid>: ...this.
12990         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12991         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12992         as references, move comment to class ptid_t.
12993         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12994         ptid_t static methods.
12995         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12996         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12997         Take ptid arguments as references, implement using ptid_t methods.
12998         * unittests/ptid-selftests.c: New file.
12999         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13000         unittests/ptid-selftests.c.
13001         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13002
13003 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13004
13005         * python/python.c (python_run_simple_file): Cast mode literal to
13006         non-const char pointer as expected by PyFile_FromString.
13007
13008 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
13009
13010         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13011         minus_one_ptid and null_ptid.
13012
13013 2017-04-05  Pedro Alves  <palves@redhat.com>
13014
13015         * warning.m4 (build_warnings): Remove -Wno-write-strings.
13016         * configure: Regenerate.
13017
13018 2017-04-05  Pedro Alves  <palves@redhat.com>
13019
13020         * ada-exp.y (yyerror): Constify.
13021         * ada-lang.c (bound_name, get_selections)
13022         (ada_variant_discrim_type)
13023         (ada_variant_discrim_name, ada_value_struct_elt)
13024         (ada_lookup_struct_elt_type, is_unchecked_variant)
13025         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13026         (catch_ada_exception_command_split)
13027         (catch_ada_assert_command_split, catch_assert_command)
13028         (ada_op_name): Constify.
13029         * ada-lang.h (ada_yyerror, get_selections)
13030         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13031         * arc-tdep.c (arc_print_frame_cache): Constify.
13032         * arm-tdep.c (arm_skip_stub): Constify.
13033         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13034         (gen_aggregate_elt_ref): Constify.
13035         * bcache.c (print_bcache_statistics): Constify.
13036         * bcache.h (print_bcache_statistics): Constify.
13037         * break-catch-throw.c (catch_exception_command_1):
13038         * breakpoint.c (struct ep_type_description::description):
13039         Constify.
13040         (add_solib_catchpoint): Constify.
13041         (catch_fork_command_1): Add cast.
13042         (add_catch_command): Constify.
13043         * breakpoint.h (add_catch_command, add_solib_catchpoint):
13044         Constify.
13045         * bsd-uthread.c (bsd_uthread_state): Constify.
13046         * buildsym.c (patch_subfile_names): Constify.
13047         * buildsym.h (next_symbol_text_func, patch_subfile_names):
13048         Constify.
13049         * c-exp.y (yyerror): Constify.
13050         (token::oper): Constify.
13051         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13052         * c-varobj.c (cplus_describe_child): Constify.
13053         * charset.c (find_charset_names): Add cast.
13054         (find_charset_names): Constify array and add const_cast.
13055         * cli/cli-cmds.c (complete_command, cd_command): Constify.
13056         (edit_command): Constify.
13057         * cli/cli-decode.c (lookup_cmd): Constify.
13058         * cli/cli-dump.c (dump_memory_command, dump_value_command):
13059         Constify.
13060         (struct dump_context): Constify.
13061         (add_dump_command, restore_command): Constify.
13062         * cli/cli-script.c (get_command_line): Constify.
13063         * cli/cli-script.h (get_command_line): Constify.
13064         * cli/cli-utils.c (check_for_argument): Constify.
13065         * cli/cli-utils.h (check_for_argument): Constify.
13066         * coff-pe-read.c (struct read_pe_section_data): Constify.
13067         * command.h (lookup_cmd): Constify.
13068         * common/print-utils.c (decimal2str): Constify.
13069         * completer.c (gdb_print_filename): Constify.
13070         * corefile.c (set_gnutarget): Constify.
13071         * cp-name-parser.y (yyerror): Constify.
13072         * cp-valprint.c (cp_print_class_member): Constify.
13073         * cris-tdep.c (cris_register_name, crisv32_register_name):
13074         Constify.
13075         * d-exp.y (yyerror): Constify.
13076         (struct token::oper): Constify.
13077         * d-lang.h (d_yyerror): Constify.
13078         * dbxread.c (struct header_file_location::name): Constify.
13079         (add_old_header_file, add_new_header_file, last_function_name)
13080         (dbx_next_symbol_text, add_bincl_to_list)
13081         (find_corresponding_bincl_psymtab, set_namestring)
13082         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13083         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13084         * defs.h (command_line_input, print_address_symbolic)
13085         (deprecated_readline_begin_hook): Constify.
13086         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13087         Constify.
13088         * event-top.c (handle_line_of_input): Constify and add cast.
13089         * exceptions.c (catch_errors): Constify.
13090         * exceptions.h (catch_errors): Constify.
13091         * expprint.c (print_subexp_standard, op_string, op_name)
13092         (op_name_standard, dump_raw_expression, dump_raw_expression):
13093         * expression.h (op_name, op_string, dump_raw_expression):
13094         Constify.
13095         * f-exp.y (yyerror): Constify.
13096         (struct token::oper): Constify.
13097         (struct f77_boolean_val::name): Constify.
13098         * f-lang.c (f_word_break_characters): Constify.
13099         * f-lang.h (f_yyerror): Constify.
13100         * fork-child.c (fork_inferior): Add cast.
13101         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13102         (new_variant): Constify.
13103         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13104         * gdbarch.c: Regenerate.
13105         * gdbcore.h (set_gnutarget): Constify.
13106         * go-exp.y (yyerror): Constify.
13107         (token::oper): Constify.
13108         * go-lang.h (go_yyerror): Constify.
13109         * go32-nat.c (go32_sysinfo): Constify.
13110         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13111         * guile/scm-cmd.c (cmdscm_function): Constify.
13112         * guile/scm-param.c (pascm_param_value): Constify.
13113         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13114         (h8300sx_register_name): Constify.
13115         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13116         Constify.
13117         * ia64-tdep.c (ia64_register_names): Constify.
13118         * infcmd.c (construct_inferior_arguments): Constify.
13119         (path_command, attach_post_wait): Constify.
13120         * language.c (show_range_command, show_case_command)
13121         (unk_lang_error): Constify.
13122         * language.h (language_defn::la_error)
13123         (language_defn::la_name_of_this): Constify.
13124         * linespec.c (decode_line_2): Constify.
13125         * linux-thread-db.c (thread_db_err_str): Constify.
13126         * lm32-tdep.c (lm32_register_name): Constify.
13127         * m2-exp.y (yyerror): Constify.
13128         * m2-lang.h (m2_yyerror): Constify.
13129         * m32r-tdep.c (m32r_register_names): Constify and make static.
13130         * m68hc11-tdep.c (m68hc11_register_names): Constify.
13131         * m88k-tdep.c (m88k_register_name): Constify.
13132         * macroexp.c (appendmem): Constify.
13133         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13134         (upgrade_type, parse_external, parse_partial_symbols)
13135         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13136         (new_symbol): Constify.
13137         * memattr.c (mem_info_command): Constify.
13138         * mep-tdep.c (register_name_from_keyword): Constify.
13139         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13140         Constify.
13141         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13142         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13143         * mi/mi-main.c (captured_mi_execute_command): Constify and add
13144         cast.
13145         (mi_execute_async_cli_command): Constify.
13146         * mips-tdep.c (mips_register_name): Constify.
13147         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13148         (am33_register_name, am33_2_register_name)
13149         * moxie-tdep.c (moxie_register_names): Constify.
13150         * nat/linux-osdata.c (osdata_type): Constify fields.
13151         * nto-tdep.c (nto_parse_redirection): Constify.
13152         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13153         (lookup_child_selector): Constify.
13154         (objc_methcall::name): Constify.
13155         * objc-lang.h (lookup_objc_class, lookup_child_selector)
13156         (lookup_struct_typedef): Constify.
13157         * objfiles.c (pc_in_section): Constify.
13158         * objfiles.h (pc_in_section): Constify.
13159         * p-exp.y (struct token::oper): Constify.
13160         (yyerror): Constify.
13161         * p-lang.h (pascal_yyerror): Constify.
13162         * parser-defs.h (op_name_standard): Constify.
13163         (op_print::string): Constify.
13164         (exp_descriptor::op_name): Constify.
13165         * printcmd.c (print_address_symbolic): Constify.
13166         * psymtab.c (print_partial_symbols): Constify.
13167         * python/py-breakpoint.c (stop_func): Constify.
13168         (bppy_get_expression): Constify.
13169         * python/py-cmd.c (cmdpy_completer::name): Constify.
13170         (cmdpy_function): Constify.
13171         * python/py-event.c (evpy_add_attribute)
13172         (gdbpy_initialize_event_generic): Constify.
13173         * python/py-event.h (evpy_add_attribute)
13174         (gdbpy_initialize_event_generic): Constify.
13175         * python/py-evts.c (add_new_registry): Constify.
13176         * python/py-finishbreakpoint.c (outofscope_func): Constify.
13177         * python/py-framefilter.c (get_py_iter_from_func): Constify.
13178         * python/py-inferior.c (get_buffer): Add cast.
13179         * python/py-param.c (parm_constant::name): Constify.
13180         * python/py-unwind.c (fprint_frame_id): Constify.
13181         * python/python.c (gdbpy_parameter_value): Constify.
13182         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13183         * remote.c (memory_packet_config::name): Constify.
13184         (show_packet_config_cmd, remote_write_bytes)
13185         (remote_buffer_add_string):
13186         * reverse.c (exec_reverse_once): Constify.
13187         * rs6000-tdep.c (variant::name, variant::description): Constify.
13188         * rust-exp.y (rustyyerror): Constify.
13189         * rust-lang.c (rust_op_name): Constify.
13190         * rust-lang.h (rustyyerror): Constify.
13191         * serial.h (serial_ops::name): Constify.
13192         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13193         (sh_sh3e_register_name, sh_sh2e_register_name)
13194         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13195         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13196         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13197         (sh_sh4al_dsp_register_name): Constify.
13198         * sh64-tdep.c (sh64_register_name): Constify.
13199         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13200         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13201         * stabsread.c (patch_block_stabs, read_type_number)
13202         (ref_map::stabs, ref_add, process_reference)
13203         (symbol_reference_defined, define_symbol, define_symbol)
13204         (error_type, read_type, read_member_functions, read_cpp_abbrev)
13205         (read_one_struct_field, read_struct_fields, read_baseclasses)
13206         (read_tilde_fields, read_struct_type, read_array_type)
13207         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13208         (read_huge_number, read_range_type, read_args, common_block_start)
13209         (find_name_end): Constify.
13210         * stabsread.h (common_block_start, define_symbol)
13211         (process_one_symbol, symbol_reference_defined, ref_add):
13212         * symfile.c (get_section_index, add_symbol_file_command):
13213         * symfile.h (get_section_index): Constify.
13214         * target-descriptions.c (tdesc_type::name): Constify.
13215         (tdesc_free_type): Add cast.
13216         * target.c (find_default_run_target):
13217         (add_deprecated_target_alias, find_default_run_target)
13218         (target_announce_detach): Constify.
13219         (do_option): Constify.
13220         * target.h (add_deprecated_target_alias): Constify.
13221         * thread.c (print_thread_info_1): Constify.
13222         * top.c (deprecated_readline_begin_hook, command_line_input):
13223         Constify.
13224         (init_main): Add casts.
13225         * top.h (handle_line_of_input): Constify.
13226         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13227         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13228         (tfind_command): Rename to ...
13229         (tfind_command_1): ... this and constify.
13230         (tfind_command): New function.
13231         (tfind_end_command, tfind_start_command): Adjust.
13232         (encode_source_string): Constify.
13233         * tracepoint.h (encode_source_string): Constify.
13234         * tui/tui-data.c (tui_partial_win_by_name): Constify.
13235         * tui/tui-data.h (tui_partial_win_by_name): Constify.
13236         * tui/tui-source.c (tui_set_source_content_nil): Constify.
13237         * tui/tui-source.h (tui_set_source_content_nil): Constify.
13238         * tui/tui-win.c (parse_scrolling_args): Constify.
13239         * tui/tui-windata.c (tui_erase_data_content): Constify.
13240         * tui/tui-windata.h (tui_erase_data_content): Constify.
13241         * tui/tui-winsource.c (tui_erase_source_content): Constify.
13242         * tui/tui.c (tui_enable): Add cast.
13243         * utils.c (defaulted_query): Constify.
13244         (init_page_info): Add cast.
13245         (puts_debug, subset_compare): Constify.
13246         * utils.h (subset_compare): Constify.
13247         * varobj.c (varobj_format_string): Constify.
13248         * varobj.h (varobj_format_string): Constify.
13249         * vax-tdep.c (vax_register_name): Constify.
13250         * windows-nat.c (windows_detach): Constify.
13251         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13252         * xml-support.c (gdb_xml_end_element): Constify.
13253         * xml-tdesc.c (tdesc_start_reg): Constify.
13254         * xstormy16-tdep.c (xstormy16_register_name): Constify.
13255         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13256         * xtensa-tdep.h (xtensa_register_t::name): Constify.
13257
13258 2017-04-05  Pedro Alves  <palves@redhat.com>
13259
13260         * proc-api.c (struct trans): Constify.
13261         (procfs_note): Constify.
13262         * proc-events.c (struct trans, syscall_table):
13263         * proc-flags.c (struct trans): Constify.
13264         * proc-utils.h (procfs_note): Constify.
13265         * proc-why.c (struct trans): Constify.
13266         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13267         (procfs_detach): Constify.
13268         * sol-thread.c (struct string_map): Constify.
13269         (td_err_string, td_state_string): Constify.
13270
13271 2017-04-05  Pedro Alves  <palves@redhat.com>
13272
13273         * proc-api.c (procfs_filename): Don't initialize
13274         procfs_filename.
13275         (prepare_to_trace): Assume procfs_filename is non-NULL.
13276         (_initialize_proc_api): Give procfs_filename a default value here.
13277
13278 2017-04-05  Pedro Alves  <palves@redhat.com>
13279
13280         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13281         'cond_string' parameter.
13282         (extract_exception_regexp): Constify 'string' parameter.
13283         (catch_exception_command_1): Constify.
13284         * breakpoint.c (init_catchpoint)
13285         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13286         parameter.
13287         (ep_parse_optional_if_clause, catch_fork_command_1)
13288         (catch_exec_command_1): Constify.
13289         * breakpoint.h (init_catchpoint): Constify 'cond_string'
13290         parameter.
13291         (ep_parse_optional_if_clause): Constify.
13292         * cli/cli-utils.c (remove_trailing_whitespace)
13293         (check_for_argument): Constify.
13294         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13295         non-const overload.
13296         (check_for_argument): Likewise.
13297
13298 2017-04-05  Pedro Alves  <palves@redhat.com>
13299
13300         * event-top.c (command_line_handler): Add cast to execute_command
13301         call.
13302         * record-btrace.c (cmd_record_btrace_bts_start)
13303         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13304         (cmd_record_btrace_start): Add cast to execute_command call.
13305         * record-full.c (record_full_goto_insn):
13306         * record.c (record_start, record_stop): Add cast to
13307         execute_command_to_string calls.
13308         (cmd_record_start): Add cast to execute_command calls.
13309
13310 2017-04-05  Pedro Alves  <palves@redhat.com>
13311
13312         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13313         static inline function.
13314         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13315         array and use gdb_PyArg_ParseTupleAndKeywords.
13316         * python/py-cmd.c (cmdpy_init): Likewise.
13317         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13318         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13319         (infpy_search_memory): Likewise.
13320         * python/py-objfile.c (objfpy_add_separate_debug_file)
13321         (gdbpy_lookup_objfile): Likewise.
13322         * python/py-symbol.c (gdbpy_lookup_symbol)
13323         (gdbpy_lookup_global_symbol): Likewise.
13324         * python/py-type.c (gdbpy_lookup_type): Likewise.
13325         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13326         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13327         Likewise.
13328
13329 2017-04-05  Pedro Alves  <palves@redhat.com>
13330
13331         * python/python-internal.h (gdb_PyGetSetDef): New type.
13332         * python/py-block.c (block_object_getset)
13333         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13334         * python/py-event.c (event_object_getset)
13335         (finish_breakpoint_object_getset): Likewise.
13336         * python/py-inferior.c (inferior_object_getset): Likewise.
13337         * python/py-infthread.c (thread_object_getset): Likewise.
13338         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13339         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13340         * python/py-objfile.c (objfile_getset): Likewise.
13341         * python/py-progspace.c (pspace_getset): Likewise.
13342         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13343         Likewise.
13344         * python/py-record.c (recpy_record_getset): Likewise.
13345         * python/py-symbol.c (symbol_object_getset): Likewise.
13346         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13347         Likewise.
13348         * python/py-type.c (type_object_getset, field_object_getset):
13349         Likewise.
13350         * python/py-value.c (value_object_getset): Likewise.
13351
13352 2017-04-05  Pedro Alves  <palves@redhat.com>
13353
13354         * python/python-internal.h (gdb_PyObject_CallMethod)
13355         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13356         New functions.
13357         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13358         (PySys_GetObject, PySys_SetPath): New macros.
13359
13360 2017-04-05  Pedro Alves  <palves@redhat.com>
13361
13362         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13363         info_osdata_command.
13364         * osdata.c (info_osdata_command): Rename to ...
13365         (info_osdata): ... this.  Constify 'type' parameter, and remove
13366         the 'from_tty' parameter.  Accept NULL TYPE.
13367         (info_osdata_command): New function.
13368         * osdata.h (info_osdata_command): Remove declaration.
13369         (info_osdata): New declaration.
13370
13371 2017-04-05  Pedro Alves  <palves@redhat.com>
13372
13373         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13374         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13375         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13376         parameter.
13377         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13378         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13379         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13380         parameter.
13381         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13382         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13383         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13384         (mi_cmd_file_list_exec_source_files)
13385         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13386         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13387         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13388         parameter.
13389         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13390         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13391         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13392         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13393         (mi_cmd_stack_info_frame): Constify 'command' parameter.
13394         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13395         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13396         'command' parameter.
13397         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13398         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13399         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13400         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13401         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13402         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13403         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13404         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13405         (mi_cmd_var_set_update_range): Constify 'command' parameter.
13406         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13407         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13408         parameter.
13409         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13410         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13411         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13412         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13413         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13414         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13415         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13416         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13417         (mi_cmd_data_list_changed_registers)
13418         (mi_cmd_data_write_register_values)
13419         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13420         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13421         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13422         (mi_cmd_list_features, mi_cmd_list_target_features)
13423         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13424         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13425         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13426         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13427         (mi_cmd_trace_frame_collected): Constify 'command'
13428         parameter.
13429         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13430         'command' parameter.
13431
13432 2017-04-05  Pedro Alves  <palves@redhat.com>
13433
13434         * ada-lang.c (ada_completer_word_break_characters): Now a const
13435         array.
13436         (ada_get_gdb_completer_word_break_characters): Constify.
13437         * completer.c (gdb_completer_command_word_break_characters)
13438         (gdb_completer_file_name_break_characters)
13439         (gdb_completer_quote_characters): Now const arrays.
13440         (get_gdb_completer_quote_characters): Constify.
13441         (set_rl_completer_word_break_characters): New function.
13442         (set_gdb_completion_word_break_characters)
13443         (complete_line_internal): Use it.
13444         * completer.h (get_gdb_completer_quote_characters): Constify.
13445         (set_rl_completer_word_break_characters): Declare.
13446         * f-lang.c (f_word_break_characters): Constify.
13447         * language.c (default_word_break_characters): Constify.
13448         * language.h (language_defn::la_word_break_characters): Constify.
13449         (default_word_break_characters): Constify.
13450         * top.c (init_main): Use set_rl_completer_word_break_characters.
13451
13452 2017-04-05  Pedro Alves  <palves@redhat.com>
13453
13454         * aix-thread.c (aix_thread_pid_to_str)
13455         (aix_thread_extra_thread_info): Constify.
13456         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13457         * bsd-uthread.c (bsd_uthread_extra_thread_info)
13458         (bsd_uthread_pid_to_str): Constify.
13459         * corelow.c (core_pid_to_str): Constify.
13460         * darwin-nat.c (darwin_pid_to_str): Constify.
13461         * fbsd-nat.c (fbsd_pid_to_str): Constify.
13462         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13463         Constify.
13464         * gnu-nat.c (gnu_pid_to_str): Constify.
13465         * go32-nat.c (go32_pid_to_str): Constify.
13466         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13467         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13468         * inferior.c (inferior_pid_to_str): Constify.
13469         * linux-nat.c (linux_nat_pid_to_str): Constify.
13470         * linux-tdep.c (linux_core_pid_to_str): Constify.
13471         * linux-thread-db.c (thread_db_pid_to_str)
13472         (thread_db_extra_thread_info): Constify.
13473         * nto-tdep.c (nto_extra_thread_info): Constify.
13474         * nto-tdep.h (nto_extra_thread_info): Constify.
13475         * obsd-nat.c (obsd_pid_to_str): Constify.
13476         * procfs.c (procfs_pid_to_str): Constify.
13477         * ravenscar-thread.c (ravenscar_extra_thread_info)
13478         (ravenscar_pid_to_str): Constify.
13479         * remote-sim.c (gdbsim_pid_to_str): Constify.
13480         * remote.c (remote_threads_extra_info, remote_pid_to_str):
13481         Constify.
13482         * sol-thread.c (solaris_pid_to_str): Constify.
13483         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13484         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13485         * target.c (default_pid_to_str, target_pid_to_str)
13486         (normal_pid_to_str, default_pid_to_str): Constify.
13487         * target.h (target_ops::to_pid_to_str)
13488         (target_ops::to_extra_thread_info): Constify.
13489         (target_pid_to_str, normal_pid_to_str): Constify.
13490         * windows-nat.c (windows_pid_to_str): Constify.
13491         * gdbarch.sh (core_pid_to_str): Constify.
13492         * target-delegates.c: Regenerate.
13493         * gdbarch.h, gdbarch.c: Regenerate.
13494
13495 2017-04-05  Pedro Alves  <palves@redhat.com>
13496
13497         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13498         the memory of the temporary warning_pre_print override.
13499         * utils.c (warning_pre_print): Constify.
13500         * utils.h (warning_pre_print): Constify.
13501
13502 2017-04-05  Pedro Alves  <palves@redhat.com>
13503
13504         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13505         (shell_command): New function.
13506         (make_command): Use std::string.
13507         (init_cli_cmds): Register shell_command instead of shell_escape.
13508
13509 2017-04-05  Pedro Alves  <palves@redhat.com>
13510
13511         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13512         * tracepoint.c (default_collect): Don't initialize.
13513
13514 2017-04-05  Pedro Alves  <palves@redhat.com>
13515
13516         * macroexp.c (macro_buffer::shared): Now a bool.
13517         (init_buffer): Update.
13518         (init_shared_buffer): Constify 'addr' parameter.
13519         (substitute_args, expand, macro_expand, macro_expand_next): Remove
13520         casts.
13521
13522 2017-04-05  Pedro Alves  <palves@redhat.com>
13523
13524         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13525         * disasm.c (set_disassembler_options): Constify local.
13526         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13527
13528 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
13529
13530         PR gdb/21352
13531         * tracefile.c (tsave_command): Fix argument parsing for '-r'
13532         option.
13533
13534 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13535
13536         * frame.c (frame_unwind_register_unsigned): Call
13537         frame_unwind_register_value.
13538
13539 2017-04-05  Yao Qi  <yao.qi@linaro.org>
13540
13541         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13542         Use gdb_test_multiple, and don't match anchor.
13543
13544 2017-04-05  Pedro Alves  <palves@redhat.com>
13545
13546         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13547         (Write After Approval): Remove Simon Marchi.
13548
13549 2017-04-05  Pedro Alves  <palves@redhat.com>
13550
13551         * common/gdb_optional.h (optional::optional): Make constexpr and
13552         initialize m_dummy.
13553
13554 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13555
13556         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13557         (amd64fbsd_jmp_buf_reg_offset): Remove.
13558         (amd64fbsd_supply_uthread): Remove function.
13559         (amd64fbsd_collect_uthread): Remove function.
13560         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13561         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13562         (x86_64-*-freebsd*): Remove bsd-uthread.o.
13563         (fbsd-nat.c): Update comment.
13564         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13565         (i386fbsd_jmp_buf_reg_offset): Remove.
13566         (i386fbsd_supply_uthread): Remove function.
13567         (i386fbsd_collect_uthread): Remove function.
13568         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13569
13570 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13571
13572         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13573         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13574         * NEWS: Mention that support for FreeBSD/alpha was removed.
13575         * alpha-fbsd-tdep.c: Delete file.
13576         * config/alpha/fbsd.mh: Delete file.
13577         * configure.host: Delete alpha*-*-freebsd* and
13578         alpha*-*-kfreebsd*-gnu.
13579         * configure.tgt: Delete alpha*-*-freebsd* and
13580         alpha*-*-kfreebsd*-gnu.
13581
13582 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
13583
13584         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13585         amd64bsd_store_inferior_registers): Use ptid from regcache.
13586
13587 2017-04-04  Pedro Alves  <palves@redhat.com>
13588
13589         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
13590         data fields, make them private and add "m_" prefixes.
13591         (lnp_state_machine::lnp_state_machine): New ctor.
13592         (record_line, check_line_address, handle_set_discriminator)
13593         (handle_set_address, handle_advance_pc, handle_special_opcode)
13594         (handle_advance_line, handle_set_file, handle_negate_stmt)
13595         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13596         (end_sequence, advance_line): New methods.
13597         (m_gdbarch, m_record_lines_p): New fields.
13598         (lnp_reader_state): Delete.
13599         (dwarf_record_line): Rename to ...
13600         (lnp_state_machine::record_line): ... adjust.
13601         (init_lnp_state_machine): Delete.
13602         (lnp_state_machine::lnp_state_machine): New.
13603         (check_line_address): Rename to ...
13604         (lnp_state_machine::check_line_address): This.
13605         (dwarf_decode_lines_1): Remove reference to "reader_state".
13606         Adjust lnp_state_machine having a non-default ctor.  Use bool.
13607         State machine internal state manipulation moved to
13608         lnp_state_machine methods.
13609
13610 2017-04-04  Pedro Alves  <palves@redhat.com>
13611
13612         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13613         unittests/offset-type-selftests.c.
13614         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13615         * common/offset-type.h: New file.
13616         * common/preprocessor.h: New file.
13617         * common/traits.h: New file.
13618         * common/valid-expr.h: New file.
13619         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
13620         sect_offset and cu_offset strong typedefs throughout.
13621         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13622         typedefs throughout.
13623         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
13624         sect_offset and cu_offset strong typedefs throughout.
13625         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13626         typedefs throughout.
13627         * gdbtypes.h: Include "common/offset-type.h".
13628         (cu_offset): Now an offset type (strong typedef) instead of a
13629         struct.
13630         (sect_offset): Likewise.
13631         (union call_site_parameter_u): Rename "param_offset" field to
13632         "param_cu_off".
13633         * unittests/offset-type-selftests.c: New file.
13634
13635 2017-04-04  Pedro Alves  <palves@redhat.com>
13636
13637         * common/underlying.h: New file.
13638         * dwarf2read.c: Include "common/gdb_optional.h" and
13639         "common/underlying.h".
13640         (dir_index, file_name_index): New types.
13641         (file_entry): Use them.
13642         (file_entry::include): Use to_underlying.
13643         (line_header::add_file_name): Use dir_index.
13644         (read_formatted_entries): Use gdb::optional.  Read form before
13645         writting to file_entry.
13646         (dwarf_decode_line_header): Use dir_index.
13647         (lnp_state_machine::current_file): Use to_underlying.
13648         (lnp_state_machine::file): Change type to file_name_index.
13649         (dwarf_record_line): Use to_underlying.
13650         (init_lnp_state_machine): Use file_name_index.
13651         (dwarf_decode_lines_1): Use dir_index and file_name_index.
13652
13653 2017-04-04  Pedro Alves  <palves@redhat.com>
13654
13655         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13656         operator bool, has_value and get methods.
13657
13658 2017-04-04  Pedro Alves  <palves@redhat.com>
13659
13660         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13661         fields.
13662         (line_header): Initialize all data fields.  Change type of
13663         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13664         Change type of include_dirs to std::vector<const char *>.  Remove
13665         num_include_dirs, include_dirs_size.  Change type of file_names to
13666         std::vector<file_entry>.  Remove num_file_names, file_names_size.
13667         (line_header::line_header): New.
13668         (line_header::add_include_dir, line_header::add_file_name): New
13669         methods.
13670         (line_header::include_dir_at): Remove NULL check.
13671         (line_header::file_name_at): Add const overload.
13672         (line_header_up): New unique_ptr typedef.
13673         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
13674         std::vector.  Remove free_line_header call.
13675         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
13676         free_line_header call.
13677         (free_cu_line_header): Delete.
13678         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13679         (setup_type_unit_groups): Use line_header_up instead of cleanups.
13680         Adjust to use std::vector.
13681         (free_line_header): Delete.
13682         (free_line_header_voidp): Use delete.
13683         (add_include_dir): Replace with ...
13684         (line_header::add_include_dir): ... this method.  Use std::vector.
13685         (add_file_name): Replace with ...
13686         (line_header::add_file_name): ... this method.  Use std::vector.
13687         (add_include_dir_stub): Delete.
13688         (read_formatted_entries): Remove memset.
13689         (dwarf_decode_line_header): Return a line_header_up instead of a
13690         raw pointer.  Remove cleanup handling.  Pass lambdas to
13691         read_formatted_entries.  Adjust to use line_header methods.
13692         (dwarf_decode_lines_1): Adjust to use line_header methods.
13693         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13694         use std::vector.
13695
13696 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
13697
13698         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13699         instead of struct ptid.
13700
13701 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
13702
13703         * frame.c (get_frame_register_bytes): Unwind using value.
13704         (put_frame_register_bytes): Likewise.
13705
13706 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
13707
13708         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13709         aggregate-like.
13710
13711 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
13712
13713         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13714
13715 2017-03-29  Yao Qi  <yao.qi@linaro.org>
13716
13717         * gdbthread.h (struct thread_info): Declare constructor and
13718         destructor.  Add some in-class member initializers.
13719         * thread.c (free_thread): Remove.
13720         (init_thread_list): Call delete instead of free_thread.
13721         (new_thread): Call thread_info constructor.
13722         (thread_info::thread_info): New function.
13723         (thread_info::~thread_info): New function.
13724         (delete_thread_1): Call delete instead of free_thread.
13725         (make_cleanup_restore_current_thread): Move tp and frame to
13726         inner block.
13727
13728 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13729
13730         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13731         (arc_skip_prologue): Likewise.
13732         (arc_make_frame_cache): Likewise.
13733         (arc_pv_get_operand): New function.
13734         (arc_is_in_prologue): Likewise.
13735         (arc_analyze_prologue): Likewise.
13736         (arc_print_frame_cache): Likewise.
13737         (MAX_PROLOGUE_LENGTH): New constant.
13738
13739 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13740
13741         * configure.tgt: Add arc-insn.o.
13742         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13743         (dump_arc_instruction_command): New function.
13744         (arc_fprintf_disasm): Likewise.
13745         (arc_disassemble_info): Likewise.
13746         (arc_insn_get_operand_value): Likewise.
13747         (arc_insn_get_operand_value_signed): Likewise.
13748         (arc_insn_get_memory_base_reg): Likewise.
13749         (arc_insn_get_memory_offset): Likewise.
13750         (arc_insn_get_branch_target): Likewise.
13751         (arc_insn_dump): Likewise.
13752         (arc_insn_get_linear_next_pc): Likewise.
13753         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13754         (arc_disassemble_info): Likewise.
13755         (arc_insn_get_branch_target): Likewise.
13756         (arc_insn_get_linear_next_pc): Likewise.
13757         * NEWS: Mention new "maint print arc arc-instruction".
13758
13759 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13760
13761         * arc-tdep (maintenance_print_arc_list): New variable.
13762         (maintenance_print_arc_command): New function.
13763
13764 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13765
13766         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13767         Add "limm" and "reserved".
13768         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13769         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13770         * arc-tdep.h (arc_regnum): Likewise.
13771
13772 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13773
13774         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13775         for THREADPTR register.
13776         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13777         register.
13778         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13779         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13780         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13781
13782 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13783
13784         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13785         registers above gdbarch_num_regs (gdbarch) as privileged in
13786         call0 ABI.
13787
13788 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13789
13790         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13791         for a single specified register or for all registers in
13792         a0_base..a0_base + C0_NREGS range.
13793         (supply_gregset_reg): Call regcache_raw_supply for a single
13794         specified register or for all registers in a0_base..a0_base +
13795         C0_NREGS range.
13796
13797 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13798
13799         * arch/xtensa.h (C0_NREGS): Add definition.
13800         * xtensa-tdep.c (C0_NREGS): Remove definition.
13801
13802 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13803
13804         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13805         Drop xtensa_default_isa initialization.
13806         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13807
13808 2017-03-27  Pedro Alves  <palves@redhat.com>
13809
13810         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13811         (file_entry::include_dir): New method.
13812         (line_header::include_dir_at, line_header::file_name_at): New
13813         methods.
13814         (setup_type_unit_groups, setup_type_unit_groups)
13815         (psymtab_include_file_name): Simplify using the new methods.
13816         (lnp_state_machine) <the_line_header>: New field.
13817         <file>: Add comment.
13818         (lnp_state_machine::current_file): New method.
13819         (dwarf_record_line): Simplify using the new methods.
13820         (init_lnp_state_machine): Initialize the "the_line_header" field.
13821         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13822         Simplify using the new methods.
13823
13824 2017-03-27  Pedro Alves  <palves@redhat.com>
13825
13826         * cp-name-parser.y (make_empty): Delete.
13827         (demangler_special, nested_name, ptr_operator, array_indicator)
13828         (direct_declarator, declarator_1): Use fill_comp instead of
13829         make_empty.
13830
13831 2017-03-27  Pedro Alves  <palves@redhat.com>
13832
13833         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13834         to ATTRIBUTE_PRINTF.
13835         * solib-target.c (library_list_start_list): Print "string" not
13836         "version".
13837         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13838         gdb_xml_error call.
13839
13840 2017-03-27  Pedro Alves  <palves@redhat.com>
13841
13842         * dwarf2read.c (struct file_and_directory): New.
13843         (dwarf2_get_dwz_file): Adjust to use std::string.
13844         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13845         (find_file_and_directory): Adjust to return a file_and_directory
13846         object.
13847         (read_file_scope): Adjust to use file_and_directory.  Remove
13848         make_cleanup/do_cleanups calls.
13849         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13850         make_cleanup/do_cleanups calls.
13851         * python/python.c (do_start_initialization): Adjust to ldirname
13852         returning a std::string.
13853         * utils.c (ldirname): Now returns a std::string.
13854         * utils.h (ldirname): Change return type to std::string.
13855         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13856         returning a std::string.
13857         * xml-tdesc.c (file_read_description_xml): Likewise.
13858
13859 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13860
13861         * regcache.c (regcache_debug_print_register): New function.
13862         * regcache.h (regcache_debug_print_register): New declaration.
13863         * target.c (debug_print_register): Remove.
13864         (target_fetch_registers): Call regcache_debug_print_register.
13865         (target_store_registers): Likewise.
13866
13867 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13868
13869         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13870         reference beyond the 'lh->include_dirs' array before accessing to
13871         it.
13872         (psymtab_include_file_name): Likewise.
13873         (dwarf_decode_lines_1): Likewise.
13874         (dwarf_decode_lines): Likewise.
13875         (file_file_name): Likewise.
13876
13877 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13878
13879         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13880         inferior_ptid.
13881         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13882         ps_lsetfpregs): Likewise.
13883         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13884         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13885         ps_lsetfpregs): Likewise.
13886         * target.c (target_fetch_registers, target_store_registers):
13887         Remove asserts.
13888
13889 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13890
13891         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13892
13893 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13894
13895         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13896         (_initialize_aarch64_tdep): Register it.
13897         (aarch64_record_load_store): Handle PRFM instruction.
13898         (aarch64_process_record_test): New function.
13899
13900 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13901
13902         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13903         indentation.
13904
13905 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13906
13907         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13908
13909 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13910
13911         python/python.c (do_start_initialization): Fix memory leak.
13912
13913 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13914
13915         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13916         using get_ptrace_pid.
13917         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13918         inferior_ptid.
13919         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13920         inferior_ptid instead of pid.
13921
13922 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13923
13924         * aarch64-tdep.c: Wrap locally used classes in anonymous
13925         namespace.
13926         * arm-tdep.c: Likewise.
13927         * linespec.c: Likewise.
13928         * ui-out.c: Likewise.
13929
13930 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13931
13932         PR gdb/19637
13933         * python/lib/gdb/printer/bound_registers.py: Import sys.
13934
13935 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13936
13937         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13938         windows_thread_info parameter and use it instead of
13939         current_thread.
13940         (windows_fetch_inferior_registers): Don't set current_thread,
13941         pass the thread to do_windows_fetch_inferior_registers.  Use
13942         ptid from regcache instead of inferior_ptid.
13943         (do_windows_store_inferior_registers): Add windows_thread_info
13944         parameter and use it instead of current_thread.
13945         (windows_store_inferior_registers): Don't set current_thread,
13946         pass the thread to do_windows_store_inferior_registers.  Use
13947         ptid from regcache instead of inferior_ptid.
13948
13949 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13950
13951         * ser-mingw.c (ser_windows_raw): Remove reference to
13952         struct serial::current_timeout.
13953
13954 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13955
13956         PR tdep/20928
13957         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13958         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13959         (sparc64_fsr_type): Fix %fsr decoding.
13960
13961 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13962
13963         * python/py-record-btrace.c (btpy_insn_data): Change return type
13964         for Python 2.
13965
13966 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13967
13968         * spu-linux-nat.c (spu_fetch_inferior_registers,
13969         spu_store_inferior_registers): Use ptid from regcache, set and
13970         restore inferior_ptid.
13971         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13972         Likewise.
13973
13974 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13975
13976         * i386-linux-nat.c (fetch_register, store_register,
13977         i386_linux_fetch_inferior_registers,
13978         i386_linux_store_inferior_registers): Use ptid from regcache.
13979         * ia64-linux-nat.c (ia64_linux_fetch_register,
13980         ia64_linux_store_register): Likewise.
13981         * inf-ptrace.c (inf_ptrace_fetch_register,
13982         inf_ptrace_store_register): Likewise.
13983         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13984         m32r_linux_store_inferior_registers): Likewise.
13985         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13986         m68kbsd_store_inferior_registers): Likewise.
13987         * m68k-linux-nat.c (fetch_register, store_register,
13988         m68k_linux_fetch_inferior_registers,
13989         m68k_linux_store_inferior_registers): Likewise.
13990         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13991         m88kbsd_store_inferior_registers): Likewise.
13992         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13993         mips_fbsd_store_inferior_registers): Likewise.
13994         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13995         mips64_linux_regsets_store_registers): Likewise.
13996         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13997         mipsnbsd_store_inferior_registers): Likewise.
13998         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13999         mips64obsd_store_inferior_registers): Likewise.
14000         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14001         Likewise.
14002         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14003         ppcfbsd_store_inferior_registers): Likewise.
14004         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14005         ppc_linux_store_inferior_registers): Likewise.
14006         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14007         ppcnbsd_store_inferior_registers): Likewise.
14008         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14009         ppcobsd_store_registers): Likewise.
14010         * procfs.c (procfs_fetch_registers, procfs_store_registers):
14011         Likewise.
14012         * ravenscar-thread.c (ravenscar_fetch_registers,
14013         ravenscar_store_registers, ravenscar_prepare_to_store):
14014         Likewise.
14015         * record-btrace.c (record_btrace_fetch_registers,
14016         record_btrace_store_registers, record_btrace_prepare_to_store):
14017         Likewise.
14018         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14019         Lookup inferior using ptid from regcache, instead of
14020         current_inferior.
14021         * remote.c (remote_fetch_registers, remote_store_registers): Use
14022         ptid from regcache.
14023         * rs6000-nat.c (fetch_register, store_register): Likewise.
14024         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14025         s390_linux_store_inferior_registers): Likewise.
14026         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14027         shnbsd_store_inferior_registers): Likewise.
14028         * sol-thread.c (sol_thread_fetch_registers,
14029         sol_thread_store_registers): Likewise.
14030         * sparc-nat.c (sparc_fetch_inferior_registers,
14031         sparc_store_inferior_registers): Likewise.
14032         * tilegx-linux-nat.c (fetch_inferior_registers,
14033         store_inferior_registers): Likewise.
14034         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14035         vaxbsd_store_inferior_registers): Likewise.
14036         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14037         store_xtregs): Likewise.
14038
14039 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14040
14041         PR gdb/14441
14042         * NEWS: Mention support for rvalue references in GDB and python.
14043         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14044         supports both lvalue and rvalue references.
14045
14046 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14047
14048         PR gdb/14441
14049         * gdbtypes.c (rank_one_type): Implement overloading
14050         resolution rules regarding rvalue references.
14051
14052 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14053
14054         PR gdb/14441
14055         * aarch64-tdep.c (aarch64_type_align)
14056         (aarch64_extract_return_value, aarch64_store_return_value): Change
14057         lvalue reference type checks to general reference type checks.
14058         * amd64-tdep.c (amd64_classify): Likewise.
14059         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14060         Likewise.
14061         * arm-tdep.c (arm_type_align, arm_extract_return_value)
14062         (arm_store_return_value): Likewise.
14063         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14064         * c-typeprint.c (c_print_type): Likewise.
14065         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14066         (cplus_number_of_children, cplus_describe_child): Likewise.
14067         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14068         * completer.c (expression_completer): Likewise.
14069         * cp-support.c (make_symbol_overload_list_adl_namespace):
14070         Likewise.
14071         * darwin-nat-info.c (info_mach_region_command): Likewise.
14072         * dwarf2loc.c (entry_data_value_coerce_ref)
14073         (value_of_dwarf_reg_entry): Likewise.
14074         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14075         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14076         Likewise.
14077         * findvar.c (extract_typed_address, store_typed_address):
14078         Likewise.
14079         * gdbtypes.c (rank_one_type): Likewise.
14080         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14081         * infcall.c (value_arg_coerce): Likewise.
14082         * language.c (pointer_type): Likewise.
14083         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14084         Likewise.
14085         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14086         * mn10300-tdep.c (mn10300_type_align): Likewise.
14087         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14088         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14089         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14090         Likewise.
14091         * printcmd.c (print_formatted, x_command): Likewise.
14092         * python/py-type.c (typy_get_composite, typy_template_argument):
14093         Likewise.
14094         * python/py-value.c (valpy_referenced_value)
14095         (valpy_get_dynamic_type, value_has_field): Likewise.
14096         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14097         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14098         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14099         * spu-tdep.c (spu_scalar_value_p): Likewise.
14100         * symtab.c (lookup_symbol_aux): Likewise.
14101         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14102         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14103         Likewise.
14104         * valops.c (value_cast_pointers, value_cast)
14105         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14106         (value_struct_elt, value_struct_elt_bitpos)
14107         (value_find_oload_method_list, find_overload_match)
14108         (value_rtti_indirect_type): Likewise.
14109         * valprint.c (val_print_scalar_type_p, generic_val_print):
14110         Likewise.
14111         * value.c (value_actual_type, value_as_address, unpack_long)
14112         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14113         (coerce_ref): Likewise.
14114         * varobj.c (varobj_get_value_type): Likewise.
14115
14116 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14117
14118         PR gdb/14441
14119         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14120         table of constants.
14121         * python/lib/gdb/command/explore.py: Support exploring values
14122         of rvalue reference types.
14123         * python/lib/gdb/types.py: Implement get_basic_type() for
14124         rvalue reference types.
14125         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14126         constant.
14127         * python/py-value.c (valpy_getitem): Add an rvalue reference
14128         check.
14129         (valpy_reference_value): Add new parameter "refcode".
14130         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14131         New wrappers for valpy_reference_value().
14132         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14133         (gdbpy_invoke_xmethod): Likewise.
14134
14135 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14136
14137         PR gdb/14441
14138         * dwarf2read.c (process_die, read_type_die_1): Handle the
14139         DW_TAG_rvalue_reference_type DIE.
14140         (read_tag_reference_type): Add new parameter "refcode".
14141
14142 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14143
14144         PR gdb/14441
14145         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14146         (c_type_print_modifier, c_type_print_varspec_suffix)
14147         (c_type_print_base): Support printing rvalue reference types.
14148         * c-valprint.c (c_val_print, c_value_print): Support printing
14149         rvalue reference values.
14150
14151 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14152
14153         PR gdb/14441
14154         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14155         typename.
14156         * cp-support.c (replace_typedefs): Handle
14157         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14158         * python/py-type.c (typy_lookup_type): Likewise.
14159
14160 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14161
14162         PR gdb/14441
14163         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14164         * parse.c (insert_type): Change assert statement.
14165         (follow_types): Handle rvalue reference types.
14166         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14167         constant.
14168
14169 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14170
14171         PR gdb/14441
14172         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14173         value_ref() interface.
14174         * c-valprint.c (c_value_print): Likewise.
14175         * infcall.c (value_arg_coerce): Likewise.
14176         * python/py-value.c (valpy_reference_value): Likewise.
14177         * valops.c (value_cast, value_reinterpret_cast)
14178         (value_dynamic_cast, typecmp): Likewise.
14179         (value_ref): Parameterize by kind of return value reference type.
14180         * value.h (value_ref): Add new parameter "refcode".
14181
14182 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14183
14184         PR gdb/14441
14185         * dwarf2read.c (read_tag_reference_type): Use
14186         lookup_lvalue_reference_type() instead of lookup_reference_type().
14187         * eval.c (evaluate_subexp_standard): Likewise.
14188         * f-exp.y: Likewise.
14189         * gdbtypes.c (make_reference_type, lookup_reference_type):
14190         Generalize with rvalue reference types.
14191         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14192         convenience wrappers for lookup_reference_type().
14193         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14194         reference kind parameter.
14195         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14196         wrappers for lookup_reference_type().
14197         * guile/scm-type.c (gdbscm_type_reference): Use
14198         lookup_lvalue_reference_type() instead of lookup_reference_type().
14199         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14200         * parse.c (follow_types): Likewise.
14201         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14202         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14203         Likewise.
14204         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14205         (gdbpy_invoke_xmethod): Likewise.
14206         * stabsread.c: Provide extra argument to make_reference_type()
14207         call.
14208         * valops.c (value_ref, value_rtti_indirect_type): Use
14209         lookup_lvalue_reference_type() instead of lookup_reference_type().
14210
14211 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14212
14213         PR gdb/14441
14214         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14215         (TYPE_IS_REFERENCE): New macro.
14216         (struct type): Add rvalue_reference_type field.
14217         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14218
14219 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14220
14221         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14222         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14223         New function definition.
14224         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14225         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14226         New function declaration.
14227         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14228         * mi/mi-interp.h: New file.
14229         * solib.c (info_sharedlibrary_command): Replace for loop with
14230         ALL_SO_LIBS macro
14231         * solib.h (update_solib_list): New function declaration.
14232         (so_list_head): Move macro.
14233         * solist.h (ALL_SO_LIBS): New macro.
14234
14235 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14236
14237         * infcmd.c (post_create_inferior): Remove unused argument in
14238         call to solib_add.
14239         * remote.c (remote_start_remote): Likewise.
14240         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14241         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14242         (enable_break): Likewise.
14243         * solib.c (update_solib_list): Remove unused target argument
14244         and its documentation.
14245         (solib_add): Remove unused target argument.  Remove unused
14246         argument in call to update_solib_list.
14247         (info_sharedlibrary_command): Remove unused argument in call
14248         to update_solib_list.
14249         (sharedlibrary_command): Remove unused argument in call to
14250         solib_add.
14251         (handle_solib_event): Likewise.
14252         (reload_shared_libraries): Likewise.
14253         * solib.h (solib_add): Remove unused target argument.
14254
14255 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14256
14257         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14258         (s390_displaced_step_fixup): Cover relative branches with the
14259         default fixup handling.  This fixes lack of support for some
14260         relative branch instructions.
14261
14262 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14263
14264         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14265         ptid from regcache.
14266
14267 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14268
14269         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14270         i386_darwin_store_inferior_registers): Use ptid from regcache.
14271
14272 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14273
14274         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14275         i386bsd_store_inferior_registers): Use ptid from regcache.
14276
14277 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14278
14279         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14280         hppaobsd_store_registers): Use ptid from regcache.
14281
14282 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14283
14284         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14285         hppanbsd_store_registers): Use ptid from regcache.
14286
14287 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14288
14289         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14290         from regcache.  Use get_ptrace_pid.
14291
14292 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14293
14294         * corelow.c (get_core_register_section): Use ptid from regcache,
14295         update doc.
14296
14297 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14298
14299         * bsd-uthread.c (bsd_uthread_fetch_registers,
14300         bsd_uthread_store_registers): Use ptid from regcache, set and
14301         restore inferior_ptid.
14302
14303 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14304
14305         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14306         fetch_fp_regs, store_register, store_regs, store_fp_register,
14307         store_fp_regs): Use ptid from regcache.
14308
14309 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14310
14311         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14312         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14313         store_vfp_regs): Use ptid from regcache.
14314
14315 2017-03-17  Pedro Alves  <palves@redhat.com>
14316
14317         PR remote/21188
14318         * ser-base.c (ser_base_wait_for): Add comment.
14319         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14320         version.
14321         * ser-unix.c (hardwire_raw): Remove reference to
14322         scb->current_timeout.
14323         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14324         (hardwire_ops): Install ser_base_readchar instead of
14325         hardwire_readchar.
14326         * serial.h (struct serial) <current_timeout, timeout_remaining>:
14327         Remove fields.
14328
14329 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
14330
14331         PR gdb/19637
14332         * python/lib/gdb/printer/bound_registers.py: Add support for
14333         Python 3.
14334
14335 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14336
14337         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14338         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14339         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14340         byte_offset to subobj_byte_offset.  Fix the handling of
14341         DWARF_VALUE_STACK on big-endian targets when coming via an
14342         implicit pointer.
14343         (dwarf2_evaluate_loc_desc): Adjust call to
14344         dwarf2_evaluate_loc_desc_full.
14345         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14346         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14347
14348 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14349
14350         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14351         and REVSH instructions.
14352
14353 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14354
14355         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14356         (arm_record_test): Declare.
14357         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14358         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14359         align with the manual.
14360         (thumb_record_misc): Adjust the code order to align with the
14361         manual.
14362         (thumb2_record_decode_insn_handler): Fix instruction matching.
14363         (instruction_reader_thumb): New class.
14364         (arm_record_test): New function.
14365
14366 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14367
14368         * arm-tdep.c (abstract_memory_reader): New class.
14369         (instruction_reader): New class.
14370         (extract_arm_insn): Add argument 'reader'.  Callers updated.
14371         (decode_insn): Likewise.
14372
14373 2017-03-16  Doug Evans  <dje@google.com>
14374
14375         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14376         member.  Change type of TYPE member to SCM.  All uses updated.
14377         (lsscm_make_lazy_string_smob): Add assert.
14378         (lsscm_make_lazy_string): Flag bad length values.
14379         (lsscm_elt_type): New function.
14380         (gdbscm_lazy_string_to_value): Rewrite to use
14381         lsscm_safe_lazy_string_to_value.
14382         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14383         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14384         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
14385         in incoming type.
14386         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14387         * guile/scm-type.c (tyscm_scm_to_type): New function.
14388
14389 2017-03-15  Doug Evans  <dje@google.com>
14390
14391         PR python/17728, python/18439, python/18779
14392         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14393         member.  Change type of TYPE member to PyObject *.  All uses updated.
14394         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14395         (gdbpy_create_lazy_string_object): Flag bad length values.
14396         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14397         Handle typedefs in incoming type.
14398         (stpy_lazy_string_elt_type): New function.
14399         (gdbpy_extract_lazy_string): Call it.
14400         * python/py-value.c (valpy_lazy_string): Flag bad length values.
14401         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
14402         typedefs in incoming type.
14403
14404 2017-03-16  Doug Evans  <dje@google.com>
14405
14406         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14407         * guile/scm-type.c (tyscm_scm_to_type): New function.
14408
14409 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
14410
14411         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14412         "ULONGEST" for "skip".
14413
14414 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14415
14416         PR gdb/21220
14417         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14418         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14419         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
14420         over ptrace peek/poke until end of buffer or error.
14421
14422 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
14423
14424         * parse.c (length_of_subexp): Make static.
14425         * parser-defs.h (length_of_subexp): Remove.
14426
14427 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14428
14429         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14430         as well.
14431
14432 2017-03-14  Pedro Alves  <palves@redhat.com>
14433
14434         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14435         (main): Use std::unique_ptr.  Remove calls to
14436         cp_demangled_name_parse_free.
14437
14438 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14439
14440         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14441         alphabsd_store_inferior_registers): Use regcache->ptid instead
14442         of inferior_ptid.
14443
14444 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14445
14446         * aix-thread.c (aix_thread_fetch_registers,
14447         aix_thread_store_registers): Use regcache->ptid instead of
14448         inferior_ptid.
14449
14450 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14451
14452         * aarch64-linux-nat.c (fetch_gregs_from_thread,
14453         store_gregs_to_thread, fetch_fpregs_from_thread,
14454         store_fpregs_to_thread): Use regcache->ptid instead of
14455         inferior_ptid.
14456
14457 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14458
14459         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14460         amd64_linux_fetch_inferior_registers): Use regcache->ptid
14461         instead of inferior_ptid.
14462
14463 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14464
14465         * target.c (target_fetch_registers, target_store_registers): Add
14466         assert.
14467
14468 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
14469
14470         * regcache.h (regcache_get_ptid): New function.
14471         * regcache.c (regcache_get_ptid): New function.
14472
14473 2017-03-13  Mark Wielaard  <mark@klomp.org>
14474
14475         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14476
14477 2017-03-10  Keith Seitz  <keiths@redhat.com>
14478
14479         PR c++/8218
14480         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14481
14482 2017-03-08  Pedro Alves  <palves@redhat.com>
14483
14484         PR gdb/18360
14485         * infrun.c (start_step_over, do_target_resume, resume)
14486         (restart_threads): Assert we're not resuming a thread that is
14487         meant to be stopped.
14488         (infrun_thread_stop_requested_callback): Delete.
14489         (infrun_thread_stop_requested): If the thread is internally
14490         stopped, queue a pending stop event and clear the thread's
14491         inline-frame state.
14492         (handle_stop_requested): New function.
14493         (handle_syscall_event, handle_inferior_event_1): Use
14494         handle_stop_requested.
14495         (handle_stop_requested): New function.
14496         (handle_signal_stop): Set the thread's stop_signal here instead of
14497         at caller.
14498         (finish_step_over): Clear step over info unconditionally.
14499         (handle_signal_stop): If the user had interrupted the event
14500         thread, consider the stop a random signal.
14501         (handle_signal_stop) <signal arrived while stepping over
14502         breakpoint>: Don't restart threads here.
14503         (stop_waiting): Don't clear step-over info here.
14504
14505 2017-03-08  Pedro Alves  <palves@redhat.com>
14506
14507         PR 21206
14508         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14509         goes to argument 2, not 1.
14510
14511 2017-03-08  Pedro Alves  <palves@redhat.com>
14512
14513         PR cli/21218
14514         * top.c (gdb_readline_wrapper): Avoid passing NULL to
14515         display_gdb_prompt.
14516         (command_line_input): Add comment.
14517
14518 2017-03-08  Pedro Alves  <palves@redhat.com>
14519
14520         PR tui/21216
14521         * tui/tui-file.c (tui_file::write): New.
14522         * tui/tui-file.h (tui_file): Override "write".
14523         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14524         factored out from ...
14525         (tui_puts): ... here.
14526         (tui_putc): Use them.
14527         (tui_write): New function.
14528         * tui/tui-io.h (tui_write): Declare.
14529
14530 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
14531
14532         * Makefile.in (SFILES): Replace "environ.c" with
14533         "common/environ.c".
14534         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14535         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
14536         to...
14537         * common/environ.c: ... here.
14538         * environ.h: Moved to...
14539         * common/environ.h: ... here.
14540
14541 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14542
14543         * gdbarch.sh (pstring_ptr): New static function.
14544         (gdbarch_disassembler_options): Use it.
14545         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14546         not valid_disassembler_option->name.
14547         * gdbarch.c: Regenerate.
14548
14549 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
14550
14551         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14552
14553 2017-03-07  Pedro Alves  <palves@redhat.com>
14554
14555         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14556
14557 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14558
14559         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14560         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14561         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14562         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14563
14564 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
14565
14566         * xtensa-linux-nat.c (fetch_gregs): Remove const.
14567
14568 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
14569
14570         * remote.c (remote_add_target_side_commands): Use range-based
14571         for loop.
14572
14573 2017-03-03  Yao Qi  <yao.qi@linaro.org>
14574
14575         PR gdb/21165
14576         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14577         value is lazy.
14578         * valprint.c (common_val_print): Likewise.
14579
14580 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
14581
14582         * NEWS: Mention new set/show disassembler-options commands.
14583         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14584         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14585         (prospective_options): New static variable.
14586         (gdb_disassembler::gdb_disassembler): Initialize
14587         m_di.disassembler_options.
14588         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14589         (get_disassembler_options): New function.
14590         (set_disassembler_options): Likewise.
14591         (set_disassembler_options_sfunc): Likewise.
14592         (show_disassembler_options_sfunc): Likewise.
14593         (disassembler_options_completer): Likewise.
14594         (_initialize_disasm): Likewise.
14595         * disasm.h (get_disassembler_options): New prototype.
14596         (set_disassembler_options): Likewise.
14597         * gdbarch.sh (gdbarch_disassembler_options): New variable.
14598         (gdbarch_verify_disassembler_options): Likewise.
14599         * gdbarch.c: Regenerate.
14600         * gdbarch.h: Likewise.
14601         * arm-tdep.c (num_disassembly_options): Delete.
14602         (set_disassembly_style): Likewise.
14603         (arm_disassembler_options): New static variable.
14604         (set_disassembly_style_sfunc): Convert short style name into long
14605         option name.  Call set_disassembler_options.
14606         (show_disassembly_style_sfunc): New function.
14607         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14608         set_gdbarch_verify_disassembler_options.
14609         (_initialize_arm_tdep): Delete regnames variable and update callers.
14610         (arm_disassembler_options): Initialize.
14611         (disasm_options): New variable.
14612         (num_disassembly_options): Rename from this...
14613         (num_disassembly_styles): ...to this.  Compute by scanning through
14614         disasm_options.
14615         (valid_disassembly_styles): Initialize using disasm_options.
14616         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14617         set_arm_regname_option.
14618         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14619         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14620         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14621         set_gdbarch_verify_disassembler_options.
14622         * s390-tdep.c (s390_disassembler_options): New static variable.
14623         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14624         set_gdbarch_verify_disassembler_options.
14625
14626 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14627
14628         * remote.c (remote_add_target_side_condition): Remove "struct"
14629         keyword from range-based for loop.
14630
14631 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
14632
14633         * remote.c (remote_add_target_side_condition): Use range-based
14634         for loop.  Update comment.
14635
14636 2017-02-27  Yao Qi  <yao.qi@linaro.org>
14637
14638         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14639
14640 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
14641
14642         * regcache.c (regcache_raw_update): New function.
14643         (regcache_raw_read): Move code to regcache_raw_update.
14644         * regcache.h (regcache_raw_update): New declaration.
14645         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14646
14647 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
14648
14649         * dwarf2read.c (create_debug_type_hash_table): Initialize
14650         header.signature and header.type_offset_in_tu.
14651
14652 2017-02-24  Pedro Alves  <palves@redhat.com>
14653
14654         * symtab.c (make_file_symbol_completion_list_1): Use
14655         add_symtab_completions.
14656
14657 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14658
14659         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14660
14661 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
14662
14663         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14664         I386_MAX_REGISTER_SIZE.
14665         (i386_pseudo_register_write): Likewise.
14666         (i386_process_record): Likewise.
14667         * i387-tdep.c (i387_supply_xsave): Likewise.
14668         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14669         (store_register): Likewise.
14670
14671 2017-02-23  Pedro Alves  <palves@redhat.com>
14672
14673         * ada-lang.c: Include "common/function-view.h".
14674         (ada_iterate_over_symbols): Adjust to use function_view as
14675         callback type.
14676         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14677         (ada_make_symbol_completion_list): Use a lambda.
14678         (ada_exc_search_name_matches): Delete.
14679         (name_matches_regex): New.
14680         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14681         * compile/compile-c-support.c: Include "common/function-view.h".
14682         (print_one_macro): Change prototype to accept a ui_file pointer.
14683         (write_macro_definitions): Use a lambda.
14684         * dwarf2read.c: Include "common/function-view.h".
14685         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14686         (dw2_expand_symtabs_matching): Adjust to use function_view as
14687         callback type.
14688         * language.h: Include "common/function-view.h".
14689         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14690         function_view as callback type.
14691         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14692         * linespec.c: Include "common/function-view.h".
14693         (collect_info::add_symbol): New method.
14694         (struct symbol_and_data_callback, iterate_inline_only, struct
14695         symbol_matcher_data, iterate_name_matcher): Delete.
14696         (iterate_over_all_matching_symtabs): Adjust to use function_view
14697         as callback type and lambdas.
14698         (iterate_over_file_blocks): Adjust to use function_view as
14699         callback type.
14700         (decode_compound_collector): Now a class with private fields.
14701         (decode_compound_collector::release_symbols): New method.
14702         (collect_one_symbol): Rename to...
14703         (decode_compound_collector::operator()): ... this and adjust.
14704         (lookup_prefix_sym): decode_compound_collector construction bits
14705         move to decode_compound_collector ctor.  Pass the
14706         decode_compound_collector object directly as callback.  Remove
14707         cleanups and use decode_compound_collector::release_symbols
14708         instead.
14709         (symtab_collector): Now a class with private fields.
14710         (symtab_collector::release_symtabs): New method.
14711         (add_symtabs_to_list): Rename to...
14712         (symtab_collector::operator()): ... this and adjust.
14713         (collect_symtabs_from_filename): symtab_collector construction
14714         bits move to symtab_collector ctor.  Pass the symtab_collector
14715         object directly as callback.  Remove cleanups and use
14716         symtab_collector::release_symtabs instead.
14717         (collect_symbols): Delete.
14718         (add_matching_symbols_to_info): Use lambdas.
14719         * macrocmd.c (print_macro_callback): Delete.
14720         (info_macro_command): Use a lambda.
14721         (info_macros_command): Pass print_macro_definition as callable
14722         directly.
14723         (print_one_macro): Remove 'ignore' parameter.
14724         (macro_list_command): Adjust.
14725         * macrotab.c (macro_for_each_data::fn): Now a function_view.
14726         (macro_for_each_data::user_data): Delete field.
14727         (foreach_macro): Adjust to call the function_view.
14728         (macro_for_each): Adjust to use function_view as callback type.
14729         (foreach_macro_in_scope): Adjust to call the function_view.
14730         (macro_for_each_in_scope): Adjust to use function_view as callback
14731         type.
14732         * macrotab.h: Include "common/function-view.h".
14733         (macro_callback_fn): Declare a prototype instead of a pointer.
14734         Remove "user_data" parameter.
14735         (macro_for_each, macro_for_each_in_scope): Adjust to use
14736         function_view as callback type.
14737         * psymtab.c (partial_map_expand_apply)
14738         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14739         Adjust to use function_view as callback type and to return bool.
14740         (psym_expand_symtabs_matching): Adjust to use function_view as
14741         callback types.
14742         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14743         to use function_view as callback type and to return bool.
14744         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14745         callback types.
14746         * symfile.c (expand_symtabs_matching): Adjust to use function_view
14747         as callback types.
14748         * symfile.h: Include "common/function-view.h".
14749         (expand_symtabs_file_matcher_ftype)
14750         (expand_symtabs_symbol_matcher_ftype)
14751         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14752         return bool.
14753         (quick_symbol_functions::map_symtabs_matching_filename)
14754         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14755         function_view as callback type and return bool.
14756         (expand_symtabs_matching): Adjust to use function_view as callback
14757         type.
14758         (maintenance_expand_name_matcher)
14759         (maintenance_expand_file_matcher): Delete.
14760         (maintenance_expand_symtabs): Use lambdas.
14761         * symtab.c (iterate_over_some_symtabs): Adjust to use
14762         function_view as callback types and return bool.
14763         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14764         of a cleanup.
14765         (lookup_symtab_callback): Delete.
14766         (lookup_symtab): Use a lambda.
14767         (iterate_over_symbols): Adjust to use function_view as callback
14768         type.
14769         (struct search_symbols_data, search_symbols_file_matches)
14770         (search_symbols_name_matches): Delete.
14771         (search_symbols): Use a pair of lambdas.
14772         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14773         (symtab_expansion_callback): Delete.
14774         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14775         * symtab.h: Include "common/function-view.h".
14776         (iterate_over_some_symtabs): Adjust to use function_view as
14777         callback type and return bool.
14778         (iterate_over_symtabs): Adjust to use function_view as callback
14779         type.
14780         (symbol_found_callback_ftype): Remove 'data' parameter and return
14781         bool.
14782         (iterate_over_symbols): Adjust to use function_view as callback
14783         type.
14784
14785 2017-02-23  Pedro Alves  <palves@redhat.com>
14786
14787         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14788         (%.o) <unittests/%.c>: New pattern.
14789         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14790         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14791         * common/function-view.h: New file.
14792         * unittests/function-view-selftests.c: New file.
14793         * configure: Regenerate.
14794
14795 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14796
14797         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14798         inferior_ptid.
14799         * go32-nat.c (go32_thread_alive): Likewise.
14800
14801 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14802
14803         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14804         delete.
14805
14806 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14807
14808         * varobj.c (varobj_clear_saved_item): Use delete instead of
14809         xfree.
14810         (update_dynamic_varobj_children): Likewise.
14811
14812 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14813
14814         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14815
14816 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14817
14818         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14819         m_enum_value to 0 in default constructor.
14820
14821 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14822
14823         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14824         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14825         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14826         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14827         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14828         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14829         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14830         IS_STORE_CONDITIONAL_INSN.
14831
14832 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14833
14834         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14835
14836 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14837
14838         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14839
14840 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14841
14842         * dwarf2read.c (skip_one_die, read_attribute_value)
14843         (dwarf2_const_value_attr, dump_die_shallow)
14844         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14845         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14846
14847 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14848
14849         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14850         (dwarf_parse_macro_header): Accept DWARF version 5.
14851         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14852
14853 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14854
14855         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14856         DW_AT_GNU_*.
14857         * common/common-exceptions.h (enum errors): Likewise.
14858         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14859         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14860         (dwarf_expr_context::execute_stack_op): Likewise.
14861         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14862         Likewise.
14863         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14864         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14865         (show_entry_values_debug, call_site_to_target_addr)
14866         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14867         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14868         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14869         (value_of_dwarf_block_entry, indirect_pieced_value)
14870         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14871         (disassemble_dwarf_expression): Likewise.
14872         * dwarf2read.c (process_die, inherit_abstract_dies)
14873         (read_call_site_scope): Likewise.
14874         * gdbtypes.h (struct func_type, struct call_site_parameter)
14875         (struct call_site): Likewise.
14876         * stack.c (read_frame_arg): Likewise.
14877         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14878
14879 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14880
14881         * defs.h (read_unsigned_leb128): New declaration.
14882         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14883         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14884         (dwarf2_find_location_expression): Call also
14885         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14886         * dwarf2loc.h (dwarf2_version): New declaration.
14887         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14888         rnglists.
14889         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14890         .debug_rnglists.
14891         (struct dwop_section_names): Add loclists_dwo.
14892         (dwop_section_names): Add .debug_loclists.dwo.
14893         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14894         (struct dwarf2_per_cu_data): Add dwarf_version.
14895         (struct dwo_sections): Add loclists.
14896         (struct attr_abbrev): Add implicit_const.
14897         (read_indirect_line_string): New declaration.
14898         (read_unsigned_leb128): Delete declaration.
14899         (rcuh_kind): New definition.
14900         (read_and_check_comp_unit_head): Change parameter
14901         is_debug_types_section to section_kind.
14902         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14903         (read_comp_unit_head): Change parameter abfd to section, add parameter
14904         section_kind.  Handle DWARF-5.
14905         (error_check_comp_unit_head): Accept also DWARF version 5.
14906         (read_and_check_comp_unit_head): Change parameter
14907         is_debug_types_section to section_kind.
14908         (read_and_check_type_unit_head): Delete function.
14909         (read_abbrev_offset): Handle DWARF-5.
14910         (create_debug_type_hash_table): Add parameter section_kind.  Process
14911         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14912         comp_unit_head.
14913         (create_debug_types_hash_table): Update create_debug_type_hash_table
14914         caller.
14915         (create_all_type_units): Call create_debug_type_hash_table.
14916         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14917         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14918         caller.
14919         (skip_one_die): Handle DW_FORM_implicit_const.
14920         (dwarf2_rnglists_process): New function.
14921         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14922         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14923         (read_attribute_value): Handle DW_FORM_implicit_const,
14924         DW_FORM_line_strp.
14925         (read_attribute): Handle DW_FORM_implicit_const.
14926         (read_indirect_string_at_offset_from): New function from
14927         read_indirect_string_at_offset.
14928         (read_indirect_string_at_offset): Call
14929         read_indirect_string_at_offset_from.
14930         (read_indirect_line_string_at_offset): New function.
14931         (read_indirect_string): New function comment.
14932         (read_indirect_line_string): New function.
14933         (read_unsigned_leb128): Make it global.
14934         (dwarf2_string_attr): Handle DWARF-5.
14935         (add_include_dir_stub, read_formatted_entries): New functions.
14936         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14937         Handle DWARF-5.
14938         (per_cu_header_read_in): Update read_comp_unit_head caller.
14939         (dwarf2_version): New function.
14940         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14941         rnglists.
14942         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14943         fields.
14944
14945 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14946
14947         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14948
14949 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14950
14951         * dwarf2read.c (dwarf2_ranges_process): New function from
14952         dwarf2_ranges_read.
14953         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14954         dwarf2_ranges_process.
14955
14956 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14957
14958         * dwarf2read.c (create_debug_type_hash_table): New function from
14959         create_debug_types_hash_table.
14960         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14961         (create_all_type_units, open_and_init_dwo_file): Update
14962         create_debug_types_hash_table callers.
14963
14964 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14965
14966         PR gdb/16188
14967         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14968         refer to 'ap', not 'args'.
14969
14970 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14971             Pedro Alves  <palves@redhat.com>
14972
14973         PR gdb/16188
14974         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14975         calls succeeded.
14976         * fork-child.c (trace_start_error): New function.
14977         (trace_start_error_with_name): Likewise.
14978         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14979         * inf-ptrace.c (inf_ptrace_me): Likewise.
14980         * inferior.h (trace_start_error): New prototype.
14981         (trace_start_error_with_name): Likewise.
14982
14983 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14984
14985         PR gdb/21164
14986         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14987         NULL before using it.
14988         * symmisc.c (maintenance_print_symbols): Likewise.
14989         (maintenance_print_msymbols): Likewise.
14990
14991 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14992
14993         * NEWS: Add record Python bindings entry.
14994
14995 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14996
14997         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14998         py-record-full.o.
14999         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15000         * python/py-record-btrace.c, python/py-record-btrace.h,
15001         python/py-record-full.c, python/py-record-full.h: New file.
15002         * python/py-record.c: Add include for py-record-btrace.h and
15003         py-record-full.h.
15004         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15005         recpy_instruction_history, recpy_function_call_history, recpy_begin,
15006         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15007         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15008         New definition.
15009         (gdbpy_initialize_btrace): New export.
15010         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15011
15012 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15013
15014         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15015         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15016         * python/py-record.c: New file.
15017         * python/python-internal.h (gdbpy_start_recording,
15018         gdbpy_current_recording, gdpy_stop_recording,
15019         gdbpy_initialize_record): New export.
15020         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15021         (python_GdbMethods): Add gdbpy_start_recording,
15022         gdbpy_current_recording and gdbpy_stop_recording.
15023
15024 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15025
15026         * record-btrace.c (record_btrace_record_method): New function.
15027         (init_record_btrace_ops): Initialize to_record_method.
15028         * record-full.c (record_full_record_method): New function.
15029         (init_record_full_ops, init_record_full_core_ops): Add
15030         record_full_record_method.
15031         * record.h (enum record_method): New enum.
15032         * target-debug.h (target_debug_print_enum_record_method: New define.
15033         * target-delegates.c: Regenerate.
15034         * target.c (target_record_method): New function.
15035         * target.h: Include record.h.
15036         (struct target_ops) <to_record_method>: New field.
15037         (target_record_method): New export.
15038
15039 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15040
15041         * record.h (record_start, record_stop): New export.
15042         * record.c (record_start, record_stop): New function.
15043
15044 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15045
15046         * btrace.c (btrace_fetch): Copy function call segments pointer
15047         into a vector.
15048         (btrace_clear): Clear the vector.
15049         (btrace_find_insn_by_number): Use binary search to find the correct
15050         function call segment.
15051         * btrace.h (brace_fun_p): New typedef.
15052         (struct btrace_thread_info) <functions>: New field.
15053
15054 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15055
15056         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15057         * btrace.c (btrace_decode_error): ... here.  New function.
15058         * btrace.h (btrace_decode_error): New export.
15059
15060 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15061
15062         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15063         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15064         btrace_find_insn_by_number): Remove special case for gaps.
15065         * btrace.h (btrace_insn_get_error): New export.
15066         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15067         * record-btrace.c (btrace_insn_history): Print number for gaps.
15068         (record_btrace_info, record_btrace_goto): Handle gaps.
15069
15070 2017-02-14  Tom Tromey  <tom@tromey.com>
15071
15072         PR python/13598:
15073         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15074         event.
15075         * python/py-evts.c (gdbpy_initialize_py_events): Add
15076         before_prompt registry.
15077         * python/py-events.h (events_object) <before_prompt>: New field.
15078
15079 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
15080
15081         * btrace.c (ftrace_new_switch): Preserve up link and flags.
15082
15083 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
15084
15085         * symfile (_initialize_symfile): Add usage text to the load command's
15086         help text.
15087
15088 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
15089
15090         * utils.c (defaulted_query): Don't query on secondary UIs.
15091
15092 2017-02-10  Tom Tromey  <tom@tromey.com>
15093
15094         * rust-lang.c (rust_get_disr_info): Remove unused variable.
15095
15096 2017-02-10  Tom Tromey  <tom@tromey.com>
15097
15098         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15099         "cleanup" local.
15100         * python/py-type.c (typy_legacy_template_argument): Remove
15101         unnecessary "cleanup" local.
15102
15103 2017-02-10  Tom Tromey  <tom@tromey.com>
15104
15105         * python/python.c (do_start_initialization): New function, from
15106         _initialize_python.
15107         (_initialize_python): Call do_start_initialization.
15108         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15109         goto.
15110
15111 2017-02-10  Tom Tromey  <tom@tromey.com>
15112
15113         * python/py-prettyprint.c (pretty_print_one_value): Use
15114         gdbpy_ref.
15115
15116 2017-02-10  Tom Tromey  <tom@tromey.com>
15117
15118         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15119         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15120         gdbpy_ref.
15121         * python/py-type.c (field_new): Use gdbpy_ref.
15122         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15123         gdbpy_ref.
15124         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15125         (py_free_pspace): Likewise.
15126         (pspace_to_pspace_object): Likewise.
15127         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15128         (py_free_objfile): Likewise.
15129         (objfile_to_objfile_object): Likewise.
15130         * python/py-inferior.c (delete_thread_object): Use
15131         gdbpy_ref.
15132         (infpy_read_memory): Likewise.
15133         (py_free_inferior): Likewise.
15134         * python/py-evtregistry.c (create_eventregistry_object): Use
15135         gdbpy_ref.
15136         * python/py-event.c (create_event_object): Use gdbpy_ref.
15137
15138 2017-02-10  Tom Tromey  <tom@tromey.com>
15139
15140         * python/py-ref.h (gdbpy_ref_policy): Now a template.
15141         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15142         used.
15143         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15144         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15145         python/py-exitedevent.c, python/py-finishbreakpoint.c,
15146         python/py-framefilter.c, python/py-function.c,
15147         python/py-inferior.c, python/py-infevents.c,
15148         python/py-linetable.c, python/py-newobjfileevent.c,
15149         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15150         python/py-signalevent.c, python/py-stopevent.c,
15151         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15152         python/py-unwind.c, python/py-utils.c, python/py-value.c,
15153         python/py-varobj.c, python/py-xmethods.c, python/python.c,
15154         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15155
15156 2017-02-10  Tom Tromey  <tom@tromey.com>
15157
15158         * ui-out.h (ui_out_emit_type): New class.
15159         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15160         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15161         and ui_out_emit_tuple.
15162         (enumerate_locals): Likewise.
15163         (py_mi_print_variables, py_print_locals, py_print_args): Use
15164         ui_out_emit_list.
15165         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15166         ui_out_emit_list.
15167         * common/gdb_optional.h: New file.
15168
15169 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15170
15171         * MAINTAINERS (Write After Approval): Update my e-mail address.
15172
15173 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15174
15175         PR gdb/21122
15176         * breakpoint.c (_initialize_breakpoint): Update the help description
15177         of the 'commands' command to indicate that it takes a list argument.
15178
15179 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
15180
15181         * interps.c (current_interp_set_logging): Remove "return".
15182
15183 2017-02-09  Gary Benson  <gbenson@redhat.com>
15184
15185         * symtab.c (add_symtab_completions): Prevent NULL pointer
15186         dereference.
15187
15188 2017-02-08  Pedro Alves  <palves@redhat.com>
15189
15190         * interps.c (interp::interp): Remove reference to quiet_p.
15191         (interp_set): Make static.  Remove dead "Switching to" output
15192         code.
15193         (interp_quiet_p, interp_set_quiet): Delete.
15194         (interpreter_exec_cmd): Don't set the interpreter quiet.
15195         * interps.h (interp_quiet_p): Make static.
15196         (class interp) <quiet_p>: Remove field
15197
15198 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15199
15200         * cli/cli-decode.c (find_command_name_length): Make it extern.
15201         * cli/cli-decode.h (find_command_name_length): Declare.
15202         * cli/cli-script.c (command_name_equals, line_first_arg):
15203         New functions.
15204         (process_next_line): Use cli-decode to parse command names.
15205         (build_command_line): Make args a constant pointer.
15206
15207 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15208
15209         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15210         Remove case-insensitive search.
15211
15212 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15213
15214         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15215         at the end of the line.  Avoids an ARI warning.
15216
15217 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
15218
15219         * NEWS: Mention support for record/replay of Intel 64 rdrand and
15220         rdseed instructions.
15221         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15222
15223 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
15224
15225         PR tdep/20936
15226         Provide and use sparc32 and sparc64 target description XML files.
15227         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15228         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15229         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15230         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15231         * features/sparc/sparc32-solaris.xml: New file.
15232         * features/sparc/sparc64-solaris.xml: New file.
15233         * features/sparc/sparc32-solaris.c: Generated.
15234         * features/sparc/sparc64-solaris.c: Generated.
15235         * sparc-tdep.h: Account for differences in target descriptions.
15236         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15237         (sparc32_register_type): Use target provided registers.
15238         (validate_tdesc_registers): New function.
15239         (sparc32_gdbarch_init): Use tdesc_has_registers.
15240         Set pseudoregister functions.
15241         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15242         (sparc64_register_type): Use target provided registers.
15243         (sparc64_init_abi): Set pseudoregister functions.
15244
15245 2017-02-03  Tom Tromey  <tom@tromey.com>
15246
15247         PR rust/21097:
15248         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15249         with a single member.
15250
15251 2017-02-03  Pedro Alves  <palves@redhat.com>
15252
15253         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15254         (cli_interp_base::~cli_interp_base): New.
15255         (cli_interp): New struct.
15256         (as_cli_interp): Cast the interp itself to cli_interp.
15257         (cli_interpreter_pre_command_loop): Rename to ...
15258         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
15259         parameter.
15260         (cli_interpreter_init): Rename to ...
15261         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
15262         boolean.  Make extern.
15263         (cli_interpreter_resume): Rename to ...
15264         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
15265         extern.
15266         (cli_interpreter_suspend): Rename to ...
15267         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
15268         extern.
15269         (cli_interpreter_exec): Rename to ...
15270         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
15271         extern.
15272         (cli_interpreter_supports_command_editing): Rename to ...
15273         (cli_interp_base::supports_command_editing): ... this.  Remove
15274         'interp' parameter.  Make extern.
15275         (cli_ui_out): Rename to ...
15276         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
15277         Make extern.
15278         (cli_set_logging): Rename to ...
15279         (cli_interp_base::set_logging): ... this.  Remove 'interp'
15280         parameter.  Make extern.
15281         (cli_interp_procs): Delete.
15282         (cli_interp_factory): Adjust to use "new".
15283         * cli/cli-interp.h: Include "interps.h".
15284         (struct cli_interp_base): New struct.
15285         * interps.c (struct interp): Delete.  Fields moved to interps.h.
15286         (interp_new): Delete.
15287         (interp::interp, interp::~interp): New.
15288         (interp_set): Use bool, and return void.  Assume the interpreter
15289         has suspend, init and resume methods, and that the all return
15290         void.
15291         (set_top_level_interpreter): interp_set returns void.
15292         (interp_ui_out): Adapt.
15293         (current_interp_set_logging): Adapt.
15294         (interp_data): Delete.
15295         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15296         (interp_exec): Adapt.
15297         (top_level_interpreter_data): Delete.
15298         * interps.h (interp_init_ftype, interp_resume_ftype)
15299         (interp_suspend_ftype, interp_exec_ftype)
15300         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15301         (class interp): New.
15302         (interp_new): Delete.
15303         (interp_set): Now returns void.  Use bool.
15304         (interp_data, top_level_interpreter_data): Delete.
15305         * mi/mi-common.h: Include interps.h.
15306         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
15307         init, resume, suspect, exec, interp_ui_out, set_logging and
15308         pre_command_loop methods.
15309         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15310         (mi_interpreter_init): Rename to ...
15311         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
15312         bool, return void and make extern.  Adjust.
15313         (mi_interpreter_resume): ... Rename to ...
15314         (mi_interp::resume): ... this.  Remove the 'data' parameter,
15315         return void and make extern.  Adjust.
15316         (mi_interpreter_suspend): ... Rename to ...
15317         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
15318         return void and make extern.  Adjust.
15319         (mi_interpreter_exec): ... Rename to ...
15320         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
15321         extern.  Adjust.
15322         (mi_interpreter_pre_command_loop): ... Rename to ...
15323         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
15324         parameter and make extern.
15325         (mi_on_normal_stop_1): Adjust.
15326         (mi_ui_out): Rename to ...
15327         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
15328         parameter and make extern.  Adjust.
15329         (mi_set_logging): Rename to ...
15330         (mi_interp::set_logging): ... this.  Remove the 'interp'
15331         parameter and make extern.  Adjust.
15332         (mi_interp_procs): Delete.
15333         (mi_interp_factory): Adjust to use 'new'.
15334         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15335         (mi_print_exception, mi_execute_command, mi_load_progress):
15336         Adjust.
15337         * tui/tui-interp.c (tui_interp): New class.
15338         (as_tui_interp): Return a tui_interp pointer.
15339         (tui_on_normal_stop, tui_on_signal_received)
15340         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15341         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15342         to use interp::interp_ui_out.
15343         (tui_init): Rename to ...
15344         (tui_interp::init): ... this.  Remove the 'self' parameter, use
15345         bool, return void and make extern.  Adjust.
15346         (tui_resume): Rename to ...
15347         (tui_interp::resume): ... this.  Remove the 'data' parameter,
15348         return void and make extern.  Adjust.
15349         (tui_suspend): Rename to ...
15350         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
15351         return void and make extern.  Adjust.
15352         (tui_ui_out): Rename to ...
15353         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
15354         parameter, and make extern.  Adjust.
15355         (tui_exec): Rename to ...
15356         (tui_interp::exec): ... this.  Remove the 'data' parameter and
15357         make extern.
15358         (tui_interp_procs): Delete.
15359         (tui_interp_factory): Use "new".
15360
15361 2017-02-02  Tom Tromey  <tom@tromey.com>
15362
15363         * rust-exp.y (ends_raw_string, space_then_number)
15364         (rust_identifier_start_p): Return bool.
15365         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15366         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15367         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15368         (rust_chartype_p): Return bool.
15369         (val_print_struct, rust_print_struct_def, rust_print_type):
15370         Update.
15371         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15372         Return bool.
15373
15374 2017-02-02  Tom Tromey  <tom@tromey.com>
15375
15376         * rust-lang.c: Reindent.
15377
15378 2017-02-02  Tom Tromey  <tom@tromey.com>
15379
15380         * rust-lang.h (rust_crate_for_block): Update.
15381         * rust-lang.c (rust_crate_for_block): Return std::string.
15382         (rust_get_disr_info): Use std:;string, not
15383         gdb::unique_xmalloc_ptr.
15384         * rust-exp.y (crate_name): Update.
15385
15386 2017-02-02  Pedro Alves  <palves@redhat.com>
15387
15388         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15389         field out of gdb_disassembler_test and make it static.
15390
15391 2017-02-02  Pedro Alves  <palves@redhat.com>
15392
15393         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15394         mi1_interp and mi_interp fields.
15395
15396 2017-02-02  Pedro Alves  <palves@redhat.com>
15397
15398         * cli/cli-interp.c (struct saved_output_files, saved_output):
15399         Moved from cli/cli-logging.c.
15400         (cli_set_logging): New function.
15401         (cli_interp_procs): Install cli_set_logging.
15402         * cli/cli-interp.h (make_logging_output, cli_set_logging):
15403         Declare.
15404         * cli/cli-logging.c (struct saved_output_files, saved_output):
15405         Moved to cli/cli-interp.c.
15406         (pop_output_files): Don't save outputs here.
15407         (make_logging_output): New function.
15408         (handle_redirections): Don't build tee nor save previous outputs
15409         here.
15410         * interps.c (current_interp_set_logging): Change prototype.
15411         Assume there's always a set_logging_proc method installed.
15412         * interps.h (interp_set_logging_ftype): Change prototype.
15413         (current_interp_set_logging): Change prototype and adjust comment.
15414         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
15415         use make_logging_output.
15416         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15417 2017-02-02  Pedro Alves  <palves@redhat.com>
15418
15419         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15420         from ...
15421         (set_logging_overwrite): ... here.
15422         (logging_no_redirect_file): Delete.
15423         (set_logging_redirect): Don't handle redirection on the fly.
15424         Instead warn that "logging off" / "logging on" is necessary.
15425         (pop_output_files): Delete references to logging_no_redirect_file.
15426         (show_logging_command): Always speak in terms of what will happen
15427         once logging is reenabled.
15428
15429 2017-02-02  Pedro Alves  <palves@redhat.com>
15430
15431         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15432
15433 2017-02-02  Pedro Alves  <palves@redhat.com>
15434
15435         * disasm.c (gdb_pretty_print_insn): Rename to ...
15436         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15437         Remove gdbarch parameter.  Adapt to clear the object's buffers
15438         instead of allocating new buffers, and to print using the object's
15439         gdb_disassembler instead of calling gdb_print_insn.
15440         (dump_insns): Use gdb_pretty_print_disassembler.
15441         * disasm.h (gdb_pretty_print_insn): Delete declaration.
15442         (gdb_pretty_print_disassembler): New class.
15443         * record-btrace.c (btrace_insn_history): Use
15444         gdb_pretty_print_disassembler.
15445
15446 2017-02-02  Pedro Alves  <palves@redhat.com>
15447
15448         * ada-lang.c (type_as_string): Use string_file.
15449         * ada-valprint.c (ada_print_floating): Use string_file.
15450         * ada-varobj.c (ada_varobj_scalar_image)
15451         (ada_varobj_get_value_image): Use string_file.
15452         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15453         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15454         * breakpoint.c (update_inserted_breakpoint_locations)
15455         (insert_breakpoint_locations, reattach_breakpoints)
15456         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15457         (print_it_watchpoint): Use string_file.
15458         (save_breakpoints): Use stdio_file.
15459         * c-exp.y (oper): Use string_file.
15460         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15461         tee_file.
15462         (pop_output_files): Use delete.
15463         (handle_redirections): Use stdio_file and tee_file.
15464         * cli/cli-setshow.c (do_show_command): Use string_file.
15465         * compile/compile-c-support.c (c_compute_program): Use
15466         string_file.
15467         * compile/compile-c-symbols.c (generate_vla_size): Take a
15468         'string_file &' instead of a 'ui_file *'.
15469         (generate_c_for_for_one_variable): Take a 'string_file &' instead
15470         of a 'ui_file *'.  Use string_file.
15471         (generate_c_for_variable_locations): Take a 'string_file &'
15472         instead of a 'ui_file *'.
15473         * compile/compile-internal.h (generate_c_for_for_one_variable):
15474         Take a 'string_file &' instead of a 'ui_file *'.
15475         * compile/compile-loc2c.c (push, pushf, unary, binary)
15476         (print_label, pushf_register_address, pushf_register)
15477         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15478         'ui_file *'.  Adjust.
15479         * compile/compile.c (compile_to_object): Use string_file.
15480         * compile/compile.h (compile_dwarf_expr_to_c)
15481         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15482         'ui_file *'.
15483         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15484         (replace_typedefs_qualified_name): Use string_file and
15485         obstack_copy0.
15486         * disasm.c (gdb_pretty_print_insn): Use string_file.
15487         (gdb_disassembly): Adjust reference the null_stream global.
15488         (do_ui_file_delete): Delete.
15489         (gdb_insn_length): Use null_stream.
15490         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15491         * dwarf2loc.c (dwarf2_compile_property_to_c)
15492         (locexpr_generate_c_location, loclist_generate_c_location): Take a
15493         'string_file &' instead of a 'ui_file *'.
15494         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15495         * dwarf2read.c (do_ui_file_peek_last): Delete.
15496         (dwarf2_compute_name): Use string_file.
15497         * event-top.c (gdb_setup_readline): Use stdio_file.
15498         * gdbarch.sh (verify_gdbarch): Use string_file.
15499         * gdbtypes.c (safe_parse_type): Use null_stream.
15500         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15501         string_file.
15502         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15503         'string_file *' instead of a 'ui_file *'.
15504         (gdbscm_arch_disassemble): Use string_file.
15505         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15506         * guile/scm-ports.c (class ioscm_file_port): Now a class that
15507         inherits from ui_file.
15508         (ioscm_file_port_delete, ioscm_file_port_rewind)
15509         (ioscm_file_port_put): Delete.
15510         (ioscm_file_port_write): Rename to ...
15511         (ioscm_file_port::write): ... this.  Remove file_port_magic
15512         checks.
15513         (ioscm_file_port_new): Delete.
15514         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15515         ui_file_up.
15516         * guile/scm-type.c (tyscm_type_name): Use string_file.
15517         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15518         Use string_file.
15519         * infcmd.c (print_return_value_1): Use string_file.
15520         * infrun.c (print_target_wait_results): Use string_file.
15521         * language.c (add_language): Use string_file.
15522         * location.c (explicit_to_string_internal): Use string_file.
15523         * main.c (captured_main_1): Use null_file.
15524         * maint.c (maintenance_print_architecture): Use stdio_file.
15525         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15526         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15527         event_channel>: Change type to mi_console_file pointer.
15528         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15529         (mi_console_file_delete): Delete.
15530         (struct mi_console_file): Delete.
15531         (mi_console_file_magic): Delete.
15532         (mi_console_file_new): Delete.
15533         (mi_console_file::mi_console_file): New.
15534         (mi_console_file_delete): Delete.
15535         (mi_console_file_fputs): Delete.
15536         (mi_console_file::write): New.
15537         (mi_console_raw_packet): Delete.
15538         (mi_console_file::flush): New.
15539         (mi_console_file_flush): Delete.
15540         (mi_console_set_raw): Rename to ...
15541         (mi_console_file::set_raw): ... this.
15542         * mi/mi-console.h (class mi_console_file): New class.
15543         (mi_console_file_new, mi_console_set_raw): Delete.
15544         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15545         (mi_set_logging): Use delete and tee_file.  Adjust.
15546         * mi/mi-main.c (output_register): Use string_file.
15547         (mi_cmd_data_evaluate_expression): Use string_file.
15548         (mi_cmd_data_read_memory): Use string_file.
15549         (mi_cmd_execute, print_variable_or_computed): Use string_file.
15550         * mi/mi-out.c (mi_ui_out::main_stream): New.
15551         (mi_ui_out::rewind): Use main_stream and
15552         string_file.
15553         (mi_ui_out::put): Use main_stream and string_file.
15554         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15555         Allocate a 'string_file' instead.
15556         (mi_out_new): Don't allocate a mem_fileopen stream here.
15557         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15558         (mi_ui_out::main_stream): Declare method.
15559         * printcmd.c (eval_command): Use string_file.
15560         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15561         * python/py-arch.c (archpy_disassemble): Use string_file.
15562         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15563         * python/py-frame.c (frapy_str): Use string_file.
15564         * python/py-framefilter.c (py_print_type, py_print_single_arg):
15565         Use string_file.
15566         * python/py-type.c (typy_str): Use string_file.
15567         * python/py-unwind.c (unwind_infopy_str): Use string_file.
15568         * python/py-value.c (valpy_str): Use string_file.
15569         * record-btrace.c (btrace_insn_history): Use string_file.
15570         * regcache.c (regcache_print): Use stdio_file.
15571         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15572         * remote.c (escape_buffer): Use string_file.
15573         * rust-lang.c (rust_get_disr_info): Use string_file.
15574         * serial.c (serial_open_ops_1): Use stdio_file.
15575         (do_serial_close): Use delete.
15576         * stack.c (print_frame_arg): Use string_file.
15577         (print_frame_args): Remove local mem_fileopen stream, not used.
15578         (print_frame): Use string_file.
15579         * symmisc.c (maintenance_print_symbols): Use stdio_file.
15580         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15581         Take a 'string_file *' instead of a 'ui_file *'.
15582         * top.c (new_ui): Use stdio_file and stderr_file.
15583         (free_ui): Use delete.
15584         (execute_command_to_string): Use string_file.
15585         (quit_confirm): Use string_file.
15586         * tracepoint.c (collection_list::append_exp): Use string_file.
15587         * tui/tui-disasm.c (tui_disassemble): Use string_file.
15588         * tui/tui-file.c: Don't include "ui-file.h".
15589         (enum streamtype, struct tui_stream): Delete.
15590         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15591         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15592         (tui_file::tui_file): New method.
15593         (tui_file_fputs): Delete.
15594         (tui_file_get_strbuf): Delete.
15595         (tui_file::puts): New method.
15596         (tui_file_adjust_strbuf): Delete.
15597         (tui_file_flush): Delete.
15598         (tui_file::flush): New method.
15599         * tui/tui-file.h: Tweak intro comment.
15600         Include ui-file.h.
15601         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15602         (tui_file_adjust_strbuf): Delete declarations.
15603         (class tui_file): New class.
15604         * tui/tui-io.c (tui_initialize_io): Use tui_file.
15605         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15606         (tui_register_format): Use string_stream.
15607         * tui/tui-stack.c (tui_make_status_line): Use string_file.
15608         (tui_get_function_from_frame): Use string_file.
15609         * typeprint.c (type_to_string): Use string_file.
15610         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15611         (null_stream): New global.
15612         (ui_file_delete): Delete.
15613         (ui_file::ui_file): New.
15614         (null_file_isatty): Delete.
15615         (ui_file::~ui_file): New.
15616         (null_file_rewind): Delete.
15617         (ui_file::printf): New.
15618         (null_file_put): Delete.
15619         (null_file_flush): Delete.
15620         (ui_file::putstr): New.
15621         (null_file_write): Delete.
15622         (ui_file::putstrn): New.
15623         (null_file_read): Delete.
15624         (ui_file::putc): New.
15625         (null_file_fputs): Delete.
15626         (null_file_write_async_safe): Delete.
15627         (ui_file::vprintf): New.
15628         (null_file_delete): Delete.
15629         (null_file::write): New.
15630         (null_file_fseek): Delete.
15631         (null_file::puts): New.
15632         (ui_file_data): Delete.
15633         (null_file::write_async_safe): New.
15634         (gdb_flush, ui_file_isatty): Adjust.
15635         (ui_file_put, ui_file_rewind): Delete.
15636         (ui_file_write): Adjust.
15637         (ui_file_write_for_put): Delete.
15638         (ui_file_write_async_safe, ui_file_read): Adjust.
15639         (ui_file_fseek): Delete.
15640         (fputs_unfiltered): Adjust.
15641         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15642         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15643         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15644         (set_ui_file_data): Delete.
15645         (string_file::~string_file, string_file::write)
15646         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15647         (do_ui_file_as_string, ui_file_as_string): Delete.
15648         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15649         (struct mem_file): Delete.
15650         (mem_file_new): Delete.
15651         (stdio_file::stdio_file): New.
15652         (mem_file_delete): Delete.
15653         (stdio_file::stdio_file): New.
15654         (mem_fileopen): Delete.
15655         (stdio_file::~stdio_file): New.
15656         (mem_file_rewind): Delete.
15657         (stdio_file::set_stream): New.
15658         (mem_file_put): Delete.
15659         (stdio_file::open): New.
15660         (mem_file_write): Delete.
15661         (stdio_file_magic, struct stdio_file): Delete.
15662         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15663         (stdio_file::flush): New.
15664         (stdio_file_read): Rename to ...
15665         (stdio_file::read): ... this.  Adjust.
15666         (stdio_file_write): Rename to ...
15667         (stdio_file::write): ... this.  Adjust.
15668         (stdio_file_write_async_safe): Rename to ...
15669         (stdio_file::write_async_safe) ... this.  Adjust.
15670         (stdio_file_fputs): Rename to ...
15671         (stdio_file::puts) ... this.  Adjust.
15672         (stdio_file_isatty): Delete.
15673         (stdio_file_fseek): Delete.
15674         (stdio_file::isatty): New.
15675         (stderr_file_write): Rename to ...
15676         (stderr_file::write) ... this.  Adjust.
15677         (stderr_file_fputs): Rename to ...
15678         (stderr_file::puts) ... this.  Adjust.
15679         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15680         (stderr_file::stderr_file): New.
15681         (tee_file_magic): Delete.
15682         (struct tee_file): Delete.
15683         (tee_file::tee_file): New.
15684         (tee_file_new): Delete.
15685         (tee_file::~tee_file): New.
15686         (tee_file_delete): Delete.
15687         (tee_file_flush): Rename to ...
15688         (tee_file::flush): ... this.  Adjust.
15689         (tee_file_write): Rename to ...
15690         (tee_file::write): ... this.  Adjust.
15691         (tee_file::write_async_safe): New.
15692         (tee_file_fputs): Rename to ...
15693         (tee_file::puts): ... this.  Adjust.
15694         (tee_file_isatty): Rename to ...
15695         (tee_file::isatty): ... this.  Adjust.
15696         * ui-file.h (struct obstack, struct ui_file): Don't
15697         forward-declare.
15698         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15699         (ui_file_write_ftype)
15700         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15701         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15702         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15703         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15704         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15705         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15706         (set_ui_file_fseek): Delete.
15707         (ui_file_data, ui_file_delete, ui_file_rewind)
15708         (struct ui_file): New.
15709         (ui_file_up): New.
15710         (class null_file): New.
15711         (null_stream): Declare.
15712         (ui_file_write_for_put, ui_file_put): Delete.
15713         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15714         Delete.
15715         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15716         (gdb_fopen, tee_file_new): Delete.
15717         (struct string_file): New.
15718         (struct stdio_file): New.
15719         (stdio_file_up): New.
15720         (struct stderr_file): New.
15721         (class tee_file): New.
15722         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15723         of a 'ui_file *'.  Adjust.
15724         * ui-out.h (class ui_out) <field_stream>: Likewise.
15725         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15726         (null_stream): Delete.
15727         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15728         Adjust.
15729         * utils.h (struct ui_file): Delete forward declaration..
15730         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15731         (error_stream): Take a 'string_file &' instead of a
15732         'ui_file *'.
15733         * varobj.c (varobj_value_get_print_value): Use string_file.
15734         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15735         * gdbarch.c: Regenerate.
15736
15737 2017-02-02  Pedro Alves  <palves@redhat.com>
15738
15739         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15740         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
15741         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
15742         Adjust to call gdb_print_insn instead of
15743         gdb_disassembler::print_insn.
15744         (dump_insns, do_mixed_source_and_assembly_deprecated)
15745         (do_mixed_source_and_assembly, do_assembly_only): Add back a
15746         'gdbarch' parameter.  Remove gdb_disassembler parameter.
15747         (gdb_disassembly): Don't allocate a gdb_disassembler here.
15748         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15749         declaration.
15750         (gdb_pretty_print_insn): Re-add declaration.
15751         * record-btrace.c (btrace_insn_history): Don't allocate a
15752         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
15753
15754 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
15755
15756         * disasm.h (gdb_disassembly): Remove file_string parameter.
15757         * disasm.c (gdb_disassembly): Likewise.
15758         * cli/cli-cmds.c (print_disassembly): Adapt.
15759         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15760         * stack.c (do_gdb_disassembly): Likewise.
15761
15762 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15763
15764         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15765         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15766         targets.  And if the implicit value is longer than needed, extract
15767         the first bytes instead of the "least significant" ones.
15768
15769 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15770
15771         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15772         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15773         (btrace_fetch): Assert can_access_registers_ptid.
15774         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15775         validate_registers_access.
15776
15777 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15778
15779         * gdbthread.h (can_access_registers_ptid): New.
15780         * thread.c (can_access_registers_ptid): New.
15781
15782 2017-02-01  Pedro Alves  <palves@redhat.com>
15783
15784         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15785
15786 2017-01-31  Pedro Alves  <palves@redhat.com>
15787
15788         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15789         Fix typos.
15790
15791 2017-01-31  Pedro Alves  <palves@redhat.com>
15792
15793         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15794         not used.
15795
15796 2017-01-31  Pedro Alves  <palves@redhat.com>
15797
15798         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15799
15800 2017-01-31  Pedro Alves  <palves@redhat.com>
15801
15802         * common/scoped_restore.h
15803         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15804         change the value's parameter type to T2.
15805         (make_scoped_restore): Likewise.
15806
15807 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15808             Richard Henderson  <rth@redhat.com>
15809
15810         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15811         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15812         GS_BASE for older kernels.
15813         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15814         GS_BASE for older kernels.
15815         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15816         and GS_BASE to the offset table.
15817         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15818         system register group.
15819         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15820         for older kernels.
15821         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15822         amd64 ABI.
15823         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15824         AMD64_GSBASE_REGNUM.
15825         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15826         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15827         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15828         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15829         i386/64bit-segments.xml in those rules.
15830         * features/i386/64bit-segments.xml: New file.
15831         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15832         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15833         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15834         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15835         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15836         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15837         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15838         * features/i386/amd64-avx-linux.c: Regenerated.
15839         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15840         * features/i386/amd64-avx-mpx.c: Regenerated.
15841         * features/i386/amd64-avx512-linux.c: Regenerated.
15842         * features/i386/amd64-linux.c: Regenerated.
15843         * features/i386/amd64-mpx-linux.c: Regenerated.
15844         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15845         * features/i386/i386-avx-mpx.c: Regenerated.
15846         * features/i386/x32-avx-linux.c: Regenerated.
15847         * features/i386/x32-avx512-linux.c: Regenerated.
15848         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15849         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15850         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15851         * regformats/i386/amd64-linux.dat: Regenerated.
15852         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15853         * regformats/i386/x32-avx-linux.dat: Regenerated.
15854         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15855         * regformats/i386/x32-linux.dat: Regenerated.
15856
15857 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15858
15859         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15860         Set to AMD64_NUM_REGS.
15861
15862 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15863
15864         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15865         that checks validity of a register number.
15866
15867 2017-01-27  Kees Cook  <keescook@google.com>
15868
15869         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15870         fetch_fpregs if target has fpa registers.
15871         (arm_linux_store_inferior_registers): Call store_fpregs if target
15872         has fpa registers.
15873
15874 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15875
15876         * cris-tdep.c (cris_gdbarch_init): Remove check for
15877         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15878
15879 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15880
15881         * corelow.c (get_core_register_section): Check for regset
15882         existence before checking for REGSET_VARIABLE_SIZE.
15883
15884 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15885             Pedro Alves  <palves@redhat.com>
15886
15887         PR gdb/20939
15888         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15889         call memory_error, save memaddr instead.
15890         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15891         negative, cal memory_error.
15892         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15893
15894 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15895
15896         * disasm-selftests.c (memory_error_test): New function.
15897         (_initialize_disasm_selftests): Register memory_error_test.
15898
15899 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15900
15901         * Makefile.in (SFILES): Add disasm-selftests.c and
15902         selftest-arch.c.
15903         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15904         * disasm-selftests.c: New file.
15905         * selftest-arch.c: New file.
15906         * selftest-arch.h: New file.
15907
15908 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15909
15910         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15911         to bfd_arch_mep.  Don't return 0 if section is not
15912         found.  Call print_insn_mep.
15913
15914 2017-01-26  Pedro Alves  <palves@redhat.com>
15915             Yao Qi  <yao.qi@linaro.org>
15916
15917         * arm-tdep.c: Include "disasm.h".
15918         (gdb_print_insn_arm): Update code to get gdbarch.
15919         * disasm.c (dis_asm_read_memory): Change it to
15920         gdb_disassembler::dis_asm_read_memory.
15921         (dis_asm_memory_error): Likewise.
15922         (dis_asm_print_address): Likewise.
15923         (gdb_pretty_print_insn): Change it to
15924         gdb_disassembler::pretty_print_insn.
15925         (dump_insns): Add one argument gdb_disassemlber.  All
15926         callers updated.
15927         (do_mixed_source_and_assembly_deprecated): Likewise.
15928         (do_mixed_source_and_assembly): Likewise.
15929         (do_assembly_only): Likewise.
15930         (gdb_disassembler::gdb_disassembler): New.
15931         (gdb_disassembler::print_insn): New.
15932         * disasm.h (class gdb_disassembler): New.
15933         (gdb_pretty_print_insn): Remove declaration.
15934         (gdb_disassemble_info): Likewise.
15935         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15936         (gdbscm_disasm_read_memory_worker): Update.
15937         (gdbscm_disasm_read_memory): Update.
15938         (gdbscm_disasm_memory_error): Remove.
15939         (gdbscm_disasm_print_address): Remove.
15940         (gdbscm_disassembler::gdbscm_disassembler): New.
15941         (gdbscm_print_insn_from_port): Update.
15942         * mips-tdep.c: Include disasm.h.
15943         (gdb_print_insn_mips): Update code to get gdbarch.
15944         * record-btrace.c (btrace_insn_history): Update.
15945         * spu-tdep.c: Include disasm.h.
15946         (struct spu_dis_asm_data): Remove.
15947         (struct spu_dis_asm_info): New.
15948         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15949         SPU id.
15950         (gdb_print_insn_spu): Cast disassemble_info to
15951         spu_dis_asm_info.
15952
15953 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15954
15955         * disasm.c (do_ui_file_delete): Delete.
15956         (gdb_insn_length): Move code creating stream to ...
15957         * utils.c (null_stream): ... here.  New function.
15958         * utils.h (null_stream): Declare.
15959
15960 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15961
15962         * python/py-inferior.c (find_thread_object): Return directly
15963         from the loop.  Remove "found" variable.
15964
15965 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15966
15967         GDB 7.12.1 released.
15968
15969 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15970
15971         * python/py-function.c (fnpy_call): Reorder declarations to have
15972         the gdbpy_enter object declared first.
15973         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15974
15975 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15976
15977         PR python/21068
15978         * python/python-internal.h (PyMem_RawMalloc): Define for
15979         Python < 3.4.
15980         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15981         PyMem_RawMalloc instead of PyMem_Malloc.
15982
15983 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15984             Luis Machado  <lgustavo@codesourcery.com>
15985
15986         * NEWS (New commands): Mention flash-erase.
15987         (New MI commands): Mention target-flash-erase.
15988         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15989         command.
15990         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15991         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15992         * target.c (flash_erase_command): New function.
15993         (initialize_targets): Add new flash-erase command.
15994         * target.h (flash_erase_command): New declaration.
15995
15996 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15997
15998         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15999         HAVE_SYS_PROCFS_H is defined.
16000
16001 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16002
16003         * remote.c (struct cached_reg): Change data into a pointer.
16004         * (stop_reply_dtr): Free data pointers before deleting vector.
16005         (process_stop_reply): Likewise.
16006         (remote_parse_stop_reply): Allocate space for data
16007
16008 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16009
16010         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16011         MAX_REGISTER_SIZE.
16012         (amd64_pseudo_register_read_value): Likewise.
16013         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16014         (store_register_using_P): Likewise.
16015         * regcache.c (regcache_xfer_part): Likewise.
16016
16017 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
16018
16019         Split real and pseudo registers.
16020         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16021         (sparc32_pseudo_regnum): New enum.
16022         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16023         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16024         (SPARC32_CP0_REGISTERS): New macro.
16025         (sparc32_pseudo_register_name): New function.
16026         (sparc32_register_name): Use sparc32_pseudo_register_name.
16027         (sparc32_pseudo_register_type): New function.
16028         (sparc32_register_type): Use sparc32_pseudo_register_type.
16029         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16030         pseudo register numbers.
16031         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16032         (SPARC64_CP0_REGISTERS): New macro.
16033         (sparc64_pseudo_register_name): New function.
16034         (sparc64_register_name): Use sparc64_pseudo_register_name.
16035         (sparc64_pseudo_register_type): New function.
16036         (sparc64_register_type): Use sparc64_pseudo_register_type.
16037         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16038         pseudo register numbers.
16039         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16040         sparc64_store_arguments): Handle pseudo register numbers.
16041
16042 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16043
16044         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16045         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16046         output.
16047         (getpkt_or_notif_sane_1): Likewise.
16048
16049 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16050
16051         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16052         of CC.  Pass "-x c++-header" instead of "-x c".
16053
16054 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16055
16056         * remote.c (remote_can_async_p): Update comment.
16057
16058 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16059
16060         * linux-nat.c (linux_nat_can_async_p): Update comment.
16061
16062 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16063
16064         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16065
16066 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
16067
16068         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16069
16070 2017-01-10  Tom Tromey  <tom@tromey.com>
16071
16072         * python/py-type.c (typy_legacy_template_argument): Update.
16073         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16074         ~demangle_parse_info): Declare new members.
16075         (cp_demangled_name_to_comp): Return unique_ptr.
16076         (cp_demangled_name_parse_free)
16077         (make_cleanup_cp_demangled_name_parse_free)
16078         (cp_new_demangle_parse_info): Remove.
16079         * cp-support.c (do_demangled_name_parse_free_cleanup)
16080         (make_cleanup_cp_demangled_name_parse_free): Remove.
16081         (inspect_type, cp_canonicalize_string_full)
16082         (cp_canonicalize_string): Update.
16083         (mangled_name_to_comp): Change return type.
16084         (cp_class_name_from_physname, method_name_from_physname)
16085         (cp_func_name, cp_remove_params): Update.
16086         * cp-name-parser.y (demangle_parse_info): New constructor, from
16087         cp_new_demangle_parse_info.
16088         (~demangle_parse_info): New destructor, from
16089         cp_demangled_name_parse_free.
16090         (cp_merge_demangle_parse_infos): Update.
16091         (cp_demangled_name_to_comp): Change return type.
16092
16093 2017-01-10  Tom Tromey  <tom@tromey.com>
16094
16095         * top.c (prevent_dont_repeat): Change return type.
16096         * python/python.c (execute_gdb_command): Use std::string.
16097         Update.
16098         * guile/guile.c (gdbscm_execute_gdb_command): Update.
16099         * command.h (prevent_dont_repeat): Change return type.
16100         * breakpoint.c (bpstat_do_actions_1): Update.
16101
16102 2017-01-10  Tom Tromey  <tom@tromey.com>
16103
16104         * value.h (scoped_value_mark::~scoped_value_mark): Call
16105         free_to_mark.
16106         (scoped_value_mark::free_to_mark): New method.
16107         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16108         scoped_value_mark.
16109
16110 2017-01-10  Tom Tromey  <tom@tromey.com>
16111
16112         * python/py-value.c (valpy_dereference, valpy_referenced_value)
16113         (valpy_reference_value, valpy_const_value, valpy_get_address)
16114         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16115         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16116         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16117         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16118         scoped_value_mark.
16119         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16120         * value.h (scoped_value_mark): New class.
16121
16122 2017-01-10  Tom Tromey  <tom@tromey.com>
16123
16124         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16125         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16126         * psymtab.c (discard_psymtabs_upto): Remove.
16127         (make_cleanup_discard_psymtabs): Remove.
16128         (struct psymtab_state): Remove.
16129
16130 2017-01-10  Tom Tromey  <tom@tromey.com>
16131
16132         * record-full.c (record_full_save_cleanups): Remove.
16133         (record_full_save): Use gdb::unlinker.
16134         * gcore.c (do_bfd_delete_cleanup): Remove.
16135         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
16136         cleanups.
16137         * dwarf2read.c (unlink_if_set): Remove.
16138         (write_psymtabs_to_index): Use gdb::unlinker.
16139         * common/gdb_unlinker.h: New file.
16140
16141 2017-01-10  Tom Tromey  <tom@tromey.com>
16142
16143         * windows-tdep.c (windows_xfer_shared_library): Update.
16144         * windows-nat.c (windows_make_so): Update.
16145         * utils.h (make_cleanup_bfd_unref): Remove.
16146         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16147         * symfile.h (symfile_bfd_open)
16148         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16149         * symfile.c (read_symbols, symbol_file_add)
16150         (separate_debug_file_exists): Update.
16151         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16152         (generic_load, reread_symbols): Update.
16153         * symfile-mem.c (symbol_file_add_from_memory): Update.
16154         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16155         (spu_symbol_file_add_from_memory): Update.
16156         * solist.h (struct target_so_ops) <bfd_open>: Return
16157         gdb_bfd_ref_ptr.
16158         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16159         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16160         gdb_bfd_ref_ptr.
16161         (solib_map_sections, reload_shared_libraries_1): Update.
16162         * solib-svr4.c (enable_break): Update.
16163         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16164         * solib-frv.c (enable_break2): Update.
16165         * solib-dsbt.c (enable_break): Update.
16166         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16167         gdb_bfd_ref_ptr.
16168         (darwin_solib_get_all_image_info_addr_at_init): Update.
16169         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16170         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16171         * record-full.c (record_full_save): Update.
16172         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16173         * procfs.c (insert_dbx_link_bpt_in_file): Update.
16174         * minidebug.c (find_separate_debug_file_in_section): Return
16175         gdb_bfd_ref_ptr.
16176         * machoread.c (macho_add_oso_symfile): Change abfd to
16177         gdb_bfd_ref_ptr.
16178         (macho_symfile_read_all_oso): Update.
16179         (macho_check_dsym): Return gdb_bfd_ref_ptr.
16180         (macho_symfile_read): Update.
16181         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16182         (jit_bfd_try_read_symtab): Update.
16183         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16184         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16185         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16186         gdb_bfd_ref_ptr.
16187         (gdb_bfd_ref_policy): New struct.
16188         (gdb_bfd_ref_ptr): New typedef.
16189         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16190         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16191         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16192         gdb_bfd_ref_ptr.
16193         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16194         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16195         (gcore_command): Update.
16196         * exec.c (exec_file_attach): Update.
16197         * elfread.c (elf_symfile_read): Update.
16198         * dwarf2read.c (dwarf2_get_dwz_file): Update.
16199         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16200         (open_and_init_dwo_file): Update.
16201         (open_dwp_file): Return gdb_bfd_ref_ptr.
16202         (open_and_init_dwp_file): Update.
16203         * corelow.c (core_open): Update.
16204         * compile/compile-object-load.c (compile_object_load): Update.
16205         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16206         * coffread.c (coff_symfile_read): Update.
16207         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16208         gdb_bfd_ref_ptr.  Rename.
16209         (dump_bfd_file, restore_command): Update.
16210         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16211         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16212         (find_separate_debug_file_by_buildid): Update.
16213
16214 2017-01-10  Tom Tromey  <tom@tromey.com>
16215
16216         * common/gdb_ref_ptr.h: New file.
16217         * python/py-ref.h (struct gdbpy_ref_policy): New.
16218         (gdbpy_ref): Now a typedef.
16219
16220 2017-01-10  Tom Tromey  <tom@tromey.com>
16221
16222         * utils.h (make_cleanup_htab_delete): Don't declare.
16223         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16224         Remove.
16225         * linespec.c (decode_compound_collector): Add constructor,
16226         destructor.
16227         (lookup_prefix_sym): Remove cleanup.
16228         (symtab_collector): Add constructor, destructor.
16229         (collect_symtabs_from_filename): Remove cleanup.
16230         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16231         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16232         Use htab_up.
16233         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16234         * dwarf2read.c (dw2_expand_symtabs_matching)
16235         (dw2_map_symbol_filenames, dwarf_decode_macros)
16236         (write_psymtabs_to_index): Use htab_up.
16237         * dwarf2loc.c (func_verify_no_selftailcall)
16238         (call_site_find_chain_1, func_verify_no_selftailcall)
16239         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16240         std::vector, gdb::unique_xmalloc_ptr.
16241         (call_sitep): Remove typedef.
16242         (dwarf2_locexpr_baton_eval): Remove unused variable.
16243
16244 2017-01-10  Tom Tromey  <tom@tromey.com>
16245
16246         * python/python-internal.h (make_cleanup_py_decref)
16247         (make_cleanup_py_xdecref): Don't declare.
16248         * python/py-utils.c (py_decref, make_cleanup_py_decref)
16249         (py_xdecref, make_cleanup_py_xdecref): Remove.
16250
16251 2017-01-10  Tom Tromey  <tom@tromey.com>
16252
16253         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16254         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16255
16256 2017-01-10  Tom Tromey  <tom@tromey.com>
16257
16258         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16259
16260 2017-01-10  Tom Tromey  <tom@tromey.com>
16261
16262         * python/py-utils.c (unicode_to_encoded_string)
16263         (python_string_to_target_string)
16264         (python_string_to_target_python_string)
16265         (python_string_to_host_string, gdbpy_obj_to_string)
16266         (get_addr_from_python): Use gdbpy_ref.
16267
16268 2017-01-10  Tom Tromey  <tom@tromey.com>
16269
16270         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16271         gdbpy_ref.
16272
16273 2017-01-10  Tom Tromey  <tom@tromey.com>
16274
16275         * python/python.c (eval_python_command, gdbpy_decode_line)
16276         (gdbpy_run_events, gdbpy_start_type_printers)
16277         (gdbpy_apply_type_printers): Use gdbpy_ref.
16278
16279 2017-01-10  Tom Tromey  <tom@tromey.com>
16280
16281         * python/py-param.c (get_doc_string, compute_enum_values): Use
16282         gdbpy_ref.
16283
16284 2017-01-10  Tom Tromey  <tom@tromey.com>
16285
16286         * python/py-inferior.c (find_thread_object, build_inferior_list):
16287         Use gdbpy_ref.
16288
16289 2017-01-10  Tom Tromey  <tom@tromey.com>
16290
16291         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16292
16293 2017-01-10  Tom Tromey  <tom@tromey.com>
16294
16295         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16296         gdbpy_ref.
16297
16298 2017-01-10  Tom Tromey  <tom@tromey.com>
16299
16300         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
16301         extra incref.
16302         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16303         Use gdbpy_ref.
16304
16305 2017-01-10  Tom Tromey  <tom@tromey.com>
16306
16307         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16308         gdbpy_ref.
16309
16310 2017-01-10  Tom Tromey  <tom@tromey.com>
16311
16312         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
16313         decref results of PyArg_ParseTupleAndKeywords.
16314
16315 2017-01-10  Tom Tromey  <tom@tromey.com>
16316
16317         * python/python.c (python_run_simple_file): Use
16318         unique_xmalloc_ptr, gdbpy_ref.
16319
16320 2017-01-10  Tom Tromey  <tom@tromey.com>
16321
16322         * python/py-prettyprint.c (print_stack_unless_memory_error)
16323         (print_string_repr, print_children): Use gdbpy_ref.
16324         (dummy_python_frame): New class.
16325         (dummy_python_frame::dummy_python_frame): Rename from
16326         push_dummy_python_frame.
16327         (py_restore_tstate): Remove.
16328
16329 2017-01-10  Tom Tromey  <tom@tromey.com>
16330
16331         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16332
16333 2017-01-10  Tom Tromey  <tom@tromey.com>
16334
16335         * python/python.c (ensure_python_env, restore_python_env):
16336         Remove.
16337         * python/python-internal.h (ensure_python_env): Don't declare.
16338         * varobj.h (varobj_ensure_python_env): Don't declare.
16339         * varobj.c (varobj_ensure_python_env): Remove.
16340
16341 2017-01-10  Tom Tromey  <tom@tromey.com>
16342
16343         * varobj.c (varobj_value_get_print_value): Use
16344         gdbpy_enter_varobj.
16345
16346 2017-01-10  Tom Tromey  <tom@tromey.com>
16347
16348         * python/py-prettyprint.c (print_string_repr, print_children):
16349         Update.
16350         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16351         of "encoding".
16352         * varobj.c (varobj_value_get_print_value): Update.
16353         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16354
16355 2017-01-10  Tom Tromey  <tom@tromey.com>
16356
16357         * varobj.c (varobj_get_display_hint)
16358         (dynamic_varobj_has_child_method, install_new_value_visualizer)
16359         (varobj_set_visualizer, free_variable): Use
16360         gdbpy_enter_varobj.
16361
16362 2017-01-10  Tom Tromey  <tom@tromey.com>
16363
16364         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16365         (do_finish_initialization): New function.  Use gdbpy_ref.
16366         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
16367         do_finish_initialization.
16368
16369 2017-01-10  Tom Tromey  <tom@tromey.com>
16370
16371         * python/py-param.c (get_set_value, get_show_value): Use
16372         gdbpy_enter, gdbpy_ref.
16373
16374 2017-01-10  Tom Tromey  <tom@tromey.com>
16375
16376         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16377
16378 2017-01-10  Tom Tromey  <tom@tromey.com>
16379
16380         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16381
16382 2017-01-10  Tom Tromey  <tom@tromey.com>
16383
16384         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16385         Use gdbpy_enter_varobj.
16386
16387 2017-01-10  Tom Tromey  <tom@tromey.com>
16388
16389         * varobj.c (gdbpy_enter_varobj): New constructor.
16390         * python/python-internal.h (gdbpy_enter_varobj): New class.
16391         * python/py-varobj.c (py_varobj_get_iterator): Use
16392         gdbpy_enter_varobj.
16393
16394 2017-01-10  Tom Tromey  <tom@tromey.com>
16395
16396         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16397         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16398         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16399         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16400         unique_xmalloc_ptr.
16401         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16402
16403 2017-01-10  Tom Tromey  <tom@tromey.com>
16404
16405         * python/py-xmethods.c (invoke_match_method): Use
16406         gdbpy_ref.
16407
16408 2017-01-10  Tom Tromey  <tom@tromey.com>
16409
16410         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16411         gdbpy_enter, gdbpy_ref.
16412
16413 2017-01-10  Tom Tromey  <tom@tromey.com>
16414
16415         * python/python.c (python_interactive_command): Use gdbpy_enter.
16416
16417 2017-01-10  Tom Tromey  <tom@tromey.com>
16418
16419         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16420         gdbpy_ref.
16421
16422 2017-01-10  Tom Tromey  <tom@tromey.com>
16423
16424         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16425         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16426
16427 2017-01-10  Tom Tromey  <tom@tromey.com>
16428
16429         * utils.h (htab_deleter): New struct.
16430         (htab_up): New typedef.
16431         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16432         gdbpy_enter, gdbpy_ref, htab_up.
16433
16434 2017-01-10  Tom Tromey  <tom@tromey.com>
16435
16436         * python/py-unwind.c (pending_frame_invalidate): Remove.
16437         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16438
16439 2017-01-10  Tom Tromey  <tom@tromey.com>
16440
16441         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16442         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16443
16444 2017-01-10  Tom Tromey  <tom@tromey.com>
16445
16446         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16447
16448 2017-01-10  Tom Tromey  <tom@tromey.com>
16449
16450         * python/python.c (gdbpy_eval_from_control_command)
16451         (gdbpy_source_script, gdbpy_run_events)
16452         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16453         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16454         gdbpy_enter.
16455
16456 2017-01-10  Tom Tromey  <tom@tromey.com>
16457
16458         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16459
16460 2017-01-10  Tom Tromey  <tom@tromey.com>
16461
16462         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16463
16464 2017-01-10  Tom Tromey  <tom@tromey.com>
16465
16466         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16467         (python_on_inferior_call_pre, python_on_inferior_call_post)
16468         (python_on_memory_change, python_on_register_change)
16469         (python_inferior_exit, python_new_objfile, add_thread_object)
16470         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16471
16472 2017-01-10  Tom Tromey  <tom@tromey.com>
16473
16474         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16475         (bpfinishpy_handle_exit): Use gdbpy_enter.
16476
16477 2017-01-10  Tom Tromey  <tom@tromey.com>
16478
16479         * python/py-cmd.c (cmdpy_destroyer)
16480         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16481         gdbpy_enter.
16482
16483 2017-01-10  Tom Tromey  <tom@tromey.com>
16484
16485         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16486         gdbpy_enter.
16487         (gdbpy_breakpoint_has_cond): Likewise.
16488
16489 2017-01-10  Tom Tromey  <tom@tromey.com>
16490
16491         * python/python.c (gdbpy_enter): New constructor.
16492         (~gdbpy_enter): New destructor.
16493         (restore_python_env, ensure_python_env): Rewrite.
16494         * python/python-internal.h (gdbpy_enter): New class.
16495
16496 2017-01-10  Tom Tromey  <tom@tromey.com>
16497
16498         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16499
16500 2017-01-10  Tom Tromey  <tom@tromey.com>
16501
16502         * python/py-value.c (value_has_field, get_field_flag)
16503         (get_field_type, valpy_getitem, convert_value_from_python): Use
16504         gdbpy_ref.
16505
16506 2017-01-10  Tom Tromey  <tom@tromey.com>
16507
16508         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16509         gdbpy_ref.
16510
16511 2017-01-10  Tom Tromey  <tom@tromey.com>
16512
16513         * python/py-prettyprint.c (search_pp_list)
16514         (find_pretty_printer_from_objfiles)
16515         (find_pretty_printer_from_progspace)
16516         (find_pretty_printer_from_gdb, find_pretty_printer)
16517         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16518         gdbpy_ref.
16519
16520 2017-01-10  Tom Tromey  <tom@tromey.com>
16521
16522         * python/py-param.c (call_doc_function): Use gdbpy_ref.
16523
16524 2017-01-10  Tom Tromey  <tom@tromey.com>
16525
16526         * python/py-linetable.c (build_line_table_tuple_from_pcs)
16527         (ltpy_get_all_source_lines): Use gdbpy_ref.
16528
16529 2017-01-10  Tom Tromey  <tom@tromey.com>
16530
16531         * python/py-framefilter.c (extract_sym, extract_value)
16532         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16533         gdbpy_ref.
16534
16535 2017-01-10  Tom Tromey  <tom@tromey.com>
16536
16537         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16538
16539 2017-01-10  Tom Tromey  <tom@tromey.com>
16540
16541         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16542
16543 2017-01-10  Tom Tromey  <tom@tromey.com>
16544
16545         * python/py-function.c (convert_values_to_python, fnpy_init): Use
16546         gdbpy_ref.
16547
16548 2017-01-10  Tom Tromey  <tom@tromey.com>
16549
16550         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16551
16552 2017-01-10  Tom Tromey  <tom@tromey.com>
16553
16554         * python/py-type.c (convert_field, make_fielditem, typy_fields)
16555         (typy_range): Use gdbpy_ref.
16556
16557 2017-01-10  Tom Tromey  <tom@tromey.com>
16558
16559         * python/py-threadevent.c (create_thread_event_object): Use
16560         gdbpy_ref.
16561         * python/py-stopevent.c (create_stop_event_object): Simplify.
16562         (emit_stop_event): Use gdbpy_ref.
16563         * python/py-signalevent.c (create_signal_event_object): Use
16564         gdbpy_ref.
16565         * python/py-newobjfileevent.c (create_new_objfile_event_object)
16566         (emit_new_objfile_event, create_clear_objfiles_event_object)
16567         (emit_clear_objfiles_event): Use gdbpy_ref.
16568         * python/py-infevents.c (create_inferior_call_event_object)
16569         (create_register_changed_event_object)
16570         (create_memory_changed_event_object, emit_inferior_call_event)
16571         (emit_memory_changed_event, emit_register_changed_event): Use
16572         gdbpy_ref.
16573         * python/py-exitedevent.c (create_exited_event_object)
16574         (emit_exited_event): Use gdbpy_ref.
16575         * python/py-event.h (evpy_emit_event): Remove
16576         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16577         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16578         * python/py-continueevent.c (emit_continue_event): Use
16579         gdbpy_ref.
16580         * python/py-breakpoint.c (gdbpy_breakpoint_created)
16581         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16582         gdbpy_ref.
16583         * python/py-bpevent.c (create_breakpoint_event_object): Use
16584         gdbpy_ref.
16585
16586 2017-01-10  Tom Tromey  <tom@tromey.com>
16587
16588         * python/py-ref.h: New file.
16589
16590 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16591
16592         * cli-out.c (cli_ui_out::do_redirect): Change return type to
16593         void.
16594         * cli-out.h (cli_ui_out::do_redirect): Likewise.
16595         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16596         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16597         * ui-out.c (ui_out::redirect): Likewise.
16598         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16599         * cli/cli-logging.c (set_logging_redirect): Update call site of
16600         ui_out::redirect.
16601         (handle_redirections): Likewise.
16602         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16603         * top.c (execute_command_to_string): Likewise.
16604         * utils.c (do_ui_out_redirect_pop): Likewise.
16605
16606 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
16607
16608         * stack.c (_initialize_stack): Update "frame" command help message.
16609
16610 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
16611
16612         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16613
16614 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16615
16616         * x86-linux-nat.h: Include gdb_proc_service.h.
16617
16618 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16619
16620         * ser-base.h: Include serial.h.
16621
16622 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16623
16624         * ppc-linux-tdep.h: Include ppc-tdep.h.
16625
16626 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16627
16628         * nat/amd64-linux-siginfo.h: Include signal.h.
16629
16630 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16631
16632         * nat/aarch64-linux-hw-point.h: Include break-common.h.
16633
16634 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16635
16636         * mi/mi-parse.h: Include mi-cmds.h.
16637
16638 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16639
16640         * inf-loop.c: Don't include "target.h".
16641         * inf-loop.h: Include it here.
16642
16643 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16644
16645         * dfp.h: Include "dboulest.h" and "expression.h".
16646
16647 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16648
16649         * ax-gdb.h: Include "ax.h".
16650
16651 2017-01-06  Yao Qi  <yao.qi@linaro.org>
16652
16653         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16654         with nat/gdb_ptrace.h.
16655
16656 2017-01-05  Yao Qi  <yao.qi@linaro.org>
16657
16658         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16659         new line.
16660         (mips64_fbsd_sigframe_init): Likewise.
16661
16662 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16663
16664         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16665         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16666
16667 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16668
16669         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16670         * NEWS: Mention new FreeBSD/mips native configuration.
16671         * config/mips/fbsd.mh: New file.
16672         * configure.host: Add mips*-*-freebsd*.
16673         * mips-fbsd-nat.c: New file.
16674
16675 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
16676
16677         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16678         (ALLDEPFILES): Add mips-fbsd-tdep.c.
16679         * NEWS: Mention new FreeBSD/mips target.
16680         * configure.tgt: Add mips*-*-freebsd*.
16681         * mips-fbsd-tdep.c: New file.
16682         * mips-fbsd-tdep.h: New file.
16683
16684 2017-01-04  Yao Qi  <yao.qi@linaro.org>
16685
16686         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16687         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16688
16689 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16690
16691         Update copyright year range in all GDB files.
16692
16693 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
16694
16695         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16696
16697 For older changes see ChangeLog-2016.
16698 \f
16699 Local Variables:
16700 mode: change-log
16701 left-margin: 8
16702 fill-column: 74
16703 version-control: never
16704 coding: utf-8
16705 End: