Poison XNEW and friends for types that should use new/delete
[binutils-gdb.git] / gdb / ChangeLog
1 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * common/common-utils.h: Include poison.h.
4 (xfree): Remove declaration, add definition with static_assert.
5 * common/common-utils.c (xfree): Remove.
6 * common/poison.h (IsMallocatable): Define.
7 (IsFreeable): Define.
8 (free): Delete for non-freeable types.
9 (xnew): New.
10 (XNEW): Undef and redefine.
11 (xcnew): New.
12 (XCNEW): Undef and redefine.
13 (xdelete): New.
14 (XDELETE): Undef and redefine.
15 (xnewvec): New.
16 (XNEWVEC): Undef and redefine.
17 (xcnewvec): New.
18 (XCNEWVEC): Undef and redefine.
19 (xresizevec): New.
20 (XRESIZEVEC): Undef and redefine.
21 (xdeletevec): New.
22 (XDELETEVEC): Undef and redefine.
23 (xnewvar): New.
24 (XNEWVAR): Undef and redefine.
25 (xcnewvar): New.
26 (XCNEWVAR): Undef and redefine.
27 (xresizevar): New.
28 (XRESIZEVAR): Undef and redefine.
29
30 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * gdbthread.h (private_thread_info): Define structure type, add
33 virtual pure destructor.
34 (thread_info) <priv>: Change type to unique_ptr.
35 <private_dtor>: Remove.
36 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
37 (private_thread_info::~private_thread_info): Provide default
38 implementation.
39 (thread_info::~thread_info): Don't call private_dtor nor
40 manually free priv.
41 * aix-thread.c (private_thread_info): Rename to ...
42 (aix_thread_info): ... this.
43 (get_aix_thread_info): New.
44 (sync_threadlists): Adjust.
45 (iter_tid): Adjust.
46 (aix_thread_resume): Adjust.
47 (aix_thread_fetch_registers): Adjust.
48 (aix_thread_store_registers): Adjust.
49 (aix_thread_extra_thread_info): Adjust.
50 * darwin-nat.h (private_thread_info): Rename to ...
51 (darwin_thread_info): ... this.
52 (get_darwin_thread_info): New.
53 * darwin-nat.c (darwin_init_thread_list): Adjust.
54 (darwin_check_new_threads): Adjust.
55 (thread_info_from_private_thread_info): Adjust.
56 * linux-thread-db.c (private_thread_info): Rename to ...
57 (thread_db_thread_info): ... this, initialize fields.
58 (get_thread_db_thread_info): New.
59 <dying>: Change type to bool.
60 (update_thread_state): Adjust to type rename.
61 (record_thread): Adjust to type rename an use of unique_ptr.
62 (thread_db_pid_to_str): Likewise.
63 (thread_db_extra_thread_info): Likewise.
64 (thread_db_thread_handle_to_thread_info): Likewise.
65 (thread_db_get_thread_local_address): Likewise.
66 * nto-tdep.h (private_thread_info): Rename to ...
67 (nto_thread_info): ... this, initialize fields.
68 (get_nto_thread_info): New.
69 <name>: Change type to std::string.
70 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
71 use of unique_ptr.
72 * nto-procfs.c (update_thread_private_data_name): Adjust to
73 std::string change, allocate nto_private_thread_info with new.
74 (update_thread_private_data): Adjust to unique_ptr.
75 * remote.c (private_thread_info): Rename to ...
76 (remote_thread_info): ... this, initialize data members with
77 default values.
78 <extra, name>: Change type to std::string.
79 <thread_handle>: Change type to non-pointer.
80 (free_private_thread_info): Remove.
81 (get_private_info_thread): Rename to...
82 (get_remote_thread_info): ... this, change return type, adjust to
83 use of unique_ptr, use remote_thread_info constructor.
84 (remote_add_thread): Adjust.
85 (get_private_info_ptid): Rename to...
86 (get_remote_thread_info): ...this, change return type.
87 (remote_thread_name): Use get_remote_thread_info, adjust to
88 change to std::string.
89 (struct thread_item) <~thread_item>: Remove.
90 <thread_handle>: Make non pointer.
91 (start_thread): Adjust to thread_item::thread_handle type
92 change.
93 (remote_update_thread_list): Adjust to type name change, move
94 strings from temporary to long-lived object instead of
95 duplicating.
96 (remote_threads_extra_info): Use get_remote_thread_info.
97 (process_initial_stop_replies): Likewise.
98 (resume_clear_thread_private_info): Likewise.
99 (remote_resume): Adjust to type name change.
100 (remote_commit_resume): Use get_remote_thread_info.
101 (process_stop_reply): Adjust to type name change.
102 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
103 (remote_stopped_by_hw_breakpoint): Likewise.
104 (remote_stopped_by_watchpoint): Likewise.
105 (remote_stopped_data_address): Likewise.
106 (remote_core_of_thread): Likewise.
107 (remote_thread_handle_to_thread_info): Use
108 get_private_info_thread, adjust to thread_handle field type
109 change.
110
111 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * remote.c (struct thread_item): Add constructor, disable copy
114 construction and copy assignment, define default move
115 construction and move assignment.
116 <extra, name>: Change type to std::string.
117 <core>: Initialize.
118 <thread_handle>: Make non-pointer.
119 (thread_item_t): Remove typedef.
120 (DEF_VEC_O(thread_item_t)): Remove.
121 (threads_listing_context) <contains_thread>: New method.
122 <remove_thread>: New method.
123 <items>: Change type to std::vector.
124 (clear_threads_listing_context): Remove.
125 (threads_listing_context_remove): Remove.
126 (remote_newthread_step): Use thread_item constructor, adjust to
127 change to std::vector.
128 (start_thread): Use thread_item constructor, adjust to change to
129 std::vector.
130 (end_thread): Adjust to change to std::vector and std::string.
131 (remote_get_threads_with_qthreadinfo): Use thread_item
132 constructor, adjust to std::vector.
133 (remote_update_thread_list): Adjust to change to std::vector and
134 std::string, use threads_listing_context methods.
135 (remove_child_of_pending_fork): Adjust.
136 (remove_new_fork_children): Adjust.
137 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
138 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
139 * unittests/rsp-low-selftests.c: New file.
140 * common/rsp-low.h: Include common/byte-vector.h.
141 (hex2bin): New overload.
142 * common/rsp-low.c (hex2bin): New overload.
143
144 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
145
146 * inferior.h (private_inferior): Define structure type, add
147 virtual pure destructor.
148 (inferior) <priv>: Change type to unique_ptr.
149 * inferior.c (private_inferior::~private_inferior): Provide
150 default implementation.
151 (inferior::~inferior): Don't free priv field.
152 (exit_inferior_1): Likewise.
153 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
154 (darwin_exception_info): Remove typedef.
155 (DEF_VEC_O (darwin_thread_t)); Remove.
156 (private_inferior): Rename to ...
157 (darwin_private_inferior): ... this, extend private_inferior.
158 (get_darwin_inferior): New.
159 <threads>: Change type to std::vector of darwin_thread_t pointers.
160 * darwin-nat.c (darwin_check_new_threads): Adjust.
161 (find_inferior_task_it): Adjust.
162 (darwin_find_thread); Adjust.
163 (darwin_suspend_inferior): Adjust.
164 (darwin_resume_inferior): Adjust.
165 (darwin_find_new_inferior): Adjust.
166 (darwin_decode_notify_message): Adjust.
167 (darwin_send_reply): Adjust.
168 (darwin_resume_inferior_threads): Adjust.
169 (darwin_suspend_inferior_threads): Adjust.
170 (darwin_decode_message): Adjust.
171 (darwin_wait): Adjust.
172 (darwin_interrupt): Adjust.
173 (darwin_deallocate_threads): Adjust.
174 (darwin_mourn_inferior): Adjust, don't free private data.
175 (darwin_reply_to_all_pending_messages): Adjust.
176 (darwin_stop_inferior): Adjust.
177 (darwin_setup_exceptions): Adjust.
178 (darwin_kill_inferior): Adjust.
179 (darwin_setup_request_notification): Adjust.
180 (darwin_attach_pid): Adjust.
181 (darwin_init_thread_list): Adjust.
182 (darwin_setup_fake_stop_event): Adjust.
183 (darwin_attach): Adjust.
184 (darwin_detach): Adjust.
185 (darwin_xfer_partial): Adjust.
186 (set_enable_mach_exceptions): Adjust.
187 (darwin_pid_to_exec_file): Adjust.
188 (darwin_get_ada_task_ptid): Adjust.
189 * darwin-nat-info.c (get_task_from_args): Adjust.
190 (info_mach_ports_command): Adjust.
191 (info_mach_region_command): Adjust.
192 (info_mach_exceptions_command): Adjust.
193 * remote.c (private_inferior): Rename to ...
194 (remote_private_inferior): ... this, initialize fields.
195 (get_remote_inferior); New.
196 (remote_commit_resume): Use get_remote_inferior.
197 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
198
199 2017-11-24 Pedro Alves <palves@redhat.com>
200
201 * NEWS: Mention linespecs and explicit locations, and completion
202 improvements.
203
204 2017-11-24 Yao Qi <yao.qi@linaro.org>
205
206 * regcache.c (regcache::dump): Remove footnote_register_size.
207
208 2017-11-24 Yao Qi <yao.qi@linaro.org>
209
210 * regcache.c (cooked_read_test): Add more test for readonly
211 regcache.
212
213 2017-11-24 Yao Qi <yao.qi@linaro.org>
214
215 * gdbarch-selftests.c (test_target_has_registers): Move it to
216 target.c.
217 (test_target_has_stack): Likewise.
218 (test_target_has_memory): Likewise.
219 (test_target_prepare_to_store): Likewise.
220 (test_target_store_registers): Likewise.
221 (test_target_ops): Likewise.
222 * regcache.c: Include selftest-arch.h and gdbthread.h.
223 (target_ops_no_register): New class.
224 (test_target_fetch_registers): New.
225 (test_target_store_registers): New.
226 (test_target_xfer_partial): New.
227 (readwrite_regcache): New.
228 (cooked_read_test): New.
229 (_initialize_regcache): Register the test.
230 * target.c: (test_target_has_registers): Moved from
231 gdbarch-selftests.c.
232 (test_target_has_stack): Likewise.
233 (test_target_has_memory): Likewise.
234 (test_target_prepare_to_store): Likewise.
235 (test_target_store_registers): Likewise.
236 * target.h (test_target_ops): New class.
237
238 2017-11-24 Alan Hayward <alan.hayward@arm.com>
239
240 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
241 selftest.
242
243 2017-11-24 Alan Hayward <alan.hayward@arm.com>
244
245 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
246 * arch/aarch64.c (aarch64_create_target_description): Create
247 new target description.
248 * features/Makefile: Add new files.
249 * features/aarch64.c: Remove file.
250 * features/aarch64-core.c: New autogenerated file.
251 * features/aarch64-fpu.c: New autogenerated file.
252 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
253
254 2017-11-24 Alan Hayward <alan.hayward@arm.com>
255
256 * Makefile.in: Add new files.
257 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
258 aarch64_read_description.
259 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
260 Call aarch64_read_description.
261 * aarch64-tdep.c (aarch64_read_description): New function.
262 (aarch64_gdbarch_init): Call aarch64_read_description.
263 * aarch64-tdep.h (aarch64_read_description): New function.
264 * arch/aarch64.c: New file.
265 * configure.tgt: Add new files.
266
267 2017-11-24 Yao Qi <yao.qi@linaro.org>
268
269 * mi/mi-main.c (register_changed_p): Update.
270 * value.c (value_contents_bits_eq): Change return type.
271 (value_contents_eq): Likewise.
272 * value.h: Update comments.
273
274 2017-11-24 Yao Qi <yao.qi@linaro.org>
275
276 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
277 local 'changed'. Remove error.
278 (register_changed_p): Change return type to bool.
279
280 2017-11-24 Yao Qi <yao.qi@linaro.org>
281
282 * arch/tic6x.c: New file.
283 * arch/tic6x.h: New file.
284 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
285 tic6x-core.xml and tic6x-gp.xml.
286 * features/tic6x-c6xp.c: Generated.
287 * features/tic6x-core.c: Generated.
288 * features/tic6x-gp.c: Generated.
289 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
290 "tic6x-".
291
292 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
293
294 * mi/mi-main.c (list_available_thread_groups): Change map value
295 type to std::vector.
296
297 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
298
299 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
300
301 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
302
303 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
304 back to...
305 <children_requested>: ... this.
306 (varobj_get_num_children, varobj_update): Adjust.
307
308 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
309
310 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
311 (ada_value_has_mutated): Likewise.
312 * c-varobj.c (varobj_is_anonymous_child): Likewise.
313 (c_is_path_expr_parent): Likewise.
314 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
315 (mi_cmd_var_set_frozen): Likewise.
316 (mi_cmd_var_update_iter): Likewise.
317 (mi_cmd_var_update): Likewise.
318 * varobj.c (pretty_printing): Likewise.
319 (varobj_enable_pretty_printing): Likewise.
320 (struct varobj_root) <floating, is_valid>: Likewise.
321 (struct varobj_dynamic) <children_requested>: Likewise.
322 (delete_variable): Likewise.
323 (delete_variable_1): Likewise.
324 (install_variable): Likewise.
325 (update_type_if_necessary): Likewise.
326 (install_new_value): Likewise.
327 (value_of_root): Likewise.
328 (is_root_p): Likewise.
329 (varobj_create): Likewise.
330 (varobj_delete): Likewise.
331 (varobj_has_more): Likewise.
332 (varobj_set_frozen): Likewise.
333 (varobj_get_frozen): Likewise.
334 (install_dynamic_child): Likewise.
335 (dynamic_varobj_has_child_method): Likewise.
336 (update_dynamic_varobj_children): Likewise.
337 (varobj_get_num_children): Likewise.
338 (varobj_list_children): Likewise.
339 (is_path_expr_parent): Likewise.
340 (varobj_default_is_path_expr_parent): Likewise.
341 (varobj_is_dynamic_p): Likewise.
342 (varobj_set_value): Likewise.
343 (varobj_value_has_mutated): Likewise.
344 (varobj_update): Likewise.
345 (check_scope): Likewise.
346 (value_of_root_1): Likewise.
347 (varobj_value_get_print_value): Likewise.
348 (varobj_editable_p): Likewise.
349 (varobj_value_is_changeable_p): Likewise.
350 (varobj_floating_p): Likewise.
351 (varobj_default_value_is_changeable_p): Likewise.
352 (varobj_invalidate_iter): Likewise.
353 * varobj.h (struct varobj_update_result) <type_changed,
354 children_changed, changed, value_installed>: Likewise.
355 (struct varobj) <updated, frozen, not_fetched>: Likewise.
356 (struct lang_varobj_ops) <value_is_changeable_p,
357 value_has_mutated, is_path_expr_parent>: Likewise.
358 (varobj_delete): Likewise.
359 (varobj_set_frozen): Likewise.
360 (varobj_get_frozen): Likewise.
361 (varobj_set_value): Likewise.
362 (varobj_update): Likewise.
363 (varobj_editable_p): Likewise.
364 (varobj_floating_p): Likewise.
365 (varobj_has_more): Likewise.
366 (varobj_is_dynamic_p): Likewise.
367 (varobj_default_value_is_changeable_p): Likewise.
368 (varobj_value_is_changeable_p): Likewise.
369 (varobj_is_anonymous_child): Likewise.
370 (varobj_default_is_path_expr_parent): Likewise.
371
372 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
373
374 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
375 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
376 <type_str>: Convert to 'std::string'.
377 <expr>: Convert to 'expression_up'.
378 (dtrace_probe_arg_s): Delete type and VEC.
379 (dtrace_probe_enabler_s): Likewise.
380 (struct dtrace_probe): Replace by...
381 (class dtrace_static_probe_ops): ...this and...
382 (class dtrace_probe): ...this.
383 (dtrace_probe_is_linespec): Rename to...
384 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
385 to reflect change.
386 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
387 Adjust code. Create new instance of 'dtrace_probe'.
388 (dtrace_build_arg_exprs): Rename to...
389 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
390 reflect change.
391 (dtrace_get_probes): Rename to...
392 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
393 to reflect change.
394 (dtrace_get_arg): Rename to...
395 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
396 reflect change.
397 (dtrace_probe_is_enabled): Rename to...
398 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
399 change.
400 (dtrace_get_probe_address): Rename to...
401 (dtrace_probe::get_relocated_address): ...this. Adjust code
402 to reflect change.
403 (dtrace_get_probe_argument_count): Rename to...
404 (dtrace_probe::get_argument_count): ...this. Adjust code to
405 reflect change.
406 (dtrace_can_evaluate_probe_arguments): Rename to...
407 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
408 to reflect change.
409 (dtrace_evaluate_probe_argument): Rename to...
410 (dtrace_probe::evaluate_argument): ...this. Adjust code to
411 reflect change.
412 (dtrace_compile_to_ax): Rename to...
413 (dtrace_probe::compile_to_ax): ...this. Adjust code to
414 reflect change.
415 (dtrace_probe_destroy): Delete.
416 (dtrace_type_name): Rename to...
417 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
418 reflect change.
419 (dtrace_probe::get_static_ops): New method.
420 (dtrace_gen_info_probes_table_header): Rename to...
421 (dtrace_static_probe_ops::gen_info_probes_table_header):
422 ...this. Adjust code to reflect change.
423 (dtrace_gen_info_probes_table_values): Rename to...
424 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
425 code to reflect change.
426 (dtrace_enable_probe): Rename to...
427 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
428 change.
429 (dtrace_disable_probe): Rename to...
430 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
431 change.
432 (struct probe_ops dtrace_probe_ops): Delete.
433 (info_probes_dtrace_command): Call 'info_probes_for_spops'
434 instead of 'info_probes_for_ops'.
435 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
436 of 'all_probe_ops'.
437
438 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
439 Simon Marchi <simark@simark.ca>
440
441 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
442 variable.
443 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
444 <aexpr>: Change type to 'expression_up'.
445 (stap_probe_arg_s): Delete type and VEC.
446 (struct stap_probe): Delete. Replace by...
447 (class stap_static_probe_ops): ...this and...
448 (class stap_probe): ...this. Rename variables to add 'm_'
449 prefix. Do not use 'union' for arguments anymore.
450 (stap_get_expected_argument_type): Receive probe name instead
451 of 'struct stap_probe'. Adjust code.
452 (stap_parse_probe_arguments): Rename to...
453 (stap_probe::parse_arguments): ...this. Adjust code to
454 reflect change.
455 (stap_get_probe_address): Rename to...
456 (stap_probe::get_relocated_address): ...this. Adjust code
457 to reflect change.
458 (stap_get_probe_argument_count): Rename to...
459 (stap_probe::get_argument_count): ...this. Adjust code
460 to reflect change.
461 (stap_get_arg): Rename to...
462 (stap_probe::get_arg_by_number'): ...this. Adjust code to
463 reflect change.
464 (can_evaluate_probe_arguments): Rename to...
465 (stap_probe::can_evaluate_arguments): ...this. Adjust code
466 to reflect change.
467 (stap_evaluate_probe_argument): Rename to...
468 (stap_probe::evaluate_argument): ...this. Adjust code
469 to reflect change.
470 (stap_compile_to_ax): Rename to...
471 (stap_probe::compile_to_ax): ...this. Adjust code to
472 reflect change.
473 (stap_probe_destroy): Delete.
474 (stap_modify_semaphore): Adjust comment.
475 (stap_set_semaphore): Rename to...
476 (stap_probe::set_semaphore): ...this. Adjust code to reflect
477 change.
478 (stap_clear_semaphore): Rename to...
479 (stap_probe::clear_semaphore): ...this. Adjust code to
480 reflect change.
481 (stap_probe::get_static_ops): New method.
482 (handle_stap_probe): Adjust code to create instance of
483 'stap_probe'.
484 (stap_get_probes): Rename to...
485 (stap_static_probe_ops::get_probes): ...this. Adjust code to
486 reflect change.
487 (stap_probe_is_linespec): Rename to...
488 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
489 reflect change.
490 (stap_type_name): Rename to...
491 (stap_static_probe_ops::type_name): ...this. Adjust code to
492 reflect change.
493 (stap_gen_info_probes_table_header): Rename to...
494 (stap_static_probe_ops::gen_info_probes_table_header):
495 ...this. Adjust code to reflect change.
496 (stap_gen_info_probes_table_values): Rename to...
497 (stap_probe::gen_info_probes_table_values): ...this. Adjust
498 code to reflect change.
499 (struct probe_ops stap_probe_ops): Delete.
500 (info_probes_stap_command): Use 'info_probes_for_spops'
501 instead of 'info_probes_for_ops'.
502 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
503 of 'all_probe_ops'.
504
505 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
506
507 * break-catch-throw.c (fetch_probe_arguments): Use
508 'probe.prob' instead of 'probe.probe'.
509 * breakpoint.c (create_longjmp_master_breakpoint): Call
510 'can_evaluate_arguments' and 'get_relocated_address' methods
511 from probe.
512 (create_exception_master_breakpoint): Likewise.
513 (add_location_to_breakpoint): Use 'sal->prob' instead of
514 'sal->probe'.
515 (bkpt_probe_insert_location): Call 'set_semaphore' method from
516 probe.
517 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
518 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
519 of 'probe_ops'.
520 (probe_key_free): Call 'delete' on probe.
521 (check_exception_resume): Use 'probe.prob' instead of
522 'probe.probe'.
523 * location.c (string_to_event_location_basic): Call
524 'probe_linespec_to_static_ops'.
525 * probe.c (class any_static_probe_ops): New class.
526 (any_static_probe_ops any_static_probe_ops): New variable.
527 (parse_probes_in_pspace): Receive 'static_probe_ops' as
528 argument. Adjust code to reflect change.
529 (parse_probes): Use 'static_probe_ops' instead of
530 'probe_ops'. Adjust code to reflect change.
531 (find_probes_in_objfile): Call methods to get name and
532 provider from probe.
533 (find_probe_by_pc): Use 'result.prob' instead of
534 'result.probe'. Call 'get_relocated_address' method from
535 probe.
536 (collect_probes): Adjust comment and argument list to receive
537 'static_probe_ops' instead of 'probe_ops'. Adjust code to
538 reflect change. Call necessary methods from probe.
539 (compare_probes): Call methods to get name and provider from
540 probes.
541 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
542 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
543 adjust code accordingly.
544 (print_ui_out_not_applicables): Likewise.
545 (info_probes_for_ops): Rename to...
546 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
547 as argument instead of 'probe_ops'. Adjust code. Call
548 necessary methods from probe.
549 (info_probes_command): Use 'info_probes_for_spops'.
550 (enable_probes_command): Pass correct argument to
551 'collect_probes'. Call methods from probe.
552 (disable_probes_command): Likewise.
553 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
554 (get_probe_argument_count): Move to
555 'any_static_probe_ops::get_argument_count'.
556 (can_evaluate_probe_arguments): Move to
557 'any_static_probe_ops::can_evaluate_arguments'.
558 (evaluate_probe_argument): Move to
559 'any_static_probe_ops::evaluate_argument'.
560 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
561 'probe.probe'.
562 (probe_linespec_to_ops): Rename to...
563 (probe_linespec_to_static_ops): ...this. Adjust code.
564 (probe_any_is_linespec): Rename to...
565 (any_static_probe_ops::is_linespec): ...this.
566 (probe_any_get_probes): Rename to...
567 (any_static_probe_ops::get_probes): ...this.
568 (any_static_probe_ops::type_name): New method.
569 (any_static_probe_ops::gen_info_probes_table_header): New
570 method.
571 (compute_probe_arg): Use 'pc_probe.prob' instead of
572 'pc_probe.probe'. Call methods from probe.
573 (compile_probe_arg): Likewise.
574 (std::vector<const probe_ops *> all_probe_ops): Delete.
575 (std::vector<const static_probe_ops *> all_static_probe_ops):
576 New variable.
577 (_initialize_probe): Use 'all_static_probe_ops' instead of
578 'all_probe_ops'.
579 * probe.h (struct info_probe_column) <field_name>: Delete
580 extraneous newline
581 (info_probe_column_s): Delete type and VEC.
582 (struct probe_ops): Delete. Replace with...
583 (class static_probe_ops): ...this and...
584 (clas probe): ...this.
585 (struct bound_probe) <bound_probe>: Delete extraneous
586 newline. Adjust constructor to receive 'probe' instead of
587 'struct probe'.
588 <probe>: Rename to...
589 <prob>: ...this. Delete extraneous newline.
590 <objfile>: Delete extraneous newline.
591 (register_probe_ops): Delete unused prototype.
592 (info_probes_for_ops): Rename to...
593 (info_probes_for_spops): ...this. Adjust comment.
594 (get_probe_address): Move to 'probe::get_address'.
595 (get_probe_argument_count): Move to
596 'probe::get_argument_count'.
597 (can_evaluate_probe_arguments): Move to
598 'probe::can_evaluate_arguments'.
599 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
600 * solib-svr4.c (struct svr4_info): Adjust comment.
601 (struct probe_and_action) <probe>: Rename to...
602 <prob>: ...this.
603 (register_solib_event_probe): Receive 'probe' instead of
604 'struct probe' as argument. Use 'prob' instead of 'probe'
605 when applicable.
606 (solib_event_probe_action): Call 'get_argument_count' method
607 from probe. Adjust comment.
608 (svr4_handle_solib_event): Adjust comment. Call
609 'evaluate_argument' method from probe.
610 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
611 from probe.
612 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
613 'struct probe'. Call 'can_evaluate_arguments' from probe.
614 * symfile.h: Forward declare 'class probe' instead of 'struct
615 probe'.
616 * symtab.h: Likewise.
617 (struct symtab_and_line) <probe>: Rename to...
618 <prob>: ...this.
619 * tracepoint.c (start_tracing): Use 'prob' when applicable.
620 Call probe methods.
621 (stop_tracing): Likewise.
622
623 2017-11-22 Joel Brobecker <brobecker@adacore.com>
624
625 * ravenscar-thread.c (ravenscar_inferior_created): Remove
626 trailing newline at end of string in call to warning.
627
628 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
629
630 * osdata.h: Include vector isntead of vec.h.
631 (osdata_column_s): Remove typedef.
632 (struct osdata_column): Add constructor.
633 <name, value>: Change type to std::string.
634 (DEF_VEC_O (osdata_column_s)): Remove.
635 (osdata_item_s): Remove typedef.
636 (struct osdata_item) <columns>: Change type to std::vector.
637 (DEF_VEC_O (osdata_item_s)): Remove.
638 (struct osdata): Add constructor.
639 <type>: Change type to std::string.
640 <items>: Change type to std::vector.
641 (osdata_p): Remove typedef.
642 (DEF_VEC_P (osdata_p)): Remove.
643 (osdata_parse): Return a unique_ptr.
644 (osdata_free): Remove.
645 (make_cleanup_osdata_free): Remove.
646 (get_osdata): Return a unique_ptr.
647 (get_osdata_column): Return pointer to std::string, take a
648 reference to osdata_item as parameter.
649 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
650 unique_ptr.
651 <property_name>: Change type to std::string.
652 (osdata_start_osdata): Allocate osdata with new and adjust.
653 (osdata_start_item): Adjust.
654 (osdata_start_column): Adjust.
655 (osdata_end_column): Adjust.
656 (clear_parsing_data): Remove.
657 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
658 (osdata_item_clear): Remove.
659 (get_osdata): return a unique_ptr and adjust.
660 (get_osdata_column): Return a pointer to std::string and adjust.
661 (info_osdata): Adjust.
662 * mi/mi-main.c: Include <map>.
663 (free_vector_of_osdata_items): Remove.
664 (list_available_thread_groups): Adjust, use std::map instead of
665 splay tree.
666
667 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
668
669 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
670 case in switch.
671
672 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
675
676 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * varobj.h (struct varobj_update_result): Add constructor, add
679 move constructor, disable copy and assign, initialize fields.
680 <newobj>: Change type to std::vector.
681 (varobj_update): Return std::vector.
682 * varobj.c (install_dynamic_child): Change VEC parameters to
683 std::vector and adjust.
684 (update_dynamic_varobj_children): Likewise.
685 (varobj_update): Return std::vector and adjust.
686 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
687
688 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * varobj.h (struct varobj) <parent>: Remove const.
691 <children>: Change type to std::vector.
692 (varobj_list_children): Return std::vector const reference.
693 (varobj_restrict_range): Change parameter type to std::vector
694 const reference.
695 * varobj.c (varobj_has_more): Adjust.
696 (varobj_restrict_range): Change parameter type to std::vector
697 const reference and adjust.
698 (install_dynamic_child): Adjust.
699 (update_dynamic_varobj_children): Adjust.
700 (varobj_list_children): Return std::vector const reference and
701 adjust.
702 (varobj_add_child): Adjust.
703 (update_type_if_necessary): Adjust.
704 (varobj_update): Adjust.
705 (delete_variable_1): Adjust.
706 * ada-varobj.c (ada_value_has_mutated): Adjust.
707 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
708
709 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
710
711 * varobj.h (struct varobj): Add constructor and destructor,
712 initialize fields.
713 * varobj.c (struct varobj_root): Initialize fields.
714 (struct varobj_dynamic): Initialize fields.
715 (varobj_create): Use unique_ptr instead of cleanup. Create
716 varobj with new instead of new_root_variable.
717 (delete_variable_1): Free variable with delete instead of
718 free_variable.
719 (create_child_with_value): Create variable with new instead of
720 new_variable.
721 (varobj::varobj): New.
722 (varobj::~varobj): New (body mostly coming from free_variable).
723 (new_variable): Remove.
724 (free_variable): Remove.
725 (do_free_variable_cleanup): Remove.
726 (make_cleanup_free_variable): Remove.
727
728 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
729
730 * core-regset.c: Remove file.
731 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
732
733 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
734
735 * NEWS: Document use of GNU MPFR.
736 * README: Likewise.
737
738 * Makefile.in (LIBMPFR): Add define.
739 (CLIBS): Add $(LIBMPFR).
740 * configure.ac: Add --with-mpfr configure option.
741 * configure: Regenerate.
742 * config.in: Regenerate.
743
744 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
745 (class mpfr_float_ops): New type.
746 (mpfr_float_ops::from_target): Two new overloaded functions.
747 (mpfr_float_ops::to_target): Likewise.
748 (mpfr_float_ops::to_string): New function.
749 (mpfr_float_ops::from_string): Likewise.
750 (mpfr_float_ops::to_longest): Likewise.
751 (mpfr_float_ops::from_longest): Likewise.
752 (mpfr_float_ops::from_ulongest): Likewise.
753 (mpfr_float_ops::to_host_double): Likewise.
754 (mpfr_float_ops::from_host_double): Likewise.
755 (mpfr_float_ops::convert): Likewise.
756 (mpfr_float_ops::binop): Likewise.
757 (mpfr_float_ops::compare): Likewise.
758 (get_target_float_ops): Use mpfr_float_ops if available.
759
760 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
761
762 * target-float.c: Do not include <math.h>.
763 Include <cmath> and <limits>.
764 (DOUBLEST): Do not define.
765 (class target_float_ops): New type.
766 (class host_float_ops): New templated type.
767 (class decimal_float_ops): New type.
768
769 (floatformat_to_doublest): Rename to ...
770 (host_float_ops<T>::from_target): ... this. Use template type T
771 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
772 (host_float_ops<T>::from_target): New overload using a type argument.
773 (floatformat_from_doublest): Rename to ...
774 (host_float_ops<T>::to_target): ... this. Use template type T
775 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
776 (host_float_ops<T>::to_target): New overload using a type argument.
777 (floatformat_printf_format): New function.
778 (struct printf_length_modifier): New templated type.
779 (floatformat_to_string): Rename to ...
780 (host_float_ops<T>::to_string): ... this. Use type instead of
781 floatformat argument. Use floatformat_printf_format and
782 printf_length_modifier. Remove special handling of invalid numbers,
783 infinities and NaN (moved to target_float_to_string).
784 (struct scanf_length_modifier): New templated type.
785 (floatformat_from_string): Rename to ...
786 (host_float_ops<T>::from_string): ... this. Use type instead of
787 floatformat argument. Use scanf_length_modifier.
788 (floatformat_to_longest): Rename to ...
789 (host_float_ops<T>::to_longest): ... this. Use type instead of
790 floatformat argument. Handle out-of-range values deterministically.
791 (floatformat_from_longest): Rename to ...
792 (host_float_ops<T>::from_longest): ... this. Use type instead of
793 floatformat argument.
794 (floatformat_from_ulongest): Rename to ...
795 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
796 floatformat argument.
797 (floatformat_to_host_double): Rename to ...
798 (host_float_ops<T>::to_host_double): ... this. Use type instead of
799 floatformat argument.
800 (floatformat_from_host_double): Rename to ...
801 (host_float_ops<T>::from_host_double): ... this. Use type instead of
802 floatformat argument.
803 (floatformat_convert): Rename to ...
804 (host_float_ops<T>::convert): ... this. Use type instead of
805 floatformat arguments. Remove handling of no-op conversions.
806 (floatformat_binop): Rename to ...
807 (host_float_ops<T>::binop): ... this. Use type instead of
808 floatformat arguments.
809 (floatformat_compare): Rename to ...
810 (host_float_ops<T>::compare): ... this. Use type instead of
811 floatformat arguments.
812
813 (match_endianness): Use type instead of length/byte_order arguments.
814 (set_decnumber_context): Likewise.
815 (decimal_from_number): Likewise. Update calls.
816 (decimal_to_number): Likewise.
817 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
818 (decimal_float_ops::to_host_double): New dummy function.
819 (decimal_float_ops::from_host_double): Likewise.
820 (decimal_to_string): Rename to ...
821 (decimal_float_ops::to_string): ... this. Use type instead of
822 length/byte_order arguments. Update calls.
823 (decimal_from_string): Rename to ...
824 (decimal_float_ops::from_string): ... this. Use type instead of
825 length/byte_order arguments. Update calls.
826 (decimal_from_longest): Rename to ...
827 (decimal_float_ops::from_longest): ... this. Use type instead of
828 length/byte_order arguments. Update calls.
829 (decimal_from_ulongest): Rename to ...
830 (decimal_float_ops::from_ulongest): ... this. Use type instead of
831 length/byte_order arguments. Update calls.
832 (decimal_to_longest): Rename to ...
833 (decimal_float_ops::to_longest): ... this. Use type instead of
834 length/byte_order arguments. Update calls.
835 (decimal_binop): Rename to ...
836 (decimal_float_ops::binop): ... this. Use type instead of
837 length/byte_order arguments. Update calls.
838 (decimal_compare): Rename to ...
839 (decimal_float_ops::compare): ... this. Use type instead of
840 length/byte_order arguments. Update calls.
841 (decimal_convert): Rename to ...
842 (decimal_float_ops::convert): ... this. Use type instead of
843 length/byte_order arguments. Update calls.
844
845 (target_float_same_category_p): New function.
846 (target_float_same_format_p): Likewise.
847 (target_float_format_length): Likewise.
848 (enum target_float_ops_kind): New type.
849 (get_target_float_ops_kind): New function.
850 (get_target_float_ops): Three new overloaded functions.
851
852 (target_float_is_zero): Update call.
853 (target_float_to_string): Add special handling of invalid numbers,
854 infinities and NaN (moved from floatformat_to_string). Use
855 target_float_ops callback.
856 (target_float_from_string): Use target_float_ops callback.
857 (target_float_to_longest): Likewise.
858 (target_float_from_longest): Likewise.
859 (target_float_from_ulongest): Likewise.
860 (target_float_to_host_double): Likewise.
861 (target_float_from_host_double): Likewise.
862 (target_float_convert): Add special case for no-op conversions.
863 Use target_float_ops callback.
864 (target_float_binop): Use target_float_ops callback.
865 (target_float_compare): Likewise.
866
867 2017-11-22 Yao Qi <yao.qi@linaro.org>
868
869 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
870
871 2017-11-22 Yao Qi <yao.qi@linaro.org>
872
873 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
874 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
875
876 2017-11-21 Jerome Guitton <guitton@adacore.com>
877
878 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
879 with event ptid from the lower layer before doing the
880 ravenscar-specific update.
881
882 2017-11-21 Joel Brobecker <brobecker@adacore.com>
883
884 * ravenscar-thread.c (is_ravenscar_task): Also verify that
885 the ptid's TID is nonzero.
886
887 2017-11-21 Joel Brobecker <brobecker@adacore.com>
888
889 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
890 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
891 Make non-static. Change return type to char *. Adjust code
892 accordingly. Rewrite the function's documentation.
893 (read_atcb): Adjust call to get_tcb_types_info accordingly.
894 * ravenscar-thread.c (ravenscar_inferior_created): Check that
895 we have enough debugging information in the runtime to support
896 Ada task debugging before we enable the ravenscar-thread layer.
897
898 2017-11-21 Joel Brobecker <brobecker@adacore.com>
899
900 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
901 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
902 * ravenscar-thread.c: Add into comment.
903 (base_magic_null_ptid): Delete.
904 (base_ptid): Change documentation.
905 (ravenscar_active_task): Renames ravenscar_running_thread.
906 All callers updated throughout.
907 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
908 (ravenscar_task_is_currently_active): Likewise.
909 (get_base_thread_from_ravenscar_task): Ditto.
910 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
911 (ravenscar_runtime_initialized): Likewise.
912 (get_running_thread_id): Add new parameter "cpu". Adjust
913 implementation to handle this new parameter.
914 (ravenscar_fetch_registers): Small adjustment to use
915 is_ravenscar_task and ravenscar_task_is_currently_active in
916 order to decide whether to use the target beneath or this
917 module's arch_ops.
918 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
919 (ravenscar_stopped_by_sw_breakpoint): Use
920 get_base_thread_from_ravenscar_task to get the underlying
921 thread, rather than using base_ptid.
922 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
923 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
924 Likewise.
925 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
926
927 2017-11-21 Joel Brobecker <brobecker@adacore.com>
928
929 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
930 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
931 (get_tcb_types_info): Set fieldnos.base_cpu.
932 (read_atcb): Set task_info->base_cpu.
933 (info_task): Print "Base CPU" info if set by runtime.
934
935 2017-11-21 Joel Brobecker <brobecker@adacore.com>
936
937 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
938 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
939 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
940 New functions.
941 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
942 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
943 to_stopped_data_address and to_core_of_thread fields of
944 ravenscar_ops.
945
946 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
947
948 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
949 (struct gdbarch_tdep): New member long_double_abi.
950 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
951 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
952 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
953 format depending on long_double_abi tdep member.
954 (ppc_floatformat_for_type): Handle __ibm128 type.
955
956 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
957
958 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
959
960 2017-11-21 Pedro Alves <palves@redhat.com>
961
962 * dwarf2read.c (mapped_index::find_name_components_bounds)
963 <completion mode, upper bound>: Use std::lower_bound instead of
964 std::upper_bound.
965 (test_mapped_index_find_name_component_bounds): Remove incorrect
966 "t1_fund" from expected symbols.
967
968 2017-11-21 Pedro Alves <palves@redhat.com>
969
970 * dwarf2read.c (mapped_index::name_components_casing): New field.
971 (mapped_index) <build_name_components,
972 find_name_components_bounds): Declare new methods.
973 (mapped_index::find_name_components_bounds)
974 (mapped_index::build_name_components): New methods, factored out
975 from dw2_expand_symtabs_matching_symbol.
976 (check_find_bounds_finds)
977 (test_mapped_index_find_name_component_bounds): New.
978 (run_test): Rename to ...
979 (test_dw2_expand_symtabs_matching_symbol): ... this.
980 (run_test): Reimplement.
981
982 2017-11-21 Pedro Alves <palves@redhat.com>
983
984 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
985 (symbol_end): Use cp_ident_is_alnum.
986 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
987 * dwarf2read.c (make_sort_after_prefix_name): New function.
988 (dw2_expand_symtabs_matching_symbol): Use it.
989 (test_symbols): Add more symbols.
990 (run_test): Add tests.
991
992 2017-11-17 Tom Tromey <tom@tromey.com>
993
994 * symtab.h (enum symbol_subclass_kind): New.
995 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
996 Remove.
997 <subclass>: New member.
998 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
999 * rust-lang.c (rust_get_trait_object_pointer): Update.
1000 * dwarf2read.c (read_func_scope): Update.
1001 (read_variable): Update.
1002
1003 2017-11-17 Tom Tromey <tom@tromey.com>
1004
1005 * dwarf2read.c (read_func_scope): Update.
1006 * symtab.h (struct template_symbol): Derive from symbol.
1007 <base>: Remove.
1008
1009 2017-11-17 Tom Tromey <tom@tromey.com>
1010
1011 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1012 (struct rust_vtable_symbol): New.
1013 (find_symbol_at_address): Declare.
1014 * symtab.c (find_symbol_at_address): New function.
1015 * symfile.h (struct quick_symbol_functions)
1016 <find_compunit_symtab_by_address>: New member.
1017 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1018 function.
1019 (debug_sym_quick_functions): Link to
1020 debug_qf_find_compunit_symtab_by_address.
1021 * rust-lang.c (rust_get_trait_object_pointer): New function.
1022 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1023 rust_get_trait_object_pointer.
1024 * psymtab.c (psym_relocate): Clear psymbol_map.
1025 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1026 functions.
1027 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1028 * objfiles.h (struct objfile) <psymbol_map>: New member.
1029 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1030 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1031 (rust_containing_type, read_variable): New functions.
1032
1033 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1036
1037 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1038
1039 * common/filestuff.c: Include <algorithm>.
1040 (open_fds): Change type to std::vector<int>.
1041 (do_mark_open_fd): Adjust.
1042 (unmark_fd_no_cloexec): Adjust.
1043 (do_close): Adjust.
1044
1045 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1046
1047 * breakpoint.c (output_thread_groups): Take an std::vector.
1048 (print_one_breakpoint_location): Adjust.
1049
1050 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1051
1052 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1053 (ada_evaluate_subexp_for_cast): New function.
1054 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1055 ada_evaluate_subexp_for_cast.
1056 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1057 eval_skip_value.
1058 * eval.c (evaluate_var_value): Make non-static.
1059 (evaluate_var_msym_value, eval_skip_value): Likewise.
1060 * value.h (evaluate_var_value, evaluate_var_msym_value)
1061 (eval_skip_value): Declare.
1062
1063 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1064
1065 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1066 Update all callers.
1067
1068 2017-11-16 Pedro Alves <palves@redhat.com>
1069
1070 * python/py-unwind.c (pyuw_sniffer): Translate
1071 PyExc_KeyboardInterrupt to a GDB Quit exception.
1072
1073 2017-11-16 Pedro Alves <palves@redhat.com>
1074
1075 * infrun.c (resume_cleanups): Delete.
1076 (resume): No longer install a resume_cleanups cleanup nor call
1077 QUIT.
1078 (proceed): Pass the terminal to the inferior.
1079 (keep_going_pass_signal): No longer install a resume_cleanups
1080 cleanup.
1081
1082 2017-11-16 Pedro Alves <palves@redhat.com>
1083
1084 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1085 if the prompt is blocked.
1086
1087 2017-11-16 Pedro Alves <palves@redhat.com>
1088
1089 * breakpoint.c (insert_bp_location): Replace bp_err and
1090 bp_err_message locals by a gdb_exception local.
1091
1092 2017-11-16 Pedro Alves <palves@redhat.com>
1093
1094 * inflow.c (scoped_ignore_sigttou): New class.
1095 (child_terminal_ours_1, new_tty): Use it.
1096
1097 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1098
1099 * target-float.c (decimal_from_number): Add byte_order argument and
1100 call match_endianness. Error if unknown floating-point type.
1101 (decimal_to_number): Add byte_order argument and call match_endianness.
1102 (decimal_from_longest): Update call. Do not call match_endianness.
1103 (decimal_from_ulongest): Likewise.
1104 (decimal_binop): Likewise.
1105 (decimal_is_zero): Likewise.
1106 (decimal_compare): Likewise.
1107 (decimal_convert): Likewise.
1108
1109 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1110
1111 * python/python.c (gdbpy_rbreak): New function.
1112 * NEWS: Document Python rbreak feature.
1113
1114 2017-11-16 Yao Qi <yao.qi@linaro.org>
1115
1116 * features/tic6x-c62x.xml: Remove.
1117 * features/tic6x-c64x.xml: Remove.
1118 * features/tic6x-c64xp.xml: Remove.
1119
1120 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1121
1122 * symtab.h: Include <array>.
1123
1124 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1125
1126 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1127 (bsd_kvm_proc_cmd): Likewise.
1128
1129 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1130
1131 * tui/tui-win.c (window_name_completer): Replace VEC with
1132 std::vector.
1133
1134 2017-11-15 Andrew Cagney <cagney@gnu.org>
1135
1136 * MAINTAINERS: Remove no-longer applicable entries.
1137
1138 2017-11-15 Andrew Cagney <cagney@gnu.org>
1139
1140 * MAINTAINERS: Move self to Past Maintainers.
1141
1142 2017-11-15 Yao Qi <yao.qi@linaro.org>
1143
1144 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1145 * features/nios2-linux.c: Remove.
1146 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1147 initialize_tdesc_nios2_linux.
1148
1149 2017-11-15 Yao Qi <yao.qi@linaro.org>
1150
1151 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1152 M68HC11_LAST_HARD_REG + 1.
1153
1154 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1155
1156 PR gdb/22388
1157 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1158 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1159 Return TARGET_XFER_EOF if size of returned data is 0.
1160
1161 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1164 memory-map-selftests.c.
1165 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1166 * memory-map.c (memory_map_start_memory): Fix computation of hi
1167 address.
1168 * unittests/memory-map-selftests.c: New file.
1169
1170 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1171
1172 * ada-lang.c: Fix some typos in the general command documenting
1173 how Ada expressions are being evaluated and how their result
1174 is printed.
1175
1176 2017-11-09 Tom Tromey <tom@tromey.com>
1177
1178 * psymtab.c (psymbol_hash): Do not hash string contents.
1179 (psymbol_compare): Add comment.
1180
1181 2017-11-09 Tom Tromey <tom@tromey.com>
1182
1183 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1184
1185 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1186
1187 * ada-exp.y (write_var_from_sym): Remove parameter
1188 "orig_left_context". Update all callers.
1189
1190 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1191
1192 * tracepoint.h (class collection_list) <stringify>: Return
1193 std::vector<std::string>.
1194 (encode_actions_rsp): Change parameters to
1195 std::vector<std::string> *.
1196 * tracepoint.c (collection_list::stringify): Return
1197 std::vector<std::string> and adjust accordingly.
1198 (encode_actions_rsp): Changee parameters to
1199 std::vector<std::string> and adjust accordingly.
1200 * remote.c (free_actions_list),
1201 free_actions_list_cleanup_wrapper): Remove.
1202 (remote_download_tracepoint): Adjust to std::vector.
1203
1204 2017-11-08 Tom Tromey <tom@tromey.com>
1205
1206 * dwarf2read.c (symbolp): Remove typedef.
1207 (read_func_scope): Use std::vector.
1208 (process_structure_scope): Use std::vector.
1209
1210 2017-11-08 Pedro Alves <palves@redhat.com>
1211
1212 * ada-lang.c (ada_make_symbol_completion_list): Use
1213 completion_skip_symbol.
1214 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1215 (symbol_is_function_or_method(symbol*)): New.
1216 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1217 completion_skip_symbol.
1218 (default_collect_symbol_completion_matches_break_on): Use
1219 completion_skip_symbol. Pass down mode.
1220 (collect_file_symbol_completion_matches): Pass down mode.
1221 * symtab.h (symbol_is_function_or_method): New declarations.
1222 (completion_skip_symbol): New template function.
1223
1224 2017-11-08 Pedro Alves <palves@redhat.com>
1225
1226 * linespec.c (iterate_over_all_matching_symtabs): Add
1227 search_domain parameter. Pass it down to expand_symtabs_matching.
1228 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1229 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1230 search_domain.
1231 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1232 Pass it down.
1233 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1234 symbols.
1235 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1236 it down.
1237
1238 2017-11-08 Pedro Alves <palves@redhat.com>
1239
1240 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1241 text_len locals and don't pass them down.
1242 * symtab.c (completion_list_add_name): Remove
1243 sym_text/sym_text_len parameters and adjust.
1244 (completion_list_add_symbol, completion_list_add_msymbol)
1245 (completion_list_objc_symbol, completion_list_add_fields)
1246 (add_symtab_completions): Likewise.
1247 (default_collect_symbol_completion_matches_break_on)
1248 (collect_file_symbol_completion_matches): Remove sym_text_len
1249 local and don't pass it down.
1250 * symtab.h (completion_list_add_name): Remove
1251 sym_text/sym_text_len parameters.
1252
1253 2017-11-08 Pedro Alves <palves@redhat.com>
1254
1255 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1256 unittests/lookup_name_info-selftests.c.
1257 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1258 * cp-support.c: Include "selftest.h".
1259 (cp_remove_params_1): Rename from cp_remove_params. Add
1260 'require_param' parameter, and handle it.
1261 (cp_remove_params): Reimplement.
1262 (cp_remove_params_if_any): New.
1263 (selftests::quote): New.
1264 (selftests::check_remove_params): New.
1265 (selftests::test_cp_remove_params): New.
1266 (_initialize_cp_support): Install
1267 selftests::test_cp_remove_params.
1268 * cp-support.h (cp_remove_params_if_any): Declare.
1269 * dwarf2read.c :Include "selftest.h".
1270 (dw2_expand_symtabs_matching_symbol): Use
1271 lookup_name_info::make_ignore_params.
1272 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1273 (selftests::dw2_expand_symtabs_matching::string_or_null)
1274 (selftests::dw2_expand_symtabs_matching::check_match)
1275 (selftests::dw2_expand_symtabs_matching::test_symbols)
1276 (selftests::dw2_expand_symtabs_matching::run_test): New.
1277 (_initialize_dwarf2_read): Register
1278 selftests::dw2_expand_symtabs_matching::run_test.
1279 * psymtab.c (psym_expand_symtabs_matching): Use
1280 lookup_name_info::make_ignore_params.
1281 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1282 If the lookup name wants to ignore parameters, strip them.
1283 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1284 code handling '('.
1285 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1286 (default_collect_symbol_completion_matches_break_on): Don't try to
1287 strip parameters.
1288 * symtab.h (lookup_name_info::lookup_name_info): Add
1289 'ignore_parameters' parameter.
1290 (lookup_name_info::ignore_parameters)
1291 (lookup_name_info::make_ignore_params): New methods.
1292 (lookup_name_info::m_ignore_parameters): New field.
1293 * unittests/lookup_name_info-selftests.c: New file.
1294
1295 2017-11-08 Pedro Alves <palves@redhat.com>
1296
1297 * dwarf2read.c (dw2_expand_marked_cus)
1298 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1299 (dw2_expand_symtabs_matching): Move further below.
1300 (dw2_expand_marked_cus): Reindent.
1301
1302 2017-11-08 Pedro Alves <palves@redhat.com>
1303
1304 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1305 (struct name_component): New.
1306 (mapped_index::name_components): New field.
1307 (mapped_index::symbol_name_at): New method.
1308 (dwarf2_read_index): Call mapped_index ctor.
1309 (dw2_map_matching_symbols): Add comment about name_components
1310 table.
1311 (dw2_expand_symtabs_matching): Factor part to...
1312 (dw2_expand_symtabs_matching_symbol): ... this new function.
1313 Build name components table, and lookup symbols in it before
1314 calling the name matcher.
1315 (dw2_expand_marked_cus): New, factored out from
1316 dw2_expand_symtabs_matching.
1317 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1318
1319 2017-11-08 Pedro Alves <palves@redhat.com>
1320
1321 * ada-lang.c (ada_encode): Rename to ..
1322 (ada_encode_1): ... this. Add throw_errors parameter and handle
1323 it.
1324 (ada_encode): Reimplement.
1325 (match_name): Delete, folded into full_name.
1326 (resolve_subexp): No longer pass the encoded name to
1327 ada_lookup_symbol_list.
1328 (should_use_wild_match): Delete.
1329 (name_match_type_from_name): New.
1330 (ada_lookup_simple_minsym): Use lookup_name_info and the
1331 language's symbol_name_matcher_ftype.
1332 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1333 (ada_add_block_renamings): Adjust to use lookup_name_info.
1334 (ada_lookup_name): New.
1335 (add_nonlocal_symbols, ada_add_all_symbols)
1336 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1337 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1338 (ada_name_for_lookup): Delete.
1339 (ada_lookup_encoded_symbol): Construct a verbatim name.
1340 (wild_match): Reverse sense of return type. Use bool.
1341 (full_match): Reverse sense of return type. Inline bits of old
1342 match_name here.
1343 (ada_add_block_symbols): Adjust to use lookup_name_info.
1344 (symbol_completion_match): Delete, folded into...
1345 (ada_lookup_name_info::matches): ... .this new method.
1346 (symbol_completion_add): Delete.
1347 (ada_collect_symbol_completion_matches): Add name_match_type
1348 parameter. Adjust to use lookup_name_info and
1349 completion_list_add_name.
1350 (get_var_value, ada_add_global_exceptions): Adjust to use
1351 lookup_name_info.
1352 (ada_get_symbol_name_cmp): Delete.
1353 (do_wild_match, do_full_match): New functions.
1354 (ada_lookup_name_info::ada_lookup_name_info): New method.
1355 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1356 functions.
1357 (ada_language_defn): Install ada_get_symbol_name_matcher.
1358 * ada-lex.l (processId): If name starts with '<', copy it
1359 verbatim.
1360 * block.c (block_iter_match_step, block_iter_match_first)
1361 (block_iter_match_next, block_lookup_symbol)
1362 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1363 lookup_name_info.
1364 * block.h (block_iter_match_first, block_iter_match_next)
1365 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1366 * c-lang.c (c_language_defn, cplus_language_defn)
1367 (asm_language_defn, minimal_language_defn): Adjust comments to
1368 refer to la_get_symbol_name_matcher.
1369 * completer.c (complete_files_symbols)
1370 (collect_explicit_location_matches, symbol_completer): Pass a
1371 symbol_name_match_type down.
1372 * completer.h (class completion_match, completion_match_result):
1373 New classes.
1374 (completion_tracker::reset_completion_match_result): New method.
1375 (completion_tracker::m_completion_match_result): New field.
1376 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1377 lookup_name_info.
1378 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1379 functions.
1380 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1381 * d-lang.c: Adjust comments to refer to
1382 la_get_symbol_name_matcher.
1383 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1384 Adjust to use lookup_name_info.
1385 (dict_iter_match_first, dict_iter_match_next)
1386 (iter_match_first_hashed, iter_match_next_hashed)
1387 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1388 with a lookup_name_info.
1389 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1390 Likewise.
1391 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1392 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1393 (gdb_index_symbol_name_matcher): New class.
1394 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1395 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1396 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1397 with a symbol_name_match_type.
1398 (f_language_defn): Adjust comments to refer to
1399 la_get_symbol_name_matcher.
1400 * go-lang.c (go_language_defn): Adjust comments to refer to
1401 la_get_symbol_name_matcher.
1402 * language.c (default_symbol_name_matcher)
1403 (language_get_symbol_name_matcher): New functions.
1404 (unknown_language_defn, auto_language_defn): Adjust comments to
1405 refer to la_get_symbol_name_matcher.
1406 * language.h (symbol_name_cmp_ftype): Delete.
1407 (language_defn) <la_collect_symbol_completion_matches>: Add match
1408 type parameter.
1409 <la_get_symbol_name_cmp>: Delete field.
1410 <la_get_symbol_name_matcher>: New field.
1411 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1412 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1413 Declare.
1414 * linespec.c (iterate_over_all_matching_symtabs)
1415 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1416 (find_methods): Add language parameter, and use lookup_name_info
1417 and the language's symbol_name_matcher_ftype.
1418 (linespec_complete_function): Adjust.
1419 (lookup_prefix_sym): Use lookup_name_info.
1420 (add_all_symbol_names_from_pspace): Adjust.
1421 (find_superclass_methods): Add language parameter and pass it
1422 down.
1423 (find_method): Pass symbol language down.
1424 (find_linespec_symbols): Don't demangle or Ada encode here.
1425 (search_minsyms_for_name): Add lookup_name_info parameter.
1426 (add_matching_symbols_to_info): Add name_match_type parameter.
1427 Use lookup_name_info.
1428 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1429 la_get_symbol_name_matcher.
1430 * minsyms.c: Include <algorithm>.
1431 (add_minsym_to_demangled_hash_table): Remove table parameter and
1432 add objfile parameter. Use search_name_hash, and add language to
1433 demangled languages vector.
1434 (struct found_minimal_symbols): New struct.
1435 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1436 New functions.
1437 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1438 input names here. Use lookup_name_info instead. Lookup up
1439 demangled names once for each language in the demangled names
1440 vector.
1441 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1442 demangled names once for each language in the demangled names
1443 vector.
1444 (build_minimal_symbol_hash_tables): Adjust.
1445 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1446 lookup_name_info.
1447 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1448 la_get_symbol_name_matcher.
1449 * objfiles.h: Include <vector>.
1450 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1451 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1452 la_get_symbol_name_matcher.
1453 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1454 la_get_symbol_name_matcher.
1455 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1456 (match_partial_symbol): Use symbol_name_match_type,
1457 lookup_name_info and psymbol_name_matches.
1458 (lookup_partial_symbol): Use lookup_name_info.
1459 (map_block): Use symbol_name_match_type and lookup_name_info.
1460 (psym_map_matching_symbols): Use symbol_name_match_type.
1461 (psymbol_name_matches): New.
1462 (recursively_search_psymtabs): Use lookup_name_info and
1463 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1464 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1465 'kind' parameter to 'domain'.
1466 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1467 la_get_symbol_name_matcher.
1468 * symfile-debug.c (debug_qf_map_matching_symbols)
1469 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1470 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1471 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1472 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1473 Adjust to use symbol_name_match_type.
1474 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1475 (expand_symtabs_matching): Adjust to use lookup_name_info.
1476 * symmisc.c (maintenance_expand_symtabs): Use
1477 lookup_name_info::match_any ().
1478 * symtab.c (symbol_matches_search_name): New.
1479 (eq_symbol_entry): Adjust to use lookup_name_info and the
1480 language's matcher.
1481 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1482 (lookup_name_info::match_any): New.
1483 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1484 (compare_symbol_name): Add language, lookup_name_info and
1485 completion_match_result parameters, and use them.
1486 (completion_list_add_name): Make extern. Add language and
1487 lookup_name_info parameters. Use them.
1488 (completion_list_add_symbol, completion_list_add_msymbol)
1489 (completion_list_objc_symbol): Add lookup_name_info parameters and
1490 adjust. Pass down language.
1491 (completion_list_add_fields): Add lookup_name_info parameters and
1492 adjust. Pass down language.
1493 (add_symtab_completions): Add lookup_name_info parameters and
1494 adjust.
1495 (default_collect_symbol_completion_matches_break_on): Add
1496 name_match_type parameter, and use it. Use lookup_name_info.
1497 (default_collect_symbol_completion_matches)
1498 (collect_symbol_completion_matches): Add name_match_type
1499 parameter, and pass it down.
1500 (collect_symbol_completion_matches_type): Adjust.
1501 (collect_file_symbol_completion_matches): Add name_match_type
1502 parameter, and use lookup_name_info.
1503 * symtab.h: Include <string> and "common/gdb_optional.h".
1504 (enum class symbol_name_match_type): New.
1505 (class ada_lookup_name_info): New.
1506 (struct demangle_for_lookup_info): New.
1507 (class lookup_name_info): New.
1508 (symbol_name_matcher_ftype): New.
1509 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1510 (symbol_matches_search_name): Declare.
1511 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1512 (default_collect_symbol_completion_matches)
1513 (collect_symbol_completion_matches)
1514 (collect_file_symbol_completion_matches): Add name_match_type
1515 parameter.
1516 (iterate_over_symbols): Use lookup_name_info.
1517 (completion_list_add_name): Declare.
1518 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1519 (strncmp_iw_with_mode): Now extern.
1520 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1521 (strncmp_iw_with_mode): Declare.
1522
1523 2017-11-08 Keith Seitz <keiths@redhat.com>
1524 Pedro Alves <palves@redhat.com>
1525
1526 * ada-lang.c (ada_language_defn): Install
1527 default_search_name_hash.
1528 * buildsym.c (struct buildsym_compunit): <language>: New field.
1529 (finish_block_internal): Pass language when creating dictionaries.
1530 (start_buildsym_compunit, start_symtab): New language parameters.
1531 Use them.
1532 (restart_symtab): Pass down compilation unit's language.
1533 * buildsym.h (enum language): Forward declare.
1534 (start_symtab): New 'language' parameter.
1535 * c-lang.c (c_language_defn, cplus_language_defn)
1536 (asm_language_defn, minimal_language_defn): Install
1537 default_search_name_hash.
1538 * coffread.c (coff_start_symtab): Adjust.
1539 * d-lang.c (d_language_defn): Install default_search_name_hash.
1540 * dbxread.c (struct symloc): Add 'pst_language' field.
1541 (PST_LANGUAGE): Define.
1542 (start_psymtab, read_ofile_symtab): Use it.
1543 (process_one_symbol): New 'language' parameter. Pass it down.
1544 * dictionary.c (struct dictionary) <language>: New field.
1545 (DICT_LANGUAGE): Define.
1546 (dict_create_hashed, dict_create_hashed_expandable)
1547 (dict_create_linear, dict_create_linear_expandable): New parameter
1548 'language'. Set the dictionary's language.
1549 (iter_match_first_hashed): Adjust to rename.
1550 (insert_symbol_hashed): Assert we don't see mismatching
1551 languages. Adjust to rename.
1552 (dict_hash): Rename to ...
1553 (default_search_name_hash): ... this and make extern.
1554 * dictionary.h (struct language_defn): Forward declare.
1555 (dict_create_hashed): New parameter 'language'.
1556 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1557 * f-lang.c (f_language_defn): Install default_search_name_hash.
1558 * go-lang.c (go_language_defn): Install default_search_name_hash.
1559 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1560 creation.
1561 * language.c (unknown_language_defn, auto_language_defn):
1562 * language.h (language_defn::la_search_name_hash): New field.
1563 (default_search_name_hash): Declare.
1564 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1565 * mdebugread.c (new_block): New parameter 'language'.
1566 * mdebugread.c (parse_symbol): Pass symbol language to block
1567 allocation.
1568 (psymtab_to_symtab_1): Pass down language.
1569 (new_symtab): Pass compunit's language to block allocation.
1570 * objc-lang.c (objc_language_defn): Install
1571 default_search_name_hash.
1572 * opencl-lang.c (opencl_language_defn):
1573 * p-lang.c (pascal_language_defn): Install
1574 default_search_name_hash.
1575 * rust-lang.c (rust_language_defn): Install
1576 default_search_name_hash.
1577 * stabsread.h (enum language): Forward declare.
1578 (process_one_symbol): Add 'language' parameter.
1579 * symtab.c (search_name_hash): New function.
1580 * symtab.h (search_name_hash): Declare.
1581 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1582
1583 2017-11-08 Pedro Alves <palves@redhat.com>
1584
1585 * cp-name-parser.y (main): Don't initialize extra_chars.
1586
1587 2017-11-07 Tom Tromey <tom@tromey.com>
1588
1589 * event-top.h (command_handler): Constify.
1590 * record-full.c (cmd_record_full_start): Update.
1591 * thread.c (thread_apply_all_command): Update.
1592 * printcmd.c (eval_command): Update.
1593 * mi/mi-main.c (mi_execute_cli_command): Update.
1594 (mi_execute_async_cli_command): Update.
1595 * tui/tui-stack.c (tui_update_command): Update.
1596 * cli/cli-interp.c (safe_execute_command): Constify.
1597 * record.c (record_start): Update.
1598 (record_start, record_stop, cmd_record_start): Update.
1599 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1600 (cmd_record_btrace_pt_start): Update.
1601 (cmd_record_btrace_start): Update.
1602 (cmd_record_btrace_start): Update.
1603 * reverse.c (exec_reverse_once): Update.
1604 * python/python.c (execute_gdb_command): Don't copy the command.
1605 * event-top.c (command_line_handler): Update.
1606 (command_handler): Constify.
1607 * defs.h (deprecated_call_command_hook): Constify.
1608 * cli/cli-script.h (execute_user_command): Constify.
1609 * cli/cli-script.c (execute_user_command): Constify.
1610 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1611 (enum command_control_type): Update.
1612 * main.c (catch_command_errors): Remove non-const overload.
1613 (catch_command_errors_ftype): Remove.
1614 * python/py-cmd.c (cmdpy_function): Constify.
1615 * guile/scm-cmd.c (cmdscm_function): Constify.
1616 * cli/cli-dump.c (call_dump_func): Constify.
1617 * cli/cli-decode.c (do_const_cfunc): Constify.
1618 (do_sfunc): Constify.
1619 (cmd_func): Constify.
1620 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1621 * top.h (execute_command): Constify.
1622 * top.c (execute_command): Constify.
1623 (execute_command_to_string): Constify.
1624 (deprecated_call_command_hook): Constify.
1625 * command.h (cmd_func): Constify.
1626 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1627
1628 2017-11-07 Tom Tromey <tom@tromey.com>
1629
1630 * ada-lang.c (catch_ada_exception_command): Constify.
1631 (catch_assert_command): Constify.
1632 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1633 (catch_rethrow_command): Constify.
1634 (catch_exception_command_1): Constify.
1635 * breakpoint.h (add_catch_command): Constify.
1636 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1637 (catch_syscall_split_args): Constify.
1638 * break-catch-sig.c (catch_signal_command): Constify.
1639 (catch_signal_split_args): Constify.
1640 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1641 cmd_const_sfunc_ftype.
1642 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1643 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1644 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1645 (add_setshow_string_cmd, struct cmd_list_element)
1646 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1647 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1648 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1649 Constify.
1650 (set_cmd_sfunc): Constify.
1651 (empty_sfunc): Constify.
1652 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1653 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1654 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1655 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1656 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1657 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1658 Constify.
1659 (set_cmd_sfunc): Constify.
1660 (cmd_sfunc_ftype): Remove.
1661 * compile/compile.c (set_compile_args): Constify.
1662 * infrun.c (set_disable_randomization): Constify.
1663 * infcmd.c (set_args_command, set_cwd_command): Constify.
1664 * breakpoint.c (set_condition_evaluation_mode): Constify.
1665 (add_catch_command): Constify.
1666 (catch_fork_command_1, catch_exec_command_1)
1667 (catch_load_command_1, catch_unload_command_1): Constify.
1668 (catch_load_or_unload): Constify.
1669 * guile/scm-param.c (pascm_set_func): Constify.
1670 (add_setshow_generic): Constify.
1671 * python/py-param.c (get_set_value): Constify.
1672 * top.h (set_verbose): Constify.
1673 * tui/tui-win.c (tui_set_var_cmd): Constify.
1674 * mi/mi-main.c (set_mi_async_command): Constify.
1675 * cli/cli-logging.c (set_logging_overwrite)
1676 (set_logging_redirect): Constify.
1677 * value.c (set_max_value_size): Constify.
1678 * valprint.c (set_input_radix, set_output_radix): Constify.
1679 * utils.c (set_width_command, set_height_command): Constify.
1680 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1681 * tracepoint.c (set_disconnected_tracing)
1682 (set_circular_trace_buffer, set_trace_buffer_size)
1683 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1684 * top.c (set_history_size_command, set_verbose, set_editing)
1685 (set_gdb_datadir, set_history_filename): Constify.
1686 * target.c (set_targetdebug, maint_set_target_async_command)
1687 (maint_set_target_non_stop_command, set_target_permissions)
1688 (set_write_memory_permission): Constify.
1689 (open_target): Constify.
1690 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1691 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1692 * symtab.c (set_symbol_cache_size_handler): Constify.
1693 * symfile.c (set_ext_lang_command): Constify.
1694 * symfile-debug.c (set_debug_symfile): Constify.
1695 * source.c (set_directories_command): Constify.
1696 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1697 * serial.c (set_parity): Constify.
1698 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1699 * remote.c (set_remote_exec_file, set_remotebreak)
1700 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1701 * record.c (set_record_insn_history_size)
1702 (set_record_call_history_size): Constify.
1703 * record-full.c (set_record_full_insn_max_num): Constify.
1704 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1705 * osabi.c (set_osabi): Constify.
1706 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1707 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1708 * maint.c (maintenance_set_profile_cmd): Constify.
1709 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1710 * language.c (set_language_command, set_range_command)
1711 (set_case_command): Constify.
1712 * infrun.c (set_non_stop, set_observer_mode)
1713 (set_stop_on_solib_events, set_schedlock_func)
1714 (set_exec_direction_func): Constify.
1715 * infcmd.c (set_inferior_tty_command): Constify.
1716 * disasm.c (set_disassembler_options_sfunc): Constify.
1717 * demangle.c (set_demangling_command): Constify.
1718 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1719 * cris-tdep.c (set_cris_version, set_cris_mode)
1720 (set_cris_dwarf2_cfi): Constify.
1721 * corefile.c (set_gnutarget_command): Constify.
1722 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1723 (set_target_wide_charset_sfunc): Constify.
1724 * breakpoint.c (update_dprintf_commands): Constify.
1725 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1726 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1727 (set_disassembly_style_sfunc): Constify.
1728 * arch-utils.c (set_endian, set_architecture): Constify.
1729 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1730 * agent.c (set_can_use_agent): Constify.
1731
1732 2017-11-07 Tom Tromey <tom@tromey.com>
1733
1734 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1735 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1736 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1737 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1738 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1739 (parse_int_arg, show_thread_default_detach_sc_cmd)
1740 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1741 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1742 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1743 (show_task_pause_cmd, set_task_detach_sc_cmd)
1744 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1745 (set_noninvasive_cmd, set_thread_pause_cmd)
1746 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1747 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1748 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1749 * windows-nat.c (display_selectors): Constify.
1750 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1751 non-const "cfunc".
1752 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1753 (cmd_cfunc_eq): Likewise.
1754 (struct cmd_list_element): Likewise.
1755 (do_cfunc): Remove.
1756 (cli_user_command_p): Update.
1757 * command.h (add_cmd): Remove non-const overload.
1758 (cmd_cfunc_ftype): Remove typedef.
1759 (cmd_cfunc_eq): Remove non-const overload.
1760 * value.c (show_values): Constify.
1761 * thread.c (thread_apply_all_command): Constify.
1762 * symfile.c (load_command): Constify.
1763 * source.c (directory_command): Constify.
1764 * maint.c (maintenance_internal_error)
1765 (maintenance_demangler_warning, maintenance_space_display)
1766 (maintenance_print_architecture, maintenance_translate_address)
1767 (maintenance_info_selftests, maintenance_internal_warning):
1768 Constify.
1769 * breakpoint.c (disable_trace_command, enable_trace_command):
1770 Constify.
1771 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1772 Constify.
1773 (add_auto_load_safe_path): Constify.
1774 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1775 * top.h (show_commands): Constify.
1776 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1777 * sparc64-tdep.c (adi_examine_command): Constify.
1778 (adi_assign_command): Constify.
1779
1780 2017-11-07 Tom Tromey <tom@tromey.com>
1781
1782 * frame.h (info_locals_command, info_args_command): Constify.
1783 * auto-load.h (auto_load_info_scripts): Constify.
1784 * inferior.h (registers_info): Constify.
1785 * copying.c: Rebuild.
1786 * copying.awk: Constify generated commands.
1787 * auto-load.c (auto_load_info_scripts)
1788 (info_auto_load_gdb_scripts): Constify.
1789 * cli/cli-decode.c (struct cmd_list_element): Take a
1790 cmd_const_cfunc_ftype.
1791 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1792 * tui/tui-win.c (tui_all_windows_info): Constify.
1793 * python/py-auto-load.c (info_auto_load_python_scripts):
1794 Constify.
1795 * cli/cli-cmds.c (show_command): Remove non-const overload.
1796 * tracepoint.c (info_tvariables_command, info_scope_command):
1797 Constify.
1798 (info_static_tracepoint_markers_command): Constify.
1799 * thread.c (info_threads_command): Constify.
1800 (print_thread_info_1): Constify.
1801 * target.c (info_target_command): Constify.
1802 * symtab.c (info_sources_command, info_functions_command)
1803 (info_types_command): Constify.
1804 (info_variables_command): Remove non-const overload.
1805 * symfile.c (info_ext_lang_command): Constify.
1806 * stack.c (info_frame_command, info_locals_command)
1807 (info_args_command): Constify.
1808 (backtrace_command): Remove non-const overload.
1809 * source.c (info_source_command, info_line_command): Constify.
1810 * solib.c (info_sharedlibrary_command): Constify.
1811 * skip.c (info_skip_command): Constify.
1812 * ser-go32.c (info_serial_command): Constify.
1813 * reverse.c (info_bookmarks_command): Constify.
1814 * printcmd.c (info_symbol_command, info_address_command)
1815 (info_display_command): Constify.
1816 * osdata.c (info_osdata_command): Constify.
1817 * objc-lang.c (info_selectors_command, info_classes_command):
1818 Constify.
1819 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1820 * memattr.c (info_mem_command): Constify.
1821 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1822 * linux-fork.c (info_checkpoints_command): Constify.
1823 * infrun.c (info_signals_command): Constify.
1824 * inflow.c (info_terminal_command): Constify.
1825 * inferior.c (info_inferiors_command): Constify.
1826 (print_inferior): Constify.
1827 * infcmd.c (info_program_command, info_all_registers_command)
1828 (info_registers_command, info_vector_command)
1829 (info_float_command): Constify.
1830 (registers_info): Constify.
1831 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1832 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1833 Constify.
1834 * f-valprint.c (info_common_command): Constify.
1835 * dcache.c (info_dcache_command): Constify.
1836 (dcache_info_1): Constify.
1837 * darwin-nat-info.c (info_mach_tasks_command)
1838 (info_mach_task_command, info_mach_ports_command)
1839 (info_mach_port_command, info_mach_threads_command)
1840 (info_mach_thread_command, info_mach_regions_command)
1841 (info_mach_regions_recurse_command, info_mach_region_command)
1842 (info_mach_exceptions_command): Constify.
1843 (get_task_from_args): Constify.
1844 * cp-support.c (info_vtbl_command): Constify.
1845 * breakpoint.c (info_watchpoints_command)
1846 (info_tracepoints_command): Constify.
1847 (info_breakpoints_command): Remove non-const overload.
1848 * avr-tdep.c (avr_io_reg_read_command): Constify.
1849 * auxv.c (info_auxv_command): Constify.
1850 * ada-tasks.c (info_tasks_command): Constify.
1851 (info_task): Constify.
1852 * ada-lang.c (info_exceptions_command): Constify.
1853
1854 2017-11-07 Tom Tromey <tom@tromey.com>
1855
1856 * solib.h (no_shared_libraries): Constify.
1857 * frame.h (return_command): Constify.
1858 * cli/cli-cmds.h (quit_command): Constify.
1859 * top.h (quit_command, execute_command): Constify.
1860 * target.h (flash_erase_command): Constify.
1861 * inferior.h (set_inferior_args, attach_command): Constify.
1862 * tracepoint.h (start_tracing, stop_tracing): Constify.
1863 * breakpoint.h (break_command, tbreak_command)
1864 (hbreak_command_wrapper, thbreak_command_wrapper)
1865 (rbreak_command_wrapper, watch_command_wrapper)
1866 (awatch_command_wrapper, rwatch_command_wrapper)
1867 (get_tracepoint_by_number): Constify.
1868 * symtab.c (info_variables_command, rbreak_command)
1869 (symtab_symbol_info): Constify.
1870 (info_variables_command): Add non-const overload.
1871 * top.c (dont_repeat_command): Constify.
1872 * breakpoint.c (ignore_command, commands_command)
1873 (condition_command, tbreak_command, hbreak_command)
1874 (thbreak_command, clear_command, break_command)
1875 (info_breakpoints_command, watch_command, rwatch_command)
1876 (awatch_command, trace_command, ftrace_command, strace_command)
1877 (trace_pass_command, break_range_command, dprintf_command)
1878 (agent_printf_command, get_tracepoint_by_number)
1879 (watch_maybe_just_location, trace_pass_command): Constify.
1880 (info_breakpoints_command): Add non-const overload.
1881 * tracefile.c (tsave_command): Constify.
1882 * infcmd.c (attach_command, disconnect_command, signal_command)
1883 (queue_signal_command, stepi_command, nexti_command)
1884 (finish_command, next_command, step_command, until_command)
1885 (advance_command, jump_command, continue_command, run_command)
1886 (start_command, starti_command, interrupt_command)
1887 (run_command_1, set_inferior_args, step_1): Constify.
1888 * inferior.c (add_inferior_command, remove_inferior_command)
1889 (clone_inferior_command): Constify.
1890 * linux-fork.c (checkpoint_command, restart_command): Constify.
1891 * windows-nat.c (signal_event_command): Constify.
1892 * guile/guile.c (guile_repl_command, guile_command): Constify.
1893 * printcmd.c (x_command, display_command, printf_command)
1894 (output_command, set_command, call_command, print_command)
1895 (eval_command): Constify.
1896 (non_const_set_command): Remove.
1897 (_initialize_printcmd): Update.
1898 * source.c (forward_search_command, reverse_search_command):
1899 Constify.
1900 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1901 Constify.
1902 * infrun.c (handle_command): Constify.
1903 * memattr.c (mem_command): Constify.
1904 * stack.c (return_command, up_command, up_silently_command)
1905 (down_command, down_silently_command, frame_command)
1906 (backtrace_command, func_command, backtrace_command_1): Constify.
1907 (backtrace_command): Add non-const overload.
1908 * remote-sim.c (simulator_command): Constify.
1909 * exec.c (set_section_command): Constify.
1910 * tracepoint.c (tdump_command, trace_variable_command)
1911 (tstatus_command, tstop_command, tstart_command)
1912 (end_actions_pseudocommand, while_stepping_pseudocommand)
1913 (collect_pseudocommand, teval_pseudocommand, actions_command)
1914 (start_tracing, stop_tracing): Constify.
1915 * value.c (init_if_undefined_command): Constify.
1916 * tui/tui-stack.c (tui_update_command): Constify.
1917 * tui/tui-win.c (tui_refresh_all_command)
1918 (tui_set_tab_width_command, tui_set_win_height_command)
1919 (tui_set_focus_command, tui_scroll_forward_command)
1920 (tui_scroll_backward_command, tui_scroll_left_command)
1921 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1922 (tui_set_win_height): Constify.
1923 * tui/tui-layout.c (tui_layout_command): Constify.
1924 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1925 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1926 (proc_untrace_sysexit_cmd): Constify.
1927 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1928 (threadset_test_cmd, threadlist_update_test_cmd)
1929 (threadalive_test): Constify.
1930 * objc-lang.c (print_object_command): Constify.
1931 * command.h (add_com): Constify.
1932 * cli/cli-dump.c (restore_command): Constify.
1933 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1934 (help_command, complete_command, shell_command, edit_command)
1935 (list_command, disassemble_command, make_command)
1936 (apropos_command, alias_command): Constify.
1937 * cli/cli-script.c (document_command, define_command)
1938 (while_command, if_command, validate_comname): Constify.
1939 * cli/cli-decode.c (struct cmd_list_element): Change type of
1940 "fun".
1941 * target.c (do_monitor_command, flash_erase_command): Constify.
1942 * regcache.c (reg_flush_command): Constify.
1943 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1944 (reverse_nexti, reverse_continue, reverse_finish)
1945 (save_bookmark_command, goto_bookmark_command)
1946 (exec_reverse_once): Constify.
1947 * python/python.c (python_interactive_command, python_command):
1948 Constify.
1949 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1950 Constify.
1951 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1952 * gcore.c (gcore_command): Constify.
1953
1954 2017-11-07 Tom Tromey <tom@tromey.com>
1955
1956 * printcmd.c (x_command): Call set_repeat_arguments.
1957 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1958 * top.c (repeat_arguments): New global.
1959 (set_repeat_arguments): New function.
1960 (execute_command): Handle repeat_arguments.
1961 (show_commands): Calls set_repeat_arguments.
1962 * command.h (set_repeat_arguments): Declare.
1963
1964 2017-11-07 Tom Tromey <tom@tromey.com>
1965
1966 * stack.c (backtrace_command): Use std::string.
1967 (backtrace_command_1): Make "count_exp" const.
1968
1969 2017-11-07 Tom Tromey <tom@tromey.com>
1970
1971 * source.c (directory_switch, mod_path, add_path): Constify.
1972 * defs.h (add_path, mod_path, directory_switch): Constify.
1973 * mi/mi-cmd-env.c (env_mod_path): Constify.
1974
1975 2017-11-07 Tom Tromey <tom@tromey.com>
1976
1977 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1978 (run_command_1, continue_command, step_1, jump_command)
1979 (signal_command, until_command, advance_command, finish_command)
1980 (attach_command): Update.
1981
1982 2017-11-07 Tom Tromey <tom@tromey.com>
1983
1984 * command.h (set_cmd_cfunc): Don't declare.
1985 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1986
1987 2017-11-07 Tom Tromey <tom@tromey.com>
1988
1989 * stack.c (select_frame_command): Constify.
1990 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1991 * command.h (add_com_suppress_notification): Constify.
1992
1993 2017-11-07 Tom Tromey <tom@tromey.com>
1994
1995 * breakpoint.c (stop_command): Constify.
1996 * cli/cli-decode.c (struct cmd_list_element): Constify.
1997 * command.h (add_abbrev_prefix_cmd): Constify.
1998
1999 2017-11-07 Pedro Alves <palves@redhat.com>
2000
2001 * breakpoint.c (extract_bp_kind): New enum.
2002 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2003 factored out from ...
2004 (extract_bp_number_and_location): ... here.
2005 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2006
2007 2017-11-07 Pedro Alves <palves@redhat.com>
2008
2009 * breakpoint.c (extract_bp_number_and_location): Change return
2010 type to void. Throw error instead of warning.
2011 (enable_disable_command): Adjust.
2012
2013 2017-11-07 Xavier Roirand <roirand@adacore.com>
2014 Pedro Alves <palves@redhat.com>
2015
2016 * breakpoint.c (map_breakpoint_number_range): New, factored out
2017 from ...
2018 (map_breakpoint_numbers): ... here.
2019 (find_location_by_number): Change parameters from string to
2020 breakpoint number and location.
2021 (extract_bp_number_and_location): New function.
2022 (enable_disable_bp_num_loc)
2023 (enable_disable_breakpoint_location_range)
2024 (enable_disable_command): New functions, factored out ...
2025 (enable_command, disable_command): ... these functions, and
2026 adjusted to support ranges.
2027 * NEWS: Document enable/disable breakpoint location range feature.
2028
2029 2017-11-06 Luis Machado <luis.machado@linaro.org>
2030
2031 * MAINTAINERS (Write After Approval): Update my e-mail address.
2032
2033 2017-11-06 Pedro Alves <palves@redhat.com>
2034
2035 * gnu-nat.c (gnu_terminal_init): Delete.
2036 (gnu_target): Don't install gnu_terminal_init.
2037 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2038 (child_terminal_init): ... this function.
2039
2040 2017-11-06 Pedro Alves <palves@redhat.com>
2041
2042 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2043 sgtty.h.
2044 * config.in, configure: Regenerate.
2045
2046 2017-11-06 Pedro Alves <palves@redhat.com>
2047
2048 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2049 (async_init_signals): Adjust.
2050 (handle_stop_sig): Rename to ...
2051 (handle_sigtstp): ... this.
2052 (async_stop_sig): Rename to ...
2053 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2054 SIGTSTP path.
2055 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2056 instead of STOP_SIGNAL thoughout.
2057 (handle_stop_sig): Rename to ...
2058 (handle_sigtstp): ... this.
2059 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2060
2061 2017-11-06 Pedro Alves <palves@redhat.com>
2062
2063 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2064 longer set flags twice in row.
2065
2066 2017-11-06 Pedro Alves <palves@redhat.com>
2067
2068 * Makefile.in (SER_HARDWIRE): Update comment.
2069 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2070 * common/gdb_termios.h: Delete file.
2071 * common/job-control.c: Include termios.h and unistd.h instead of
2072 gdb_termios.h.
2073 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2074 check.
2075 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2076 Remove sgtty code.
2077 * configure.ac: No longer check for termio.h and sgtty.h.
2078 * configure: Regenerate.
2079 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2080 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2081 Replace PROCESS_GROUP_TYPE references with pid_t references
2082 throughout.
2083 (gdb_getpgrp): Delete.
2084 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2085 (child_terminal_inferior): Remove comment. Remove sgtty code.
2086 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2087 gdb_getpgrp. Use serial_set_tty_state instead aof
2088 serial_noflush_set_tty_state. Remove sgtty code.
2089 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2090 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2091 (inferior_process_group): Now returns pid_t.
2092 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2093 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2094 * ser-event.c (serial_event_ops): Update.
2095 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2096 (dos_ops): Update.
2097 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2098 * ser-pipe.c (pipe_ops): Update.
2099 * ser-tcp.c (tcp_ops): Update.
2100 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2101 HAVE_TERMIOS checks.
2102 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2103 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2104 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2105 assume termios.
2106 (hardwire_noflush_set_tty_state): Delete.
2107 (hardwire_print_tty_state, hardwire_drain_output)
2108 (hardwire_flush_output, hardwire_flush_input)
2109 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2110 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2111 code, and assume termios.
2112 (hardwire_ops): Update.
2113 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2114 * serial.c (serial_noflush_set_tty_state): Delete.
2115 * serial.h (serial_noflush_set_tty_state): Delete.
2116 (serial_ops::noflush_set_tty_state): Delete.
2117
2118 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2119
2120 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2121 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2122 (COMMON_OBS): Remove doublest.o and dfp.o.
2123 Do not build target-float.c (instead of doublest.c)
2124 with -Wformat-nonliteral.
2125
2126 * doublest.c: Remove file.
2127 * doublest.h: Remove file.
2128 * dfp.c: Remove file.
2129 * dfp.h: Remove file.
2130
2131 * target-float.c: Do not include "doublest.h" and "dfp.h".
2132 (DOUBLEST): Move here from doublest.h.
2133 (enum float_kind): Likewise.
2134 (FLOATFORMAT_CHAR_BIT): Likewise.
2135 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2136 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2137 (floatformat_precision): Likewise.
2138 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2139 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2140 Likewise.
2141 (host_float_format, host_double_format, host_long_double_format):
2142 Likewise.
2143 (floatformat_to_string, floatformat_from_string): Likewise.
2144 (floatformat_to_doublest): Likewise. Also, inline the original
2145 convert_floatformat_to_doublest.
2146 (floatformat_from_doublest): Likewise. Also, inline the original
2147 convert_floatformat_from_doublest.
2148
2149 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2150 (MAX_DECIMAL_STRING): Move here from dfp.c.
2151 (match_endianness): Likewise.
2152 (set_decnumber_context, decimal_check_errors): Likewise.
2153 (decimal_from_number, decimal_to_number): Likewise.
2154 (decimal_to_string, decimal_from_string): Likewise. Make static.
2155 (decimal_from_longest, decimal_from_ulongest): Likewise.
2156 (decimal_to_longest): Likewise.
2157 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2158 (decimal_convert): Likewise.
2159
2160 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2161
2162 * doublest.c: Do not include "gdbtypes.h".
2163 (extract_typed_floating): Remove.
2164 (store_typed_floating): Remove.
2165 (convert_typed_floating): Remove.
2166 * doublest.h (struct type): Remove.
2167 (DOUBLEST_PRINT_FORMAT): Remove.
2168 (DOUBLEST_SCAN_FORMAT): Remove.
2169 (extract_typed_floating): Remove.
2170 (store_typed_floating): Remove.
2171 (convert_typed_floating): Remove.
2172
2173 * dfp.c (decimal_from_doublest): Remove.
2174 (decimal_to_doublest): Remove.
2175 * dfp.h: Do not include "doublest.h".
2176 (decimal_from_doublest): Remove.
2177 (decimal_to_doublest): Remove.
2178
2179 * value.c: Do not include "doublest.h" and "dfp.h".
2180 (value_as_double): Remove.
2181 (unpack_double): Remove.
2182 (value_from_double): Remove.
2183 (value_from_decfloat): Remove.
2184 * value.h: Do not include "doublest.h".
2185 (value_as_double): Remove.
2186 (unpack_double): Remove.
2187 (value_from_double): Remove.
2188 (value_from_decfloat): Remove.
2189
2190 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2191
2192 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2193 (i386_extract_return_value): Use target_float_convert.
2194 (i386_store_return_value): Likewise.
2195 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2196 (i387_value_to_register): Likewise.
2197 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2198 (ia64_register_to_value): Use target_float_convert.
2199 (ia64_value_to_register): Likewise.
2200 (ia64_extract_return_value): Likewise.
2201 (ia64_store_return_value): Likewise.
2202 (ia64_push_dummy_call): Likewise.
2203 * m68k-tdep.c: Include "target-float.h".
2204 (m68k_register_to_value): Use target_float_convert.
2205 (m68k_value_to_register): Likewise.
2206 (m68k_svr4_extract_return_value): Likewise.
2207 (m68k_svr4_store_return_value): Likewise.
2208 * ppc-sysv-tdep.c: Include "target-float.h".
2209 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2210 (do_ppc_sysv_return_value): Likewise.
2211 (ppc64_sysv_abi_push_freg): Likewise.
2212 (ppc64_sysv_abi_return_value_base): Likewise.
2213 * rs6000-aix-tdep.c: Include "target-float.h".
2214 (rs6000_push_dummy_call): Use target_float_convert.
2215 (rs6000_return_value): Likewise.
2216 * rs6000-lynx178-tdep.c: Include "target-float.h".
2217 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2218 (rs6000_lynx178_return_value): Likewise.
2219 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2220 (rs6000_register_to_value): Use target_float_convert.
2221 (rs6000_value_to_register): Likewise.
2222 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2223 (arm_extract_return_value): Use target_float_convert.
2224 (arm_store_return_value): Likewise.
2225 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2226 (sh_register_convert_to_virtual): Use target_float_convert.
2227 (sh_register_convert_to_raw): Likewise.
2228 * sh64-tdep.c: Include "target-float.h".
2229 (sh64_extract_return_value): Use target_float_convert.
2230 (sh64_register_convert_to_virtual): Likewise.
2231 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2232
2233 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2234
2235 * target-float.c (floatformat_to_host_double): New function.
2236 (floatformat_from_host_double): Likewise.
2237 (target_float_to_host_double): Likewise.
2238 (target_float_from_host_double): Likewise.
2239 * target-float.h (target_float_to_host_double): Add prototype.
2240 (target_float_from_host_double): Likewise.
2241
2242 * guile/scm-value.c: Include "target-float.h".
2243 (gdbscm_value_to_real): Use target_float_to_host_double.
2244 Handle integer source values via value_as_long.
2245 * guile/scm-math.c: Include "target-float.h". Do not include
2246 "doublest.h", "dfp.h", and "expression.h".
2247 (vlscm_convert_typed_number): Use target_float_from_host_double.
2248 (vlscm_convert_number): Likewise.
2249
2250 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2251 (convert_value_from_python): Use target_float_from_host_double.
2252
2253 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2254
2255 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2256 (cast_from_fixed): Likewise.
2257 (ada_scaling_type): New function.
2258 (ada_delta): Return value instead of DOUBLEST. Perform target
2259 arithmetic instead of host arithmetic.
2260 (scaling_factor): Rename to ...
2261 (ada_scaling_factor) ... this. Make non-static. Return value instead
2262 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2263 (ada_fixed_to_float): Remove.
2264 (ada_float_to_fixed): Remove.
2265 * ada-lang.h (ada_fixed_to_float): Remove.
2266 (ada_float_to_fixed): Remove.
2267 (ada_delta): Return value instead of DOUBLEST.
2268 (ada_scaling_factor): Add prototype.
2269
2270 * ada-typeprint.c: Include "target-float.h".
2271 (print_fixed_point_type): Perform target arithmetic instead of
2272 host arithmetic.
2273 * ada-valprint.c: Include "target-float.h".
2274 (ada_val_print_num): Perform target arithmetic instead of
2275 host arithmetic for fixed-point types.
2276
2277 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2278
2279 * target-float.c: Include <math.h>.
2280 (floatformat_binop): New function.
2281 (floatformat_compare): Likewise.
2282 (target_float_binop): Likewise.
2283 (target_float_compare): Likewise.
2284 * target-float.h: Include "expression.h".
2285 (target_float_binop): Add prototype.
2286 (target_float_compare): Likewise.
2287
2288 * valarith.c: Do not include "doublest.h" and "dfp.h".
2289 Include "common/byte-vector.h".
2290 (value_args_as_decimal): Remove, replace by ...
2291 (value_args_as_target_float): ... this function. Handle both
2292 binary and decimal target floating-point formats.
2293 (scalar_binop): Handle both binary and decimal FP using
2294 value_args_as_target_float and target_float_binop.
2295 (value_equal): Handle both binary and decimal FP using
2296 value_args_as_target_float and target_float_compare.
2297 (value_less): Likewise.
2298 (value_pos): Handle all scalar types as simple copy.
2299 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2300 * dfp.c (decimal_binop): Throw error instead of internal_error
2301 when called with an unsupported operation code.
2302
2303 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2304
2305 * target-float.c (target_float_to_string): New function.
2306 (target_float_from_string): New function.
2307 * target-float.h (target_float_to_string): Add prototype.
2308 (target_float_from_string): Add prototype.
2309
2310 * valprint.c: Include "target-float.h". Do not include
2311 "doublest.h" and "dfp.h".
2312 (print_floating): Use target_float_to_string.
2313 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2314 (printf_floating): Use target_float_to_string.
2315 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2316 (print_i387_value): Use target_float_to_string.
2317 * mips-tdep.c: Include "target-float.h".
2318 (mips_print_fp_register): Use target_float_to_string.
2319 * sh64-tdep.c: Include "target-float.h".
2320 (sh64_do_fp_register): Use target_float_to_string.
2321
2322 * parse.c: Include "target-float.h". Do not include
2323 "doublest.h" and "dfp.h".
2324 (parse_float): Use target_float_from_string.
2325 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2326 (define_symbol): Use target_float_from_string.
2327 * gdbarch-selftests.c: Include "target-float.h".
2328 (register_to_value_test): Use target_float_from_string.
2329
2330 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2331
2332 * Makefile.c (SFILES): Add target-float.c.
2333 (HFILES_NO_SRCDIR): Add target-float.h.
2334 (COMMON_OBS): Add target-float.o.
2335 * target-float.h: New file.
2336 * target-float.c: New file.
2337
2338 * doublest.c (floatformat_classify): Fix detection of float_zero.
2339
2340 * gdbtypes.c (is_floating_type): New function.
2341 * gdbtypes.h (is_floating_type): Add prototype.
2342
2343 * value.c: Do not include "floatformat.h".
2344 (unpack_double): Use target_float_is_valid.
2345 (is_floating_value): New function.
2346 * value.h (is_floating_value): Add prototype-
2347
2348 * valarith.c: Include "target-float.h".
2349 (value_logical_not): Use target_float_is_zero.
2350
2351 * python/py-value.c: Include "target-float.h".
2352 (valpy_nonzero): Use target_float_is_zero.
2353
2354 2017-11-04 Tom Tromey <tom@tromey.com>
2355
2356 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2357
2358 2017-11-04 Tom Tromey <tom@tromey.com>
2359
2360 * breakpoint.c (set_momentary_breakpoint): Return
2361 breakpoint_up.
2362 (until_break_command): Update.
2363 (new_until_break_fsm): Change argument types to
2364 breakpoint_up.
2365 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2366 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2367 Remove.
2368 * infcmd.c (finish_forward): Update.
2369 * breakpoint.h (set_momentary_breakpoint)
2370 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2371 (make_cleanup_delete_breakpoint): Remove.
2372 (struct breakpoint_deleter): New.
2373 (breakpoint_up): New typedef.
2374 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2375 (insert_exception_resume_breakpoint): Update.
2376 (insert_exception_resume_from_probe): Update.
2377 (insert_longjmp_resume_breakpoint): Update.
2378 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2379 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2380 * infcall.c (call_function_by_hand_dummy): Update
2381
2382 2017-11-04 Tom Tromey <tom@tromey.com>
2383
2384 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2385
2386 2017-11-04 Tom Tromey <tom@tromey.com>
2387
2388 * linux-tdep.c (linux_core_info_proc_mappings): Use
2389 gdb::def_vector.
2390 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2391 "size" argument.
2392 (linux_corefile_thread): Update.
2393 (linux_make_corefile_notes): Remove unused variable.
2394
2395 2017-11-04 Tom Tromey <tom@tromey.com>
2396
2397 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2398 gdb::byte_vector.
2399
2400 2017-11-04 Tom Tromey <tom@tromey.com>
2401
2402 * objfiles.c (do_free_objfile_cleanup): Remove.
2403 * compile/compile-object-load.c (compile_object_load): Update.
2404 * objfiles.h (make_cleanup_free_objfile): Remove.
2405
2406 2017-11-04 Tom Tromey <tom@tromey.com>
2407
2408 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2409 (adi_read_versions): Change "tags" to "gdb_byte *".
2410 (adi_print_versions): Likewise.
2411
2412 2017-11-04 Tom Tromey <tom@tromey.com>
2413
2414 * breakpoint.c
2415 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2416 from start_rbreak_breakpoints.
2417 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2418 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2419 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2420 * symtab.c (do_end_rbreak_breakpoints): Remove.
2421 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2422
2423 2017-11-04 Tom Tromey <tom@tromey.com>
2424
2425 * cp-namespace.c (reset_directive_searched): Remove.
2426 (cp_lookup_symbol_via_imports): Use scoped_restore.
2427 * cp-support.c (reset_directive_searched): Remove.
2428 (make_symbol_overload_list_using): Use scoped_restore.
2429 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2430 (reset_directive_searched): Remove.
2431
2432 2017-11-04 Tom Tromey <tom@tromey.com>
2433
2434 * symfile.c (find_separate_debug_file_by_debuglink): Use
2435 unique_xmalloc_ptr.
2436
2437 2017-11-04 Tom Tromey <tom@tromey.com>
2438
2439 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2440 type of "info".
2441 (compute_stack_depth): Likewise.
2442 (do_compile_dwarf_expr_to_c): Use std::vector.
2443
2444 2017-11-04 Tom Tromey <tom@tromey.com>
2445
2446 * compile/compile-object-load.c (link_callbacks_einfo): Use
2447 std::string.
2448
2449 2017-11-04 Tom Tromey <tom@tromey.com>
2450
2451 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2452 Use scoped_free_pendings.
2453 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2454 scoped_free_pendings.
2455 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2456 (xcoff_initial_scan): Likewise.
2457 * buildsym.c (reset_symtab_globals): Update comment.
2458 (scoped_free_pendings): Rename from really_free_pendings.
2459 (prepare_for_building): Update comment.
2460 (buildsym_init): Likewise.
2461 * buildsym.h (class scoped_free_pendings): New class.
2462 (really_free_pendings): Don't declare.
2463
2464 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2465
2466 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2467 output when converting a zero value to a special byteorder format.
2468
2469 2017-11-02 Yao Qi <yao.qi@linaro.org>
2470
2471 * frame.c (do_frame_register_read): Remove aspace.
2472 * jit.c (jit_frame_sniffer): Likwise.
2473 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2474 * regcache.c (regcache::regcache): Pass nullptr.
2475 (regcache_print): Caller updated.
2476 * regcache.h (regcache::regcache): Remove one constructor
2477 parameter aspace.
2478
2479 2017-11-02 Yao Qi <yao.qi@linaro.org>
2480
2481 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2482
2483 2017-11-02 Yao Qi <yao.qi@linaro.org>
2484
2485 * breakpoint.c (insert_single_step_breakpoints): Update.
2486 * frame.c (struct frame_info) <aspace>: Add const.
2487 (frame_save_as_regcache): Add const.
2488 (get_frame_address_space): Return const address_space *.
2489 * frame.h (get_frame_address_space): Update declaration.
2490 * infrun.c (struct step_over_info) <aspace>: Add const.
2491 (set_step_over_info): Make aspace const.
2492 (displaced_step_prepare_throw): Change variable const.
2493 (resume): Likewise.
2494 (proceed): Likewise.
2495 (adjust_pc_after_break): Likewise.
2496 (save_waitstatus): Likewise.
2497 (handle_signal_stop): Likewise.
2498 (keep_going_pass_signal): Likewise.
2499 * jit.c (jit_frame_sniffer): Add const.
2500 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2501 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2502 * record-full.c (record_full_wait_1): Likewise.
2503 * regcache.c (regcache::regcache): Change parameter to const.
2504 * regcache.h (regcache::regcache): Likewise.
2505 (regcache::aspace): Return const address_space *.
2506 (regcache) <m_aspace>: Add const.
2507
2508 2017-11-02 Yao Qi <yao.qi@linaro.org>
2509
2510 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2511 * frame.c (create_sentinel_frame): Likewise.
2512 * infrun.c (displaced_step_prepare_throw): Likewise.
2513 (resume): Likewise.
2514 (thread_still_needs_step_over_bp): Likewise.
2515 (proceed): Likewise.
2516 (do_target_wait): Likewise.
2517 (adjust_pc_after_break): Likewise.
2518 (handle_syscall_event): Likewise.
2519 (save_waitstatus): Likewise.
2520 (handle_inferior_event_1): Likewise.
2521 (handle_signal_stop): Likewise.
2522 (keep_going_pass_signal): Likewise.
2523 * linux-nat.c (status_callback): Likewise.
2524 (save_stop_reason): Likewise.
2525 (resume_stopped_resumed_lwps): Likewise.
2526 * record-full.c (record_full_exec_insn): Likewise.
2527 (record_full_wait_1): Likewise.
2528 * regcache.c (get_regcache_aspace): Remove.
2529 * regcache.h (get_regcache_aspace): Remove.
2530
2531 2017-11-02 Yao Qi <yao.qi@linaro.org>
2532
2533 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2534 (init_regcache_descr): Use gdbarch_num_regs.
2535 (regcache::regcache): Likewise.
2536 (regcache::get_register_status): Likewise.
2537 (regcache::assert_raw_regnum): Likewise.
2538 (regcache::cooked_read): Likewise.
2539 (regcache::cooked_read_value): Likewise.
2540 (regcache::cooked_write): Likewise.
2541 (regcache::dump): Likewise.
2542 (regcache::num_raw_registers): New method.
2543 * regcache.h (class regcache) <num_raw_registers>: New.
2544
2545 2017-11-02 Yao Qi <yao.qi@linaro.org>
2546
2547 * regcache.c (regcache::assert_regnum): New method.
2548 (regcache::invalidate): Call assert_regnum.
2549 (regcache::raw_update): Likewise.
2550 (regcache::raw_write): Likewise.
2551 (regcache::raw_read_part): Likewise.
2552 (regcache::raw_write_part): Likewise.
2553 (regcache::raw_supply): Likewise.
2554 (regcache::raw_supply_integer): Likewise.
2555 (regcache::raw_supply_zeroed): Likewise.
2556 (regcache::raw_collect): Likewise.
2557 (regcache::raw_collect_integer): Likewise.
2558 * regcache.h (regcache::assert_regnum): Declare.
2559
2560 2017-11-02 Yao Qi <yao.qi@linaro.org>
2561
2562 * regcache.c (regcache::dump): Remove code.
2563
2564 2017-11-02 Yao Qi <yao.qi@linaro.org>
2565
2566 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2567 Remove.
2568 <sizeof_cooked_register_status>: Remove.
2569 (init_regcache_descr): Update.
2570 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2571 (regcache::save): Likewise.
2572 (regcache::dump): Likewise.
2573
2574 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2575
2576 * ft32-tdep.c (ft32_fetch_instruction): New function.
2577 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2578
2579 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2580
2581 * cli/cli-script.c (execute_control_command): Rename to ...
2582 (execute_control_command_1): ... this.
2583 (execute_control_command): New function.
2584
2585 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2586
2587 * tracepoint.c (tfind_command): Remove const_cast.
2588
2589 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2590
2591 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2592
2593 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * common/common-utils.h (in_inclusive_range): New function.
2596 * arm-tdep.c (arm_record_extension_space): Use
2597 in_inclusive_range.
2598 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2599 * cris-tdep.c (cris_spec_reg_applicable): Use
2600 in_inclusive_range.
2601
2602 2017-10-30 Pedro Alves <palves@redhat.com>
2603 Simon Marchi <simon.marchi@ericsson.com>
2604
2605 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2606 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2607
2608 2017-10-30 Pedro Alves <palves@redhat.com>
2609
2610 * common/common-utils.c (string_appendf, string_vappendf): New
2611 functions.
2612 * common/common-utils.h (string_appendf, string_vappendf): New
2613 declarations.
2614 * unittests/common-utils-selftests.c (string_appendf_func)
2615 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2616 (string_vappendf_tests): New functions.
2617 (_initialize_common_utils_selftests): Register "string_appendf" and
2618 "string_vappendf tests".
2619
2620 2017-10-30 Pedro Alves <palves@redhat.com>
2621
2622 * unittests/common-utils-selftests.c (format_func): New typedef.
2623 (string_printf_tests, string_vprintf_tests): Tests factored out
2624 and merged to ...
2625 (test_format_func): ... this new function.
2626 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2627 test_format_func.
2628
2629 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * darwin-nat.c: Remove include of gdb.h.
2632
2633 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * xtensa-xtregs.c: Fix formatting issues.
2636
2637 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2638
2639 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2640
2641 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2642
2643 PR python/21213
2644 * python/py-infthread.c (thpy_get_inferior): Increment reference
2645 of inferior before returning it.
2646
2647 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2648
2649 * unittests/common-utils-selftests.c (format): Add
2650 ATTRIBUTE_PRINTF.
2651
2652 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2653
2654 * xml-syscall.c (struct syscall_desc): Add constructor.
2655 <name>: Change type to std::string.
2656 (syscall_desc_up): New typedef.
2657 (syscall_desc_p): Remove typeder.
2658 (DEF_VEC_P(syscall_desc_p)): Remove.
2659 (struct syscall_group_desc): Add constructor.
2660 <name>: Change type to std::string.
2661 <syscalls>: Change type to std::vector.
2662 (syscall_group_desc_up): New typedef.
2663 (syscall_group_desc_p): Remove typedef.
2664 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2665 (struct syscalls_info) <syscalls>: Change type to std::vector of
2666 unique_ptr.
2667 <groups>: Likewise.
2668 <my_gdb_datadir>: Change type to std::string.
2669 (syscalls_info_up): New typedef.
2670 (allocate_syscalls_info): Remove.
2671 (syscalls_info_free_syscalls_desc): Remove.
2672 (syscalls_info_free_syscall_group_desc): Remove.
2673 (free_syscalls_info): Remove.
2674 (make_cleanup_free_syscalls_info): Remove.
2675 (syscall_group_create_syscall_group_desc): Adjust.
2676 (syscall_group_add_syscall): Adjust.
2677 (syscall_create_syscall_desc): Adjust.
2678 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2679 (init_syscalls_info): Adjust.
2680 (syscall_group_get_group_by_name): Adjust.
2681 (xml_get_syscall_number): Adjust.
2682 (xml_get_syscall_name): Adjust.
2683 (xml_list_of_syscalls): Adjust.
2684 (xml_list_syscalls_by_group): Adjust.
2685 (xml_list_of_groups): Adjust.
2686
2687 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2688
2689 * probe.h: Don't include gdb_vecs.h.
2690 (DEF_VEC_P (probe_p)): Remove.
2691 (find_probes_in_objfile): Return an std::vector.
2692 * probe.c (find_probes_in_objfile): Likewise.
2693 * breakpoint.c (breakpoint_objfile_data)
2694 <longjmp_probes>: Change type to std::vector.
2695 <exception_probes>: Likewise.
2696 (free_breakpoint_probes): Don't manually free vectors.
2697 (create_longjmp_master_breakpoint): Adjust.
2698 (create_exception_master_breakpoint): Adjust.
2699 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2700 parameter type, adjust.
2701 (svr4_create_solib_event_breakpoints): Adjust.
2702
2703 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2706 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2707 with new.
2708 (free_breakpoint_probes): Rename to ...
2709 (free_breakpoint_objfile_data): ... this, and call delete on
2710 bp_objfile_data..
2711
2712 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2715 (loaded_script_ptr): Remove typedef.
2716 (DEF_VEC_P (loaded_script_ptr)): Remove.
2717 (struct collect_matching_scripts_data): Add constructor.
2718 <scripts_p>: Change type to (pointer to) std::vector.
2719 (collect_matching_scripts_data): Adjust.
2720 (sort_scripts_by_name): Make suitable for std::sort.
2721 (print_scripts): Don't sort vector, adjust to std::vector.
2722 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2723
2724 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2725
2726 * symfile.c (filename_language): Make struct, not typedef. Add
2727 constructor.
2728 <ext>: Change type to std::string.
2729 (DEF_VEC_O (filename_language)): Remove.
2730 (filename_language_table): Change type to std::vector.
2731 (add_filename_language): Adjust.
2732 (set_ext_lang_command): Adjust.
2733 (info_ext_lang_command): Adjust.
2734 (deduce_language_from_filename): Adjust.
2735 (class scoped_restore_filename_language_table): Remove.
2736 (test_filename_language): Use scoped_restore.
2737 (test_set_ext_lang_command): Use scoped_restore, adjust to
2738 std::vector change.
2739
2740 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * symfile.c: Include selftest.h.
2743 (class scoped_restore_filename_language_table): New.
2744 (test_filename_language): New test.
2745 (test_set_ext_lang_command): New test.
2746 (_initialize_symfile): Register tests.
2747
2748 2017-10-27 Keith Seitz <keiths@redhat.com>
2749
2750 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2751 in the bp_location, falling back to find_pc_sect_function when
2752 needed.
2753 (add_location_to_breakpoint): Save sal->symbol.
2754 * breakpoint.h (struct bp_location) <symbol>: New field.
2755 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2756 * symtab.h (struct symtab_and_line) <symbol>: New field.
2757
2758 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2759
2760 PR gdb/13669
2761 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2762 to rewind obstack.
2763
2764 2017-10-26 Pedro Alves <palves@redhat.com>
2765
2766 * remote.c (remote_async_terminal_ours_p): Delete.
2767 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2768 Remove references to 'remote_async_terminal_ours_p'.
2769
2770 2017-10-26 Yao Qi <yao.qi@linaro.org>
2771
2772 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2773
2774 2017-10-26 Yao Qi <yao.qi@linaro.org>
2775
2776 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2777 aspace const.
2778 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2779 Likewise.
2780 * breakpoint.c (bpstat_check_location): Remove cast.
2781 (breakpoint_hit_catch_fork): Make aspce const.
2782 (breakpoint_hit_catch_solib): Likewise.
2783 (breakpoint_hit_catch_exec): Likewise.
2784 (breakpoint_hit_ranged_breakpoint): Likewise.
2785 (breakpoint_hit_watchpoint): Likewise.
2786 (base_breakpoint_breakpoint_hit): Likewise.
2787 (bkpt_breakpoint_hit): Likewise.
2788 (dprintf_breakpoint_hit): Likewise.
2789 (tracepoint_breakpoint_hit): Likewise.
2790 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2791
2792 2017-10-26 Yao Qi <yao.qi@linaro.org>
2793
2794 * breakpoint.c (breakpoint_location_address_match): Change
2795 "struct address_space *" to "const address_space".
2796 (breakpoint_location_address_range_overlap): Likewise.
2797 (breakpoint_here_p): Likewise.
2798 (breakpoint_in_range_p): Likewise.
2799 (moribund_breakpoint_here_p): Likewise.
2800 (bp_location_inserted_here_p): Likewise.
2801 (software_breakpoint_inserted_here_p): Likewise.
2802 (hardware_breakpoint_inserted_here_p): Likewise.
2803 (hardware_watchpoint_inserted_in_range): Likewise.
2804 (bpstat_check_location): Likewise.
2805 (bpstat_stop_status): Likewise.
2806 (breakpoint_address_match): Likewise.
2807 (breakpoint_address_match_range): Likewise.
2808 (breakpoint_location_address_match): Likewise.
2809 (breakpoint_location_address_range_overlap): Likewise.
2810 (insert_single_step_breakpoint): Likewise.
2811 (breakpoint_has_location_inserted_here): Likewise.
2812 (single_step_breakpoint_inserted_here_p): Likewise.
2813 (pc_at_non_inline_function): Likewise.
2814 * breakpoint.h (bpstat_stop_status): Update declaration.
2815 (breakpoint_here_p): Likewise.
2816 (breakpoint_in_range_p): Likewise.
2817 (moribund_breakpoint_here_p): Likewise.
2818 (breakpoint_inserted_here_p): Likewise.
2819 (software_breakpoint_inserted_here_p): Likewise.
2820 (hardware_breakpoint_inserted_here_p): Likewise.
2821 (breakpoint_has_location_inserted_here): Likewise.
2822 (single_step_breakpoint_inserted_here_p): Likewise.
2823 (hardware_watchpoint_inserted_in_range): Likewise.
2824 (breakpoint_address_match): Likewise.
2825 (insert_single_step_breakpoint): Likewise.
2826 (pc_at_non_inline_function): Likewise.
2827 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2828 * record.c (record_check_stopped_by_breakpoint): Likewise.
2829 * record.h (record_check_stopped_by_breakpoint): Likewise.
2830 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2831
2832 2017-10-25 Yao Qi <yao.qi@linaro.org>
2833
2834 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2835 regcache->arch () instead get_regcache_arch.
2836 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2837 Likewise.
2838 (aarch64_fbsd_store_inferior_registers): Likewise.
2839 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2840 (store_gregs_to_thread): Likewise.
2841 (fetch_fpregs_from_thread): Likewise.
2842 (store_fpregs_to_thread): Likewise.
2843 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2844 (aarch64_store_return_value): Likewise.
2845 (aarch64_software_single_step): Likewise.
2846 * aix-thread.c (aix_thread_wait): Likewise.
2847 (supply_reg32): Likewise.
2848 (supply_sprs64): Likewise.
2849 (supply_sprs32): Likewise.
2850 (fill_gprs64): Likewise.
2851 (fill_gprs32): Likewise.
2852 (fill_sprs64): Likewise.
2853 (fill_sprs32): Likewise.
2854 (store_regs_user_thread): Likewise.
2855 (store_regs_kernel_thread): Likewise.
2856 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2857 (alphabsd_store_inferior_registers): Likewise.
2858 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2859 (alpha_store_return_value): Likewise.
2860 (alpha_deal_with_atomic_sequence): Likewise.
2861 (alpha_next_pc): Likewise.
2862 (alpha_software_single_step): Likewise.
2863 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2864 (amd64bsd_store_inferior_registers): Likewise.
2865 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2866 Likewise.
2867 (amd64_linux_store_inferior_registers): Likewise.
2868 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2869 (amd64_collect_native_gregset): Likewise.
2870 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2871 (amd64obsd_collect_uthread): Likewise.
2872 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2873 (amd64_collect_fpregset): Likewise.
2874 (amd64_supply_fxsave): Likewise.
2875 (amd64_supply_xsave): Likewise.
2876 (amd64_collect_fxsave): Likewise.
2877 (amd64_collect_xsave): Likewise.
2878 * arc-tdep.c (arc_write_pc): Likewise.
2879 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2880 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2881 (arm_fbsd_store_inferior_registers): Likewise.
2882 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2883 (store_vfp_regs): Likewise.
2884 (arm_linux_fetch_inferior_registers): Likewise.
2885 (arm_linux_store_inferior_registers): Likewise.
2886 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2887 (arm_linux_sigreturn_next_pc): Likewise.
2888 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2889 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2890 (fetch_register): Likewise.
2891 (store_register): Likewise.
2892 * arm-tdep.c (arm_is_thumb): Likewise.
2893 (displaced_in_arm_mode): Likewise.
2894 (bx_write_pc): Likewise.
2895 (arm_get_next_pcs_addr_bits_remove): Likewise.
2896 (arm_software_single_step): Likewise.
2897 (arm_extract_return_value): Likewise.
2898 (arm_store_return_value): Likewise.
2899 (arm_write_pc): Likewise.
2900 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2901 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2902 (bsd_uthread_store_registers): Likewise.
2903 * core-regset.c (fetch_core_registers): Likewise.
2904 * corelow.c (get_core_registers): Likewise.
2905 * cris-tdep.c (cris_store_return_value): Likewise.
2906 (cris_extract_return_value): Likewise.
2907 (find_step_target): Likewise.
2908 (find_step_target): Likewise.
2909 (cris_software_single_step): Likewise.
2910 * ctf.c (ctf_fetch_registers): Likewise.
2911 * darwin-nat.c (cancel_breakpoint): Likewise.
2912 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2913 * frv-tdep.c (frv_extract_return_value): Likewise.
2914 * ft32-tdep.c (ft32_store_return_value): Likewise.
2915 (ft32_extract_return_value): Likewise.
2916 * go32-nat.c (fetch_register): Likewise.
2917 (go32_fetch_registers): Likewise.
2918 (go32_store_registers): Likewise.
2919 (store_register): Likewise.
2920 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2921 (h8300_store_return_value): Likewise.
2922 * hppa-linux-nat.c (fetch_register): Likewise.
2923 (store_register): Likewise.
2924 (hppa_linux_fetch_inferior_registers): Likewise.
2925 (hppa_linux_store_inferior_registers): Likewise.
2926 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2927 (i386_darwin_store_inferior_registers): Likewise.
2928 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2929 (gnu_store_registers): Likewise.
2930 * i386-linux-nat.c (fetch_register): Likewise.
2931 (store_register): Likewise.
2932 (supply_gregset): Likewise.
2933 (fill_gregset): Likewise.
2934 (i386_linux_fetch_inferior_registers): Likewise.
2935 (i386_linux_store_inferior_registers): Likewise.
2936 (i386_linux_resume): Likewise.
2937 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2938 Likewise.
2939 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2940 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2941 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2942 (i386obsd_collect_uthread): Likewise.
2943 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2944 (i386_supply_gregset): Likewise.
2945 (i386_collect_gregset): Likewise.
2946 (i386_supply_fpregset): Likewise.
2947 (i386_collect_fpregset): Likewise.
2948 (i386_mpx_bd_base): Likewise.
2949 * i386-v4-nat.c (supply_fpregset): Likewise.
2950 (fill_fpregset): Likewise.
2951 * i387-tdep.c (i387_supply_fsave): Likewise.
2952 (i387_collect_fsave): Likewise.
2953 (i387_supply_fxsave): Likewise.
2954 (i387_collect_fxsave): Likewise.
2955 (i387_supply_xsave): Likewise.
2956 (i387_collect_xsave): Likewise.
2957 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2958 (ia64_linux_store_registers): Likewise.
2959 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2960 (ia64_extract_return_value): Likewise.
2961 (ia64_store_return_value): Likewise.
2962 (find_func_descr): Likewise.
2963 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2964 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2965 (inf_ptrace_store_registers): Likewise.
2966 * infrun.c (use_displaced_stepping): Likewise.
2967 (displaced_step_prepare_throw): Likewise.
2968 (resume): Likewise.
2969 (proceed): Likewise.
2970 (do_target_wait): Likewise.
2971 (adjust_pc_after_break): Likewise.
2972 (handle_inferior_event_1): Likewise.
2973 (handle_signal_stop): Likewise.
2974 (save_infcall_suspend_state): Likewise.
2975 (restore_infcall_suspend_state): Likewise.
2976 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2977 * jit.c (jit_frame_prev_register): Likewise.
2978 * linux-nat.c (save_stop_reason): Likewise.
2979 (linux_nat_wait_1): Likewise.
2980 (resume_stopped_resumed_lwps): Likewise.
2981 * linux-record.c (record_linux_sockaddr): Likewise.
2982 (record_linux_msghdr): Likewise.
2983 (record_linux_system_call): Likewise.
2984 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2985 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2986 (lm32_store_return_value): Likewise.
2987 * m32c-tdep.c (m32c_read_flg): Likewise.
2988 (m32c_pseudo_register_read): Likewise.
2989 (m32c_pseudo_register_write): Likewise.
2990 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2991 (m32r_linux_collect_gregset): Likewise.
2992 * m32r-tdep.c (m32r_store_return_value): Likewise.
2993 (m32r_extract_return_value): Likewise.
2994 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2995 (m68kbsd_collect_fpregset): Likewise.
2996 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2997 * m68k-linux-nat.c (fetch_register): Likewise.
2998 (old_fetch_inferior_registers): Likewise.
2999 (old_store_inferior_registers): Likewise.
3000 (store_regs): Likewise.
3001 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3002 (m68k_svr4_store_return_value): Likewise.
3003 * m88k-tdep.c (m88k_store_arguments): Likewise.
3004 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3005 (mi_cmd_data_write_register_values): Likewise.
3006 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3007 (mips_fbsd_store_inferior_registers): Likewise.
3008 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3009 (mips_fbsd_supply_gregs): Likewise.
3010 (mips_fbsd_collect_fpregs): Likewise.
3011 (mips_fbsd_collect_gregs): Likewise.
3012 (mips_fbsd_supply_fpregset): Likewise.
3013 (mips_fbsd_collect_fpregset): Likewise.
3014 (mips_fbsd_supply_gregset): Likewise.
3015 (mips_fbsd_collect_gregset): Likewise.
3016 * mips-linux-nat.c (supply_gregset): Likewise.
3017 (fill_gregset): Likewise.
3018 (supply_fpregset): Likewise.
3019 (fill_fpregset): Likewise.
3020 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3021 (mips_fill_gregset): Likewise.
3022 (mips_supply_fpregset): Likewise.
3023 (mips_fill_fpregset): Likewise.
3024 (mips64_supply_gregset): Likewise.
3025 (micromips_linux_sigframe_validate): Likewise.
3026 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3027 (mipsnbsd_fetch_inferior_registers): Likewise.
3028 (mipsnbsd_store_inferior_registers): Likewise.
3029 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3030 (mipsnbsd_supply_gregset): Likewise.
3031 (mipsnbsd_iterate_over_regset_sections): Likewise.
3032 (mipsnbsd_supply_reg): Likewise.
3033 (mipsnbsd_supply_fpreg): Likewise.
3034 * mips-tdep.c (mips_in_frame_stub): Likewise.
3035 (mips_dummy_id): Likewise.
3036 (is_octeon_bbit_op): Likewise.
3037 (micromips_bc1_pc): Likewise.
3038 (extended_mips16_next_pc): Likewise.
3039 (mips16_next_pc): Likewise.
3040 (deal_with_atomic_sequence): Likewise.
3041 * moxie-tdep.c (moxie_process_readu): Likewise.
3042 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3043 * nto-procfs.c (procfs_store_registers): Likewise.
3044 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3045 (ppcfbsd_store_inferior_registers): Likewise.
3046 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3047 (fetch_altivec_register): Likewise.
3048 (get_spe_registers): Likewise.
3049 (fetch_spe_register): Likewise.
3050 (fetch_altivec_registers): Likewise.
3051 (fetch_all_gp_regs): Likewise.
3052 (fetch_all_fp_regs): Likewise.
3053 (store_vsx_register): Likewise.
3054 (store_altivec_register): Likewise.
3055 (set_spe_registers): Likewise.
3056 (store_spe_register): Likewise.
3057 (store_altivec_registers): Likewise.
3058 (store_all_gp_regs): Likewise.
3059 (store_all_fp_regs): Likewise.
3060 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3061 (ppc_linux_collect_gregset): Likewise.
3062 (ppc_canonicalize_syscall): Likewise.
3063 (ppc_linux_record_signal): Likewise.
3064 (ppu2spu_prev_register): Likewise.
3065 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3066 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3067 (ppcobsd_store_registers): Likewise.
3068 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3069 Likewise.
3070 (ppc_ravenscar_generic_store_registers): Likewise.
3071 * procfs.c (procfs_fetch_registers): Likewise.
3072 (procfs_store_registers): Likewise.
3073 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3074 (ravenscar_store_registers): Likewise.
3075 (ravenscar_prepare_to_store): Likewise.
3076 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3077 * record-full.c (record_full_wait_1): Likewise.
3078 (record_full_registers_change): Likewise.
3079 (record_full_store_registers): Likewise.
3080 (record_full_core_fetch_registers): Likewise.
3081 (record_full_save): Likewise.
3082 (record_full_goto_insn): Likewise.
3083 * regcache.c (regcache_register_size): Likewise.
3084 (get_regcache_arch): Remove.
3085 (regcache_read_pc): Likewise.
3086 * regcache.h (get_regcache_arch): Remove.
3087 * remote-sim.c (gdbsim_fetch_register): Likewise.
3088 (gdbsim_store_register): Likewise.
3089 * remote.c (fetch_register_using_p): Likewise.
3090 (send_g_packet): Likewise.
3091 (remote_prepare_to_store): Likewise.
3092 (store_registers_using_G): Likewise.
3093 * reverse.c (save_bookmark_command): Likewise.
3094 (goto_bookmark_command): Likewise.
3095 * rs6000-aix-tdep.c (branch_dest): Likewise.
3096 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3097 (fetch_register): Likewise.
3098 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3099 (ppc_collect_reg): Likewise.
3100 (ppc_collect_gregset): Likewise.
3101 (ppc_collect_fpregset): Likewise.
3102 (ppc_collect_vsxregset): Likewise.
3103 (ppc_collect_vrregset): Likewise.
3104 (ppc_displaced_step_hw_singlestep): Likewise.
3105 (rs6000_pseudo_register_read): Likewise.
3106 (rs6000_pseudo_register_write): Likewise.
3107 * s390-linux-nat.c (supply_gregset): Likewise.
3108 (fill_gregset): Likewise.
3109 (s390_linux_fetch_inferior_registers): Likewise.
3110 * s390-linux-tdep.c (s390_write_pc): Likewise.
3111 (s390_software_single_step): Likewise.
3112 (s390_all_but_pc_registers_record): Likewise.
3113 (s390_linux_syscall_record): Likewise.
3114 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3115 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3116 (shnbsd_store_inferior_registers): Likewise.
3117 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3118 (sh_extract_return_value_fpu): Likewise.
3119 (sh_store_return_value_nofpu): Likewise.
3120 (sh_corefile_supply_regset): Likewise.
3121 (sh_corefile_collect_regset): Likewise.
3122 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3123 (sh64_store_return_value): Likewise.
3124 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3125 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3126 (sparc_store_inferior_registers): Likewise.
3127 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3128 (sparc_ravenscar_prepare_to_store): Likewise.
3129 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3130 (sparc_analyze_control_transfer): Likewise.
3131 (sparc_step_trap): Likewise.
3132 (sparc_software_single_step): Likewise.
3133 (sparc32_gdbarch_init): Likewise.
3134 (sparc_supply_rwindow): Likewise.
3135 (sparc_collect_rwindow): Likewise.
3136 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3137 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3138 (sparc64nbsd_collect_gregset): Likewise.
3139 (sparc64nbsd_supply_fpregset): Likewise.
3140 (sparc64nbsd_collect_fpregset): Likewise.
3141 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3142 (sparc64_supply_gregset): Likewise.
3143 (sparc64_collect_gregset): Likewise.
3144 (sparc64_supply_fpregset): Likewise.
3145 (sparc64_collect_fpregset): Likewise.
3146 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3147 * spu-tdep.c (spu_unwind_sp): Likewise.
3148 (spu2ppu_prev_register): Likewise.
3149 (spu_memory_remove_breakpoint): Likewise.
3150 * stack.c (return_command): Likewise.
3151 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3152 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3153 * tracefile.c (trace_save_ctf): Likewise.
3154 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3155 (do_windows_store_inferior_registers): Likewise.
3156 (windows_resume): Likewise.
3157 * xtensa-linux-nat.c (fill_gregset): Likewise.
3158 (supply_gregset_reg): Likewise.
3159 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3160 (xtensa_register_read_masked): Likewise.
3161 (xtensa_supply_gregset): Likewise.
3162 (xtensa_extract_return_value): Likewise.
3163 (xtensa_store_return_value): Likewise.
3164
3165 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3166
3167 * doublest.c (floatformat_from_string): New function.
3168 * doublest.h (floatformat_from_string): Add prototype.
3169
3170 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3171 (OP_FLOAT): ... this.
3172 * expression.h: Do not include "doublest.h".
3173 (union exp_element): Replace doubleconst and decfloatconst by
3174 new element floatconst.
3175 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3176 (ada_evaluate_subexp): Likewise.
3177 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3178 OP_DOUBLE and OP_DECFLOAT.
3179 * expprint.c (print_subexp_standard): Likewise.
3180 (dump_subexp_body_standard): Likewise.
3181 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3182
3183 * parse.c: Include "dfp.h".
3184 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3185 (write_exp_elt_floatcst): New function.
3186 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3187 and OP_DECFLOAT.
3188 (operator_check_standard): Likewise.
3189 (parse_float): Do not accept suffix. Take type as input. Return bool.
3190 Return target format buffer instead of host DOUBLEST.
3191 Use floatformat_from_string and decimal_from_string to parse
3192 either binary or decimal floating-point types.
3193 (parse_c_float): Remove.
3194 * parser-defs.h: Do not include "doublest.h".
3195 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3196 (write_exp_elt_floatcst): Add prototype.
3197 (parse_float): Update prototype.
3198 (parse_c_float): Remove.
3199
3200 * c-exp.y: Do not include "dfp.h".
3201 (typed_val_float): Use byte buffer instead of DOUBLEST.
3202 (typed_val_decfloat): Remove.
3203 (DECFLOAT): Remove.
3204 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3205 (parse_number): Update to new parse_float interface.
3206 Parse suffixes and determine type before calling parse_float.
3207 Handle decimal and binary FP types the same way.
3208
3209 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3210 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3211 (parse_number): Update to new parse_float interface.
3212 Parse suffixes and determine type before calling parse_float.
3213
3214 * f-exp.y: Replace dval by typed_val_float.
3215 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3216 (parse_number): Use parse_float instead of atof.
3217
3218 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3219 (parse_go_float): Remove.
3220 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3221 (parse_number): Call parse_float instead of parse_go_float.
3222 Parse suffixes and determine type before calling parse_float.
3223
3224 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3225 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3226 (parse_number): Update to new parse_float interface.
3227 Parse suffixes and determine type before calling parse_float.
3228
3229 * m2-exp.y: Replace dval by byte buffer val.
3230 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3231 (parse_number): Call parse_float instead of atof.
3232
3233 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3234 (lex_number): Call parse_float instead of strtod.
3235 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3236 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3237 Use write_exp_elt_floatcst.
3238 (unit_testing): Remove static variable.
3239 (rust_type): Do not check unit_testing.
3240 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3241
3242 * ada-exp.y (type_float, type_double): Remove.
3243 (typed_val_float): Use byte buffer instead of DOUBLEST.
3244 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3245 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3246
3247 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3248
3249 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3250 * arch/aarch64.h: New file.
3251
3252 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3253
3254 * dfp.h (decimal_from_string): Use const reference for argument.
3255 * dfp.c (decimal_from_string): Likewise.
3256
3257 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3258
3259 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3260 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3261 * mips-tdep.c (mips_print_fp_register): Likewise.
3262
3263 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3264
3265 * common/format.h (enum argclass): Replace decfloat_arg by
3266 dec32float_arg, dec64float_arg, and dec128float_arg.
3267 * common/format.c (parse_format_string): Update to return
3268 new decimal float argument classes.
3269
3270 * printcmd.c (printf_decfloat): Rename to ...
3271 (printf_floating): ... this. Add argclass argument, and use it
3272 instead of parsing the format string again. Add support for
3273 binary floating-point values, using floatformat_to_string.
3274 Convert value to the target format if it doesn't already match.
3275 (ui_printf): Call printf_floating instead of printf_decfloat,
3276 also for double_arg / long_double_arg. Pass argclass.
3277
3278 * dfp.c (decimal_to_string): Add format string argument.
3279 * dfp.h (decimal_to_string): Likewise.
3280
3281 * doublest.c (floatformat_to_string): Add format string argument.
3282 * doublest.h (floatformat_to_string): Likewise.
3283
3284 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3285
3286 * doublest.c (floatformat_precision): New routine.
3287 (floatformat_to_string): Likewise.
3288 * doublest.c (floatformat_to_string): Add prototype.
3289
3290 * printcmd.c (print_scalar_formatted): Only call print_floating
3291 on floating-point types.
3292 * valprint.c: Do not include "floatformat.h".
3293 (generic_val_print_decfloat): Remove.
3294 (generic_val_print): Call generic_val_print_float for both
3295 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3296 (print_floating): Use floatformat_to_string. Handle decimal float.
3297 (print_decimal_floating): Remove, merge into floatformat_to_string.
3298 * value.h (print_decimal_floating): Remove.
3299
3300 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3301
3302 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3303
3304 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3305
3306 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3307
3308 * memattr.h: Don't include vec.h.
3309 (struct mem_attrib): Initialize fields.
3310 <unknown>: New static method.
3311 (struct mem_region): Add constructors, operator<, initialize
3312 fields.
3313 * memattr.c: Include algorithm.
3314 (default_mem_attrib, unknown_mem_attrib): Remove.
3315 (user_mem_region_list): New global.
3316 (target_mem_region_list, mem_region_list): Change type to
3317 std::vector<mem_region>.
3318 (mem_use_target): Now a function.
3319 (target_mem_regions_valid): Change type to bool.
3320 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3321 (require_user_regions): Adjust.
3322 (require_target_regions): Adjust.
3323 (create_mem_region): Adjust.
3324 (lookup_mem_region): Adjust.
3325 (invalidate_target_mem_regions): Adjust.
3326 (mem_clear): Rename to...
3327 (user_mem_clear): ... this, and adjust.
3328 (mem_command): Adjust.
3329 (info_mem_command): Adjust.
3330 (mem_enable, enable_mem_command, mem_disable,
3331 disable_mem_command): Adjust.
3332 (mem_delete): Adjust.
3333 (delete_mem_command): Adjust.
3334 * memory-map.h (parse_memory_map): Return an std::vector.
3335 * memory-map.c (parse_memory_map): Likewise.
3336 (struct memory_map_parsing_data): Add constructor.
3337 <memory_map>: Point to std::vector.
3338 (memory_map_start_memory): Adjust.
3339 (memory_map_end_memory): Adjust.
3340 (memory_map_end_property): Adjust.
3341 (clear_result): Remove.
3342 * remote.c (remote_memory_map): Return an std::vector.
3343 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3344 Remove.
3345 (target_debug_print_mem_region_vector): New.
3346 * target-delegates.c: Regenerate.
3347 * target.h (mem_region_vector): New typedef.
3348 (to_memory_map): Return mem_region_vector.
3349 (target_memory_map): Return an std::vector.
3350 * target.c (target_memory_map): Return an std::vector.
3351 (flash_erase_command): Adjust.
3352
3353 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3354
3355 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3356 Change type to std::string.
3357 (memory_map_start_property): Adjust.
3358 (memory_map_end_property): Adjust.
3359
3360 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3361
3362 * infrun.h: Include common/byte-vector.h.
3363 (struct displaced_step_closure): New struct.
3364 (struct buf_displaced_step_closure): New struct.
3365 * infrun.c (displaced_step_closure::~displaced_step_closure):
3366 Provide default implementation.
3367 (displaced_step_clear): Deallocate step closure with delete.
3368 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3369 (aarch64_displaced_step_closure): ... this, extend
3370 displaced_step_closure.
3371 (aarch64_displaced_step_data) <dsc>: Change type to
3372 aarch64_displaced_step_closure.
3373 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3374 unique_ptr.
3375 (aarch64_displaced_step_fixup): Add cast for displaced step
3376 closure.
3377 * amd64-tdep.c (displaced_step_closure): Rename to ...
3378 (amd64_displaced_step_closure): ... this, extend
3379 displaced_step_closure.
3380 <insn_buf>: Change type to std::vector<gdb_byte>.
3381 <max_len>: Remove.
3382 (fixup_riprel): Change type of DSC parameter, adjust to type
3383 change of insn_buf.
3384 (fixup_displaced_copy): Change type of DSC parameter.
3385 (amd64_displaced_step_copy_insn): Instantiate
3386 amd64_displaced_step_closure.
3387 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3388 to type change of insn_buf.
3389 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3390 parameter DSC.
3391 (arm_linux_copy_svc): Likewise.
3392 (cleanup_kernel_helper_return): Likewise.
3393 (arm_catch_kernel_helper_return): Likewise.
3394 (arm_linux_displaced_step_copy_insn): Instantiate
3395 arm_displaced_step_closure.
3396 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3397 (displaced_read_reg): Change type of parameter DSC.
3398 (branch_write_pc): Likewise.
3399 (load_write_pc): Likewise.
3400 (alu_write_pc): Likewise.
3401 (displaced_write_reg): Likewise.
3402 (arm_copy_unmodified): Likewise.
3403 (thumb_copy_unmodified_32bit): Likewise.
3404 (thumb_copy_unmodified_16bit): Likewise.
3405 (cleanup_preload): Likewise.
3406 (install_preload): Likewise.
3407 (arm_copy_preload): Likewise.
3408 (thumb2_copy_preload): Likewise.
3409 (install_preload_reg): Likewise.
3410 (arm_copy_preload_reg): Likewise.
3411 (cleanup_copro_load_store): Likewise.
3412 (install_copro_load_store): Likewise.
3413 (arm_copy_copro_load_store) Likewise.
3414 (thumb2_copy_copro_load_store): Likewise.
3415 (cleanup_branch): Likewise.
3416 (install_b_bl_blx): Likewise.
3417 (arm_copy_b_bl_blx): Likewise.
3418 (thumb2_copy_b_bl_blx): Likewise.
3419 (thumb_copy_b): Likewise.
3420 (install_bx_blx_reg): Likewise.
3421 (arm_copy_bx_blx_reg): Likewise.
3422 (thumb_copy_bx_blx_reg): Likewise.
3423 (cleanup_alu_imm): Likewise.
3424 (arm_copy_alu_imm): Likewise.
3425 (thumb2_copy_alu_imm): Likewise.
3426 (cleanup_alu_reg): Likewise.
3427 (install_alu_reg): Likewise.
3428 (arm_copy_alu_reg): Likewise.
3429 (thumb_copy_alu_reg): Likewise.
3430 (cleanup_alu_shifted_reg): Likewise.
3431 (install_alu_shifted_reg): Likewise.
3432 (arm_copy_alu_shifted_reg): Likewise.
3433 (cleanup_load): Likewise.
3434 (cleanup_store): Likewise.
3435 (arm_copy_extra_ld_st): Likewise.
3436 (install_load_store): Likewise.
3437 (thumb2_copy_load_literal): Likewise.
3438 (thumb2_copy_load_reg_imm): Likewise.
3439 (arm_copy_ldr_str_ldrb_strb): Likewise.
3440 (cleanup_block_load_all): Likewise.
3441 (cleanup_block_store_pc): Likewise.
3442 (cleanup_block_load_pc): Likewise.
3443 (arm_copy_block_xfer): Likewise.
3444 (thumb2_copy_block_xfer): Likewise.
3445 (cleanup_svc): Likewise.
3446 (install_svc): Likewise.
3447 (arm_copy_svc): Likewise.
3448 (thumb_copy_svc): Likewise.
3449 (arm_copy_undef): Likewise.
3450 (thumb_32bit_copy_undef): Likewise.
3451 (arm_copy_unpred): Likewise.
3452 (arm_decode_misc_memhint_neon): Likewise.
3453 (arm_decode_unconditional): Likewise.
3454 (arm_decode_miscellaneous): Likewise.
3455 (arm_decode_dp_misc): Likewise.
3456 (arm_decode_ld_st_word_ubyte): Likewise.
3457 (arm_decode_media): Likewise.
3458 (arm_decode_b_bl_ldmstm): Likewise.
3459 (arm_decode_ext_reg_ld_st): Likewise.
3460 (thumb2_decode_dp_shift_reg): Likewise.
3461 (thumb2_decode_ext_reg_ld_st): Likewise.
3462 (arm_decode_svc_copro): Likewise.
3463 (thumb2_decode_svc_copro): Likewise.
3464 (install_pc_relative): Likewise.
3465 (thumb_copy_pc_relative_16bit): Likewise.
3466 (thumb_decode_pc_relative_16bit): Likewise.
3467 (thumb_copy_pc_relative_32bit): Likewise.
3468 (thumb_copy_16bit_ldr_literal): Likewise.
3469 (thumb_copy_cbnz_cbz): Likewise.
3470 (thumb2_copy_table_branch): Likewise.
3471 (cleanup_pop_pc_16bit_all): Likewise.
3472 (thumb_copy_pop_pc_16bit): Likewise.
3473 (thumb_process_displaced_16bit_insn): Likewise.
3474 (decode_thumb_32bit_ld_mem_hints): Likewise.
3475 (thumb_process_displaced_32bit_insn): Likewise.
3476 (thumb_process_displaced_insn): Likewise.
3477 (arm_process_displaced_insn): Likewise.
3478 (arm_displaced_init_closure): Likewise.
3479 (arm_displaced_step_fixup): Add cast for closure.
3480 * arm-tdep.h: Include infrun.h.
3481 (displaced_step_closure): Rename to ...
3482 (arm_displaced_step_closure): ... this, extend
3483 displaced_step_closure.
3484 <u::svc::copy_svc_os>: Change type of parameter DSC.
3485 <cleanup>: Likewise.
3486 (arm_process_displaced_insn): Likewise.
3487 (arm_displaced_init_closure): Likewise.
3488 (displaced_read_reg): Likewise.
3489 (displaced_write_reg): Likewise.
3490 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3491 Adjust.
3492 * i386-tdep.h: Include infrun.h.
3493 (i386_displaced_step_closure): New typedef.
3494 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3495 i386_displaced_step_closure.
3496 (i386_displaced_step_fixup): Adjust.
3497 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3498 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3499 and unique_ptr.
3500 (ppc_displaced_step_fixup): Adjust.
3501 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3502 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3503 and unique_ptr.
3504 (s390_displaced_step_fixup): Adjust.
3505
3506 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3507
3508 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3509 Remove declarations.
3510
3511 2017-10-20 Tom Tromey <tom@tromey.com>
3512
3513 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3514 std::vector.
3515 (gdb_bfd_record_inclusion): Update.
3516 (bfdp): Remove typedef.
3517
3518 2017-10-20 Tom Tromey <tom@tromey.com>
3519
3520 * gdb_bfd.c (gdb_bfd_ref): Use new.
3521 (struct gdb_bfd_data): Add constructor, destructor, and member
3522 initializers.
3523 (gdb_bfd_unref): Use delete.
3524
3525 2017-10-20 Tom Tromey <tom@tromey.com>
3526
3527 * exec.c (exec_file_attach): Use new_bfd_ref.
3528 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3529 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3530 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3531 new_bfd_ref.
3532 * gdb_bfd.h (new_bfd_ref): New function.
3533
3534 2017-10-20 Pedro Alves <palves@redhat.com>
3535
3536 * main.c (captured_command_loop): Add attribute noinline.
3537
3538 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3539
3540 * interps.c (struct interp_factory): Add constructor.
3541 (interp_factory_p): Remove typedef.
3542 (DEF_VEC_P(interp_factory_p)): Remove.
3543 (interpreter_factories): Change type to std::vector.
3544 (interp_factory_register): Adjust.
3545 (interp_lookup): Adjust.
3546 (interpreter_completer): Adjust.
3547
3548 2017-10-19 Tom Tromey <tom@tromey.com>
3549
3550 * break-catch-syscall.c (catch_syscall_completer): Use
3551 std::string, gdb::unique_xmalloc_ptr.
3552
3553 2017-10-19 Tom Tromey <tom@tromey.com>
3554
3555 * infcall.c (call_function_by_hand_dummy): Use std::string.
3556
3557 2017-10-19 Tom Tromey <tom@tromey.com>
3558
3559 * mi/mi-main.c (mi_cmd_execute): Update.
3560 * top.h (prepare_execute_command): Return scoped_value_mark.
3561 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3562 Add move constructor.
3563 * top.c (prepare_execute_command): Return scoped_value_mark.
3564 (execute_command): Update.
3565
3566 2017-10-19 Pedro Alves <palves@redhat.com>
3567
3568 * xml-support.c (xml_fetch_content_from_file): Check fread's
3569 return.
3570
3571 2017-10-19 Pedro Alves <palves@redhat.com>
3572
3573 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3574 async.
3575 (handle_error_fd): New function.
3576 (ser_base_async): Add/delete an event loop file handler for
3577 error_fd.
3578
3579 2017-10-19 Pedro Alves <palves@redhat.com>
3580
3581 * xml-support.c (xml_fetch_content_from_file): Don't read in
3582 chunks. Instead use fseek to determine the file's size, and read
3583 it in one go.
3584
3585 2017-11-18 Keith Seitz <keiths@redhat.com>
3586
3587 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3588 types.
3589 Add whitespace to front of type name.
3590
3591 2017-10-18 Keith Seitz <keiths@redhat.com>
3592
3593 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3594 DW_AT_accessibility.
3595
3596 2017-10-18 Yao Qi <yao.qi@linaro.org>
3597
3598 * features/tic6x-c62x-linux.c: Remove.
3599
3600 2017-10-17 Tom Tromey <tom@tromey.com>
3601
3602 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3603 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3604 (do_mixed_source_and_assembly): Likewise.
3605
3606 2017-10-17 Tom Tromey <tom@tromey.com>
3607
3608 * regcache.c (regcache::xfer_part): Remove assertion.
3609
3610 2017-10-17 Pedro Alves <palves@redhat.com>
3611
3612 * xml-support.c (xml_fetch_content_from_file): Call
3613 unique_ptr::release() instead unique_ptr::get() when passing
3614 through xrealloc.
3615
3616 2017-10-17 Yao Qi <yao.qi@linaro.org>
3617
3618 * regcache.c (regcache::xfer_part): Remove parameters read and
3619 write, add parameter is_raw. All callers are updated.
3620
3621 2017-10-16 Keith Seitz <keiths@redhat.com>
3622
3623 * c-typeprint.c (enum access_specifier): Moved here from
3624 c_type_print_base.
3625 (output_access_specifier): New function.
3626 (c_type_print_base): Consider typedefs when assessing
3627 whether access labels are needed.
3628 Use output_access_specifier as needed.
3629 Output access specifier for typedefs, if needed.
3630 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3631 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3632 fields.
3633 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3634 accessor macros.
3635
3636 2017-10-16 Tom Tromey <tom@tromey.com>
3637
3638 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3639 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3640 * target.c (target_fileio_read_stralloc): Update.
3641 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3642 * target.h (target_fileio_read_stralloc): Return
3643 unique_xmalloc_ptr.
3644
3645 2017-10-16 Tom Tromey <tom@tromey.com>
3646
3647 * xml-syscall.c (xml_init_syscalls_info): Update.
3648 * xml-support.c (xinclude_start_include): Update.
3649 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3650 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3651 (xml_fetch_content_from_file): Likewise.
3652 * osdata.c (get_osdata): Update.
3653 * target.h (target_read_stralloc, target_get_osdata): Return
3654 unique_xmalloc_ptr.
3655 * solib-aix.c (solib_aix_get_library_list): Update.
3656 * solib-target.c (solib_target_current_sos): Update.
3657 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3658 * xml-tdesc.c (fetch_available_features_from_target): Update.
3659 (target_fetch_description_xml): Update.
3660 (file_read_description_xml): Update.
3661 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3662 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3663 (remote_pid_to_exec_file): Update.
3664 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3665 (target_get_osdata): Likewise.
3666
3667 2017-10-16 Tom Tromey <tom@tromey.com>
3668
3669 * remote.c (remote_register_number_and_offset): Use std::vector.
3670 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3671 (putpkt_binary): Use gdb::def_vector.
3672 (compare_sections_command): Use gdb::byte_vector.
3673
3674 2017-10-16 Tom Tromey <tom@tromey.com>
3675
3676 * ppc-linux-nat.c (hwdebug_insert_point): Use
3677 gdb::unique_xmalloc_ptr, XDUP.
3678
3679 2017-10-16 Tom Tromey <tom@tromey.com>
3680
3681 * probe.c (parse_probes): Use std::string.
3682 (info_probes_for_ops, enable_probes_command)
3683 (disable_probes_command): Remove cleanups.
3684
3685 2017-10-16 Tom Tromey <tom@tromey.com>
3686
3687 * buildsym.c (block_compar): Remove.
3688 (end_symtab_get_static_block): Use std::vector.
3689
3690 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3691
3692 * memrange.h (struct mem_range): Define operator< and operator==.
3693 (mem_range_s): Remove.
3694 (DEF_VEC_O (mem_range_s)): Remove.
3695 (normalize_mem_ranges): Change parameter type to std::vector.
3696 * memrange.c (compare_mem_ranges): Remove.
3697 (normalize_mem_ranges): Change parameter type to std::vector,
3698 adjust to vector change.
3699 * exec.c (section_table_available_memory): Return vector, remove
3700 parameter.
3701 (section_table_read_available_memory): Adjust to std::vector
3702 change.
3703 * remote.c (remote_read_bytes): Adjust to std::vector
3704 change.
3705 * tracepoint.h (traceframe_available_memory): Change parameter
3706 type to std::vector.
3707 * tracepoint.c (traceframe_available_memory): Change parameter
3708 type to std::vector, adjust.
3709 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3710 std::vector change.
3711 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3712 unittests/memrange-selftests.c.
3713 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3714 * gdb/unittests/memrange-selftests.c: New file.
3715
3716 2017-10-16 Pedro Alves <palves@redhat.com>
3717
3718 * elfread.c (probe_key_free): Rename range-for variable.
3719 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3720 (find_probe_by_pc, collect_probes): Rename range-for variable.
3721
3722 2017-10-16 Yao Qi <yao.qi@linaro.org>
3723
3724 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3725 * features/tic6x-c62x.c: Remove.
3726 * features/tic6x-c64x-linux.c: Remove.
3727 * features/tic6x-c64x.c: Remove.
3728 * features/tic6x-c64xp-linux.c: Remove.
3729 * features/tic6x-c64xp.c: Remove.
3730 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3731 initialize_tdesc_tic6x_*_linux functions.
3732 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3733 initialize_tdesc_tic6x_* functions.
3734
3735 2017-10-16 Yao Qi <yao.qi@linaro.org>
3736
3737 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3738 tic6x-c62x.
3739 * regformats/tic6x-c62x.dat: Remove.
3740 * regformats/tic6x-c64x.dat: Remove.
3741 * regformats/tic6x-c64xp.dat: Remove.
3742
3743 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3744
3745 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3746 (the !HAVE_LIBEXPAT version).
3747
3748 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3749
3750 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3751 const.
3752
3753 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3754
3755 * target.h: Include tracepoint.h.
3756 (enum trace_find_type): Move to tracepoint.h.
3757 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3758 * tracepoint.h: Don't include target.h
3759 (enum trace_find_type): Move from target.h.
3760 (parse_traceframe_info): Return a unique ptr.
3761 * tracepoint.c (current_traceframe_info): Change type to unique
3762 ptr.
3763 (free_traceframe_info): Remove.
3764 (clear_traceframe_info): Don't manually free
3765 current_traceframe_info.
3766 (free_result): Remove.
3767 (parse_traceframe_info): Return a unique ptr.
3768 (get_traceframe_info): Adjust to unique ptr.
3769 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3770 * remote.c (remote_traceframe_info): Return a unique ptr.
3771 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3772 ptr.
3773 * target-debug.h (target_debug_print_traceframe_info_up): New
3774 macro.
3775 * target-delegates.c: Regenerate.
3776
3777 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3778
3779 * memrange.h (struct mem_range): Add constructors.
3780 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3781 std::vector<mem_range>.
3782 * tracepoint.c (free_traceframe_info): Don't manually free
3783 vector.
3784 (traceframe_info_start_memory): Adjust to vector change.
3785 (traceframe_available_memory): Likewise.
3786 * tracefile-tfile.c (build_traceframe_info): Likewise.
3787 * ctf.c (ctf_traceframe_info): Likewise.
3788
3789 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3790
3791 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3792 std::vector<int>.
3793 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3794 (traceframe_info_start_tvar): Adjust to vector change.
3795 (parse_traceframe_info): Allocate with new.
3796 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3797 vector change.
3798 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3799 change.
3800 tfile_traceframe_info): Allocate with new.
3801 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3802 change.
3803
3804 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3805
3806 * tracepoint.c (traceframe_info): Rename to...
3807 (current_traceframe_info): ...this.
3808 (clear_traceframe_info): Adjust.
3809 (get_traceframe_info): Adjust.
3810
3811 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3812
3813 * nat/linux-osdata.c: Include algorithm.
3814 (compare_processes): Remove.
3815 (struct pid_pgid_entry): New struct.
3816 (linux_xfer_osdata_processgroups): Use std::vector instead of
3817 XNEWVEC.
3818
3819 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3820
3821 * objfiles.h: Don't include symfile.h.
3822 (struct partial_symbol): Remove forward-declaration.
3823 (struct objfile) <global_psymbols, static_psymbols>: Change type
3824 to std::vector<partial_symbol *>.
3825 * objfiles.c (objfile::objfile): Don't memset those fields.
3826 (objfile::~objfile): Don't free those fields.
3827 * psympriv.h (struct psymbol_allocation_list): Remove
3828 forward-declaration.
3829 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3830 to std::vector.
3831 (start_psymtab_common): Change parameters to std::vector.
3832 * psymtab.c: Include algorithm.
3833 (require_partial_symbols): Call shrink_to_fit.
3834 (find_pc_sect_psymbol): Adjust to vector change.
3835 (match_partial_symbol): Likewise.
3836 (lookup_partial_symbol): Likewise.
3837 (psym_relocate): Likewise.
3838 (dump_psymtab): Likewise.
3839 (recursively_search_psymtabs): Likewise.
3840 (compare_psymbols): Remove.
3841 (sort_pst_symbols): Adjust to vector change.
3842 (start_psymtab_common): Likewise.
3843 (end_psymtab_common): Likewise.
3844 (psymbol_bcache_full): De-constify return value.
3845 (add_psymbol_to_bcache): Likewise.
3846 (extend_psymbol_list): Remove.
3847 (append_psymbol_to_list): Adjust to vector change.
3848 (add_psymbol_to_list): Likewise.
3849 (init_psymbol_list): Likewise.
3850 (maintenance_info_psymtabs): Likewise.
3851 (maintenance_check_psymtabs): Likewise.
3852 * symfile.h (struct psymbol_allocation_list): Remove.
3853 * symfile.c (reread_symbols): Adjust to vector change.
3854 * dbxread.c (start_psymtab): Change type of parameters.
3855 (dbx_symfile_read): Adjust to vector change.
3856 (read_dbx_symtab): Likewise.
3857 (start_psymtab): Change type of parameters.
3858 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3859 (create_partial_symtab): Likewise.
3860 (add_partial_symbol): Likewise.
3861 (write_one_signatured_type): Likewise.
3862 (recursively_write_psymbols): Likewise.
3863 * mdebugread.c (parse_partial_symbols): Likewise.
3864 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3865 (scan_xcoff_symtab): Adjust to vector change.
3866 (xcoff_initial_scan): Likewise.
3867
3868 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3869
3870 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3871
3872 2017-10-13 Yao Qi <yao.qi@linaro.org>
3873
3874 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3875 Remove s390x-*-expedite, add s390x-expedite.
3876
3877 2017-10-13 Yao Qi <yao.qi@linaro.org>
3878
3879 * features/s390-gs-linux64.c: Regenerated.
3880 * features/s390x-gs-linux64.c: Regenerated.
3881
3882 2017-10-13 Tom Tromey <tom@tromey.com>
3883
3884 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3885 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3886 delete.
3887 * symfile.c (symbol_file_add_with_addrs): Use new.
3888 (symbol_file_add_separate): Update comment.
3889 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3890 * jit.c (jit_object_close_impl): Use new.
3891 (jit_unregister_code): Use delete.
3892 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3893 (~objfile): Rename from free_objfile.
3894 (free_objfile_separate_debug, do_free_objfile_cleanup)
3895 (free_all_objfiles, objfile_purge_solibs): Use delete.
3896 * objfiles.h (struct objfile): Add constructor and destructor.
3897 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3898 (allocate_objfile, free_objfile): Don't declare.
3899 (struct objstats): Add initializers.
3900
3901 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3902
3903 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3904 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3905 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3906 * gdbarch.h: Regenerate.
3907 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3908 Adjust comment.
3909 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3910 (i386_displaced_step_fixup): Adjust comment.
3911 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3912
3913 2017-10-12 Tom Tromey <tom@tromey.com>
3914
3915 * prologue-value.h (pv_area::store_would_trash): Return bool.
3916 (pv_area::find_reg): Likewise.
3917 * prologue-value.c (pv_area::store_would_trash): Return bool.
3918 (pv_area::find_reg): Likewise.
3919
3920 2017-10-12 Tom Tromey <tom@tromey.com>
3921
3922 * s390-linux-tdep.c (s390_store, s390_load)
3923 (s390_check_for_saved, s390_analyze_prologue): Update.
3924 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3925 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3926 * prologue-value.h (class pv_area): Move from prologue-value.c.
3927 Change names of members. Add constructor, destructor, member
3928 functions.
3929 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3930 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3931 (pv_area_fetch, pv_area_scan): Don't declare.
3932 * prologue-value.c (struct pv_area::area_entry): Now member of
3933 pv_area.
3934 (struct pv_area): Move to prologue-value.h.
3935 (pv_area::pv_area): Rename from make_pv_area.
3936 (pv_area::~pv_area): Rename from free_pv_area.
3937 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3938 (clear_entries, find_entry, overlaps, store_would_trash, store)
3939 (fetch, find_reg, scan): Now member of pv_area.
3940 Remove "area" argument. Update.
3941 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3942 Update.
3943 * mn10300-tdep.c (push_reg, check_for_saved)
3944 (mn10300_analyze_prologue): Update.
3945 * mep-tdep.c (is_arg_spill, check_for_saved)
3946 (mep_analyze_prologue): Update.
3947 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3948 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3949 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3950 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3951 Update.
3952 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3953 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3954
3955 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3956
3957 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3958 * linux-nat.c (linux_nat_delete_thread): New variable.
3959 (lwp_free): Invoke linux_nat_delete_thread if set.
3960 (linux_nat_set_delete_thread): New function.
3961 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3962 thread delete callback.
3963 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3964 (_initialize_arm_linux_nat): Assign thread delete callback.
3965 * s390-linux-nat.c (s390_delete_thread): New function.
3966 (_initialize_s390_nat): Assign thread delete callback.
3967 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3968 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3969 function.
3970 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3971 declaration.
3972 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3973 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3974
3975 2017-10-09 Tom Tromey <tom@tromey.com>
3976
3977 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3978 std::string.
3979 * tui/tui-layout.c (enum tui_status): Use std::string.
3980
3981 2017-10-11 Tom Tromey <tom@tromey.com>
3982
3983 * gdbthread.h (thread_command): Constify.
3984 * inferior.h (detach_command): Constify.
3985 * top.h (set_history, show_history): Constify.
3986 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3987 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3988 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3989 * printcmd.c (set_command): Constify.
3990 (non_const_set_command): New function.
3991 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3992 * breakpoint.c (enable_command, disable_command, delete_command)
3993 (catch_command, tcatch_command, set_breakpoint_cmd)
3994 (show_breakpoint_cmd): Constify.
3995 * macrocmd.c (macro_command): Constify.
3996 * infcmd.c (unset_command, kill_command, detach_command)
3997 (info_proc_cmd): Constify.
3998 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3999 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4000 (info_auto_load_cmd): Constify.
4001 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4002 (unset_tdesc_cmd): Constify.
4003 * ada-lang.c (set_ada_command, show_ada_command)
4004 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4005 * guile/guile.c (set_guile_command, show_guile_command)
4006 (info_guile_command): Constify.
4007 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4008 Constify.
4009 * skip.c (skip_command): Constify.
4010 * compile/compile.c (_initialize_compile): Constify.
4011 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4012 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4013 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4014 (maint_btrace_pt_show_cmd): Constify.
4015 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4016 Constify.
4017 * python/python.c (user_show_python, user_set_python): Constify.
4018 * mips-tdep.c (set_mips_command, show_mips_command)
4019 (set_mipsfpu_command): Constify.
4020 * record-btrace.c (cmd_record_btrace_start)
4021 (cmd_set_record_btrace, cmd_show_record_btrace)
4022 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4023 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4024 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4025 Constify.
4026 * symfile.c (overlay_command): Constify.
4027 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4028 * cli/cli-logging.c (set_logging_command, show_logging_command):
4029 Constify.
4030 * cli/cli-dump.c (dump_command, append_command)
4031 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4032 (tekhex_dump_command, binary_dump_command)
4033 (binary_append_command): Constify.
4034 * cli/cli-decode.c (struct cmd_list_element): Change type of
4035 "fun".
4036 * cli/cli-cmds.c (info_command, show_command, set_debug)
4037 (show_debug): Constify.
4038 (show_command): Add non-const overload.
4039 * top.c (set_history, show_history): Constify.
4040 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4041 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4042 * target.c (target_command): Constify.
4043 * sparc64-tdep.c (info_adi_command): Constify.
4044 * record-full.c (cmd_record_full_start): Constify.
4045 (set_record_full_command): Constify. Fix typo.
4046 (show_record_full_command): Constify.
4047 * thread.c (thread_command, thread_apply_command): Constify.
4048 * memattr.c (dummy_cmd): Constify.
4049 * value.c (function_command): Constify.
4050 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4051 * probe.c (info_probes_command): Constify.
4052 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4053 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4054 (show_thread_cmd, set_thread_default_cmd)
4055 (show_thread_default_cmd): Constify.
4056 (check_empty): Constify.
4057 * tracepoint.c (tfind_command): Constify.
4058 * cp-support.c (maint_cplus_command): Constify.
4059 * windows-tdep.c (info_w32_command): Constify.
4060 * record.c (cmd_record_start, set_record_command)
4061 (show_record_command, info_record_command, cmd_record_goto):
4062 Constify.
4063 * ravenscar-thread.c (set_ravenscar_command)
4064 (show_ravenscar_command): Constify.
4065 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4066 Constify.
4067 (add_internal_problem_command): Remove casts.
4068 * arc-tdep.c (maintenance_print_arc_command): Constify.
4069 * valprint.c (set_print, show_print, set_print_raw)
4070 (show_print_raw): Constify.
4071 * maint.c (maintenance_command, maintenance_info_command)
4072 (maintenance_print_command, maintenance_set_cmd)
4073 (maintenance_show_cmd, set_per_command_cmd)
4074 (show_per_command_cmd, maintenance_check_command): Constify.
4075 * language.c (set_check, show_check): Constify.
4076 * typeprint.c (show_print_type, set_print_type): Constify.
4077 * go32-nat.c (go32_info_dos_command): Constify.
4078
4079 2017-10-11 Tom Tromey <tom@tromey.com>
4080
4081 * breakpoint.c (prepare_re_set_context): Remove.
4082 (breakpoint_re_set_one): Update. Don't use cleanups.
4083 (breakpoint_re_set): Use scoped_restore, std::string, and
4084 scoped_restore_current_language.
4085
4086 2017-10-11 Tom Tromey <tom@tromey.com>
4087
4088 * breakpoint.c (commands_command_1): Use std::string.
4089 (cleanup_executing_breakpoints): Remove.
4090 (bpstat_do_actions_1): Use scoped_restore.
4091 (bpstat_check_watchpoint): Use std::string.
4092 (decode_static_tracepoint_spec): Likewise.
4093 (break_range_command): Likewise.
4094 (watch_command_1): Likewise.
4095 (compare_breakpoints): Change argument types.
4096 (clear_command): Use std::vector.
4097 (cleanup_executing_breakpoints): Remove.
4098 (update_global_location_list): Use unique_xmalloc_ptr.
4099 (strace_command): Remove unused declaration.
4100
4101 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4102
4103 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4104 * NEWS: Mention new FreeBSD/arm native configuration.
4105 * configure.host: Add arm*-*-freebsd*.
4106 * configure.nat: Likewise.
4107 * arm-fbsd-nat.c: New file.
4108
4109 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4110
4111 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4112 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4113 * NEWS: Mention new FreeBSD/arm target.
4114 * configure.tgt: Add arm*-*-freebsd*.
4115 * arm-fbsd-tdep.c: New file.
4116 * arm-fbsd-tdep.h: New file.
4117
4118 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4119
4120 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4121 `gdbarch_elfcore_write_linux_prpsinfo'.
4122 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4123 method.
4124 (elf_internal_linux_prpsinfo): Remove declaration.
4125 * gdbarch.h: Regenerate.
4126 * gdbarch.c: Regenerate.
4127
4128 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4129
4130 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4131 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4132
4133 2017-10-11 Pedro Alves <palves@redhat.com>
4134
4135 * breakpoint.c (reattach_breakpoints): Delete.
4136 * breakpoint.h (reattach_breakpoints): Delete.
4137
4138 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4139
4140 * symfile.c (registered_sym_fns): Make struct, not typedef.
4141 (DEF_VEC_O (registered_sym_fns)): Remove.
4142 (symtab_fns): Change type to std::vector.
4143 (add_symtab_fns): Adjust.
4144 (find_sym_fns): Adjust.
4145
4146 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4147
4148 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4149 * arc-tdep.h (arc_arch_is_em): New function.
4150 (arc_arch_is_hs): Likewise.
4151
4152 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4153
4154 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4155 parentheses in the declaration.
4156 (macro_lookup_inclusion): Likewise.
4157 (macro_lookup_definition): Likewise.
4158 * p-lang.h (pascal_builtin_types): Likewise.
4159 * tui/tui-data.c (tui_win_list): Likewise.
4160 * tui/tui-data.h (tui_win_list): Likewise.
4161 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4162
4163 2017-10-11 Mark Rages <markrages@gmail.com>
4164
4165 * target-memory.c (block_boundaries): Fix for block address not
4166 aligned on block size.
4167
4168 2017-10-10 Pedro Alves <palves@redhat.com>
4169 Tom Tromey <tom@tromey.com>
4170
4171 * breakpoint.c (struct captured_breakpoint_query_args)
4172 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4173 (print_breakpoint): New.
4174 * breakpoint.h (print_breakpoint): Declare.
4175 * common/common-exceptions.h (enum return_reason): Remove
4176 references to catch_exceptions.
4177 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4178 Delete.
4179 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4180 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4181 * gdb.h: Delete.
4182 * gdbthread.h (thread_select): Declare.
4183 * mi/mi-cmd-break.c: Don't include gdb.h.
4184 (breakpoint_notify): Use print_breakpoint.
4185 * mi/mi-cmd-catch.c: Don't include gdb.h.
4186 * mi/mi-interp.c: Don't include gdb.h.
4187 (mi_print_breakpoint_for_event): New.
4188 (mi_breakpoint_created, mi_breakpoint_modified): Use
4189 mi_print_breakpoint_for_event.
4190 * mi/mi-main.c: Don't include gdb.h.
4191 (mi_cmd_thread_select): Parse the global thread ID here. Use
4192 thread_select instead of gdb_thread_select.
4193 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4194 of using gdb_list_thread_ids.
4195 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4196 FILEIO_ENOSYS here.
4197 (remote_fileio_request): Use TRY/CATCH instead of
4198 catch_exceptions.
4199 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4200 (symbol_file_add_from_memory_wrapper): Delete.
4201 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4202 * thread.c: Don't include gdb.h.
4203 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4204 (thread_alive): Use thread_select.
4205 (do_captured_thread_select): Delete, parts salvaged as ...
4206 (thread_select): ... this new function.
4207 (gdb_thread_select): Delete.
4208
4209 2017-10-10 Pedro Alves <palves@redhat.com>
4210 Tom Tromey <tom@tromey.com>
4211
4212 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4213 and reverse logic.
4214 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4215 No longer macros. Instead ...
4216 (enum wp_check_result): They're now values of this new
4217 enumeration.
4218 (watchpoint_check): Change return type to wp_check_result and
4219 parameter type to bpstat.
4220 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4221 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4222 catch_errors. Reverse logic of watchpoint_check call.
4223 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4224 pointer as parameter.
4225 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4226 * common/common-exceptions.c (throw_exception_sjlj): Update
4227 comments to avoid mentioning catch_errors.
4228 * exceptions.c (catch_errors): Delete.
4229 * exceptions.h: Update comments to avoid mentioning catch_errors.
4230 (catch_errors_ftype, catch_errors): Delete.
4231 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4232 (hook_stop_stub): Delete.
4233 (restore_selected_frame): Change return type to void, and
4234 parameter type to const frame_id &.
4235 (restore_infcall_control_state): Use TRY/CATCH instead of
4236 catch_errors.
4237 * main.c (captured_command_loop): Return void and remove
4238 parameter. Remove references to catch_errors.
4239 (captured_main): Use TRY/CATCH instead of catch_errors.
4240 * objc-lang.c (objc_submethod_helper_data)
4241 (find_objc_msgcall_submethod_helper): Delete.
4242 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4243 catch_errors.
4244 * record-full.c (record_full_message): Return void.
4245 (record_full_message_args, record_full_message_wrapper): Delete.
4246 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4247 instead of catch_errors.
4248 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4249 parameter type to int.
4250 * solib-darwin.c (open_symbol_file_object): Ditto.
4251 * solib-dsbt.c (open_symbol_file_object): Ditto.
4252 * solib-frv.c (open_symbol_file_object): Ditto.
4253 * solib-svr4.c (open_symbol_file_object): Ditto.
4254 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4255 * solib.c (update_solib_list): Use TRY/CATCH instead of
4256 catch_errors.
4257 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4258 Change type.
4259 * symmisc.c (struct print_symbol_args): Remove.
4260 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4261 (print_symbol): Change type.
4262 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4263 and remove parameters.
4264 (catch_errors): New.
4265 (get_windows_debug_event): Adjust.
4266
4267 2017-10-09 Tom Tromey <tom@tromey.com>
4268
4269 * mi/mi-main.c (free_splay_tree): Remove.
4270 (list_available_thread_groups): Use splay_tree_up.
4271 * common/gdb_splay_tree.h: New file.
4272
4273 2017-10-09 Tom Tromey <tom@tromey.com>
4274
4275 * mi/mi-main.c (do_nothing): Remove.
4276 (list_available_thread_groups): Update.
4277
4278 2017-10-09 Pedro Alves <palves@redhat.com>
4279
4280 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4281 reading registers when switching context.
4282
4283 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4284
4285 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4286 (fbsd_convert_siginfo): Likewise.
4287 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4288
4289 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4290
4291 * configure.ac (try_guile_versions): Remove guile-2.2.
4292 * configure: Regenerate.
4293
4294 2017-10-09 Tom Tromey <tom@tromey.com>
4295
4296 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4297 (COMPILE.pre): Use $(CXX).
4298
4299 2017-10-09 Pedro Alves <palves@redhat.com>
4300
4301 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4302 Use bool.
4303 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4304 * cp-support.h (cp_remove_params): Now returns a
4305 gdb::unique_xmalloc_ptr.
4306 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4307 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4308 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4309 returning a gdb::unique_xmalloc_ptr.
4310 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4311 * stack.c (find_frame_funname): Adjust to cp_remove_params
4312 returning a gdb::unique_xmalloc_ptr.
4313
4314 2017-10-08 Tom Tromey <tom@tromey.com>
4315
4316 * dwarf2read.c (dwarf2_get_dwz_file): Use
4317 gdb::unique_xmalloc_ptr.
4318 (find_slot_in_mapped_hash): Likewise.
4319 (dwarf2_physname): Likewise.
4320 (create_dwo_unit_in_dwp_v1): Use std::string.
4321 (create_dwo_unit_in_dwp_v2): Likewise.
4322 (lookup_dwo_cutu): Likewise.
4323 (inherit_abstract_dies): Use std::vector.
4324 (read_array_type): Likewise.
4325 (dwarf_decode_macros): Remove unused declaration.
4326 (unsigned_int_compar): Remove.
4327 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4328 (psymtabs_addrmap_cleanup): Remove.
4329
4330 2017-10-08 Tom Tromey <tom@tromey.com>
4331
4332 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4333 * frame.h (frame_cleanup_after_sniffer): Declare.
4334 (frame_prepare_for_sniffer): Return void.
4335 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4336 type of argument.
4337 (frame_prepare_for_sniffer): Return void.
4338
4339 2017-10-08 Tom Tromey <tom@tromey.com>
4340
4341 * utils.h (make_cleanup_value_free): Remove.
4342 * utils.c (do_value_free, struct cleanup): Remove.
4343 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4344 Use gdb_value_up.
4345 * value.h (struct value_deleter): New.
4346 (gdb_value_up): New typedef.
4347
4348 2017-10-08 Tom Tromey <tom@tromey.com>
4349
4350 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4351 (make_cleanup_free_search_symbols): Remove.
4352 (search_symbols): Return std::vector.
4353 (symbol_search::compare_search_syms): Now member of
4354 symbol_search. Change arguments.
4355 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4356 (symtab_symbol_info, rbreak_command): Update.
4357 * symtab.h (struct symbol_search) <next>: Remove.
4358 Add constructors.
4359 (symbol_search::operator<): New function.
4360 (symbol_search::operator==): New function.
4361 (search_symbols): Remove std::vector.
4362 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4363 (symbol_search::compare_search_syms): Declare.
4364
4365 2017-10-06 Yao Qi <yao.qi@linaro.org>
4366
4367 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4368 arch/aarch64-insn.o.
4369 Remove one rule.
4370 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4371
4372 2017-10-06 Yao Qi <yao.qi@linaro.org>
4373
4374 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4375 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4376 arch/arm-linux.o respectively.
4377 * configure.tgt: Likewise.
4378
4379 2017-10-06 Yao Qi <yao.qi@linaro.org>
4380
4381 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4382 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4383
4384 2017-10-06 Pedro Alves <palves@redhat.com>
4385
4386 * windows-nat.c: Include <algorithm>.
4387
4388 2017-10-06 Yao Qi <yao.qi@linaro.org>
4389
4390 * configure.tgt (i386_tobjs): New variable.
4391 (amd64_tobjs): New variable.
4392 Set $cpu_obs and $os_obs.
4393
4394 2017-10-06 Yao Qi <yao.qi@linaro.org>
4395
4396 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4397 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4398 (clean): Remove object files and dependency files.
4399 (distclean): Remove the directory.
4400 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4401 * configure: Re-generated.
4402 * configure.tgt: Replace amd64.o with arch/amd64.o.
4403
4404 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4405
4406 PR build/22188
4407 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4408 and SETEND.
4409
4410 2017-10-05 Pedro Alves <palves@redhat.com>
4411
4412 * linux-nat.c (linux_child_follow_fork): When following the parent
4413 and detaching the child, consult the parent thread's architecture
4414 instead of the child's.
4415
4416 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4417
4418 * ax.h: Do not include "doublest.h".
4419 (union agent_val): Remove.
4420
4421 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4422
4423 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4424 (decimal_to_string): Return std::string object.
4425 (decimal_from_string): Accept std::string object. Return bool.
4426 (decimal_from_integral, decimal_from_doublest): Remove.
4427 (decimal_from_longest): Add prototype.
4428 (decimal_from_ulongest): Likewise.
4429 (decimal_to_longest): Likewise.
4430 (decimal_from_doublest): Likewise.
4431 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4432 (MAX_DECIMAL_STRING): Move here.
4433 (decimal_to_string): Return std::string object.
4434 (decimal_from_string): Accept std::string object. Return bool.
4435 (decimal_from_integral): Remove, replace by ...
4436 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4437 (decimal_to_longest): New function.
4438 (decimal_from_floating): Remove, replace by ...
4439 (decimal_from_doublest): ... this new function.
4440 (decimal_to_doublest): Update to new decimal_to_string interface.
4441
4442 * value.c (unpack_long): Use decimal_to_longest.
4443 * valops.c (value_cast): Use decimal_from_doublest instead of
4444 decimal_from_floating. Use decimal_from_[u]longest isntead of
4445 decimal_from_integral.
4446 * valarith.c (value_args_as_decimal): Likewise.
4447 * valprint.c (print_decimal_floating): Update to new
4448 decimal_to_string interface.
4449 * printcmd.c (printf_decfloat): Likewise.
4450 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4451
4452 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4453
4454 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4455 * gdbtypes.c: Include "floatformat.h".
4456 * value.c: Likewise.
4457 * m68k-tdep.c: Likewise.
4458
4459 * findvar.c: Do not include "floatformat.h".
4460 * amd64-darwin-tdep.c: Likewise.
4461 * arm-linux-tdep.c: Likewise.
4462 * i386-darwin-tdep.c: Likewise.
4463 * i387-tdep.c: Likewise.
4464 * m68k-linux-tdep.c: Likewise.
4465 * mep-tdep.c: Likewise.
4466 * mips-tdep.c: Likewise.
4467 * nios2-tdep.c: Likewise.
4468 * s390-linux-tdep.c: Likewise.
4469 * sparc-obsd-tdep.c: Likewise.
4470 * sparc-tdep.c: Likewise.
4471 * sparc64-tdep.c: Likewise.
4472 * spu-tdep.c: Likewise.
4473 * tic6x-tdep.c: Likewise.
4474 * tilegx-tdep.c: Likewise.
4475 * vax-tdep.c: Likewise.
4476 * xstormy16-tdep.c: Likewise.
4477 * xtensa-tdep.c: Likewise.
4478
4479 * top.c: Do not include "doublest.h".
4480 * aarch64-tdep.c: Likewise.
4481 * alpha-tdep.c: Likewise.
4482 * arm-linux-tdep.c: Likewise.
4483 * m68k-linux-tdep.c: Likewise.
4484 * tilegx-tdep.c: Likewise.
4485 * xstormy16-tdep.c: Likewise.
4486
4487 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4488
4489 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4490 (mipsn32_fbsd_sigframe): Define.
4491 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4492 for FreeBSD/mipsn32.
4493
4494 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4495
4496 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4497 AT_HWCAP.
4498
4499 2017-10-05 Tristan Gingold <tgingold@free.fr>
4500
4501 * MAINTAINERS (Misc): Update my email address.
4502
4503 2017-10-04 Pedro Alves <palves@redhat.com>
4504
4505 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4506 it instead of target_gdbarch.
4507 (get_remote_state, get_remote_packet_size): Adjust
4508 get_remote_arch_state calls, passing down target_gdbarch
4509 explicitly.
4510 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4511 'gdbarch' and use it instead of target_gdbarch.
4512 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4513 passing down target_gdbarch explicitly.
4514 (struct stop_reply) <arch>: New field.
4515 (remote_parse_stop_reply): Use the stopped thread's architecture,
4516 not the current inferior's. Save the architecture in the
4517 stop_reply.
4518 (process_stop_reply): Use the stop reply's architecture.
4519 (process_g_packet, remote_fetch_registers)
4520 (remote_prepare_to_store, store_registers_using_G)
4521 (remote_store_registers): Adjust get_remote_arch_state calls,
4522 using the regcache's architecture.
4523 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4524 passing down target_gdbarch explicitly.
4525 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4526 beneath instead of calling target_gdbarch.
4527 * target.c (default_thread_architecture): Use the specified
4528 inferior's architecture, instead of the current inferior's
4529 architecture (via target_gdbarch).
4530
4531 2017-10-04 Pedro Alves <palves@redhat.com>
4532
4533 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4534 case.
4535 (regcache_print): Handle !target_has_registers here instead.
4536
4537 2017-10-04 Pedro Alves <palves@redhat.com>
4538
4539 * frame.c (create_test_frame): Delete.
4540 * frame.h (create_test_frame): Delete.
4541 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4542 (class regcache_test): Delete.
4543 (test_target_has_registers, test_target_has_stack)
4544 (test_target_has_memory, test_target_prepare_to_store)
4545 (test_target_store_registers): New functions.
4546 (test_target_ops): New class.
4547 (register_to_value_test): Error out if there's already a
4548 process_stratum (or higher) target pushed. Create a fuller mock
4549 environment, with mock target_ops, inferior, address space, thread
4550 and inferior_ptid.
4551 * progspace.c (struct address_space): Move to ...
4552 * progspace.h (struct address_space): ... here.
4553 * regcache.h (regcache::~regcache, regcache::raw_write)
4554 [GDB_SELF_TEST]: No longer virtual.
4555
4556 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4557
4558 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4559
4560 2017-10-04 Pedro Alves <palves@redhat.com>
4561
4562 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4563 out of 'between TRY and CATCH'.
4564
4565 2017-10-04 Pedro Alves <palves@redhat.com>
4566
4567 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4568 * common/common-exceptions.h (TRY): Open an outermost scope.
4569 Expand intro comment.
4570 (CATCH): Reindent.
4571 (END_CATCH): Close the outermost scope.
4572 * completer.c (complete_line_internal): Add missing END_CATCH.
4573
4574 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4575
4576 * NEWS (Changes since GDB 8.0): Add entry about new
4577 'set-cwd-on-gdbserver' feature.
4578 (New remote packets): Add entry for QSetWorkingDir.
4579 * common/common-inferior.h (set_inferior_cwd): New prototype.
4580 * infcmd.c (set_inferior_cwd): Remove "static".
4581 (show_cwd_command): Expand text to include remote debugging.
4582 * remote.c: Add PACKET_QSetWorkingDir.
4583 (remote_protocol_features) <QSetWorkingDir>: New entry for
4584 PACKET_QSetWorkingDir.
4585 (extended_remote_set_inferior_cwd): New function.
4586 (extended_remote_create_inferior): Call
4587 "extended_remote_set_inferior_cwd".
4588 (_initialize_remote): Call "add_packet_config_cmd" for
4589 QSetWorkingDir.
4590
4591 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4592
4593 * NEWS (New commands): Mention "set/show cwd".
4594 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4595 "cd" command's help text.
4596 * common/common-inferior.h (get_inferior_cwd): New prototype.
4597 * infcmd.c (inferior_cwd_scratch): New global variable.
4598 (set_inferior_cwd): New function.
4599 (get_inferior_cwd): Likewise.
4600 (set_cwd_command): Likewise.
4601 (show_cwd_command): Likewise.
4602 (_initialize_infcmd): Add "set/show cwd" commands.
4603 * inferior.h (class inferior) <cwd>: New field.
4604 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4605 (fork_inferior): Change inferior's cwd before its execution.
4606 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4607 to CreateProcess.
4608
4609 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4610
4611 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4612 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4613 (COMMON_OBS): Add gdb_tilde_expand.o.
4614 * common/gdb_tilde_expand.c: New file.
4615 * common/gdb_tilde_expand.h: Likewise.
4616
4617 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4618
4619 * gdbarch.sh (objfile): Remove duplicate declaration.
4620 * gdbarch.h: Regenerate.
4621
4622 2017-10-03 Tom Tromey <tom@tromey.com>
4623
4624 * utils.c (internal_vproblem): Use string_vprintf.
4625
4626 2017-10-03 Tom Tromey <tom@tromey.com>
4627
4628 * printcmd.c (info_symbol_command): Use std::string.
4629
4630 2017-10-03 Tom Tromey <tom@tromey.com>
4631
4632 * top.c (gdb_safe_append_history): Use std::string.
4633
4634 2017-10-03 Tom Tromey <tom@tromey.com>
4635
4636 * event-top.c (stdin_event_handler): Update.
4637 * main.c (captured_main_1): Update.
4638 * top.h (make_delete_ui_cleanup): Remove.
4639 (struct ui): Add constructor and destructor.
4640 (new_ui, delete_ui): Remove.
4641 * top.c (make_delete_ui_cleanup): Remove.
4642 (new_ui_command): Use std::unique_ptr.
4643 (delete_ui_cleanup): Remove.
4644 (ui::ui): Rename from new_ui. Update.
4645 (free_ui): Remove.
4646 (ui::~ui): Rename from delete_ui. Update.
4647
4648 2017-10-03 Tom Tromey <tom@tromey.com>
4649
4650 * symfile.c (load_progress): Use gdb::byte_vector.
4651
4652 2017-10-03 Tom Tromey <tom@tromey.com>
4653
4654 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4655 declaration.
4656 * printcmd.c (x_command): Remove unused declaration.
4657 * symfile.c (symbol_file_command): Remove unused declaration.
4658
4659 2017-10-03 Tom Tromey <tom@tromey.com>
4660
4661 * utils.c (internal_vproblem): Use std::string.
4662 (defaulted_query): Likewise.
4663
4664 2017-10-03 Tom Tromey <tom@tromey.com>
4665
4666 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4667 * top.c (execute_command_to_string): Update.
4668 * utils.c (make_cleanup_restore_page_info): Remove.
4669 (do_restore_page_info_cleanup): Remove.
4670 (set_batch_flag_and_restore_page_info):
4671 New.
4672 (make_cleanup_restore_page_info): Remove.
4673 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4674 (~set_batch_flag_and_restore_page_info): New
4675 (make_cleanup_restore_uinteger): Remove.
4676 (make_cleanup_restore_integer): Remove.
4677 (struct restore_integer_closure): Remove.
4678 (restore_integer): Remove.
4679 * utils.h (struct set_batch_flag_and_restore_page_info): New
4680 class.
4681 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4682 (make_cleanup_restore_page_info): Remove.
4683 (make_cleanup_restore_uinteger) Remove.
4684 (make_cleanup_restore_integer) Remove.
4685
4686 2017-10-03 Tom Tromey <tom@tromey.com>
4687
4688 * record-full.h (record_full_gdb_operation_disable_set): Return
4689 scoped_restore_tmpl<int>.
4690 * infrun.c (adjust_pc_after_break): Update.
4691 (handle_signal_stop): Update.
4692 * record-full.c (record_full_gdb_operation_disable_set): Return
4693 scoped_restore_tmpl<int>.
4694 (record_full_wait_1, record_full_insert_breakpoint)
4695 (record_full_remove_breakpoint, record_full_save)
4696 (record_full_goto_insn): Update.
4697
4698 2017-10-02 Tom Tromey <tom@tromey.com>
4699
4700 PR rust/22236:
4701 * rust-lang.c (rust_val_print_str): New function.
4702 (val_print_struct): Call it.
4703 (rust_subscript): Preserve name of slice type.
4704
4705 2017-10-02 Tom Tromey <tom@tromey.com>
4706
4707 * rust-lang.c (rust_subscript): Handle slices in
4708 EVAL_AVOID_SIDE_EFFECTS case.
4709
4710 2017-10-02 Tom Tromey <tom@tromey.com>
4711
4712 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4713
4714 2017-10-02 Tom Tromey <tom@tromey.com>
4715
4716 * rust-lang.h (rust_slice_type): Add "extern".
4717
4718 2017-10-02 Tom Tromey <tom@tromey.com>
4719 Pedro Alves <palves@redhat.com>
4720
4721 * ada-lang.h (ada_exc_info::operator<): Make const.
4722 (ada_exc_info::operator==): Make const.
4723 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4724 Make const.
4725
4726 2017-09-29 Tom Tromey <tom@tromey.com>
4727
4728 * target.c (read_whatever_is_readable): Change type of "result".
4729 Update.
4730 (free_memory_read_result_vector): Remove.
4731 (read_memory_robust): Change return type. Update.
4732 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4733 bin2hex, std::string.
4734 * target.h (memory_read_result_s): Remove typedef.
4735 (free_memory_read_result_vector): Remove.
4736 (read_memory_robust): Return std::vector.
4737
4738 2017-09-29 Tom Tromey <tom@tromey.com>
4739
4740 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4741
4742 2017-09-29 Tom Tromey <tom@tromey.com>
4743
4744 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4745 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4746 operator< and operator==.
4747 (ada_exceptions_list): Return a std::vector.
4748 * ada-lang.c (ada_exc_info::operator<): Rename from
4749 compare_ada_exception_info.
4750 (ada_exc_info::operator==): New.
4751 (sort_remove_dups_ada_exceptions_list): Change type of
4752 "exceptions".
4753 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4754 (ada_add_global_exceptions): Likewise.
4755 (ada_exceptions_list_1): Return a std::vector.
4756 (ada_exceptions_list): Likewise.
4757
4758 2017-09-29 Tom Tromey <tom@tromey.com>
4759
4760 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4761 'std::set *'.
4762 (print_one_inferior): Update.
4763 (free_vector_of_ints): Remove.
4764 (list_available_thread_groups): Change "ids" to std::set.
4765 (mi_cmd_list_thread_groups): Update.
4766 (struct collect_cores_data) <core>: Now a std::set.
4767 (collect_cores): Update.
4768 (unique): Remove.
4769 (print_one_inferior): Update.
4770
4771 2017-09-29 Tom Tromey <tom@tromey.com>
4772
4773 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4774 (mi_execute_async_cli_command): Likewise.
4775 (mi_cmd_trace_frame_collected): Use field_fmt.
4776
4777 2017-09-29 Tom Tromey <tom@tromey.com>
4778
4779 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4780 gdb::byte_vector.
4781
4782 2017-09-29 Tom Tromey <tom@tromey.com>
4783
4784 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4785
4786 2017-09-29 Tom Tromey <tom@tromey.com>
4787
4788 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4789
4790 2017-09-29 Tom Tromey <tom@tromey.com>
4791
4792 * varobj.h (varobj_gen_name): Return std::string.
4793 * varobj.c (varobj_gen_name): Return std::string.
4794 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4795 (mi_cmd_var_delete): Don't copy "name".
4796
4797 2017-09-29 Tom Tromey <tom@tromey.com>
4798
4799 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4800 (mi_cmd_break_insert_1): Update.
4801
4802 2017-09-29 Tom Tromey <tom@tromey.com>
4803
4804 * target.h (make_scoped_defer_target_commit_resume): Update.
4805 * target.c (make_scoped_defer_target_commit_resume): Rename from
4806 make_cleanup_defer_target_commit_resume. Return a
4807 scoped_restore.
4808 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4809
4810 2017-09-29 Tom Tromey <tom@tromey.com>
4811
4812 * main.c (captured_main_1): Remove unused declaration.
4813 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4814
4815 2017-09-29 Tom Tromey <tom@tromey.com>
4816
4817 * symtab.c (search_symbols): Remove unused outer cleanup.
4818 (make_source_files_completion_list): Remove unused declaration.
4819
4820 2017-09-29 Tom Tromey <tom@tromey.com>
4821
4822 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4823
4824 2017-09-29 Tom Tromey <tom@tromey.com>
4825
4826 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4827 gdb::byte_vector.
4828
4829 2017-09-29 Tom Tromey <tom@tromey.com>
4830
4831 * complaints.c (vcomplaint): Use std::string.
4832
4833 2017-09-29 Tom Tromey <tom@tromey.com>
4834
4835 * tracepoint.c (trace_variable_command): Use std::string.
4836 (encode_actions_1): Remove unused declarations.
4837 (create_tsv_from_upload): Use std::string.
4838
4839 2017-09-29 Tom Tromey <tom@tromey.com>
4840
4841 * cp-support.c (gdb_demangle): Use std::string.
4842
4843 2017-09-29 Tom Tromey <tom@tromey.com>
4844
4845 * stack.c (parse_frame_specification): Use std::string
4846 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4847
4848 2017-09-29 Tom Tromey <tom@tromey.com>
4849
4850 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4851
4852 2017-09-29 Tom Tromey <tom@tromey.com>
4853
4854 * utils.c (vfprintf_maybe_filtered): Use std::string.
4855 (vfprintf_unfiltered): Likewise.
4856
4857 2017-09-29 Tom Tromey <tom@tromey.com>
4858
4859 * event-top.c (top_level_prompt): Return std::string.
4860 (display_gdb_prompt): Update.
4861
4862 2017-09-29 Tom Tromey <tom@tromey.com>
4863
4864 * unittests/common-utils-selftests.c (format): New function.
4865 (string_vprintf_tests): New function.
4866 (_initialize_common_utils_selftests): Register new tests.
4867 * common/common-utils.c (string_vprintf): New function.
4868 * common/common-utils.h (string_vprintf): Declare.
4869
4870 2017-09-29 Pedro Alves <palves@redhat.com>
4871
4872 * common/rsp-low.c (unpack_varlen_hex): Constify.
4873 * common/rsp-low.h (unpack_varlen_hex): Constify.
4874 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4875 Constify.
4876 * remote.c (remote_set_permissions, read_ptid)
4877 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4878 (remote_static_tracepoint_marker_at)
4879 (remote_static_tracepoint_markers_by_strid)
4880 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4881 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4882 (parse_tracepoint_definition, parse_tsv_definition)
4883 (parse_static_tracepoint_marker_definition): Constify.
4884 * tracepoint.h (parse_static_tracepoint_marker_definition)
4885 (parse_trace_status, parse_tracepoint_status)
4886 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4887
4888 2017-09-29 Pedro Alves <palves@redhat.com>
4889
4890 * remote.c (target_buf, target_buf_size): Delete.
4891 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4892 Use the connection's packet buffer instead.
4893 All callers adjusted.
4894 (_initialize_remote): Remove references to target_buf and
4895 target_buf_size.
4896
4897 2017-09-28 Pedro Alves <palves@redhat.com>
4898
4899 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4900 unittests/common-utils-selftests.c.
4901 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4902 (COMMON_OBS): Remove utils-selftests.o.
4903 * utils-selftests.c: Move to ...
4904 * unittests/common-utils-selftests.c: ... here and rename self
4905 test to "string_printf".
4906
4907 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4908
4909 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4910 having NULL cus or tus.
4911
4912 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4913
4914 * arm-tdep.c: (convert_from_extended): Remove.
4915 (convert_to_extended): Likewise.
4916 (arm_extract_return_value): Use convert_typed_floating.
4917 (arm_store_return_value): Likewise.
4918
4919 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4920 * sh-tdep.c: Do not include "floatformat.h".
4921 (sh_littlebyte_bigword_type): New function.
4922 (sh_register_convert_to_virtual): Use convert_typed_floating.
4923 (sh_register_convert_to_raw): Likewise.
4924 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4925 (sh64_littlebyte_bigword_type): New function.
4926 (sh64_extract_return_value): Use convert_typed_floating.
4927 (sh64_register_convert_to_virtual): Likewise.
4928 (sh64_register_convert_to_raw): Likewise.
4929
4930 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4931
4932 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4933 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4934
4935 * gdbtypes.h (union type_specific): Make field floatformat hold
4936 just a single struct floatformat, not an array.
4937 (floatformat_from_type): Move here.
4938 * gdbtypes.c (floatformat_from_type): Move here. Update to
4939 changed TYPE_FLOATFORMAT definition.
4940 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4941 (recursive_dump_type): Likewise.
4942 (init_float_type): Install correct floatformat for byte order.
4943 (arch_float_type): Likewise.
4944
4945 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4946
4947 * gdbtypes.c (init_type): Change incoming argument from
4948 length-in-bytes to length-in-bits. Assert length is a
4949 multiple of TARGET_CHAR_BITS.
4950 (arch_type, arch_flags_type): Likewise.
4951 (init_integer_type): Update call to init_type.
4952 (init_character_type): Likewise.
4953 (init_boolean_type): Likewise.
4954 (init_float_type): Likewise.
4955 (init_decfloat_type): Likewise.
4956 (init_complex_type): Likewise.
4957 (init_pointer_type): Likewise.
4958 (objfile_type): Likewise.
4959 (arch_integer_type): Update call to arch_type.
4960 (arch_character_type): Likewise.
4961 (arch_boolean_type): Likewise.
4962 (arch_float_type): Likewise.
4963 (arch_decfloat_type): Likewise.
4964 (arch_complex_type): Likewise.
4965 (arch_pointer_type): Likewise.
4966 (gdbtypes_post_init): Likewise.
4967
4968 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4969 (read_base_type): Likewise.
4970 * mdebugread.c (basic_type): Likewise.
4971 * stabsread.c (dbx_init_float_type): Likewise.
4972 (rs6000_builtin_type): Likewise.
4973 (read_range_type): Likewise. Also, fix call to init_integer_type
4974 with erroneous length argument.
4975
4976 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4977 * d-lang.c (build_d_types): Likewise.
4978 * f-lang.c (build_fortran_types): Likewise.
4979 * go-lang.c (build_go_types): Likewise.
4980 * opencl-lang.c (build_opencl_types): Likewise.
4981 * jit.c (finalize_symtab): Likewise.
4982 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4983 (build_std_type_info_type): Likewise.
4984 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4985 update call to arch_flags_type.
4986
4987 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4988 arch_type.
4989 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4990 * windows-tdep.c (windows_get_tlb_type): Likewise.
4991
4992 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4993 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4994 * m32c-tdep.c (make_types): Likewise.
4995 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4996 (rl78_psw_type): Update call to arch_flags_type.
4997 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4998 * rx-tdep.c (rx_psw_type): Likewise.
4999 (rx_fpsw_type): Likewise.
5000 * sparc-tdep.c (sparc_psr_type): Likewise.
5001 (sparc_fsr_type): Likewise.
5002 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5003 (sparc64_ccr_type): Likewise.
5004 (sparc64_fsr_type): Likewise.
5005 (sparc64_fprs_type): Likewise.
5006
5007 2017-09-27 Tom Tromey <tom@tromey.com>
5008
5009 * findcmd.c (find_command): Constify.
5010
5011 2017-09-27 Tom Tromey <tom@tromey.com>
5012
5013 * ada-tasks.c (task_command_1, task_command): Constify.
5014
5015 2017-09-27 Tom Tromey <tom@tromey.com>
5016
5017 * symtab.c (maintenance_print_symbol_cache)
5018 (maintenance_flush_symbol_cache)
5019 (maintenance_print_symbol_cache_statistics): Constify.
5020
5021 2017-09-27 Tom Tromey <tom@tromey.com>
5022
5023 * inferior.c (detach_inferior_command, kill_inferior_command)
5024 (inferior_command): Constify.
5025
5026 2017-09-27 Tom Tromey <tom@tromey.com>
5027
5028 * regcache.c (regcache_print, maintenance_print_registers)
5029 (maintenance_print_raw_registers)
5030 (maintenance_print_cooked_registers)
5031 (maintenance_print_register_groups)
5032 (maintenance_print_remote_registers): Constify.
5033
5034 2017-09-27 Tom Tromey <tom@tromey.com>
5035
5036 * printcmd.c (map_display_numbers, undisplay_command)
5037 (enable_disable_display_command, enable_display_command)
5038 (disable_display_command): Constify.
5039
5040 2017-09-27 Tom Tromey <tom@tromey.com>
5041
5042 * breakpoint.h (delete_command): Don't declare.
5043 * breakpoint.c (delete_command, enable_once_command)
5044 (enable_count_command, enable_delete_command, breakpoint_1)
5045 (maintenance_info_breakpoints, stopin_command, stopat_command)
5046 (delete_command, delete_trace_command, save_breakpoints)
5047 (save_breakpoints_command, save_tracepoints_command): Constify.
5048
5049 2017-09-27 Tom Tromey <tom@tromey.com>
5050
5051 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5052 (skip_ws, extract_identifier, macro_define_command)
5053 (macro_undef_command, macro_list_command): Constify.
5054
5055 2017-09-27 Tom Tromey <tom@tromey.com>
5056
5057 * infcmd.c (environment_info, set_environment_command)
5058 (unset_environment_command, path_info, info_proc_cmd_1)
5059 (info_proc_cmd_mappings, info_proc_cmd_stat)
5060 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5061 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5062
5063 2017-09-27 Tom Tromey <tom@tromey.com>
5064
5065 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5066 Constify.
5067
5068 2017-09-27 Tom Tromey <tom@tromey.com>
5069
5070 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5071
5072 2017-09-27 Tom Tromey <tom@tromey.com>
5073
5074 * demangle.c (demangle_command): Constify.
5075
5076 2017-09-27 Tom Tromey <tom@tromey.com>
5077
5078 * progspace.c (maintenance_info_program_spaces_command):
5079 Constify.
5080
5081 2017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * compile/compile.c (check_raw_argument, compile_file_command)
5084 (compile_code_command, compile_print_command): Constify.
5085
5086 2017-09-27 Tom Tromey <tom@tromey.com>
5087
5088 * reggroups.c (maintenance_print_reggroups): Constify.
5089
5090 2017-09-27 Tom Tromey <tom@tromey.com>
5091
5092 * dwarf2read.c (save_gdb_index_command): Constify.
5093
5094 2017-09-27 Tom Tromey <tom@tromey.com>
5095
5096 * stap-probe.c (info_probes_stap_command): Constify.
5097
5098 2017-09-27 Tom Tromey <tom@tromey.com>
5099
5100 * fork-child.c (unset_exec_wrapper_command): Constify.
5101
5102 2017-09-27 Tom Tromey <tom@tromey.com>
5103
5104 * btrace.c (get_uint, get_context_size, no_chunk)
5105 (maint_btrace_packet_history_cmd)
5106 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5107 (maint_info_btrace_cmd): Constify.
5108
5109 2017-09-27 Tom Tromey <tom@tromey.com>
5110
5111 * reverse.c (delete_bookmark_command): Constify.
5112
5113 2017-09-27 Tom Tromey <tom@tromey.com>
5114
5115 * remote.c (set_memory_packet_size)
5116 (set_memory_write_packet_size, show_memory_write_packet_size)
5117 (set_memory_read_packet_size, show_memory_read_packet_size)
5118 (compare_sections_command, packet_command, remote_put_command)
5119 (remote_get_command, remote_delete_command): Constify.
5120
5121 2017-09-27 Tom Tromey <tom@tromey.com>
5122
5123 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5124 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5125 (set_mipsfpu_auto_command): Constify.
5126
5127 2017-09-27 Tom Tromey <tom@tromey.com>
5128
5129 * cli/cli-cmds.h (cd_command): Constify.
5130 * cli/cli-cmds.c (cd_command): Constify.
5131
5132 2017-09-27 Tom Tromey <tom@tromey.com>
5133
5134 * thread.c (thread_name_command, thread_find_command): Constify.
5135
5136 2017-09-27 Tom Tromey <tom@tromey.com>
5137
5138 * probe.c (enable_probes_command, disable_probes_command):
5139 Constify.
5140
5141 2017-09-27 Tom Tromey <tom@tromey.com>
5142
5143 * symfile.c (symbol_file_command): Constify.
5144 * gdbcore.h (deprecated_file_changed_hook): Constify.
5145 * exec.c (deprecated_file_changed_hook, exec_file_command)
5146 (file_command): Constify.
5147 * defs.h (symbol_file_command): Constify.
5148
5149 2017-09-27 Tom Tromey <tom@tromey.com>
5150
5151 * remote-fileio.c (set_system_call_allowed)
5152 (show_system_call_allowed): Constify.
5153
5154 2017-09-27 Tom Tromey <tom@tromey.com>
5155
5156 * tracepoint.c (delete_trace_variable_command)
5157 (tfind_end_command, tfind_start_command, tfind_pc_command)
5158 (tfind_tracepoint_command, tfind_line_command)
5159 (tfind_range_command, tfind_outside_command): Constify.
5160
5161 2017-09-27 Tom Tromey <tom@tromey.com>
5162
5163 * ax-gdb.c (maint_agent_printf_command, agent_command)
5164 (agent_eval_command): Constify.
5165
5166 2017-09-27 Tom Tromey <tom@tromey.com>
5167
5168 * tracepoint.c (info_scope_command): Constify.
5169 * python/python.c (gdbpy_decode_line): Constify.
5170 * python/py-breakpoint.c (bppy_init): Constify.
5171 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5172 * location.h: (new_linespec_location)
5173 (string_to_event_location_basic, string_to_event_location):
5174 Constify.
5175 * location.c (new_linespec_location)
5176 (string_to_event_location_basic, string_to_event_location):
5177 Constify.
5178 * linespec.h (decode_line_with_current_source)
5179 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5180 * linespec.c (linespec_lex_to_end)
5181 (decode_line_with_current_source)
5182 (decode_line_with_last_displayed): Constify.
5183 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5184 Constify.
5185 * cli/cli-cmds.c (edit_command, list_command): Constify.
5186 * breakpoint.h (until_break_command, watch_command_wrapper)
5187 (awatch_command_wrapper, rwatch_command_wrapper)
5188 (init_ada_exception_breakpoint): Constify.
5189 * breakpoint.c (break_command_1, dprintf_command)
5190 (break_range_command, watch_command_wrapper)
5191 (rwatch_command_wrapper, awatch_command_wrapper)
5192 (until_break_command, init_ada_exception_breakpoint)
5193 (strace_marker_create_sals_from_location, trace_command)
5194 (ftrace_command, strace_command, struct tracepoint): Constify.
5195 * ax-gdb.c (agent_command_1): Constify.
5196 * ada-lang.c (ada_exception_sal): Constify.
5197
5198 2017-09-27 Tom Tromey <tom@tromey.com>
5199
5200 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5201 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5202 (get_context_size, no_chunk, get_insn_history_modifiers)
5203 (cmd_record_insn_history, get_call_history_modifiers)
5204 (cmd_record_call_history): Constify.
5205
5206 2017-09-27 Tom Tromey <tom@tromey.com>
5207
5208 * source.c (show_substitute_path_command)
5209 (unset_substitute_path_command, set_substitute_path_command):
5210 Constify.
5211
5212 2017-09-27 Tom Tromey <tom@tromey.com>
5213
5214 * typeprint.c (maintenance_print_type): Constify.
5215 * maint.c (maintenance_dump_me, maintenance_demangle)
5216 (maintenance_time_display, maintenance_info_sections)
5217 (maintenance_print_statistics, maintenance_deprecate)
5218 (maintenance_undeprecate): Constify.
5219 (maintenance_do_deprecate): Constify. Use std::string.
5220 (maintenance_selftest): Constify.
5221 * gdbtypes.h (maintenance_print_type): Constify.
5222
5223 2017-09-27 Tom Tromey <tom@tromey.com>
5224
5225 * hppa-tdep.c (unwind_command): Constify.
5226
5227 2017-09-27 Tom Tromey <tom@tromey.com>
5228
5229 * target-descriptions.c (unset_tdesc_filename_cmd)
5230 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5231 Constify.
5232
5233 2017-09-27 Tom Tromey <tom@tromey.com>
5234
5235 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5236
5237 2017-09-27 Tom Tromey <tom@tromey.com>
5238
5239 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5240
5241 2017-09-27 Tom Tromey <tom@tromey.com>
5242
5243 * tui/tui-regs.c (tui_reg_command): Constify.
5244
5245 2017-09-27 Tom Tromey <tom@tromey.com>
5246
5247 * skip.c (skip_file_command, skip_function_command)
5248 (skip_enable_command, skip_disable_command, skip_delete_command):
5249 Constify.
5250
5251 2017-09-27 Tom Tromey <tom@tromey.com>
5252
5253 * record-btrace.c (cmd_record_btrace_bts_start)
5254 (cmd_record_btrace_pt_start): Constify.
5255
5256 2017-09-27 Tom Tromey <tom@tromey.com>
5257
5258 * symmisc.c (maintenance_print_symbols)
5259 (maintenance_print_msymbols, maintenance_print_objfiles)
5260 (maintenance_info_symtabs, maintenance_check_symtabs)
5261 (maintenance_expand_symtabs, maintenance_info_line_tables):
5262 Constify.
5263
5264 2017-09-27 Tom Tromey <tom@tromey.com>
5265
5266 * top.c (new_ui_command): Constify.
5267
5268 2017-09-27 Tom Tromey <tom@tromey.com>
5269
5270 * symfile.c (add_symbol_file_command)
5271 (remove_symbol_file_command, list_overlays_command)
5272 (map_overlay_command, unmap_overlay_command)
5273 (overlay_auto_command, overlay_manual_command)
5274 (overlay_off_command, overlay_load_command): Constify.
5275
5276 2017-09-27 Tom Tromey <tom@tromey.com>
5277
5278 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5279 (info_spu_mailbox_command, info_spu_dma_command)
5280 (info_spu_proxydma_command): Constify.
5281
5282 2017-09-27 Tom Tromey <tom@tromey.com>
5283
5284 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5285
5286 2017-09-27 Tom Tromey <tom@tromey.com>
5287
5288 * cli/cli-script.c (user_defined_command): Constify.
5289
5290 2017-09-27 Tom Tromey <tom@tromey.com>
5291
5292 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5293 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5294 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5295 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5296 (dump_binary_value, append_binary_memory, append_binary_value):
5297 Constify.
5298 (struct dump_context) <func>: Constify.
5299 (add_dump_command): Update.
5300
5301 2017-09-27 Tom Tromey <tom@tromey.com>
5302
5303 * cli/cli-cmds.c (show_version, show_configuration)
5304 (source_command, show_user): Constify.
5305
5306 2017-09-27 Tom Tromey <tom@tromey.com>
5307
5308 * target.c (maintenance_print_target_stack): Constify.
5309
5310 2017-09-27 Tom Tromey <tom@tromey.com>
5311
5312 * interps.c (interpreter_exec_cmd): Constify.
5313
5314 2017-09-27 Tom Tromey <tom@tromey.com>
5315
5316 * record-full.c (cmd_record_full_restore): Constify.
5317
5318 2017-09-27 Tom Tromey <tom@tromey.com>
5319
5320 * memattr.c (enable_mem_command, disable_mem_command)
5321 (delete_mem_command): Constify.
5322
5323 2017-09-27 Tom Tromey <tom@tromey.com>
5324
5325 * value.c (show_convenience): Constify.
5326
5327 2017-09-27 Tom Tromey <tom@tromey.com>
5328
5329 * gdbcore.h (core_file_command): Update.
5330 * corefile.c (core_file_command): Constify.
5331
5332 2017-09-27 Tom Tromey <tom@tromey.com>
5333
5334 * user-regs.c (maintenance_print_user_registers): Constify.
5335
5336 2017-09-27 Tom Tromey <tom@tromey.com>
5337
5338 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5339
5340 2017-09-27 Tom Tromey <tom@tromey.com>
5341
5342 * cp-support.c (first_component_command): Constify.
5343
5344 2017-09-27 Tom Tromey <tom@tromey.com>
5345
5346 * psymtab.c (maintenance_print_psymbols)
5347 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5348 Constify.
5349
5350 2017-09-27 Tom Tromey <tom@tromey.com>
5351
5352 * windows-tdep.c (display_tib): Constify.
5353
5354 2017-09-27 Tom Tromey <tom@tromey.com>
5355
5356 * linux-fork.c (delete_checkpoint_command)
5357 (detach_checkpoint_command): Constify.
5358
5359 2017-09-27 Tom Tromey <tom@tromey.com>
5360
5361 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5362
5363 2017-09-27 Tom Tromey <tom@tromey.com>
5364
5365 * arc-tdep.c (dump_arc_instruction_command): Constify.
5366
5367 2017-09-27 Tom Tromey <tom@tromey.com>
5368
5369 * valprint.c (set_radix, show_radix): Constify.
5370
5371 2017-09-27 Tom Tromey <tom@tromey.com>
5372
5373 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5374
5375 2017-09-27 Tom Tromey <tom@tromey.com>
5376
5377 * command.h (not_just_help_class_command): Update.
5378 * cli/cli-decode.h (not_just_help_class_command): Update.
5379 * cli/cli-decode.c (not_just_help_class_command): Constify.
5380
5381 2017-09-27 Tom Tromey <tom@tromey.com>
5382
5383 * gdb_bfd.c (maintenance_info_bfds): Constify.
5384
5385 2017-09-27 Tom Tromey <tom@tromey.com>
5386
5387 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5388 overloads.
5389 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5390 (do_const_cfunc): New function.
5391 (cmd_cfunc_eq): New overload.
5392 (cli_user_command_p): Check do_const_cfunc.
5393 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5394 const_cfunc.
5395 * command.h (add_cmd): Add const overload and no-function
5396 overload.
5397 (set_cmd_cfunc): Add const overload.
5398 (cmd_const_cfunc_ftype): Declare.
5399 (cmd_cfunc_eq): Add const overload.
5400 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5401 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5402 overload.
5403
5404 2017-09-27 Tom Tromey <tom@tromey.com>
5405
5406 * macroexp.c (get_next_token_for_substitution): New function.
5407 (substitute_args): Call it. Check for __VA_OPT__.
5408
5409 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5410 Pedro Alves <palves@redhat.com>
5411
5412 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5413 producer_is_icc_lt_14.
5414 (producer_is_icc_lt_14): New function.
5415 (check_producer): Add code for checking version of ICC.
5416 (producer_is_icc): Move to producer.c.
5417 (read_structure_type): Restrict ICC workaround to ICC<14.
5418 * producer.c: Include selftest.h.
5419 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5420 New functions.
5421 * producer.h (producer_is_icc): New declaration.
5422
5423 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5424
5425 * Makefile.in (SFILES): Add producer.c.
5426 (COMMON_OBS): Add producer.o
5427 * amd64-tdep.c (producer.h): Add new include.
5428 * dwarf2read.c (producer.h): Add new include.
5429 * producer.c: New file.
5430 * producer.h: New file.
5431 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5432 producer.c.
5433 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5434 producer.h.
5435
5436 2017-09-26 Matthias Klose <doko@ubuntu.com>
5437
5438 * configure.ac: Search ncursesw before ncurses.
5439 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5440 * gdb_curses.h: Include <ncursesw/ncurses.h>
5441 * config.in, configure: Regenerate.
5442
5443 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5444
5445 PR gdb/22185
5446 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5447 obsolete.
5448 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5449 Remove i386sol2 support.
5450 * configure.nat <i386sol2>: Remove.
5451 <sol2-64>: Fold into ...
5452 <sol2>: ... this.
5453 Move common settings to default section.
5454 Add sol-thread.o.
5455 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5456 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5457 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5458 <i[34567]86-*-solaris*>: Remove.
5459 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5460
5461 * configure.ac: Remove wctype in libw check.
5462 (_MSE_INT_H): Don't define on Solaris 7-9.
5463 <solaris*>: Remove libthread_db.so.1 check.
5464 * configure: Regenerate.
5465 * config.in: Regenerate.
5466
5467 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5468 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5469 (gdb_ps_size_t): Remove.
5470 Use base types in users.
5471 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5472
5473 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5474
5475 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5476
5477 PR build/22206
5478 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5479 (adi_is_addr_mapped): Likewise.
5480 (PSR_ICC): Don't redefine.
5481 (PSR_IMPL): Likewise.
5482
5483 2017-09-25 Tom Tromey <tom@tromey.com>
5484
5485 * regcache.c (regcache::dump): Use string_printf.
5486
5487 2017-09-25 Tom Tromey <tom@tromey.com>
5488
5489 * regcache.c (class regcache_invalidator): New.
5490 (struct register_to_invalidate): Remove.
5491 (make_cleanup_regcache_invalidate): Remove.
5492 (regcache::raw_write): Use regcache_invalidator.
5493
5494 2017-09-25 Tom Tromey <tom@tromey.com>
5495
5496 * spu-tdep.c (spu2ppu_sniffer): Update.
5497 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5498 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5499 Remove.
5500 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5501 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5502 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5503 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5504 (frame_pop): Update.
5505
5506 2017-09-25 Tom Tromey <tom@tromey.com>
5507
5508 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5509 * regcache.h (regcache_xfree): Don't declare.
5510 * regcache.c (regcache_xfree): Remove.
5511 (do_regcache_xfree): Use delete.
5512 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5513 * linux-fork.c (free_fork): Use delete.
5514 (fork_save_infrun_state): Likewise.
5515 * jit.c (jit_dealloc_cache): Use delete.
5516 * infrun.c (discard_infcall_suspend_state): Use delete.
5517
5518 2017-09-25 Tom Tromey <tom@tromey.com>
5519
5520 * regcache.h (regcache_xmalloc): Don't declare.
5521 (regcache_raw_set_cached_value): Update comment.
5522 * regcache.c (regcache_xmalloc): Remove.
5523 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5524 * jit.c (jit_frame_sniffer): Use new.
5525 * frame.c (frame_save_as_regcache): Use new.
5526
5527 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5528
5529 * NEWS: Advertise support for guarded-storage registers on IBM z.
5530
5531 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5532
5533 * s390-linux-nat.c (have_regset_gs): New static variable.
5534 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5535 control block and guarded-storage broadcast control regsets.
5536 (s390_read_description): Detect whether the target has
5537 guarded-storage support, return appropriate tdesc.
5538 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5539 (features/s390x-gs-linux64.c): Likewise.
5540 (struct gdbarch_tdep) <have_gs>: New field.
5541 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5542 (s390_gsbc_regset): New variables.
5543 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5544 and s390_gsbc_regset, if applicable.
5545 (s390_core_read_description): Check whether core file was from a
5546 target with guarded-storage support; include appropriate regsets.
5547 (s390_gdbarch_init): Add registers for guarded-storage support.
5548 (_initialize_s390_tdep): Initialize new target descriptions that
5549 include registers for guarded-storage support.
5550 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5551 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5552 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5553 (S390_NUM_REGS): Adjust macro definition.
5554 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5555 (tdesc_s390x_gs_linux64): New declarations.
5556
5557 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5558
5559 * features/s390-gs-linux64.xml: New file.
5560 * features/s390-gs.xml: New file.
5561 * features/s390-gsbc.xml: New file.
5562 * features/s390x-gs-linux64.xml: New file.
5563 * features/Makefile (WHICH): Add s390-gs-linux64 and
5564 s390x-gs-linux64.
5565 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5566 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5567 * features/s390-gs-linux64.c: New generated file.
5568 * features/s390x-gs-linux64.c: New file.
5569 * regformats/s390-gs-linux64.dat: New file.
5570 * regformats/s390x-gs-linux64.dat: New file.
5571
5572 2017-09-23 Tom Tromey <tom@tromey.com>
5573
5574 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5575
5576 2017-09-22 Tom Tromey <tom@tromey.com>
5577
5578 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5579 type to scoped_restore_tmpl.
5580 <scoped_input_handler>: Initialize m_quit_handler directly.
5581
5582 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5583
5584 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5585 (cd_command): Likewise. Free "current_directory" before
5586 assigning to it.
5587 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5588 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5589 * top.c (gdb_dirbuf): Remove global declaration.
5590 * top.h (gdb_dirbuf): Likewise.
5591
5592 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5593
5594 * gnulib/aclocal.m4: Regenerate.
5595 * gnulib/config.in: Regenerate.
5596 * gnulib/configure: Regenerate.
5597 * gnulib/import/Makefile.am: Regenerate.
5598 * gnulib/import/Makefile.in: Regenerate.
5599 * gnulib/import/assure.h: New file.
5600 * gnulib/import/at-func.c: Likewise
5601 * gnulib/import/chdir-long.c: New file.
5602 * gnulib/import/chdir-long.h: New file.
5603 * gnulib/import/cloexec.c: New file.
5604 * gnulib/import/cloexec.h: New file.
5605 * gnulib/import/close.c: New file.
5606 * gnulib/import/closedir.c: New file.
5607 * gnulib/import/dirent-private.h: New file.
5608 * gnulib/import/dup-safer.c: New file.
5609 * gnulib/import/dup.c: New file.
5610 * gnulib/import/dup2.c: New file.
5611 * gnulib/import/error.c: New file.
5612 * gnulib/import/error.h: New file.
5613 * gnulib/import/exitfail.c: New file.
5614 * gnulib/import/exitfail.h: New file.
5615 * gnulib/import/fchdir.c: New file.
5616 * gnulib/import/fcntl.c: New file.
5617 * gnulib/import/fcntl.in.h: New file.
5618 * gnulib/import/fd-hook.c: New file.
5619 * gnulib/import/fd-hook.h: New file.
5620 * gnulib/import/fd-safer.c: New file.
5621 * gnulib/import/fdopendir.c: New file.
5622 * gnulib/import/filename.h: New file.
5623 * gnulib/import/filenamecat-lgpl.c: New file.
5624 * gnulib/import/filenamecat.h: New file.
5625 * gnulib/import/fstat.c: New file.
5626 * gnulib/import/fstatat.c: New file.
5627 * gnulib/import/getcwd-lgpl.c: New file.
5628 * gnulib/import/getcwd.c: New file.
5629 * gnulib/import/getdtablesize.c: New file.
5630 * gnulib/import/getlogin_r.c: New file.
5631 * gnulib/import/getprogname.c: New file.
5632 * gnulib/import/getprogname.h: New file.
5633 * gnulib/import/gettext.h: New file.
5634 * gnulib/import/glob-libc.h: New file.
5635 * gnulib/import/glob.c: New file.
5636 * gnulib/import/glob.in.h: New file.
5637 * gnulib/import/intprops.h: New file.
5638 * gnulib/import/m4/chdir-long.m4: New file.
5639 * gnulib/import/m4/close.m4: New file.
5640 * gnulib/import/m4/closedir.m4: New file.
5641 * gnulib/import/m4/d-ino.m4: New file.
5642 * gnulib/import/m4/d-type.m4: New file.
5643 * gnulib/import/m4/dup.m4: New file.
5644 * gnulib/import/m4/dup2.m4: New file.
5645 * gnulib/import/m4/error.m4: New file.
5646 * gnulib/import/m4/fchdir.m4: New file.
5647 * gnulib/import/m4/fcntl.m4: New file.
5648 * gnulib/import/m4/fcntl_h.m4: New file.
5649 * gnulib/import/m4/fdopendir.m4: New file.
5650 * gnulib/import/m4/filenamecat.m4: New file.
5651 * gnulib/import/m4/fstat.m4: New file.
5652 * gnulib/import/m4/fstatat.m4: New file.
5653 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5654 * gnulib/import/m4/getcwd-path-max.m4: New file.
5655 * gnulib/import/m4/getcwd.m4: New file.
5656 * gnulib/import/m4/getdtablesize.m4: New file.
5657 * gnulib/import/m4/getlogin_r.m4: New file.
5658 * gnulib/import/m4/getprogname.m4: New file.
5659 * gnulib/import/m4/glob.m4: New file.
5660 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5661 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5662 * gnulib/import/m4/mempcpy.m4: New file.
5663 * gnulib/import/m4/memrchr.m4: New file.
5664 * gnulib/import/m4/mode_t.m4: New file.
5665 * gnulib/import/m4/msvc-inval.m4: New file.
5666 * gnulib/import/m4/msvc-nothrow.m4: New file.
5667 * gnulib/import/m4/open.m4: New file.
5668 * gnulib/import/m4/openat.m4: New file.
5669 * gnulib/import/m4/opendir.m4: New file.
5670 * gnulib/import/m4/readdir.m4: New file.
5671 * gnulib/import/m4/realloc.m4: New file.
5672 * gnulib/import/m4/rewinddir.m4: New file.
5673 * gnulib/import/m4/save-cwd.m4: New file.
5674 * gnulib/import/m4/strdup.m4: New file.
5675 * gnulib/import/m4/strerror.m4: New file.
5676 * gnulib/import/m4/unistd-safer.m4: New file.
5677 * gnulib/import/mempcpy.c: New file.
5678 * gnulib/import/memrchr.c: New file.
5679 * gnulib/import/msvc-inval.c: New file.
5680 * gnulib/import/msvc-inval.h: New file.
5681 * gnulib/import/msvc-nothrow.c: New file.
5682 * gnulib/import/msvc-nothrow.h: New file.
5683 * gnulib/import/open.c: New file.
5684 * gnulib/import/openat-die.c: New file.
5685 * gnulib/import/openat-priv.h: New file.
5686 * gnulib/import/openat-proc.c: New file.
5687 * gnulib/import/openat.c: New file.
5688 * gnulib/import/openat.h: New file.
5689 * gnulib/import/opendir.c: New file.
5690 * gnulib/import/pipe-safer.c: New file.
5691 * gnulib/import/readdir.c: New file.
5692 * gnulib/import/realloc.c: New file.
5693 * gnulib/import/rewinddir.c: New file.
5694 * gnulib/import/save-cwd.c: New file.
5695 * gnulib/import/save-cwd.h: New file.
5696 * gnulib/import/strdup.c: New file.
5697 * gnulib/import/strerror-override.c: New file.
5698 * gnulib/import/strerror-override.h: New file.
5699 * gnulib/import/strerror.c: New file.
5700 * gnulib/import/unistd--.h: New file.
5701 * gnulib/import/unistd-safer.h: New file.
5702 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5703 "getcwd" and "glob".
5704 * ser-tcp.c: Undefine "close" before redefining it.
5705
5706 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5707
5708 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5709 get rid of res_val.
5710
5711 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5712
5713 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5714 <sol2,sparc>: Likewise.
5715 <sol2-64,i386>: Likewise.
5716
5717 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5718 -Wdeprecated-declarations on *-*-solaris*.
5719 * configure: Regenerate.
5720
5721 * procfs.c: Include "nat/inferior.h".
5722 (procfs_info_proc): Fix typo.
5723
5724 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5725
5726 * remote.c (vector): Include.
5727 (struct private_thread_info): Add field, thread_handle.
5728 (free_private_thread_info): Deallocate storage associated with
5729 thread handle.
5730 (get_private_info_thread): Initialize `thread_handle' field.
5731 (struct thread_item): Add field, thread_handle.
5732 (clear_threads_listing_context): Deallocate storage associated
5733 with thread handle.
5734 (start_thread): Add support for "handle" attribute.
5735 (thread_attributes): Add "handle".
5736 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5737 field.
5738 (remote_update_thread_list): Update thread_handle.
5739 (remote_thread_handle_to_thread_info): New function.
5740 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5741
5742 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5743
5744 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5745 function.
5746 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5747 * python/python-internal.h (thread_object_type): Declare.
5748
5749 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5750
5751 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5752 (target_thread_handle_to_thread_info): Declare.
5753 * target.c (target_thread_handle_to_thread_info): New function.
5754 * target-delegates.c: Regenerate.
5755 * gdbthread.h (find_thread_by_handle): Declare.
5756 * thread.c (find_thread_by_handle): New function.
5757 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5758 function.
5759 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5760
5761 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5762
5763 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5764
5765 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5766
5767 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5768
5769 2017-09-21 Yao Qi <yao.qi@linaro.org>
5770
5771 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5772 to gdb_target_obs.
5773
5774 2017-09-20 Tom Tromey <tom@tromey.com>
5775
5776 * breakpoint.c (struct counted_command_line): Remove.
5777 (breakpoint_commands): Update.
5778 (alloc_counted_command_line, incref_counted_command_line)
5779 (decref_counted_command_line, do_cleanup_counted_command_line)
5780 (make_cleanup_decref_counted_command_line): Remove.
5781 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5782 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5783 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5784 (save_breakpoints): Update.
5785 * breakpoint.h (counted_command_line): Now a typedef to
5786 shared_ptr.
5787 (struct breakpoint) <commands>: Now a counted_command_line.
5788 (struct bpstats) <command>: Likewise.
5789
5790 2017-09-20 Tom Tromey <tom@tromey.com>
5791
5792 * breakpoint.c (struct commands_info, do_map_commands_command):
5793 Remove.
5794 (commands_command_1): Update.
5795 (iterate_over_related_breakpoints): Take a function_view.
5796 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5797 (delete_command): Update.
5798 (map_breakpoint_numbers): Take a function_view.
5799 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5800 (disable_command): Update.
5801 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5802 (enable_command): Update.
5803 (struct disp_data, do_enable_breakpoint_disp)
5804 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5805 (do_map_enable_delete_breakpoint): Remove.
5806 (enable_once_command, enable_count_command, enable_delete_command)
5807 (delete_trace_variable_command): Update.
5808
5809 2017-09-20 Tom Tromey <tom@tromey.com>
5810
5811 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5812 (bpstat_clear): Use delete.
5813 (bpstats): New constructors.
5814 (bpstat_copy, bpstat_stop_status): Use new.
5815 (dprintf_after_condition_true): Update.
5816 * breakpoint.h (bpstats::bpstats): Add constructors.
5817 (bpstats::~bpstats): Add destructor.
5818
5819 2017-09-20 Pedro Alves <palves@redhat.com>
5820
5821 * eval.c (make_params): Delete, refactored as ...
5822 (class fake_method): ... this new type's ctor.
5823 (fake_method::~fake_method): New.
5824 (evaluate_subexp_standard): Use 'fake_method'.
5825
5826 2017-09-20 Tom Tromey <tom@tromey.com>
5827
5828 * windows-nat.c (get_windows_debug_event, windows_wait)
5829 (do_initial_windows_stuff, windows_attach): Update.
5830 * utils.c (vwarning, internal_vproblem): Update.
5831 (ui_unregister_input_event_handler_cleanup)
5832 (prepare_to_handle_input): Remove.
5833 (class scoped_input_handler): New.
5834 (defaulted_query, prompt_for_continue): Update.
5835 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5836 Update.
5837 * top.c (undo_terminal_modifications_before_exit): Update.
5838 * target/target.h (target_terminal_init, target_terminal_inferior)
5839 (target_terminal_ours): Don't declare.
5840 (class target_terminal): New.
5841 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5842 (target_terminal_ours_for_output)
5843 (make_cleanup_restore_target_terminal): Don't declare.
5844 (target_terminal_info): Remove.
5845 * target.c (enum terminal_state, terminal_state): Remove.
5846 (target_terminal::terminal_state): Define.
5847 (target_terminal::init): Rename from target_terminal_init.
5848 (target_terminal::inferior): Rename from
5849 target_terminal_inferior.
5850 (target_terminal::ours): Rename from target_terminal_ours.
5851 (target_terminal::ours_for_output): Rename from
5852 target_terminal_ours_for_output.
5853 (target_terminal::info): New method.
5854 (cleanup_restore_target_terminal)
5855 (make_cleanup_restore_target_terminal): Remove.
5856 * solib.c (handle_solib_event): Update.
5857 * remote.c (remote_serial_quit_handler): Update.
5858 (remote_terminal_inferior, remote_wait_as): Update.
5859 * record-full.c (record_full_wait_1): Update.
5860 * nto-procfs.c (procfs_create_inferior): Update.
5861 * nat/fork-inferior.c (startup_inferior): Update.
5862 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5863 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5864 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5865 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5866 (mi_breakpoint_created, mi_breakpoint_deleted)
5867 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5868 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5869 (mi_user_selected_context_changed, report_initial_inferior):
5870 Update.
5871 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5872 (linux_nat_terminal_inferior): Update.
5873 * infrun.c (follow_fork_inferior)
5874 (handle_vfork_child_exec_or_exit, do_target_resume)
5875 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5876 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5877 Update.
5878 * inflow.c (child_terminal_init, info_terminal_command): Update.
5879 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5880 (attach_command): Update.
5881 * infcall.c (call_thread_fsm_should_stop): Update.
5882 * gnu-nat.c (gnu_attach): Update.
5883 * extension.c (struct active_ext_lang_state)
5884 (restore_active_ext_lang): Update.
5885 * exceptions.c (print_flush): Update.
5886 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5887 (struct quit_handler_cleanup_data, restore_quit_handler)
5888 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5889 Remove.
5890 * cp-support.c (gdb_demangle): Update.
5891 * breakpoint.c (update_inserted_breakpoint_locations)
5892 (insert_breakpoint_locations, handle_jit_event)
5893 (disable_breakpoints_in_unloaded_shlib): Update.
5894 * annotate.c (annotate_breakpoints_invalid)
5895 (annotate_frames_invalid): Update.
5896
5897 2017-09-20 Tom Tromey <tom@tromey.com>
5898
5899 * main.c (catch_command_errors): Rename from
5900 catch_command_errors_const.
5901 (captured_main_1): Update.
5902
5903 2017-09-20 Pedro Alves <palves@redhat.com>
5904
5905 * cli/cli-cmds.c (list_command): Use print_sal_location.
5906 (print_sal_location): New function.
5907 (ambiguous_line_spec): Use print_sal_location.
5908 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5909 * symtab.c (find_function_start_sal): Likewise.
5910 * symtab.h (symtab_and_line::symbol): New field.
5911
5912 2017-09-20 Pedro Alves <palves@redhat.com>
5913
5914 * linespec.c (minsym_found): Handle non-text minsyms.
5915 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5916
5917 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5918
5919 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5920 backslash.
5921
5922 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5923
5924 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5925 vmovups instead vmovaps.
5926 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5927
5928 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5929
5930 * NEWS (Changes since GDB 8.0): Add starti.
5931 * infcmd.c (enum run_break): New.
5932 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5933 case.
5934 (run_command): Use enum run_how.
5935 (start_command): Likewise.
5936 (starti_command): New function.
5937 (RUN_ARGS_HELP): New macro.
5938 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5939 commands. Add starti command.
5940
5941 2017-09-19 Yao Qi <yao.qi@linaro.org>
5942
5943 * Makefile.in (monitor.o): Remove the rule.
5944
5945 2017-09-19 Yao Qi <yao.qi@linaro.org>
5946
5947 * annotate.h (struct annotate_arg_emitter): Use
5948 DISABLE_COPY_AND_ASSIGN.
5949 * common/refcounted-object.h (refcounted_object): Likewise.
5950 * completer.h (struct completion_result): Likewise.
5951 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5952 * filename-seen-cache.h (filename_seen_cache): Likewise.
5953 * gdbcore.h (thread_section_name): Likewise.
5954 * gdb_regex.h (compiled_regex): Likewise.
5955 * gdbthread.h (scoped_restore_current_thread): Likewise.
5956 * inferior.h (scoped_restore_current_inferior): Likewise.
5957 * jit.c (jit_reader): Likewise.
5958 * linespec.h (struct linespec_result): Likewise.
5959 * mi/mi-parse.h (struct mi_parse): Likewise.
5960 * nat/fork-inferior.c (execv_argv): Likewise.
5961 * progspace.h (scoped_restore_current_program_space): Likewise.
5962 * python/python-internal.h (class gdbpy_enter): Likewise.
5963 * regcache.h (regcache): Likewise.
5964 * target-descriptions.c (struct tdesc_reg): Likewise.
5965 (struct tdesc_type): Likewise.
5966 (struct tdesc_feature): Likewise.
5967 * ui-out.h (ui_out_emit_type): Likewise.
5968
5969 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5970
5971 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5972 label abort_expression.
5973
5974 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5975
5976 * common/buffer.c (buffer_xml_printf): Adjust.
5977 * common/xml-utils.c (xml_escape_text): Change return type to
5978 std::string, update code accordingly.
5979 * common/xml-utils.h (xml_escape_text): Change return type to
5980 std::string.
5981 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5982 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5983 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5984 Adjust.
5985
5986 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5987
5988 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5989 (SUBDIR_UNITTESTS_OBS): Add new object file.
5990 * unittests/xml-utils-selftests.c: New file.
5991
5992 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5993
5994 * common/selftest.h (selftest): New struct/interface.
5995 (register_test): Add name parameter, add new overload.
5996 (run_tests): Add filter parameter.
5997 (for_each_selftest_ftype): New typedef.
5998 (for_each_selftest): New declaration.
5999 * common/selftest.c (tests): Change type to
6000 map<string, unique_ptr<selftest>>.
6001 (simple_selftest): New struct.
6002 (register_test): New function.
6003 (register_test): Add name parameter and use it.
6004 (run_tests): Add filter parameter and use it. Add prints.
6005 Adjust to vector -> map change.
6006 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6007 registering selftests.
6008 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6009 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6010 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6011 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6012 * findvar.c (_initialize_findvar): Likewise.
6013 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6014 * maint.c (maintenance_selftest): Update call to run_tests.
6015 (maintenance_info_selftests): New function.
6016 (_initialize_maint_cmds): Register "maintenance info selftests"
6017 command. Update "maintenance selftest" doc.
6018 * regcache.c (_initialize_regcache): Add names when registering
6019 selftests.
6020 * rust-exp.y (_initialize_rust_exp): Likewise.
6021 * selftest-arch.c (gdbarch_selftest): New struct.
6022 (gdbarch_tests): Remove.
6023 (register_test_foreach_arch): Add name parameter. Call
6024 register_test.
6025 (tests_with_arch): Remove, move most content to
6026 gdbarch_selftest::operator().
6027 (_initialize_selftests_foreach_arch): Remove.
6028 * selftest-arch.h (register_test_foreach_arch): Add name
6029 parameter.
6030 (run_tests_with_arch): New declaration.
6031 * utils-selftests.c (_initialize_utils_selftests): Add names
6032 when registering selftests.
6033 * utils.c (_initialize_utils): Likewise.
6034 * unittests/array-view-selftests.c
6035 (_initialize_array_view_selftests): Likewise.
6036 * unittests/environ-selftests.c (_initialize_environ_selftests):
6037 Likewise.
6038 * unittests/function-view-selftests.c
6039 (_initialize_function_view_selftests): Likewise.
6040 * unittests/offset-type-selftests.c
6041 (_initialize_offset_type_selftests): Likewise.
6042 * unittests/optional-selftests.c
6043 (_initialize_optional_selftests): Likewise.
6044 * unittests/scoped_restore-selftests.c
6045 (_initialize_scoped_restore_selftests): Likewise.
6046 * NEWS: Document "maintenance selftest" and "maint info
6047 selftests".
6048
6049 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6050
6051 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6052 scoped_restore.
6053
6054 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6055
6056 * mi/mi-main.c (mi_load_progress): Make uiout variable
6057 a unique_ptr.
6058
6059 2017-09-15 Pedro Alves <palves@redhat.com>
6060
6061 * compile/compile-c-types.c (convert_enum, convert_int)
6062 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6063
6064 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6065
6066 * dwarf2read.c (copy_string): Remove.
6067 (parse_macro_definition): Replace copy_string with savestring.
6068
6069 2017-09-15 Yao Qi <yao.qi@linaro.org>
6070
6071 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6072 gdb_target_obs.
6073 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6074 Likewise.
6075 (i[34567]86-*-linux*): Likewise.
6076
6077 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6078
6079 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6080 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6081 <stack>: Change type to std::vector.
6082 <stack_len, stack_allocated>: Remove.
6083 <grow_stack>: Remove.
6084 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6085 (dwarf_expr_context::~dwarf_expr_context): Remove.
6086 (dwarf_expr_context::grow_stack): Remove.
6087 (dwarf_expr_context::push): Adjust.
6088 (dwarf_expr_context::pop): Adjust.
6089 (dwarf_expr_context::fetch): Adjust.
6090 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6091 (dwarf_expr_context::stack_empty_p): Adjust.
6092 (dwarf_expr_context::execute_stack_op): Adjust.
6093
6094 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6095
6096 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6097 return type to bool.
6098 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6099
6100 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6101
6102 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6103 Change type to bool.
6104 (dwarf_stack_value) <in_stack_memory>: Likewise.
6105 (dwarf_expr_context) <push_address>: Change parameter type to
6106 bool.
6107 <fetch_in_stack_memory>: Change return type to bool.
6108 <push>: Change parameter type to bool.
6109 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6110 to bool.
6111 (dwarf_expr_context::push_address): Likewise.
6112 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6113 to bool.
6114 (dwarf_expr_context::execute_stack_op): Adjust.
6115 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6116
6117 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6118
6119 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6120 (struct dwarf_expr_context) <n_pieces>: Remove.
6121 <pieces>: Change type to std::vector.
6122 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6123 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6124 pieces.
6125 (dwarf_expr_context::add_piece): Adjust.
6126 * dwarf2loc.c (struct piece_closure): Initialize fields.
6127 <n_pieces>: Remove.
6128 <pieces>: Change type to std::vector.
6129 (allocate_piece_closure): Adjust, change parameter to
6130 std::vector rvalue and std::move it to piece_closure.
6131 (rw_pieced_value): Adjust.
6132 (check_pieced_synthetic_pointer): Adjust.
6133 (indirect_synthetic_pointer): Adjust.
6134 (coerce_pieced_ref): Adjust.
6135 (free_pieced_value_closure): Adjust. Use delete to free
6136 piece_closure.
6137 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6138 to allocate_piece_closure.
6139 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6140
6141 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6142
6143 * probe.h (probe_ops_cp): Remove typedef.
6144 (DEF_VEC_P (probe_ops_cp)): Remove.
6145 (all_probe_ops): Change type to std::vector.
6146 * probe.c (info_probes_for_ops): Adjust to vector change.
6147 (probe_linespec_to_ops): Likewise.
6148 (all_probe_ops): Change type to std::vector.
6149 (_initialize_probe): Adjust to vector change.
6150 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6151 * elfread.c (elf_get_probes): Likewise.
6152 * stap-probe.c (_initialize_stap_probe): Likewise.
6153
6154 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6155
6156 * probe.h (struct bound_probe): Define constructors.
6157 * probe.c (bound_probe_s): Remove typedef.
6158 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6159 (collect_probes): Change return type to std::vector, remove
6160 cleanup.
6161 (compare_probes): Return bool, change parameter type. Change
6162 semantic to "less than".
6163 (gen_ui_out_table_header_info): Change parameter to std::vector
6164 and update.
6165 (exists_probe_with_pops): Likewise.
6166 (info_probes_for_ops): Update to std::vector change.
6167 (enable_probes_command): Likewise.
6168 (disable_probes_command): Likewise.
6169
6170 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6171
6172 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6173 vec to std::vector.
6174 * probe.c (parse_probes_in_pspace): Update.
6175 (find_probes_in_objfile): Update.
6176 (find_probe_by_pc): Update.
6177 (collect_probes): Update.
6178 (probe_any_get_probes): Update.
6179 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6180 return type to reference to std::vector.
6181 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6182 std::vector and update.
6183 (dtrace_process_dof): Likewise.
6184 (dtrace_get_probes): Likewise.
6185 * elfread.c (elf_get_probes): Change return type to std::vector,
6186 store an std::vector in bfd_data.
6187 (probe_key_free): Update to std::vector.
6188 * stap-probe.c (handle_stap_probe): Change parameter to
6189 std::vector and update.
6190 (stap_get_probes): Likewise.
6191 * symfile-debug.c (debug_sym_get_probes): Change return type to
6192 std::vector and update.
6193
6194 2017-09-11 Tom Tromey <tom@tromey.com>
6195
6196 * breakpoint.c (program_breakpoint_here_p): Update.
6197 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6198 from make_show_memory_breakpoints_cleanup. Return a
6199 scoped_restore_tmpl<int>.
6200 (restore_show_memory_breakpoints): Remove.
6201 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6202 * mem-break.c (memory_validate_breakpoint): Update.
6203 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6204 (ia64_memory_remove_breakpoint): Update.
6205 (ia64_breakpoint_from_pc): Update.
6206 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6207 from make_show_memory_breakpoints_cleanup.
6208
6209 2017-09-11 Tom Tromey <tom@tromey.com>
6210
6211 * d-namespace.c (d_lookup_symbol): Use std::string.
6212 (find_symbol_in_baseclass): Likewise.
6213
6214 2017-09-11 Tom Tromey <tom@tromey.com>
6215
6216 * ctf.c (ctf_start): Use std::string.
6217
6218 2017-09-11 Tom Tromey <tom@tromey.com>
6219
6220 * ada-lang.c (is_known_support_routine): Update.
6221 (ada_unhandled_exception_name_addr_from_raise): Update.
6222 * guile/scm-frame.c (gdbscm_frame_name): Update.
6223 * python/py-frame.c (frapy_name): Update.
6224 (frapy_function): Update.
6225 * stack.h (find_frame_funname): Update.
6226 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6227 (print_frame): Update.
6228
6229 2017-09-11 Tom Tromey <tom@tromey.com>
6230
6231 * findcmd.c (put_bits): Take a gdb::byte_vector.
6232 (parse_find_args): Return gdb::byte_vector. "args" now const.
6233 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6234 cleanups.
6235 (find_command): Update.
6236
6237 2017-09-11 Tom Tromey <tom@tromey.com>
6238
6239 * cli/cli-script.c (class scoped_restore_hook_in): New.
6240 (clear_hook_in_cleanup): Remove.
6241 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6242 scoped_restore_hook_in.
6243
6244 2017-09-11 Tom Tromey <tom@tromey.com>
6245
6246 * cli/cli-script.c (restore_interp): Remove.
6247 (read_command_lines): Use scoped_restore_interp.
6248 * interps.c (scoped_restore_interp::set_temp): Rename from
6249 interp_set_temp.
6250 * interps.h (class scoped_restore_interp): New.
6251 (interp_set_temp): Remove.
6252
6253 2017-09-11 Tom Tromey <tom@tromey.com>
6254
6255 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6256 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6257 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6258 scoped_restore.
6259 (mi_cmd_break_insert_1): Update.
6260 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6261 scoped_restore.
6262
6263 2017-09-11 Tom Tromey <tom@tromey.com>
6264
6265 * demangle.c (demangle_command): Update.
6266 * breakpoint.c (disable_command): Update.
6267 (enable_command): Update.
6268 (find_location_by_number): Make "number" const. Use
6269 get_number_trailer.
6270 * cli/cli-utils.c (extract_arg): Return std::string.
6271 * probe.c (parse_probe_linespec): Update. Change types.
6272 (collect_probes): Take string arguments.
6273 (parse_probe_linespec): Likewise.
6274 (info_probes_for_ops): Update.
6275 (enable_probes_command): Update.
6276 (disable_probes_command): Update.
6277 * break-catch-sig.c (catch_signal_split_args): Update.
6278 * mi/mi-parse.c (mi_parse): Update.
6279
6280 2017-09-11 Tom Tromey <tom@tromey.com>
6281
6282 * language.h (language_enum): Make argument const.
6283 * language.c (language_enum): Make argument const.
6284
6285 2017-09-11 Tom Tromey <tom@tromey.com>
6286
6287 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6288 as function.
6289 (skip_to_space): Rename from skip_to_space_const.
6290 * common/common-utils.c (skip_to_space): New function.
6291 (skip_to_space): Rename from skip_to_space_const.
6292 * cli/cli-utils.h (get_number): Rename from get_number_const.
6293 (extract_arg): Rename from extract_arg_const.
6294 * cli/cli-utils.c (get_number): Rename from get_number_const.
6295 (extract_arg): Rename from extract_arg_const.
6296 (number_or_range_parser::get_number): Use ::get_number.
6297 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6298 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6299 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6300 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6301 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6302 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6303 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6304 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6305
6306 2017-09-11 Tom Tromey <tom@tromey.com>
6307
6308 * python/python.c (do_start_initialization): Use
6309 py-event-types.def to initialize types.
6310 Define all object type structures.
6311 * python/python-internal.h: Don't declare event initialization
6312 functions.
6313 * python/py-threadevent.c (thread_event_object_type): Don't
6314 define.
6315 * python/py-stopevent.c (stop_event_object_type): Don't define.
6316 * python/py-signalevent.c (signal_event_object_type): Don't
6317 declare or define.
6318 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6319 (clear_objfiles_event_object_type): Don't declare or define.
6320 * python/py-infevents.c (inferior_call_pre_event_object_type)
6321 (inferior_call_post_event_object_type)
6322 (register_changed_event_object_type)
6323 (memory_changed_event_object_type): Don't declare or define.
6324 * python/py-inferior.c (new_thread_event_object_type)
6325 (new_inferior_event_object_type)
6326 (inferior_deleted_event_object_type): Don't declare or define.
6327 * python/py-exitedevent.c (exited_event_object_type): Don't
6328 declare or define.
6329 * python/py-evts.c (gdbpy_initialize_py_events): Use
6330 py-all-events.def.
6331 * python/py-events.h (thread_event_object_type): Don't declare.
6332 (events_object): Use py-all-events.def.
6333 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6334 py-event-types.def.
6335 * python/py-event-types.def: New file.
6336 * python/py-continueevent.c (create_continue_event_object): Don't
6337 declare or define.
6338 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6339 declare or define.
6340 * python/py-all-events.def: New file.
6341
6342 2017-09-11 Tom Tromey <tom@tromey.com>
6343
6344 * python/py-threadevent.c (create_thread_event_object): Return
6345 gdbpy_ref.
6346 * python/py-stopevent.h (create_stop_event_object)
6347 (create_breakpoint_event_object, create_signal_event_object):
6348 Update.
6349 * python/py-stopevent.c (create_stop_event_object): Return
6350 gdbpy_ref.
6351 (emit_stop_event): Update.
6352 * python/py-signalevent.c (create_signal_event_object): Return
6353 gdbpy_ref.
6354 * python/py-infevents.c (create_inferior_call_event_object):
6355 Update.
6356 * python/py-event.h (create_event_object)
6357 (create_thread_event_object): Update.
6358 * python/py-event.c (create_event_object): Return gdbpy_ref.
6359 * python/py-continueevent.c: Return gdbpy_ref.
6360 * python/py-bpevent.c (create_breakpoint_event_object): Return
6361 gdbpy_ref.
6362
6363 2017-09-11 Tom Tromey <tom@tromey.com>
6364
6365 PR python/15622:
6366 * NEWS: Add entry.
6367 * python/python.c (do_start_initialization): Initialize new event
6368 types.
6369 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6370 (gdbpy_initialize_inferior_deleted_event)
6371 (gdbpy_initialize_new_thread_event): Declare.
6372 * python/py-threadevent.c (create_thread_event_object): Add option
6373 "thread" parameter.
6374 * python/py-inferior.c (new_thread_event_object_type)
6375 (new_inferior_event_object_type)
6376 (inferior_deleted_event_object_type): Declare.
6377 (python_new_inferior, python_inferior_deleted): New functions.
6378 (add_thread_object): Emit new_thread event.
6379 (gdbpy_initialize_inferior): Attach new functions to corresponding
6380 observers.
6381 (new_thread, new_inferior, inferior_deleted): Define new event
6382 types.
6383 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6384 registries.
6385 * python/py-events.h (events_object) <new_inferior,
6386 inferior_deleted, new_thread>: New fields.
6387 * python/py-event.h (create_thread_event_breakpoint): Add optional
6388 "thread" parameter.
6389
6390 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6391
6392 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6393 check current_ui instead.
6394 (internal_vproblem): Likewise.
6395
6396 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6397
6398 * thread.c (print_thread_info_1): Remove unnecessary calls to
6399 uiout->is_mi_like_p.
6400
6401 2017-09-09 Tom Tromey <tom@tromey.com>
6402
6403 * namespace.h (add_using_directive): Update.
6404 * namespace.c (add_using_directive): Change type of excludes to
6405 std::vector.
6406 * dwarf2read.c (read_import_statement): Use std::vector.
6407 (read_namespace): Update.
6408 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6409
6410 2017-09-09 Tom Tromey <tom@tromey.com>
6411
6412 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6413
6414 2017-09-09 Tom Tromey <tom@tromey.com>
6415
6416 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6417
6418 2017-09-09 Tom Tromey <tom@tromey.com>
6419
6420 * stack.c (func_command): Use gdb::def_vector.
6421
6422 2017-09-09 Tom Tromey <tom@tromey.com>
6423
6424 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6425 ui_out_emit_list, ui_out_emit_tuple.
6426 (mi_cmd_var_update): Likewise.
6427
6428 2017-09-09 Tom Tromey <tom@tromey.com>
6429
6430 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6431 ui_out_redirect_pop.
6432 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6433 ui_out_redirect_pop.
6434 * utils.c (do_ui_out_redirect_pop)
6435 (make_cleanup_ui_out_redirect_pop): Remove.
6436 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6437 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6438 * ui-out.h (ui_out_redirect_pop): New class.
6439
6440 2017-09-09 Tom Tromey <tom@tromey.com>
6441
6442 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6443 (list_available_thread_groups, mi_cmd_list_thread_groups)
6444 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6445 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6446 Likewise.
6447
6448 2017-09-09 Tom Tromey <tom@tromey.com>
6449
6450 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6451 ui_out_emit_tuple.
6452
6453 2017-09-09 Tom Tromey <tom@tromey.com>
6454
6455 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6456 * stack.c (print_frame): Use ui_out_emit_tuple.
6457 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6458 (info_spu_mailbox_command, info_spu_dma_command)
6459 (info_spu_proxydma_command): Likewise.
6460 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6461 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6462 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6463 ui_out_emit_tuple.
6464 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6465
6466 2017-09-09 Tom Tromey <tom@tromey.com>
6467
6468 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6469 (class ui_out_emit_table): Update comment.
6470 * ui-out.c (do_cleanup_table_end)
6471 (make_cleanup_ui_out_table_begin_end): Remove.
6472 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6473 (info_spu_dma_cmdlist): Likewise.
6474 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6475 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6476 ui_out_emit_table.
6477
6478 2017-09-09 Tom Tromey <tom@tromey.com>
6479
6480 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6481 ui_out_emit_list, gdb::optional.
6482
6483 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6484
6485 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6486 prototype.
6487 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6488 prototype.
6489 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6490 prototype.
6491 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6492 * ada-exp.y: Remove _initialize_ada_exp prototype.
6493 * ada-lang.c: Remove _initialize_ada_language prototype.
6494 * ada-tasks.c: Remove _initialize_tasks prototype.
6495 * addrmap.c: Remove _initialize_addrmap prototype.
6496 * agent.c: Remove _initialize_agent prototype.
6497 * aix-thread.c: Remove _initialize_aix_thread prototype.
6498 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6499 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6500 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6501 prototype.
6502 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6503 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6504 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6505 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6506 prototype.
6507 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6508 prototype.
6509 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6510 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6511 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6512 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6513 prototype.
6514 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6515 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6516 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6517 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6518 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6519 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6520 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6521 prototype.
6522 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6523 prototype.
6524 * annotate.c: Remove _initialize_annotate prototype.
6525 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6526 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6527 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6528 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6529 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6530 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6531 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6532 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6533 prototype.
6534 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6535 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6536 * auto-load.c: Remove _initialize_auto_load prototype.
6537 * auxv.c: Remove _initialize_auxv prototype.
6538 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6539 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6540 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6541 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6542 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6543 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6544 prototype.
6545 * break-catch-throw.c: Remove _initialize_break_catch_throw
6546 prototype.
6547 * breakpoint.c: Remove _initialize_breakpoint prototype.
6548 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6549 * btrace.c: Remove _initialize_btrace prototype.
6550 * charset.c: Remove _initialize_charset prototype.
6551 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6552 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6553 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6554 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6555 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6556 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6557 * coffread.c: Remove _initialize_coffread prototype.
6558 * compile/compile.c: Remove _initialize_compile prototype.
6559 * complaints.c: Remove _initialize_complaints prototype.
6560 * completer.c: Remove _initialize_completer prototype.
6561 * copying.awk: Remove _initialize_copying prototype.
6562 * copying.c: Regenerate.
6563 * core-regset.c: Remove _initialize_core_regset prototype.
6564 * corefile.c: Remove _initialize_core prototype.
6565 * corelow.c: Remove _initialize_corelow prototype.
6566 * cp-abi.c: Remove _initialize_cp_abi prototype.
6567 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6568 * cp-support.c: Remove _initialize_cp_support prototype.
6569 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6570 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6571 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6572 * ctf.c: Remove _initialize_ctf prototype.
6573 * d-lang.c: Remove _initialize_d_language prototype.
6574 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6575 prototype.
6576 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6577 * dbxread.c: Remove _initialize_dbxread prototype.
6578 * dcache.c: Remove _initialize_dcache prototype.
6579 * demangle.c: Remove _initialize_demangler prototype.
6580 * disasm-selftests.c: Remove _initialize_disasm_selftests
6581 prototype.
6582 * disasm.c: Remove _initialize_disasm prototype.
6583 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6584 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6585 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6586 prototype.
6587 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6588 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6589 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6590 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6591 * elfread.c: Remove _initialize_elfread prototype.
6592 * exec.c: Remove _initialize_exec prototype.
6593 * extension.c: Remove _initialize_extension prototype.
6594 * f-lang.c: Remove _initialize_f_language prototype.
6595 * f-valprint.c: Remove _initialize_f_valprint prototype.
6596 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6597 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6598 * filesystem.c: Remove _initialize_filesystem prototype.
6599 * findcmd.c: Remove _initialize_mem_search prototype.
6600 * fork-child.c: Remove _initialize_fork_child prototype.
6601 * frame-base.c: Remove _initialize_frame_base prototype.
6602 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6603 * frame.c: Remove _initialize_frame prototype.
6604 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6605 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6606 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6607 * gcore.c: Remove _initialize_gcore prototype.
6608 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6609 * gdbarch.c: Regenerate.
6610 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6611 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6612 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6613 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6614 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6615 * go-lang.c: Remove _initialize_go_language prototype.
6616 * go32-nat.c: Remove _initialize_go32_nat prototype.
6617 * guile/guile.c: Remove _initialize_guile prototype.
6618 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6619 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6620 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6621 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6622 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6623 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6624 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6625 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6626 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6627 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6628 prototype.
6629 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6630 prototype.
6631 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6632 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6633 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6634 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6635 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6636 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6637 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6638 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6639 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6640 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6641 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6642 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6643 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6644 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6645 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6646 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6647 prototype.
6648 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6649 prototype.
6650 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6651 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6652 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6653 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6654 * infcall.c: Remove _initialize_infcall prototype.
6655 * infcmd.c: Remove _initialize_infcmd prototype.
6656 * inferior.c: Remove _initialize_inferiors prototype.
6657 * inflow.c: Remove _initialize_inflow prototype.
6658 * infrun.c: Remove _initialize_infrun prototype.
6659 * interps.c: Remove _initialize_interpreter prototype.
6660 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6661 * jit.c: Remove _initialize_jit prototype.
6662 * language.c: Remove _initialize_language prototype.
6663 * linux-fork.c: Remove _initialize_linux_fork prototype.
6664 * linux-nat.c: Remove _initialize_linux_nat prototype.
6665 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6666 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6667 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6668 * m2-lang.c: Remove _initialize_m2_language prototype.
6669 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6670 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6671 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6672 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6673 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6674 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6675 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6676 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6677 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6678 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6679 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6680 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6681 * machoread.c: Remove _initialize_machoread prototype.
6682 * macrocmd.c: Remove _initialize_macrocmd prototype.
6683 * macroscope.c: Remove _initialize_macroscope prototype.
6684 * maint.c: Remove _initialize_maint_cmds prototype.
6685 * mdebugread.c: Remove _initialize_mdebugread prototype.
6686 * memattr.c: Remove _initialize_mem prototype.
6687 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6688 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6689 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6690 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6691 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6692 * microblaze-linux-tdep.c: Remove
6693 _initialize_microblaze_linux_tdep prototype.
6694 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6695 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6696 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6697 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6698 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6699 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6700 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6701 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6702 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6703 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6704 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6705 prototype.
6706 * mipsread.c: Remove _initialize_mipsread prototype.
6707 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6708 prototype.
6709 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6710 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6711 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6712 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6713 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6714 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6715 prototype.
6716 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6717 * nto-procfs.c: Remove _initialize_procfs prototype.
6718 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6719 * objc-lang.c: Remove _initialize_objc_language prototype.
6720 * objfiles.c: Remove _initialize_objfiles prototype.
6721 * observer.c: Remove observer_test_first_notification_function,
6722 observer_test_second_notification_function,
6723 observer_test_third_notification_function, and
6724 _initialize_observer prototypes.
6725 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6726 * osabi.c: Remove _initialize_gdb_osabi prototype.
6727 * osdata.c: Remove _initialize_osdata prototype.
6728 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6729 * parse.c: Remove _initialize_parse prototype.
6730 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6731 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6732 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6733 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6734 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6735 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6736 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6737 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6738 * printcmd.c: Remove _initialize_printcmd prototype.
6739 * probe.c: Remove _initialize_probe prototype.
6740 * proc-api.c: Remove _initialize_proc_api prototype.
6741 * proc-events.c: Remove _initialize_proc_events prototype.
6742 * proc-service.c: Remove _initialize_proc_service prototype.
6743 * procfs.c: Remove _initialize_procfs prototype.
6744 * psymtab.c: Remove _initialize_psymtab prototype.
6745 * python/python.c: Remove _initialize_python prototype.
6746 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6747 * record-btrace.c: Remove _initialize_record_btrace prototype.
6748 * record-full.c: Remove _initialize_record_full prototype.
6749 * record.c: Remove _initialize_record prototype.
6750 * regcache.c: Remove _initialize_regcache prototype.
6751 * reggroups.c: Remove _initialize_reggroup prototype.
6752 * remote-notif.c: Remove _initialize_notif prototype.
6753 * remote-sim.c: Remove _initialize_remote_sim prototype.
6754 * remote.c: Remove _initialize_remote prototype.
6755 * reverse.c: Remove _initialize_reverse prototype.
6756 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6757 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6758 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6759 prototype.
6760 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6761 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6762 * rust-exp.y: Remove _initialize_rust_exp prototype.
6763 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6764 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6765 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6766 * score-tdep.c: Remove _initialize_score_tdep prototype.
6767 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6768 prototype.
6769 * ser-go32.c: Remove _initialize_ser_dos prototype.
6770 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6771 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6772 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6773 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6774 * serial.c: Remove _initialize_serial prototype.
6775 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6776 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6777 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6778 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6779 * skip.c: Remove _initialize_step_skip prototype.
6780 * sol-thread.c: Remove _initialize_sol_thread prototype.
6781 * solib-aix.c: Remove _initialize_solib_aix prototype.
6782 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6783 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6784 * solib-frv.c: Remove _initialize_frv_solib prototype.
6785 * solib-spu.c: Remove _initialize_spu_solib prototype.
6786 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6787 * solib-target.c: Remove _initialize_solib_target prototype.
6788 * solib.c: Remove _initialize_solib prototype.
6789 * source.c: Remove _initialize_source prototype.
6790 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6791 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6792 prototype.
6793 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6794 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6795 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6796 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6797 prototype.
6798 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6799 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6800 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6801 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6802 prototype.
6803 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6804 prototype.
6805 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6806 prototype.
6807 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6808 prototype.
6809 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6810 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6811 prototype.
6812 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6813 prototype.
6814 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6815 prototype.
6816 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6817 prototype.
6818 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6819 prototype.
6820 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6821 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6822 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6823 * stabsread.c: Remove _initialize_stabsread prototype.
6824 * stack.c: Remove _initialize_stack prototype.
6825 * stap-probe.c: Remove _initialize_stap_probe prototype.
6826 * std-regs.c: Remove _initialize_frame_reg prototype.
6827 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6828 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6829 * symfile.c: Remove _initialize_symfile prototype.
6830 * symmisc.c: Remove _initialize_symmisc prototype.
6831 * symtab.c: Remove _initialize_symtab prototype.
6832 * target-dcache.c: Remove _initialize_target_dcache prototype.
6833 * target-descriptions.c: Remove _initialize_target_descriptions
6834 prototype.
6835 * thread.c: Remove _initialize_thread prototype.
6836 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6837 prototype.
6838 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6839 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6840 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6841 prototype.
6842 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6843 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6844 * tracefile.c: Remove _initialize_tracefile prototype.
6845 * tracepoint.c: Remove _initialize_tracepoint prototype.
6846 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6847 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6848 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6849 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6850 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6851 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6852 * tui/tui.c: Remove _initialize_tui prototype.
6853 * typeprint.c: Remove _initialize_typeprint prototype.
6854 * user-regs.c: Remove _initialize_user_regs prototype.
6855 * utils.c: Remove _initialize_utils prototype.
6856 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6857 * valarith.c: Remove _initialize_valarith prototype.
6858 * valops.c: Remove _initialize_valops prototype.
6859 * valprint.c: Remove _initialize_valprint prototype.
6860 * value.c: Remove _initialize_values prototype.
6861 * varobj.c: Remove _initialize_varobj prototype.
6862 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6863 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6864 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6865 * windows-nat.c: Remove _initialize_windows_nat,
6866 _initialize_check_for_gdb_ini, and _initialize_loadable
6867 prototypes.
6868 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6869 * xcoffread.c: Remove _initialize_xcoffread prototype.
6870 * xml-support.c: Remove _initialize_xml_support prototype.
6871 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6872 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6873 prototype.
6874 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6875 prototype.
6876 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6877
6878 2017-09-08 Keith Seitz <keiths@redhat.com>
6879
6880 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6881 field.
6882
6883 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6884
6885 * f-valprint.c (f_val_print): Remove check for one byte
6886 sized integers. Remove printing of character type.
6887
6888 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6889 Christoph Weinmann <christoph.t.weinmann@intel.com>
6890 Bernhard Heckel <bernhard.heckel@intel.com>
6891
6892 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6893 to maintain proper indentation when printing pointers/refs.
6894
6895 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6896
6897 GDB 8.0.1 released.
6898
6899 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6900
6901 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6902
6903 2017-09-05 Tom Tromey <tom@tromey.com>
6904
6905 * parse.c (funcall_chain): Now a std::vector.
6906 (start_arglist, end_arglist): Simplify.
6907 (free_funcalls): Remove.
6908 (parse_exp_in_context_1): Remove cleanup.
6909
6910 2017-09-05 Tom Tromey <tom@tromey.com>
6911
6912 * go-exp.y (go_parse): Don't create a cleanup.
6913
6914 2017-09-05 Tom Tromey <tom@tromey.com>
6915
6916 * d-exp.y (PrimaryExpression): Use std::string.
6917 (d_parse): Don't create a cleanup.
6918
6919 2017-09-05 Tom Tromey <tom@tromey.com>
6920
6921 * utils.c (do_clear_parser_state): Remove.
6922 (make_cleanup_clear_parser_state): Remove.
6923 * p-exp.y (pascal_parse): Use scoped_restore.
6924 * m2-exp.y (m2_parse): Use scoped_restore.
6925 * f-exp.y (f_parse): Use scoped_restore.
6926 * d-exp.y (d_parse): Use scoped_restore.
6927 * c-exp.y (c_parse): Use scoped_restore.
6928 * ada-exp.y (ada_parse): Use scoped_restore.
6929 * utils.h (make_cleanup_clear_parser_state): Remove.
6930
6931 2017-09-06 Keith Seitz <keiths@redhat.com>
6932
6933 * dwarf2read.c (dw2_linkage_name_attr): New function.
6934 (dw2_linkage_name): New function.
6935 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6936 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6937 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6938
6939 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6940
6941 * config/djgpp/djconfig.sh: Correct shell portability issue.
6942
6943 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6944
6945 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6946
6947 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6948
6949 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6950 * NEWS: Mention new FreeBSD/mips native configuration.
6951 * configure.host: Add aarch64*-*-freebsd*.
6952 * configure.nat: Likewise.
6953 * aarch64-fbsd-nat.c: New file.
6954
6955 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6956
6957 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6958 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6959 * NEWS: Mention new FreeBSD/aarch64 target.
6960 * configure.tgt: Add aarch64*-*-freebsd*.
6961 * aarch64-fbsd-tdep.c: New file.
6962 * aarch64-fbsd-tdep.h: New file.
6963
6964 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6965
6966 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6967
6968 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6969
6970 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6971 of TLS symbols.
6972
6973 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6974
6975 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6976 call.
6977
6978 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6979
6980 * infrun.c (follow_exec): Call add_thread after
6981 target_find_description.
6982
6983 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6984
6985 * infrun.c (handle_inferior_event_1): When exec'ing, read
6986 stop_pc after follow_exec.
6987
6988 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6989
6990 * remote.c (process_g_packet): Update error message.
6991
6992 2017-09-05 Yao Qi <yao.qi@linaro.org>
6993
6994 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6995 targets.
6996
6997 2017-09-05 Pedro Alves <palves@redhat.com>
6998
6999 * eval.c (eval_call, evaluate_funcall): New functions, factored
7000 out from ...
7001 (evaluate_subexp_standard): ... this.
7002
7003 2017-09-05 Yao Qi <yao.qi@linaro.org>
7004
7005 * amd64-tdep.c (amd64_target_description): Create target
7006 descriptions.
7007 (_initialize_amd64_tdep): Don't call functions
7008 initialize_tdesc_amd64_*. Add self tests.
7009 * arch/amd64.c (amd64_create_target_description): Add parameter
7010 is_linux. Call set_tdesc_osabi if is_linux is true.
7011 * arch/amd64.h (amd64_create_target_description): Update the
7012 declaration.
7013 * arch/i386.c (i386_create_target_description): Add parameter
7014 is_linux. Call set_tdesc_osabi if is_linux is true.
7015 * arch/i386.h (i386_create_target_description): Update
7016 declaration.
7017 * configure.tgt: Add i386.o to gdb_target_obs.
7018 * features/Makefile (XMLTOC): Remove i386/*.xml.
7019 * features/i386/amd64-avx-avx512.c: Remove.
7020 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7021 * features/i386/amd64-avx-mpx.c: Remove.
7022 * features/i386/amd64-avx.c: Remove.
7023 * features/i386/amd64-mpx.c: Remove.
7024 * features/i386/amd64.c: Remove.
7025 * features/i386/i386-avx-avx512.c: Remove.
7026 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7027 * features/i386/i386-avx-mpx.c: Remove.
7028 * features/i386/i386-avx.c: Remove.
7029 * features/i386/i386-mmx.c: Remove.
7030 * features/i386/i386-mpx.c: Remove.
7031 * features/i386/i386.c: Remove.
7032 * i386-tdep.c: Don't include features/i386/i386*.c., include
7033 target-descriptions.h and arch/i386.h.
7034 (i386_target_description): Create target descriptions.
7035 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7036 functions. Do self tests.
7037
7038 2017-09-05 Yao Qi <yao.qi@linaro.org>
7039
7040 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7041 * features/i386/amd64-avx-avx512-linux.c: Removed.
7042 * features/i386/amd64-avx-linux.c: Removed.
7043 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7044 * features/i386/amd64-avx-mpx-linux.c: Removed.
7045 * features/i386/amd64-linux.c: Removed.
7046 * features/i386/amd64-mpx-linux.c: Removed.
7047 * features/i386/x32-avx-avx512-linux.c: Removed.
7048 * features/i386/x32-avx-linux.c: Removed.
7049 * features/i386/x32-linux.c: Removed.
7050
7051 2017-09-05 Yao Qi <yao.qi@linaro.org>
7052
7053 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7054 features/i386/*.c.
7055 (amd64_linux_read_description): Call
7056 amd64_create_target_description.
7057 * arch/amd64.c: New file.
7058 * arch/amd64.h: New file.
7059 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7060 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7061
7062 2017-09-05 Yao Qi <yao.qi@linaro.org>
7063
7064 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7065 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7066 (amd64_linux_read_description): Create target descriptions.
7067 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7068 functions. Add unit tests.
7069 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7070 x32-core.xml.
7071 * features/i386/64bit-avx.c: Generated.
7072 * features/i386/64bit-avx512.c: Generated.
7073 * features/i386/64bit-core.c: Generated.
7074 * features/i386/64bit-linux.c: Generated.
7075 * features/i386/64bit-mpx.c: Generated.
7076 * features/i386/64bit-pkeys.c: Generated.
7077 * features/i386/64bit-segments.c: Generated.
7078 * features/i386/64bit-sse.c: Generated.
7079 * features/i386/x32-core.c: Generated.
7080 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7081 c files for amd64-linux and x32-linux.
7082
7083 2017-09-05 Yao Qi <yao.qi@linaro.org>
7084
7085 * amd64-linux-tdep.c (amd64_linux_read_description): New
7086 function.
7087 (amd64_linux_core_read_description): Call
7088 amd64_linux_read_description.
7089 (amd64_linux_init_abi): Likewise.
7090 (amd64_x32_linux_init_abi): Likewise.
7091 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7092 * x86-linux-nat.c (x86_linux_read_description): Call
7093 amd64_linux_read_description.
7094
7095 2017-09-05 Yao Qi <yao.qi@linaro.org>
7096
7097 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7098 comments.
7099
7100 2017-09-05 Yao Qi <yao.qi@linaro.org>
7101
7102 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7103 * features/i386/i386-avx-avx512-linux.c: Remove.
7104 * features/i386/i386-avx-linux.c: Remove.
7105 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7106 * features/i386/i386-avx-mpx-linux.c: Remove.
7107 * features/i386/i386-linux.c: Remove.
7108 * features/i386/i386-mmx-linux.c: Remove.
7109 * features/i386/i386-mpx-linux.c: Remove.
7110
7111 2017-09-05 Yao Qi <yao.qi@linaro.org>
7112
7113 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7114 (SFILES): Add arch/i386.c.
7115 (HFILES_NO_SRCDIR): Add arch/i386.h.
7116 * arch/i386.c: New file.
7117 * arch/i386.h: New file.
7118 * arch/tdesc.h (allocate_target_description): Declare.
7119 (set_tdesc_architecture): Declare.
7120 (set_tdesc_osabi): Declare.
7121 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7122 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7123 include arch/i386.h.
7124 (i386_linux_read_description): Remove code and call
7125 i386_create_target_description.
7126 (set_tdesc_architecture): New function.
7127 (set_tdesc_osabi): New function.
7128 * target-descriptions.h (allocate_target_description): Remove.
7129
7130 2017-09-05 Yao Qi <yao.qi@linaro.org>
7131
7132 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7133 * target-descriptions.c (tdesc_create_feature): Likewise, and
7134 adjust code.
7135 * features/i386/32bit-avx.c: Re-generated.
7136 * features/i386/32bit-avx512.c: Re-generated.
7137 * features/i386/32bit-core.c: Re-generated.
7138 * features/i386/32bit-linux.c: Re-generated.
7139 * features/i386/32bit-mpx.c: Re-generated.
7140 * features/i386/32bit-pkeys.c: Re-generated.
7141 * features/i386/32bit-sse.c: Re-generated.
7142
7143 2017-09-05 Yao Qi <yao.qi@linaro.org>
7144
7145 * regformats/regdef.h (struct reg): Override operator == and !=.
7146
7147 2017-09-05 Yao Qi <yao.qi@linaro.org>
7148
7149 * arch/tdesc.h: New file.
7150 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7151 * target-descriptions.c: Update comments.
7152 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7153 declarations.
7154 * features/i386/32bit-avx.c: Re-generated.
7155 * features/i386/32bit-avx512.c: Re-generated.
7156 * features/i386/32bit-core.c: Re-generated.
7157 * features/i386/32bit-linux.c: Re-generated.
7158 * features/i386/32bit-mpx.c: Re-generated.
7159 * features/i386/32bit-pkeys.c: Re-generated.
7160 * features/i386/32bit-sse.c: Re-generated.
7161
7162 2017-09-05 Yao Qi <yao.qi@linaro.org>
7163
7164 * regformats/regdat.sh: Update generated code.
7165
7166 2017-09-05 Yao Qi <yao.qi@linaro.org>
7167
7168 * regformats/regdat.sh: Adjust code order.
7169
7170 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7171
7172 * expprint.c (dump_subexp_body_standard): Use constant format
7173 string in fprintf_filtered call.
7174
7175 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7176
7177 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7178 NetBSD/i386.
7179 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7180
7181 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7182
7183 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7184
7185 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7186
7187 * bsd-kvm.o: Define _KMEMUSER.
7188 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7189 * configure: Regenerate.
7190
7191 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7192
7193 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7194 * i386-fbsd-nat.c: Likewise.
7195
7196 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7197
7198 * unittests/array-view-selftests.c: Add include of <array>.
7199
7200 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7201
7202 * spu-tdep.c (flush_ea_cache): Add missing argument to
7203 call_function_by_hand.
7204
7205 2017-09-04 Pedro Alves <palves@redhat.com>
7206
7207 * NEWS (Safer support for debugging with no debug info): New.
7208
7209 2017-09-04 Pedro Alves <palves@redhat.com>
7210
7211 * c-exp.y (function_method, function_method_void): Add current
7212 instance flags to TYPE_INSTANCE.
7213 * dwarf2read.c (check_modifier): New.
7214 (compute_delayed_physnames): Assert that only C++ adds delayed
7215 physnames. Mark fn_fields as const/volatile depending on
7216 physname.
7217 * eval.c (make_params): New type_instance_flags parameter. Use
7218 it as the new type's instance flags.
7219 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7220 flags element and pass it to make_params.
7221 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7222 instance flags element.
7223 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7224 * gdbtypes.h: Include "enum-flags.h".
7225 (type_instance_flags): New enum-flags type.
7226 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7227 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7228 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7229 (follow_type_instance_flags): New function.
7230 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7231 * parser-defs.h (follow_type_instance_flags): Declare.
7232 * valops.c (value_struct_elt_for_reference): const/volatile must
7233 match too.
7234
7235 2017-09-04 Pedro Alves <palves@redhat.com>
7236
7237 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7238 function/method scopes; lookup the nested name as a function local
7239 static variable.
7240
7241 2017-09-04 Pedro Alves <palves@redhat.com>
7242
7243 (%type <voidval>): Add function_method.
7244 * c-exp.y (exp): New production for calls with no arguments.
7245 (function_method, function_method_void_or_typelist): New
7246 productions.
7247 (exp): New production for "method()::static_var".
7248 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7249 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7250 Handle OP_FUNC_STATIC_VAR.
7251 * parse.c (operator_length_standard):
7252 Handle OP_FUNC_STATIC_VAR.
7253
7254 2017-09-04 Pedro Alves <palves@redhat.com>
7255
7256 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7257 handling.
7258 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7259 Ditto.
7260 * parse.c (operator_length_standard, operator_check_standard):
7261 Ditto.
7262 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7263
7264 2017-09-04 Pedro Alves <palves@redhat.com>
7265
7266 * ax-gdb.c: Include "typeprint.h".
7267 (gen_expr_for_cast): New function.
7268 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7269 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7270 type is unknown.
7271 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7272 nodebug_data_symbol.
7273 * eval.c: Include "typeprint.h".
7274 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7275 Error out if symbol has unknown type.
7276 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7277 evaluate_subexp_for_cast.
7278 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7279 OP_VAR_MSYM_VALUE.
7280 (evaluate_subexp_for_cast): New function.
7281 * gdbtypes.c (init_nodebug_var_type): New function.
7282 (objfile_type): Use it to initialize types of variables with no
7283 debug info.
7284 * typeprint.c (error_unknown_type): New.
7285 * typeprint.h (error_unknown_type): New declaration.
7286 * compile/compile-c-types.c (convert_type_basic): Handle
7287 TYPE_CODE_ERROR; warn and fallback to int for variables with
7288 unknown type.
7289
7290 2017-09-04 Pedro Alves <palves@redhat.com>
7291
7292 * eval.c (evaluate_var_value): New function, factored out from ...
7293 (evaluate_subexp_standard): ... here.
7294
7295 2017-09-04 Pedro Alves <palves@redhat.com>
7296
7297 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7298 Remove useless assignments to 'op'.
7299
7300 2017-09-04 Pedro Alves <palves@redhat.com>
7301
7302 * eval.c (eval_skip_value): New function.
7303 (evaluate_subexp_standard): Use it.
7304
7305 2017-09-04 Pedro Alves <palves@redhat.com>
7306
7307 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7308 function name from symbol/minsym and pass it to
7309 error_call_unknown_return_type.
7310
7311 2017-09-04 Pedro Alves <palves@redhat.com>
7312
7313 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7314 * ax-gdb.c (gen_msym_var_ref): New function.
7315 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7316 * eval.c (evaluate_var_msym_value): New function.
7317 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7318 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7319 to call_function_by_hand.
7320 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7321 Handle OP_VAR_MSYM_VALUE.
7322 (union exp_element) <msymbol>: New field.
7323 * minsyms.h (struct type): Forward declare.
7324 (find_minsym_type_and_address): Declare.
7325 * parse.c (write_exp_elt_msym): New function.
7326 (write_exp_msymbol): Delete, refactored as ...
7327 (find_minsym_type_and_address): ... this new function.
7328 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7329 (operator_length_standard, operator_check_standard): Handle
7330 OP_VAR_MSYM_VALUE.
7331 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7332
7333 2017-09-04 Pedro Alves <palves@redhat.com>
7334
7335 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7336 TYPE_GNU_IFUNC specially here. Throw error if return type is
7337 unknown.
7338 * ada-typeprint.c (print_func_type): Handle functions with unknown
7339 return type.
7340 * c-typeprint.c (c_type_print_base): Handle functions and methods
7341 with unknown return type.
7342 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7343 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7344 * compile/compile-c-types.c: Include "objfiles.h".
7345 (convert_func): For functions with unknown return type, warn and
7346 default to int.
7347 * compile/compile-object-run.c (compile_object_run): Adjust call
7348 to call_function_by_hand_dummy.
7349 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7350 call_function_by_hand.
7351 * eval.c (evaluate_subexp_standard): Adjust calls to
7352 call_function_by_hand. Handle functions and methods with unknown
7353 return type. Pass expect_type to call_function_by_hand.
7354 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7355 return type.
7356 * gcore.c (call_target_sbrk): Adjust call to
7357 call_function_by_hand.
7358 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7359 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7360 an integer address type instead of nodebug.
7361 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7362 call_function_by_hand.
7363 * infcall.c (error_call_unknown_return_type): New function.
7364 (call_function_by_hand): New "default_return_type" parameter.
7365 Pass it down.
7366 (call_function_by_hand_dummy): New "default_return_type"
7367 parameter. Use it instead of defaulting to int. If there's no
7368 default and the return type is unknown, throw an error. If
7369 there's a default return type, and the called function has no
7370 debug info, then assume the function is prototyped.
7371 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7372 New "default_return_type" parameter.
7373 (error_call_unknown_return_type): New declaration.
7374 * linux-fork.c (call_lseek): Cast return type of lseek.
7375 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7376 call_function_by_hand.
7377 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7378 calls to call_function_by_hand.
7379 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7380 return type.
7381 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7382 (value_nsstring, print_object_command): Adjust calls to
7383 call_function_by_hand.
7384 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7385 functions with unknown return type.
7386 (pascal_type_print_func_varspec_suffix): New function.
7387 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7388 TYPE_CODE_METHOD>: Use it.
7389 * python/py-value.c (valpy_call): Adjust call to
7390 call_function_by_hand.
7391 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7392 call_function_by_hand.
7393 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7394 call_function_by_hand.
7395 * valops.c (value_allocate_space_in_inferior): Adjust call to
7396 call_function_by_hand.
7397 * typeprint.c (type_print_unknown_return_type): New function.
7398 * typeprint.h (type_print_unknown_return_type): New declaration.
7399
7400 2017-09-04 Pedro Alves <palves@redhat.com>
7401
7402 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7403 types with more than one parameter as prototyped.
7404
7405 2017-09-04 Pedro Alves <palves@redhat.com>
7406
7407 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7408 (disassemble_command): Use gdb_disassembly_flags instead of bare
7409 int.
7410 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7411 (dump_insns, do_mixed_source_and_assembly_deprecated)
7412 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7413 Use gdb_disassembly_flags instead of bare int.
7414 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7415 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7416 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7417 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7418 (enum gdb_disassembly_flag): ... values of this new enumeration.
7419 (gdb_disassembly_flags): Define.
7420 (gdb_disassembly)
7421 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7422 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7423 gdb_disassembly_flags instead of bare int.
7424 * record-btrace.c (btrace_insn_history)
7425 (record_btrace_insn_history, record_btrace_insn_history_range)
7426 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7427 instead of bare int.
7428 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7429 Use gdb_disassembly_flags instead of bare int.
7430 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7431 Define.
7432 * target-delegates.c: Regenerate.
7433 * target.c (target_insn_history, target_insn_history_from)
7434 (target_insn_history_range): Use gdb_disassembly_flags instead of
7435 bare int.
7436 * target.h: Include "disasm.h".
7437 (struct target_ops) <to_insn_history, to_insn_history_from,
7438 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7439 int.
7440 (target_insn_history, target_insn_history_from)
7441 (target_insn_history_range): Use gdb_disassembly_flags instead of
7442 bare int.
7443
7444 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7445
7446 * cli/cli-script.c (build_command_line): For if/while commands,
7447 check whether args is empty.
7448
7449 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7450
7451 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7452 (enum command_control_type): Likewise.
7453 (struct command_line): Likewise.
7454 (free_command_lines): Likewise.
7455 (struct command_lines_deleter): Likewise.
7456 (command_line_up): Likewise.
7457 (read_command_lines): Likewise.
7458 (read_command_lines_1): Likewise.
7459 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7460 (enum command_control_type): Likewise.
7461 (struct command_line): Likewise.
7462 (free_command_lines): Likewise.
7463 (struct command_lines_deleter): Likewise.
7464 (command_line_up): Likewise.
7465 (read_command_lines): Likewise.
7466 (read_command_lines_1): Likewise.
7467 * breakpoint.h: Include cli/cli-script.h.
7468 * extension-priv.h: Likewise.
7469 * gdbcmd.h: Likewise.
7470
7471 2017-09-04 Pedro Alves <palves@redhat.com>
7472
7473 * ada-lang.c (is_known_support_routine): Move sal declaration to
7474 where it is initialized.
7475 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7476 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7477 (clear_command, update_static_tracepoint): Remove init_sal
7478 references. Move declarations closer to initializations.
7479 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7480 initializations.
7481 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7482 references. Move sal declarations closer to initializations.
7483 * frame.c (find_frame_sal): Return a symtab_and_line via function
7484 return instead of output parameter. Remove init_sal references.
7485 * frame.h (find_frame_sal): Return a symtab_and_line via function
7486 return instead of output parameter.
7487 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7488 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7489 instead of memset.
7490 (gdbscm_find_pc_line): Remove init_sal reference.
7491 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7492 references. Move declarations closer to initializations.
7493 * infcmd.c (set_step_frame): Update. Move declarations closer to
7494 initializations.
7495 (finish_backward): Remove init_sal references. Move declarations
7496 closer to initializations.
7497 * infrun.c (process_event_stop_test, handle_step_into_function)
7498 (insert_hp_step_resume_breakpoint_at_frame)
7499 (insert_step_resume_breakpoint_at_caller): Likewise.
7500 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7501 (symbol_to_sal): Likewise.
7502 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7503 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7504 to its initialization.
7505 * reverse.c (save_bookmark_command): Use new/delete. Remove
7506 init_sal references. Move declarations closer to initializations.
7507 * source.c (get_current_source_symtab_and_line): Remove brace
7508 initialization.
7509 (set_current_source_symtab_and_line): Now takes the sal by const
7510 reference. Remove brace initialization.
7511 (line_info): Remove init_sal reference.
7512 * source.h (set_current_source_symtab_and_line): Now takes a
7513 symtab_and_line via const reference.
7514 * stack.c (set_current_sal_from_frame): Adjust.
7515 (print_frame_info): Adjust.
7516 (get_last_displayed_sal): Return the sal via function return
7517 instead of via output parameter. Simplify.
7518 (frame_info): Adjust.
7519 * stack.h (get_last_displayed_sal): Return the sal via function
7520 return instead of via output parameter.
7521 * symtab.c (init_sal): Delete.
7522 (find_pc_sect_line): Remove init_sal references. Move
7523 declarations closer to initializations.
7524 (find_function_start_sal): Remove init_sal references. Move
7525 declarations closer to initializations.
7526 * symtab.h (struct symtab_and_line): In-class initialize all
7527 fields.
7528 * tracepoint.c (set_traceframe_context)
7529 (print_one_static_tracepoint_marker): Remove init_sal references.
7530 Move declarations closer to initializations.
7531 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7532 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7533 declarations closer to initializations.
7534 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7535 init_sal references. Adjust.
7536
7537 2017-09-04 Pedro Alves <palves@redhat.com>
7538
7539 * ax-gdb.c (agent_command_1): Use range-for.
7540 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7541 * breakpoint.c: Include "common/array-view.h".
7542 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7543 parameter from struct symtabs_and_lines to
7544 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7545 (breakpoint_sals_to_pc): Change sals parameter from struct
7546 symtabs_and_lines to std::vector reference.
7547 (check_fast_tracepoint_sals): Change sals parameter from struct
7548 symtabs_and_lines to std::array_view. Use range-for.
7549 (decode_static_tracepoint_spec): Return a std::vector instead of
7550 symtabs_and_lines. Update.
7551 (create_breakpoint): Update.
7552 (break_range_command, until_break_command, clear_command): Update.
7553 (base_breakpoint_decode_location, bkpt_decode_location)
7554 (bkpt_probe_create_sals_from_location)
7555 (bkpt_probe_decode_location, tracepoint_decode_location)
7556 (tracepoint_probe_decode_location)
7557 (strace_marker_create_sals_from_location): Return a std::vector
7558 instead of symtabs_and_lines.
7559 (strace_marker_create_breakpoints_sal): Update.
7560 (strace_marker_decode_location): Return a std::vector instead of
7561 symtabs_and_lines. Update.
7562 (update_breakpoint_locations): Change struct symtabs_and_lines
7563 parameters to gdb::array_view. Adjust.
7564 (location_to_sals): Return a std::vector instead of
7565 symtabs_and_lines. Update.
7566 (breakpoint_re_set_default): Use std::vector instead of struct
7567 symtabs_and_lines.
7568 (decode_location_default): Return a std::vector instead of
7569 symtabs_and_lines. Update.
7570 * breakpoint.h: Include "common/array-view.h".
7571 (struct breakpoint_ops) <decode_location>: Now returns a
7572 std::vector instead of returning a symtabs_and_lines via output
7573 parameter.
7574 (update_breakpoint_locations): Change sals parameters to use
7575 gdb::array_view.
7576 * cli/cli-cmds.c (edit_command, list_command): Update to use
7577 std::vector and gdb::array_view.
7578 (ambiguous_line_spec): Adjust to use gdb::array_view and
7579 range-for.
7580 (compare_symtabs): Rename to ...
7581 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7582 const reference and adjust.
7583 (filter_sals): Rewrite using std::vector and standard algorithms.
7584 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7585 (jump_command): Update to use std::vector.
7586 * linespec.c (struct linespec_state) <canonical_names>: Update
7587 comment.
7588 (add_sal_to_sals_basic): Delete.
7589 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7590 (decode_line_2, create_sals_line_offset)
7591 (convert_address_location_to_sals, convert_linespec_to_sals)
7592 (convert_explicit_location_to_sals, parse_linespec)
7593 (event_location_to_sals, decode_line_full, decode_line_1)
7594 (decode_line_with_current_source)
7595 (decode_line_with_last_displayed, decode_objc)
7596 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7597 (linespec_result::~linespec_result): Adjust to use std::vector
7598 instead of symtabs_and_lines.
7599 * linespec.h (linespec_sals::sals): Now a std::vector.
7600 (struct linespec_result): Use std::vector, bool, and in-class
7601 initialization.
7602 (decode_line_1, decode_line_with_current_source)
7603 (decode_line_with_last_displayed): Return std::vector.
7604 * macrocmd.c (info_macros_command): Use std::vector.
7605 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7606 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7607 std::vector.
7608 * probe.h (parse_probes): Return a std::vector.
7609 * python/python.c (gdbpy_decode_line): Use std::vector and
7610 gdb::array_view.
7611 * source.c (select_source_symtab, line_info): Use std::vector.
7612 * stack.c (func_command): Use std::vector.
7613 * symtab.h (struct symtabs_and_lines): Delete.
7614 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7615
7616 2017-09-04 Pedro Alves <palves@redhat.com>
7617
7618 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7619 unittests/array-view-selftests.c.
7620 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7621 * common/array-view.h: New file.
7622 * unittests/array-view-selftests.c: New file.
7623
7624 2017-09-04 Pedro Alves <palves@redhat.com>
7625
7626 * cli/cli-cmds.c (edit_command): Pass message to
7627 ambiguous_line_spec.
7628 (list_command): Pass message to ambiguous_line_spec. Say
7629 "first"/"last" instead of "start" and "end" to be consistent with
7630 the manual.
7631 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7632 them to print formatted message.
7633
7634 2017-09-04 Pedro Alves <palves@redhat.com>
7635
7636 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7637 ftrace_update_insns by reference instead of pointer.
7638
7639 2017-09-04 Yao Qi <yao.qi@linaro.org>
7640
7641 * i386-go32-tdep.c: Include x86-xstate.h.
7642 (i386_go32_init_abi): Call i386_target_description.
7643 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7644 if xcr0 is X86_XSTATE_X87_MASK.
7645 * i386-tdep.h (tdesc_i386): Remove the declaration.
7646 (tdesc_i386_mmx): Likewise.
7647
7648 2017-09-04 Yao Qi <yao.qi@linaro.org>
7649
7650 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7651 X86_XSTATE_SSE_MASK instead of 0.
7652
7653 2017-09-04 Yao Qi <yao.qi@linaro.org>
7654
7655 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7656 i386_target_description.
7657 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7658 i386_target_description.
7659 * i386-tdep.c (i386_gdbarch_init): Likewise.
7660
7661 2017-09-04 Yao Qi <yao.qi@linaro.org>
7662
7663 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7664 (x86_darwin_init_abi_64): Call amd64_target_description.
7665 * amd64-dicos-tdep.c: Likewise.
7666 * amd64-fbsd-nat.c: Likewise.
7667 * amd64-fbsd-tdep.c: Likewise.
7668 * amd64-nbsd-tdep.c: Likewise.
7669 * amd64-obsd-tdep.c: Likewise.
7670 * amd64-sol2-tdep.c: Likewise.
7671 * amd64-windows-tdep.c: Likewise.
7672 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7673
7674 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7675
7676 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7677 (btrace_function) <insn>: Change type to use std::vector.
7678 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7679 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7680 ftrace_update_insns, ftrace_compute_global_level_offset,
7681 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7682 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7683 change to std::vector.
7684 (ftrace_update_insns): Adjust to change to std::vector, change
7685 type of INSN parameter.
7686 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7687 * record-btrace.c (btrace_call_history_insn_range,
7688 btrace_compute_src_line_range,
7689 record_btrace_frame_prev_register): Adjust to change to
7690 std::vector.
7691 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7692 to change to std::vector.
7693
7694 2017-09-03 Tom Tromey <tom@tromey.com>
7695
7696 * corefile.c (reopen_exec_file): Use std::string.
7697
7698 2017-09-03 Tom Tromey <tom@tromey.com>
7699
7700 * compile/compile.c (compile_register_name_mangled): Return
7701 std::string.
7702 * compile/compile-loc2c.c (pushf_register_address): Update.
7703 (pushf_register): Update.
7704 * compile/compile-c-types.c (convert_array): Update.
7705 * compile/compile-c-symbols.c (generate_vla_size): Update.
7706 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7707 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7708 (convert_one_symbol): Update.
7709 (generate_c_for_for_one_variable): Update.
7710 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7711 std::string.
7712 (generate_register_struct): Update.
7713 * compile/compile-internal.h (c_get_range_decl_name): Return a
7714 std::string.
7715 (compile_register_name_mangled): Return std::string.
7716
7717 2017-09-03 Tom Tromey <tom@tromey.com>
7718
7719 * utils.c (perror_string): Return a std::string.
7720 (throw_perror_with_name, perror_warning_with_name): Update.
7721
7722 2017-09-03 Tom Tromey <tom@tromey.com>
7723
7724 * demangle.c (demangle_command): Use std::string,
7725 unique_xmalloc_ptr.
7726
7727 2017-09-03 Tom Tromey <tom@tromey.com>
7728
7729 * cli/cli-setshow.c (do_set_command): Use std::string.
7730
7731 2017-09-03 Tom Tromey <tom@tromey.com>
7732
7733 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7734
7735 2017-09-03 Tom Tromey <tom@tromey.com>
7736
7737 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7738
7739 2017-09-03 Tom Tromey <tom@tromey.com>
7740
7741 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7742 gdb::unique_xmalloc_ptr.
7743
7744 2017-09-03 Tom Tromey <tom@tromey.com>
7745
7746 * thread.c (print_thread_info_1): Use string_printf.
7747 (thread_apply_command, thread_apply_all_command): Use
7748 std::string.
7749
7750 2017-09-03 Tom Tromey <tom@tromey.com>
7751
7752 * valprint.c (val_print_string): Update.
7753 * gdbcore.h (memory_error_message): Return std::string.
7754 * corefile.c (memory_error_message): Return std::string.
7755 (memory_error): Update.
7756 * breakpoint.c (insert_bp_location): Update.
7757
7758 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7759
7760 * target/waitstatus.h (target_waitstatus_to_string): Change
7761 return type to std::string.
7762 * target/waitstatus.c (target_waitstatus_to_string): Return
7763 std::string.
7764 * target.h (target_waitstatus_to_string): Remove declaration.
7765 * infrun.c (resume, clear_proceed_status_thread,
7766 print_target_wait_results, do_target_wait, save_waitstatus,
7767 stop_all_threads): Adjust.
7768 * record-btrace.c (record_btrace_wait): Adjust.
7769 * target-debug.h
7770 (target_debug_print_struct_target_waitstatus_p): Adjust.
7771
7772 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7773
7774 PR gdb/22046
7775 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7776 detection.
7777
7778 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7779
7780 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7781 for setting/unsetting environment variables on the remote target.
7782 (New remote packets): Add entries for QEnvironmentHexEncoded,
7783 QEnvironmentUnset and QEnvironmentReset.
7784 * common/environ.c (gdb_environ::operator=): Extend method to
7785 handle m_user_set_env_list and m_user_unset_env_list.
7786 (gdb_environ::clear): Likewise.
7787 (match_var_in_string): Change type of first parameter from 'char
7788 *' to 'const char *'.
7789 (gdb_environ::set): Extend method to handle
7790 m_user_set_env_list and m_user_unset_env_list.
7791 (gdb_environ::unset): Likewise.
7792 (gdb_environ::clear_user_set_env): New method.
7793 (gdb_environ::user_set_envp): Likewise.
7794 (gdb_environ::user_unset_envp): Likewise.
7795 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7796 m_user_unset_env_list on move constructor/assignment.
7797 (unset): Add new default parameter 'update_unset_list = true'.
7798 (clear_user_set_env): New method.
7799 (user_set_envp): Likewise.
7800 (user_unset_envp): Likewise.
7801 (m_user_set_env_list): New std::set.
7802 (m_user_unset_env_list): Likewise.
7803 * common/rsp-low.c (hex2str): New function.
7804 (bin2hex): New overload for bin2hex function.
7805 * common/rsp-low.c (hex2str): New prototype.
7806 (str2hex): New overload prototype.
7807 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7808 QEnvironmentUnset and QEnvironmentReset.
7809 (remote_protocol_features): Add QEnvironmentHexEncoded,
7810 QEnvironmentUnset and QEnvironmentReset packets.
7811 (send_environment_packet): New function.
7812 (extended_remote_environment_support): Likewise.
7813 (extended_remote_create_inferior): Call
7814 extended_remote_environment_support.
7815 (_initialize_remote): Add QEnvironmentHexEncoded,
7816 QEnvironmentUnset and QEnvironmentReset packet configs.
7817 * unittests/environ-selftests.c (gdb_selftest_env_var):
7818 New variable.
7819 (test_vector_initialization): New function.
7820 (test_init_from_host_environ): Likewise.
7821 (test_reinit_from_host_environ): Likewise.
7822 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7823 Likewise.
7824 (test_unset_set_empty_vector): Likewise.
7825 (test_vector_clear): Likewise.
7826 (test_std_move): Likewise.
7827 (test_move_constructor):
7828 (test_self_move): Likewise.
7829 (test_set_unset_reset): Likewise.
7830 (run_tests): Rewrite in terms of the functions above.
7831
7832 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7833
7834 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7835 (adi_available): Use a temp variable of type CORE_ADDR as argument
7836 3 when calling target_auxv_search.
7837 (adi_normalize_address): Use masks and xor operators to calculate
7838 normalized address.
7839 (adi_read_versions, adi_write_versions, adi_print_versions)
7840 (do_examine, do_assign): Use paddress.
7841
7842 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7843
7844 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7845 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7846 out of loop and add supply of FIR.
7847 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7848 add collect of FIR.
7849
7850 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7851
7852 PR gdb/21827
7853 * cli/cli-script.c (define_command): Don't convert command name
7854 to lower case.
7855
7856 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7857
7858 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7859 Update all callers accordingly. Remove all code blocks handling
7860 the case where DISPP is not NULL.
7861
7862 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7863
7864 PR symtab/22003
7865 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7866 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7867 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7868
7869 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7870
7871 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7872 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7873 (read_comp_units_from_section): New parameter abbrev_section, use
7874 read_and_check_comp_unit_head, allocate signatured_type if needed.
7875 (create_all_comp_units): Update read_comp_units_from_section caller.
7876
7877 2017-08-23 Pedro Alves <palves@redhat.com>
7878
7879 PR remote/21852
7880 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7881 to null_ptid and switch to thread without reading the registers
7882 after adding the inferior.
7883
7884 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7885
7886 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7887 compile-gcc.
7888 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7889 (compile_to_object): Implement compile_gcc.
7890 (_initialize_compile): Install "set compile-gcc". Initialize
7891 compile_gcc.
7892
7893 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7894
7895 * compile/compile.c (compile_to_object): Conditionally call
7896 set_verbose. Conditionally call compile or compile_v0.
7897
7898 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7899
7900 * sparc64-tdep.h: (adi_normalize_address): New export.
7901 * sparc-nat.h: (open_adi_tag_fd): New export.
7902 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7903 * sparc64-linux-tdep.c:
7904 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7905 (sparc64_linux_handle_segmentation_fault): New function.
7906 (sparc64_linux_init_abi): Register
7907 sparc64_linux_handle_segmentation_fault
7908 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7909 (sparc64_addr_bits_remove): New function.
7910 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7911 (MAX_PROC_NAME_SIZE): New macro.
7912 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7913 (sparc64adilist): New variable.
7914 (adi_proc_list): New variable.
7915 (find_adi_info): New function.
7916 (add_adi_info): New function.
7917 (get_adi_info_proc): New function.
7918 (get_adi_info): New function.
7919 (info_adi_command): New function.
7920 (read_maps_entry): New function.
7921 (adi_available): New function.
7922 (adi_normalize_address): New function.
7923 (adi_align_address): New function.
7924 (adi_convert_byte_count): New function.
7925 (adi_tag_fd): New function.
7926 (adi_is_addr_mapped): New function.
7927 (adi_read_versions): New function.
7928 (adi_write_versions): New function.
7929 (adi_print_versions): New function.
7930 (do_examine): New function.
7931 (do_assign): New function.
7932 (adi_examine_command): New function.
7933 (adi_assign_command): New function.
7934 (_initialize_sparc64_adi_tdep): New function.
7935
7936 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7937
7938 * breakpoint.c (breakpoints_info): Rename to ...
7939 (info_breakpoints_command): ... this.
7940 (watchpoints_info): Rename to ...
7941 (info_watchpoints_command): ... this.
7942 (tracepoints_info): Rename to ...
7943 (info_tracepoints_command): ... this.
7944 (_initialize_breakpoint): Adjust.
7945 * dcache.c (dcache_info): Rename to ...
7946 (info_display_command): ... this.
7947 (_initialize_dcache): Adjust.
7948 * frame.h (args_info): Rename to ...
7949 (info_args_command): ... this.
7950 (locals_info): Rename to ...
7951 (info_locals_command): ... this.
7952 * infcmd.c (nofp_registers_info): Rename to ...
7953 (info_registers_command): ... this.
7954 (float_info): Rename to ...
7955 (info_float_command): ... this.
7956 (program_info): Rename to ...
7957 (info_program_command): ... this.
7958 (all_registers_info): Rename to ...
7959 (info_all_registers_command): ... this.
7960 (vector_info): Rename to ...
7961 (info_vector_command): ... this.
7962 (float_info): Rename to ...
7963 (info_float_command): ... this.
7964 (_initialize_infcmd): Adjust.
7965 * inferior.h (term_info): Rename to ...
7966 (info_terminal_command): ... this.
7967 * inflow.c (term_info): Rename to ...
7968 (info_terminal_command): ... this.
7969 (_initialize_inflow): Adjust.
7970 * infrun.c (signals_info): Rename to ...
7971 (info_signals_command): ... this.
7972 (_initialize_infrun): Adjust.
7973 * objc-lang.c (classes_info): Rename to ...
7974 (info_classes_command): ... this.
7975 (selectors_info): Rename to ...
7976 (info_selectors_command): ... this.
7977 (_initialize_objc_language): Adjust.
7978 * printcmd.c (sym_info): Rename to ...
7979 (info_symbol_command): ... this.
7980 (address_info): Rename to ...
7981 (info_address_command): ... this.
7982 (display_info): Rename to ...
7983 (info_display_command): ... this.
7984 (_initialize_printcmd): Adjust.
7985 * reverse.c (bookmarks_info): Rename to ...
7986 (info_breakpoints_command): ... this.
7987 (_initialize_reverse): Adjust.
7988 * ser-go32.c (dos_info): Rename to ...
7989 (info_serial_command): ... this.
7990 (_initialize_ser_dos): Adjust.
7991 * skip.c (skip_info): Rename to ...
7992 (info_skip_command): ... this.
7993 (_initialize_step_skip): Adjust.
7994 * source.c (line_info): Rename to ...
7995 (info_line_command): ... this.
7996 (source_info): Rename to ...
7997 (info_source_command)
7998 * stack.c (frame_info): Rename to ...
7999 (info_frame_command): ... this.
8000 (locals_info): Rename to ...
8001 (info_locals_command): ... this.
8002 (args_info): Rename to ...
8003 (info_args_command): ... this.
8004 (_initialize_stack): Adjust.
8005 * symtab.c (sources_info): Rename to ...
8006 (info_sources_command): ... this.
8007 (variables_info): Rename to ...
8008 (info_variables_command): ... this.
8009 (functions_info): Rename to ...
8010 (info_functions_command): ... this.
8011 (types_info): Rename to ...
8012 (info_types_command): ... this.
8013 (_initialize_symtab): Adjust.
8014 * target.c (target_info): Rename to ...
8015 (info_target_command): ... this.
8016 (initialize_targets): Adjust.
8017 * tracepoint.c (tvariables_info): Rename to ...
8018 (info_tvariables_command): ... this.
8019 (scope_info): Rename to ...
8020 (info_scope_command): ... this.
8021 (trace_dump_actions): Adjust.
8022 (_initialize_tracepoint): Adjust.
8023
8024 2017-08-22 Tom Tromey <tom@tromey.com>
8025
8026 * breakpoint.h (install_breakpoint): Update.
8027 * breakpoint.c (add_solib_catchpoint): Update.
8028 (install_breakpoint): Change argument to a std::unique_ptr.
8029 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8030 (create_breakpoint_sal, create_breakpoint): Update.
8031 (watch_command_1, catch_exec_command_1)
8032 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8033 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8034 Return the breakpoint.
8035 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8036 (new_single_step_breakpoint): Update.
8037 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8038 std::unique_ptr.
8039 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8040 std::unique_ptr.
8041 * break-catch-sig.c (create_signal_catchpoint): Use
8042 std::unique_ptr.
8043 * ada-lang.c (create_ada_exception_catchpoint): Use
8044 std::unique_ptr.
8045
8046 2017-08-22 Tom Tromey <tom@tromey.com>
8047
8048 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8049
8050 2017-08-22 Tom Tromey <tom@tromey.com>
8051
8052 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8053 (lookup_partial_symbol): Update.
8054
8055 2017-08-22 Tom Tromey <tom@tromey.com>
8056
8057 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8058 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8059 (find_and_open_source, symtab_to_fullname): Update.
8060 * psymtab.c (psymtab_to_fullname): Update.
8061
8062 2017-08-22 Tom Tromey <tom@tromey.com>
8063
8064 * exec.c (exec_file_attach): Update.
8065 * linux-thread-db.c (try_thread_db_load): Update.
8066 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8067 * utils.c (gdb_realpath): Change return type.
8068 (gdb_realpath_keepfile): Update.
8069 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8070 (_initialize_utils): Register the new self test.
8071 * source.c (openp): Update.
8072 (find_and_open_source): Update.
8073 * nto-tdep.c (nto_find_and_open_solib): Update.
8074 * main.c (set_gdb_data_directory): Update.
8075 (captured_main_1): Update.
8076 * dwarf2read.c (dwarf2_get_dwz_file): Update
8077 (dw2_map_symbol_filenames): Update.
8078 * auto-load.c (auto_load_safe_path_vec_update): Update.
8079 (filename_is_in_auto_load_safe_path_vec): Change type of
8080 "filename_realp".
8081 (auto_load_objfile_script): Update.
8082 (file_is_auto_load_safe): Update. Use std::string.
8083 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8084
8085 2017-08-22 Tom Tromey <tom@tromey.com>
8086
8087 * utils.c (gdb_realpath_keepfile): Return a
8088 gdb::unique_xmalloc_ptr.
8089 * exec.c (exec_file_attach): Update.
8090 * utils.h (gdb_realpath_keepfile): Return a
8091 gdb::unique_xmalloc_ptr.
8092
8093 2017-08-22 Tom Tromey <tom@tromey.com>
8094
8095 * compile/compile.c (compile_file_command): Use
8096 gdb::unique_xmalloc_ptr, std::string.
8097 * utils.c (gdb_abspath): Change return type.
8098 * source.c (openp): Update.
8099 * objfiles.c (allocate_objfile): Update.
8100 * main.c (set_gdb_data_directory): Update.
8101 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8102
8103 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8104
8105 * cli-cmds.c (list_commands): List actual code around more than
8106 one location.
8107
8108 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8109
8110 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8111
8112 2017-08-21 Pedro Alves <palves@redhat.com>
8113
8114 PR gdb/19487
8115 * c-exp.y (variable production): Handle function aliases.
8116 * minsyms.c (msymbol_is_text): New function.
8117 * minsyms.h (msymbol_is_text): Declare.
8118 * symtab.c (find_function_alias_target): New function.
8119 * symtab.h (find_function_alias_target): Declare.
8120
8121 2017-08-21 Pedro Alves <palves@redhat.com>
8122
8123 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8124 typedefs.
8125 * typeprint.c (whatis_exp): If handling "whatis", and expression
8126 is OP_TYPE, strip one typedef level. Otherwise don't strip
8127 typedefs here.
8128 * valops.c (value_cast): Save "to" type before resolving
8129 stubs/typedefs. Use that type as resulting value's type.
8130
8131 2017-08-18 Tom Tromey <tom@tromey.com>
8132 Pedro Alves <palves@redhat.com>
8133
8134 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8135 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8136 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8137 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8138 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8139 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8140 (linux_get_siginfo_data): Add "thread" argument. Use
8141 scoped_restore.
8142 * linux-nat.c (linux_child_follow_fork)
8143 (check_stopped_by_watchpoint): Use scoped_restore.
8144 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8145 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8146 (restore_inferior_ptid, save_inferior_ptid): Remove.
8147 * btrace.c (btrace_fetch): Use scoped_restore.
8148 * bsd-uthread.c (bsd_uthread_fetch_registers)
8149 (bsd_uthread_store_registers): Use scoped_restore.
8150 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8151 scoped_restore.
8152 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8153 (aix_thread_xfer_partial): Use scoped_restore.
8154 * inferior.h (save_inferior_ptid): Remove.
8155
8156 2017-08-18 Yao Qi <yao.qi@linaro.org>
8157
8158 PR tdep/21818
8159 * arm-tdep.c (gdb_print_insn_arm): Mark
8160 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8161
8162 2017-08-18 Yao Qi <yao.qi@linaro.org>
8163
8164 * NEWS: Mention GDBserver's new option "--selftest".
8165 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8166 * selftest.c: Move it to common/selftest.c.
8167 * selftest.h: Move it to common/selftest.h.
8168 * selftest-arch.c (reset): New function.
8169 (tests_with_arch): Call reset.
8170
8171 2017-08-18 Yao Qi <yao.qi@linaro.org>
8172
8173 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8174 instead of exception_fprintf and printf_filtered.
8175
8176 2017-08-18 Yao Qi <yao.qi@linaro.org>
8177
8178 * selftest.c (register_self_test): Rename it to
8179 selftests::register_test.
8180 (run_self_tests): selftest::run_tests.
8181 * selftest.h: Update declarations.
8182 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8183 selftests::register_test_foreach_arch.
8184 * selftest-arch.h: Update declaration.
8185 * aarch64-tdep.c: Update.
8186 * arm-tdep.c: Likewise.
8187 * disasm-selftests.c: Likewise.
8188 * dwarf2loc.c: Likewise.
8189 * dwarf2-frame.c: Likewise.
8190 * findvar.c: Likewise.
8191 * gdbarch-selftests.c: Likewise.
8192 * maint.c (maintenance_selftest): Likewise.
8193 * regcache.c: Likewise.
8194 * rust-exp.y: Likewise.
8195 * selftest-arch.c: Likewise.
8196 * unittests/environ-selftests.c: Likewise.
8197 * unittests/function-view-selftests.c: Likewise.
8198 * unittests/offset-type-selftests.c: Likewise.
8199 * unittests/optional-selftests.c: Likewise.
8200 * unittests/scoped_restore-selftests.c: Likewise.
8201 * utils-selftests.c: Likewise.
8202
8203 2017-08-17 Pedro Alves <palves@redhat.com>
8204
8205 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8206 local.
8207
8208 2017-08-17 Pedro Alves <palves@redhat.com>
8209
8210 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8211 field.
8212 (reset_die_in_process): Delete, replaced by ...
8213 (process_die_scope): ... this new class. Make it responsible for
8214 freeing cu->line_header too.
8215 (process_die): Use process_die_scope.
8216 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8217 cu->line_header_die_owner. Don't release the line header if it's
8218 owned by the CU.
8219 (setup_type_unit_groups): Make the CU/DIE own the line header.
8220 Don't release the line header here.
8221
8222 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8223
8224 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8225
8226 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8227
8228 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8229 Single-Key mode
8230
8231 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8232
8233 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8234 mode command list.
8235
8236 2017-08-15 Stafford Horne <shorne@gmail.com>
8237
8238 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8239
8240 2017-08-15 Stafford Horne <shorne@gmail.com>
8241
8242 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8243
8244 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8245
8246 PR gdb/21954
8247 * infcmd.c (unset_environment_command): Use the 'clear' method on
8248 the environment instead of resetting it.
8249
8250 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8251
8252 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8253 platforms.
8254
8255 2017-08-14 Tom Tromey <tom@tromey.com>
8256
8257 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8258 (print_binary_chars): Likewise.
8259 (BITS_IN_BYTES): Remove.
8260
8261 2017-08-14 Tom Tromey <tom@tromey.com>
8262
8263 PR gdb/21675
8264 * valprint.c (LOW_ZERO): Change value to 034.
8265 (print_octal_chars): Add static_asserts for octal constants.
8266 * printcmd.c (print_scalar_formatted): Add 'd' case.
8267
8268 2017-08-11 Tom Tromey <tom@tromey.com>
8269
8270 * symfile.c (add_symbol_file_command): Use std::vector.
8271
8272 2017-08-14 Tom Tromey <tom@tromey.com>
8273
8274 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8275 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8276 std::move.
8277 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8278
8279 2017-08-11 Pedro Alves <palves@redhat.com>
8280
8281 * infrun.c (process_event_stop_test): Adjust
8282 function_name_is_marked_for_skip call.
8283 * skip.c: Include <list>.
8284 (skiplist_entry): Make it a class with private fields, and
8285 getters/setters.
8286 (skiplist_entry_chain): Delete.
8287 (skiplist_entries): New.
8288 (skiplist_entry_count): Delete.
8289 (highest_skiplist_entry_num): New.
8290 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8291 (add_skiplist_entry): Delete.
8292 (skiplist_entry::skiplist_entry): New.
8293 (skiplist_entry::add_entry): New.
8294 (skip_file_command, skip_function): Adjust.
8295 (compile_skip_regexp): Delete.
8296 (skip_command): Don't compile regexp here. Adjust to use
8297 skiplist_entry::add_entry.
8298 (skip_info): Adjust to use range-for and getters.
8299 (skip_enable_command, skip_disable_command): Adjust to use
8300 range-for and setters.
8301 (skip_delete_command): Adjust to use std::list.
8302 (add_skiplist_entry): Delete.
8303 (skip_file_p): Delete, refactored as ...
8304 (skiplist_entry::do_skip_file_p): ... this new method.
8305 (skip_gfile_p): Delete, refactored as ...
8306 (skiplist_entry::do_gskip_file_p): ... this new method.
8307 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8308 (skiplist_entry::skip_function_p): ... this new method.
8309 (function_name_is_marked_for_skip): Now returns bool, and takes
8310 the function sal by const reference. Adjust to use range-for and
8311 skiplist_entry methods.
8312 (_initialize_step_skip): Remove references to
8313 skiplist_entry_chain, skiplist_entry_count.
8314 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8315 takes the function sal by const reference.
8316
8317 2017-08-11 Yao Qi <yao.qi@linaro.org>
8318
8319 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8320 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8321 (dwarf2_frame_cache):
8322 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8323 RETURN_MASK_ALL and set *this_case to NULL.
8324 * frame-unwind.h: Update comments.
8325
8326 2017-08-11 Yao Qi <yao.qi@linaro.org>
8327
8328 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8329 (dwarf2_frame_state_copy_regs): Remove.
8330 (dwarf2_frame_state_free_regs): Remove.
8331 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8332 (dwarf2_restore_rule): Call method .alloc_regs instead of
8333 dwarf2_frame_state_alloc_regs.
8334 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8335 constructor. Call std::move.
8336 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8337 (dwarf2_frame_cache): Likewise.
8338
8339 [GDB_SELF_TEST]: Include selftest.h and
8340 selftest-arch.h.
8341 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8342 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8343 execute_cfa_program_test.
8344
8345 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8346 copy ctor, assignment operator, move assignment.
8347 <alloc_regs>: New method.
8348 <swap>: New method.
8349 (struct dwarf2_frame_state): Delete dtor.
8350 (dwarf2_frame_state_alloc_regs): Remove declaration.
8351 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8352 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8353
8354 2017-08-11 Yao Qi <yao.qi@linaro.org>
8355
8356 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8357 (dwarf2_frame_state::dwarf2_frame_state): New.
8358 (dwarf2_frame_state::~dwarf2_frame_state): New.
8359 (dwarf2_fetch_cfa_info): Update.
8360 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8361 rather than a pointer. Update code.
8362 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8363 dtor.
8364 <data_align, code_align, retaddr_column>: Change them to const.
8365 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8366 to bool.
8367
8368 2017-08-11 Yao Qi <yao.qi@linaro.org>
8369
8370 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8371 <loc.exp>: New field.
8372 * dwarf2-frame.c (execute_cfa_program): Update.
8373 (dwarf2_frame_prev_register): Update.
8374
8375 2017-08-10 Pedro Alves <palves@redhat.com>
8376
8377 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8378
8379 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8380
8381 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8382 (fbsd_pending_children): Use std::list.
8383 (fbsd_remember_child): Likewise.
8384 (fbsd_is_child_pending): Likewise.
8385 (fbsd_pending_vfork_done): Use std::forward_list.
8386 (fbsd_add_vfork_done): Likewise.
8387 (fbsd_is_vfork_done_pending): Likewise.
8388 (fbsd_next_vfork_done): Likewise.
8389
8390 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8391
8392 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8393 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8394 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8395 for `mapfilename'.
8396 (fbsd_xfer_partial): Use gdb::byte_vector.
8397 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8398
8399 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8400
8401 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8402 "filestuff.h".
8403 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8404
8405 2017-08-09 Tom Tromey <tom@tromey.com>
8406
8407 * skip.c (skiplist_entry): New constructor.
8408 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8409 (skiplist_entry::file_is_glob): Now bool.
8410 (skiplist_entry::file, skiplist_entry::function): Now
8411 std::string.
8412 (make_skip_entry): Return a unique_ptr. Use new.
8413 (free_skiplist_entry, free_skiplist_entry_cleanup)
8414 (make_free_skiplist_entry_cleanup): Remove.
8415 (skip_command, skip_disable_command, add_skiplist_entry)
8416 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8417 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8418 (function_name_is_marked_for_skip): Update.
8419 (skip_delete_command): Update. Use delete.
8420
8421 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8422
8423 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8424 (aarch64_linux_core_read_description): New function.
8425 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8426
8427 2017-08-09 Pedro Alves <palves@redhat.com>
8428
8429 * cp-name-parser.y (cp_comp_to_string): Return a
8430 gdb::unique_xmalloc_ptr<char>.
8431 * cp-support.c (replace_typedefs_qualified_name)
8432 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8433 (cp_canonicalize_string_full): Use op= instead of explicit
8434 convertion.
8435 (cp_class_name_from_physname, method_name_from_physname)
8436 (cp_func_name, cp_remove_params): Adjust to use
8437 gdb::unique_xmalloc_ptr<char>.
8438 * cp-support.h (cp_comp_to_string): Return a
8439 gdb::unique_xmalloc_ptr<char>.
8440 * python/py-type.c (typy_lookup_type): Adjust to use
8441 gdb::unique_xmalloc_ptr<char>.
8442
8443 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8444
8445 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8446
8447 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8448 Yao Qi <yao.qi@linaro.org>
8449
8450 * cp-support.c (cp_canonicalize_string_full): Use
8451 gdb::unique_xmalloc_ptr<char>.
8452 (cp_canonicalize_string): Likewise.
8453
8454 2017-08-09 Yao Qi <yao.qi@linaro.org>
8455
8456 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8457 * regformats/i386/amd64-avx-avx512.dat: Remove.
8458 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8459 * regformats/i386/amd64-avx-mpx.dat:Remove.
8460 * regformats/i386/amd64-avx.dat: Remove.
8461 * regformats/i386/amd64-mpx.dat: Remove.
8462 * regformats/i386/i386-avx-avx512.dat: Remove.
8463 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8464 * regformats/i386/i386-avx-mpx.dat: Remove.
8465 * regformats/i386/i386-mmx.dat: Remove.
8466 * regformats/i386/i386-mpx.dat: Remove.
8467
8468 2017-08-09 Yao Qi <yao.qi@linaro.org>
8469
8470 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8471 * amd64-tdep.c: Don't include features/i386/x32*.c.
8472 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8473 functions.
8474 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8475 and i386/x32-avx-avx512.
8476 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8477 and i386/x32.xml.
8478 * features/i386/x32-avx-avx512.c: Removed.
8479 * features/i386/x32-avx-avx512.xml: Removed.
8480 * features/i386/x32-avx.c: Removed.
8481 * features/i386/x32-avx.xml: Removed.
8482 * features/i386/x32.c: Removed.
8483 * features/i386/x32.xml: Removed.
8484 * regformats/i386/x32-avx-avx512.dat: Removed.
8485 * regformats/i386/x32-avx.dat: Removed.
8486 * regformats/i386/x32.dat: Removed.
8487
8488 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8489
8490 PR breakpoints/21886
8491 * mem-break.c (default_memory_insert_breakpoint): Use
8492 `->placed_address' rather than `->reqstd_address' for the
8493 breakpoint location.
8494
8495 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8496
8497 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8498 assertions.
8499
8500 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8501
8502 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8503 a union of `tdep_info', `tdesc_data' and `id'.
8504 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8505 rather than `info.tdep_info'.
8506 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8507 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8508 * i386-tdep.c (i386_gdbarch_init): Likewise.
8509 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8510 * mips-tdep.c (mips_gdbarch_init): Likewise.
8511 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8512 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8513 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8514 `info.tdep_info'.
8515 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8516 `info.tdep_info'.
8517 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8518 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8519 `info.tdep_info'.
8520 * spu-tdep.c (spu_gdbarch_init): Likewise.
8521 * gdbarch.h: Regenerate.
8522
8523 2017-08-07 Leszek Swirski <leszeks@google.com>
8524
8525 PR symtab/20899
8526 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8527
8528 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8529
8530 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8531 (gdbsim_open): Rename gdb_argv args object to argv.
8532
8533 2017-08-05 Tom Tromey <tom@tromey.com>
8534
8535 * compile/compile-object-load.c (compile_object_load): Use
8536 gdb::unique_xmalloc_ptr.
8537 * cli/cli-dump.c (scan_filename): Rename from
8538 scan_filename_with_cleanup. Change return type.
8539 (scan_expression): Rename from scan_expression_with_cleanup.
8540 Change return type.
8541 (dump_memory_to_file, dump_value_to_file, restore_command):
8542 Use gdb::unique_xmalloc_ptr. Update.
8543 * cli/cli-cmds.c (find_and_open_script): Use
8544 gdb::unique_xmalloc_ptr.
8545 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8546 * symmisc.c (maintenance_print_symbols)
8547 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8548 * symfile.c (symfile_bfd_open, generic_load)
8549 (add_symbol_file_command, remove_symbol_file_command): Use
8550 gdb::unique_xmalloc_ptr.
8551 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8552 * psymtab.c (maintenance_print_psymbols): Use
8553 gdb::unique_xmalloc_ptr.
8554 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8555 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8556 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8557 (reload_shared_libraries_1): Likewise.
8558
8559 2017-08-05 Tom Tromey <tom@tromey.com>
8560
8561 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8562 (rust_op_vector, rust_set_vector): New typedefs.
8563 (current_parser): New global.
8564 (work_obstack): Change to pointer type. Update all users.
8565 (rust_ast, pstate): Remove globals.
8566 (struct rust_parser): New.
8567 (%union) <params, field_inits>: Change type.
8568 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8569 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8570 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8571 (convert_params_to_types, convert_params_to_expression): Change
8572 type of "params".
8573 (ast_string): Change type of "fields".
8574 (rust_parse): Make a rust_parser. Remove cleanups.
8575 (rust_lex_tests): Make and install an auto_obstack.
8576
8577 2017-08-04 Yao Qi <yao.qi@linaro.org>
8578
8579 * configure.srv (ipa_x32_linux_regobj): New.
8580 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8581 instead of X86_TDESC_AVX512.
8582 (initialize_low_tracepoint): Call
8583 init_registers_x32_avx_avx512_linux.
8584
8585 2017-08-04 Yao Qi <yao.qi@linaro.org>
8586
8587 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8588
8589 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8590
8591 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8592
8593 2017-08-03 Tom Tromey <tom@tromey.com>
8594
8595 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8596 Remove.
8597 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8598
8599 2017-08-03 Tom Tromey <tom@tromey.com>
8600
8601 * python/py-param.c (compute_enum_values): Use gdb_argv.
8602
8603 2017-08-03 Tom Tromey <tom@tromey.com>
8604
8605 * utils.h (struct gdb_argv_deleter): New.
8606 (gdb_argv): New class.
8607 * utils.c (gdb_argv::reset): New method.
8608 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8609 * tracefile.c (tsave_command): Use gdb_argv.
8610 * top.c (new_ui_command): Use gdb_argv.
8611 * symmisc.c (maintenance_print_symbols)
8612 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8613 * symfile.c (symbol_file_command, generic_load)
8614 (remove_symbol_file_command): Use gdb_argv.
8615 * stack.c (backtrace_command): Use gdb_argv.
8616 * source.c (add_path, show_substitute_path_command)
8617 (unset_substitute_path_command, set_substitute_path_command):
8618 Use gdb_argv.
8619 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8620 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8621 * remote.c (extended_remote_run, remote_put_command)
8622 (remote_get_command, remote_delete_command): Use gdb_argv.
8623 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8624 (gdbsim_open): Use gdb_argv.
8625 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8626 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8627 * procfs.c (procfs_info_proc): Use gdb_argv.
8628 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8629 * infrun.c (handle_command): Use gdb_argv.
8630 * inferior.c (add_inferior_command, clone_inferior_command):
8631 Use gdb_argv.
8632 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8633 * exec.c (exec_file_command): Use gdb_argv.
8634 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8635 * compile/compile.c (build_argc_argv): Use gdb_argv.
8636
8637 2017-08-03 Tom Tromey <tom@tromey.com>
8638
8639 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8640
8641 2017-08-03 Tom Tromey <tom@tromey.com>
8642
8643 * python/python.c (compute_python_string): Return std::string.
8644 (gdbpy_eval_from_control_command): Update.
8645 (do_start_initialization): Use std::string.
8646 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8647 xstrprintf.
8648 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8649 xstrprintf.
8650
8651 2017-08-03 Tom Tromey <tom@tromey.com>
8652
8653 * top.h (do_restore_instream_cleanup): Remove.
8654 * top.c (do_restore_instream_cleanup): Remove.
8655 (read_command_file): Use scoped_restore.
8656 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8657
8658 2017-08-03 Tom Tromey <tom@tromey.com>
8659
8660 * cli/cli-script.c (execute_user_command)
8661 (execute_control_command): Use scoped_restore.
8662
8663 2017-08-03 Tom Tromey <tom@tromey.com>
8664
8665 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8666 (execute_user_command): Remove user_call_depth; use
8667 user_args_stack's size instead.
8668
8669 2017-08-03 Tom Tromey <tom@tromey.com>
8670
8671 * top.h (in_user_command): Remove.
8672 * top.c (in_user_command): Remove.
8673 * cli/cli-script.c (do_restore_user_call_depth)
8674 (execute_user_command): Update.
8675
8676 2017-08-03 Tom Tromey <tom@tromey.com>
8677
8678 * valops.c (search_struct_method): Use gdb::byte_vector.
8679 * valarith.c (value_concat): Use std::vector.
8680 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8681 (simple_search_memory): Likewise.
8682 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8683 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8684 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8685 * elfread.c (elf_rel_plt_read): Use std::string.
8686 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8687 * cli/cli-dump.c (restore_section_callback): Use
8688 gdb::byte_vector.
8689
8690 2017-08-03 Tom Tromey <tom@tromey.com>
8691
8692 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8693
8694 2017-08-03 Tom Tromey <tom@tromey.com>
8695
8696 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8697 (tui_register_format): Use scoped_restore.
8698
8699 2017-08-03 Tom Tromey <tom@tromey.com>
8700
8701 * reverse.c (exec_direction_default): Remove.
8702 (exec_reverse_once): Use scoped_restore.
8703 * remote.c (restore_remote_timeout): Remove.
8704 (remote_flash_erase, remote_flash_write, remote_flash_done)
8705 (readchar, remote_serial_write): Use scoped_restore.
8706 * cli/cli-script.c (struct source_cleanup_lines_args)
8707 (source_cleanup_lines): Remove.
8708 (script_from_file): Use scoped_restore.
8709 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8710 (source_command): Use scoped_restore.
8711
8712 2017-08-03 Tom Tromey <tom@tromey.com>
8713
8714 * utils.h (make_cleanup_free_so): Remove.
8715 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8716 * solist.h (struct so_deleter): New.
8717 (so_list_up): New typedef.
8718 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8719
8720 2017-08-03 Tom Tromey <tom@tromey.com>
8721
8722 * utils.h (make_cleanup_restore_current_language): Remove.
8723 * utils.c (do_restore_current_language)
8724 (make_cleanup_restore_current_language): Remove.
8725 * parse.c (parse_exp_in_context_1)
8726 (parse_expression_with_language): Use
8727 scoped_restore_current_language.
8728 * mi/mi-main.c (mi_cmd_execute): Use
8729 scoped_restore_current_language.
8730 * language.h (scoped_restore_current_language): New class.
8731
8732 2017-08-03 Tom Tromey <tom@tromey.com>
8733
8734 * compile/compile.c (cleanup_unlink_file): Remove.
8735 (compile_to_object): Use gdb::unlinker.
8736 (eval_compile_command): Likewise.
8737
8738 2017-08-03 Tom Tromey <tom@tromey.com>
8739
8740 * utils.h (make_cleanup_fclose): Remove.
8741 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8742
8743 2017-08-03 Tom Tromey <tom@tromey.com>
8744
8745 * top.c (open_terminal_stream): Return gdb_file_up.
8746 (new_ui_command): Update.
8747
8748 2017-08-03 Tom Tromey <tom@tromey.com>
8749
8750 * source.c (print_source_lines_base, forward_search_command)
8751 (reverse_search_command): Use gdb_file_up.
8752
8753 2017-08-03 Tom Tromey <tom@tromey.com>
8754
8755 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8756
8757 2017-08-03 Tom Tromey <tom@tromey.com>
8758
8759 * cli/cli-cmds.c (find_and_open_script): Change return type.
8760 Remove "streamp" and "full_path" parameters.
8761 (source_script_with_search): Update.
8762 * auto-load.c (source_script_file): Update.
8763 * cli/cli-cmds.h (find_and_open_script): Change type.
8764 (open_script): New struct.
8765
8766 2017-08-03 Tom Tromey <tom@tromey.com>
8767
8768 * xml-support.c (xml_fetch_content_from_file): Update.
8769 * ui-file.c (stdio_file::open): Update.
8770 * tracefile-tfile.c (tfile_start): Update.
8771 * remote.c (remote_file_put, remote_file_get): Update.
8772 * nat/linux-procfs.c (linux_proc_get_int)
8773 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8774 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8775 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8776 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8777 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8778 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8779 * linux-nat.c (linux_proc_pending_signals): Update.
8780 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8781 (file_closer): Remove.
8782 * compile/compile.c (compile_to_object): Update.
8783 * common/filestuff.h (struct gdb_file_deleter): New.
8784 (gdb_file_up): New typedef.
8785 (gdb_fopen_cloexec): Change return type.
8786 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8787 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8788 (dump_binary_file, restore_binary_file): Update.
8789 * auto-load.c (auto_load_objfile_script_1): Update.
8790
8791 2017-08-03 Tom Tromey <tom@tromey.com>
8792
8793 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8794 (info_static_tracepoint_markers_command): Likewise.
8795 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8796 * skip.c (skip_info): Use ui_out_emit_table.
8797 * progspace.c (print_program_space): Use ui_out_emit_table.
8798 * osdata.c (info_osdata): Use ui_out_emit_table.
8799 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8800 ui_out_emit_table.
8801 * linux-thread-db.c (info_auto_load_libthread_db): Use
8802 ui_out_emit_table.
8803 * inferior.c (print_inferior): Use ui_out_emit_table.
8804 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8805 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8806 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8807 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8808 * ui-out.h (class ui_out_emit_table): New.
8809
8810 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8811
8812 * mips-tdep.c (mips_fpu_type_str): New function.
8813 (mips_dump_tdep): Call it.
8814
8815 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8816
8817 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8818 `->mips_fpu_type'.
8819
8820 2017-07-31 Xavier Roirand <roirand@adacore.com>
8821
8822 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8823
8824 2017-07-27 Xavier Roirand <roirand@adacore.com>
8825
8826 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8827
8828 2017-07-26 Yao Qi <yao.qi@linaro.org>
8829
8830 * cli/cli-cmds.c (maintenancechecklist): New variable.
8831 * gdbcmd.h (maintenancechecklist): Declare it.
8832 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8833 Call i386_linux_read_description with different masks.
8834 * maint.c (maintenance_check_command): New function.
8835 (_initialize_maint_cmds): Call add_prefix_cmd.
8836 * target-descriptions.c (tdesc_reg): override operator != and ==.
8837 (tdesc_type): Likewise.
8838 (tdesc_feature): Likewise.
8839 (target_desc): Likewise.
8840 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8841 (maintenance_check_xml_descriptions): New function.
8842 (_initialize_target_descriptions) Add command "xml-descriptions".
8843 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8844
8845 2017-07-26 Yao Qi <yao.qi@linaro.org>
8846
8847 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8848 Include features/i386/32bit-*.c.
8849 (i386_linux_read_description): Generate target description if it
8850 doesn't exist.
8851 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8852 functions.
8853 * features/i386/32bit-linux.c: Re-generated.
8854 * features/i386/32bit-sse.c: Likewise.
8855 * target-descriptions.c (print_c_feature::visit): Print code to
8856 set register number if needed.
8857 (print_c_feature) <m_next_regnum>: New field.
8858
8859 2017-07-26 Yao Qi <yao.qi@linaro.org>
8860
8861 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8862 (FEATURE_XMLFILES): New.
8863 (FEATURE_CFILES): New.
8864 New rules.
8865 (clean-cfiles): Remove generated c files.
8866 * features/i386/32bit-avx.c: Generated.
8867 * features/i386/32bit-avx512.c: Generated.
8868 * features/i386/32bit-core.c: Generated.
8869 * features/i386/32bit-linux.c: Generated.
8870 * features/i386/32bit-mpx.c: Generated.
8871 * features/i386/32bit-pkeys.c: Generated.
8872 * features/i386/32bit-sse.c: Generated.
8873 * target-descriptions.c: Include algorithm.
8874 (tdesc_element_visitor): Add method visit_end.
8875 (print_c_tdesc): Implement visit_end.
8876 (print_c_tdesc:: m_filename_after_features): Move it to
8877 protected.
8878 (print_c_feature): New class.
8879 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8880 name starts with "i386/32bit-".
8881
8882 2017-07-26 Yao Qi <yao.qi@linaro.org>
8883
8884 * target-descriptions.c (tdesc_element_visitor): New class.
8885 (tdesc_element): New class.
8886 (tdesc_reg): Inherit from tdesc_element.
8887 (tdesc_reg::accept): New function.
8888 (tdesc_type): Inherit from tdesc_element.
8889 (tdesc_type::accept): New function.
8890 (tdesc_feature): Inherit from tdesc_element.
8891 (tdesc_feature::accept): New function.
8892 (target_desc): Inherit from tdesc_element.
8893 (target_desc::target_desc): New.
8894 (target_desc::~target_desc): New.
8895 (target_desc::accept): New.
8896 (allocate_target_description): Use new.
8897 (free_target_description): Use delete.
8898 (print_c_tdesc): New class.
8899 (maint_print_c_tdesc_cmd): Adjust.
8900
8901 * features/aarch64.c: Re-generated.
8902 * features/arc-arcompact.c: Re-generated.
8903 * features/arc-v2.c: Re-generated.
8904 * features/arm/arm-with-iwmmxt.c: Re-generated.
8905 * features/arm/arm-with-m.c: Re-generated.
8906 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8907 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8908 * features/arm/arm-with-neon.c: Re-generated.
8909 * features/arm/arm-with-vfpv2.c: Re-generated.
8910 * features/arm/arm-with-vfpv3.c: Re-generated.
8911 * features/i386/amd64-avx-avx512.c: Re-generated.
8912 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8913 * features/i386/amd64-avx.c: Re-generated.
8914 * features/i386/amd64-avx-linux.c: Re-generated.
8915 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8916 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8917 * features/i386/amd64-avx-mpx.c: Re-generated.
8918 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8919 * features/i386/amd64.c: Re-generated.
8920 * features/i386/amd64-linux.c: Re-generated.
8921 * features/i386/amd64-mpx.c: Re-generated.
8922 * features/i386/amd64-mpx-linux.c: Re-generated.
8923 * features/i386/i386-avx-avx512.c: Re-generated.
8924 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8925 * features/i386/i386-avx.c: Re-generated.
8926 * features/i386/i386-avx-linux.c: Re-generated.
8927 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8928 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8929 * features/i386/i386-avx-mpx.c: Re-generated.
8930 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8931 * features/i386/i386.c: Re-generated.
8932 * features/i386/i386-linux.c: Re-generated.
8933 * features/i386/i386-mmx.c: Re-generated.
8934 * features/i386/i386-mmx-linux.c: Re-generated.
8935 * features/i386/i386-mpx.c: Re-generated.
8936 * features/i386/i386-mpx-linux.c: Re-generated.
8937 * features/i386/x32-avx-avx512.c: Re-generated.
8938 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8939 * features/i386/x32-avx.c: Re-generated.
8940 * features/i386/x32-avx-linux.c: Re-generated.
8941 * features/i386/x32.c: Re-generated.
8942 * features/i386/x32-linux.c: Re-generated.
8943 * features/microblaze.c: Re-generated.
8944 * features/microblaze-with-stack-protect.c: Re-generated.
8945 * features/mips64-dsp-linux.c: Re-generated.
8946 * features/mips64-linux.c: Re-generated.
8947 * features/mips-dsp-linux.c: Re-generated.
8948 * features/mips-linux.c: Re-generated.
8949 * features/nds32.c: Re-generated.
8950 * features/nios2.c: Re-generated.
8951 * features/nios2-linux.c: Re-generated.
8952 * features/rs6000/powerpc-32.c: Re-generated.
8953 * features/rs6000/powerpc-32l.c: Re-generated.
8954 * features/rs6000/powerpc-403.c: Re-generated.
8955 * features/rs6000/powerpc-403gc.c : Re-generated.
8956 * features/rs6000/powerpc-405.c: Re-generated.
8957 * features/rs6000/powerpc-505.c: Re-generated.
8958 * features/rs6000/powerpc-601.c: Re-generated.
8959 * features/rs6000/powerpc-602.c: Re-generated.
8960 * features/rs6000/powerpc-603.c: Re-generated.
8961 * features/rs6000/powerpc-604.c: Re-generated.
8962 * features/rs6000/powerpc-64.c: Re-generated.
8963 * features/rs6000/powerpc-64l.c: Re-generated.
8964 * features/rs6000/powerpc-7400.c: Re-generated.
8965 * features/rs6000/powerpc-750.c: Re-generated.
8966 * features/rs6000/powerpc-860.c: Re-generated.
8967 * features/rs6000/powerpc-altivec32.c: Re-generated.
8968 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8969 * features/rs6000/powerpc-altivec64.c: Re-generated.
8970 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8971 * features/rs6000/powerpc-cell32l.c: Re-generated.
8972 * features/rs6000/powerpc-cell64l.c: Re-generated.
8973 * features/rs6000/powerpc-e500.c: Re-generated.
8974 * features/rs6000/powerpc-e500l.c: Re-generated.
8975 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8976 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8977 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8978 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8979 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8980 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8981 * features/rs6000/powerpc-vsx32.c: Re-generated.
8982 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8983 * features/rs6000/powerpc-vsx64.c: Re-generated.
8984 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8985 * features/rs6000/rs6000.c: Re-generated.
8986 * features/s390-linux32.c: Re-generated.
8987 * features/s390-linux32v1.c: Re-generated.
8988 * features/s390-linux32v2.c: Re-generated.
8989 * features/s390-linux64.c: Re-generated.
8990 * features/s390-linux64v1.c: Re-generated.
8991 * features/s390-linux64v2.c: Re-generated.
8992 * features/s390-te-linux64.c: Re-generated.
8993 * features/s390-tevx-linux64.c: Re-generated.
8994 * features/s390-vx-linux64.c: Re-generated.
8995 * features/s390x-linux64.c: Re-generated.
8996 * features/s390x-linux64v1.c: Re-generated.
8997 * features/s390x-linux64v2.c: Re-generated.
8998 * features/s390x-te-linux64.c: Re-generated.
8999 * features/s390x-tevx-linux64.c: Re-generated.
9000 * features/s390x-vx-linux64.c: Re-generated.
9001 * features/sparc/sparc32-solaris.c: Re-generated.
9002 * features/sparc/sparc64-solaris.c: Re-generated.
9003 * features/tic6x-c62x.c: Re-generated.
9004 * features/tic6x-c62x-linux.c: Re-generated.
9005 * features/tic6x-c64x.c: Re-generated.
9006 * features/tic6x-c64x-linux.c: Re-generated.
9007 * features/tic6x-c64xp.c: Re-generated.
9008 * features/tic6x-c64xp-linux.c: Re-generated.
9009
9010 2017-07-26 Yao Qi <yao.qi@linaro.org>
9011
9012 * i386-linux-tdep.c (i386_linux_read_description): New function.
9013 (i386_linux_core_read_description): Call
9014 i386_linux_read_description.
9015 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9016 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9017 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9018 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9019 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9020 * x86-linux-nat.c (x86_linux_read_description): Call
9021 i386_linux_read_description.
9022
9023 2017-07-26 Yao Qi <yao.qi@linaro.org>
9024
9025 * NEWS: Mention it.
9026 * features/Makefile (%.c: %.xml): Pass the xml file name to
9027 command "maint print c-tdesc".
9028 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9029 name from 'arg'.
9030
9031 2017-07-26 Yao Qi <yao.qi@linaro.org>
9032
9033 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9034 in-class initialization.
9035 (tdesc_create_feature): Call new instead of XCNEW.
9036 (free_target_description): Ue delete.
9037
9038 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9039
9040 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9041
9042 2017-07-25 Yao Qi <yao.qi@linaro.org>
9043
9044 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9045 constant.
9046 (amd64_x32_init_abi): Likewise.
9047 * amd64-tdep.h (amd64_init_abi): Update declaration.
9048 (amd64_x32_init_abi): Likewise.
9049
9050 2017-07-25 Yao Qi <yao.qi@linaro.org>
9051
9052 PR tdep/21717
9053 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9054 condition for FPSCR.
9055 (arm_linux_store_inferior_registers): Likewise.
9056
9057 2017-07-22 Tom Tromey <tom@tromey.com>
9058
9059 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9060 <syscalls_counts>: Now a std::vector.
9061 (get_catch_syscall_inferior_data): Use "new".
9062 (catch_syscall_inferior_data_cleanup): Use "delete".
9063 (insert_catch_syscall, remove_catch_syscall)
9064 (clear_syscall_counts): Update.
9065
9066 2017-07-22 Tom Tromey <tom@tromey.com>
9067
9068 * break-catch-syscall.c (syscall_catchpoint)
9069 <syscalls_to_be_caught>: Now a std::vector<int>
9070 (~syscall_catchpoint): Remove.
9071 (insert_catch_syscall, remove_catch_syscall)
9072 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9073 (print_mention_catch_syscall, print_recreate_catch_syscall):
9074 Update.
9075 (create_syscall_event_catchpoint): Change type of "filter"
9076 parameter.
9077 (catch_syscall_split_args): Return a std::vector.
9078 (catch_syscall_command_1, catching_syscall_number_1): Update.
9079
9080 2017-07-22 Tom Tromey <tom@tromey.com>
9081
9082 * break-catch-throw.c (struct exception_catchpoint)
9083 <exception_rx>: Now a std::string.
9084 (~exception_catchpoint): Remove.
9085 (print_one_detail_exception_catchpoint): Update.
9086 (handle_gnu_v3_exceptions): Change type of except_rx.
9087 (extract_exception_regexp): Return a std::string.
9088 (catch_exception_command_1): Update.
9089
9090 2017-07-22 Tom Tromey <tom@tromey.com>
9091
9092 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9093 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9094 std::vector.
9095 <catch_all>: Now a bool.
9096 (~signal_catchpoint): Remove.
9097 (signal_catchpoint_insert_location)
9098 (signal_catchpoint_remove_location)
9099 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9100 (signal_catchpoint_print_mention)
9101 (signal_catchpoint_print_recreate)
9102 (signal_catchpoint_explains_signal): Update.
9103 (create_signal_catchpoint): Change type of "filter" and
9104 "catch_all".
9105 (catch_signal_split_args): Return a std::vector. Change type of
9106 "catch_all".
9107 (catch_signal_command): Update.
9108
9109 2017-07-20 Pedro Alves <palves@redhat.com>
9110
9111 * ada-lang.c (ada_language_defn): Make extern.
9112 (_initialize_ada_language): Remove add_language call.
9113 * c-lang.c (c_language_defn, cplus_language_defn)
9114 (asm_language_defn, minimal_language_defn): Make extern.
9115 (_initialize_c_language): Delete.
9116 * completer.c (compare_cstrings): Delete, moved to utils.h.
9117 * d-lang.c (d_language_defn): Make extern.
9118 (_initialize_d_language): Remove add_language calls.
9119 * defs.h (enum language): Add comment.
9120 * f-lang.c (f_language_defn): Make extern.
9121 (_initialize_f_language): Remove add_language call.
9122 * go-lang.c (go_language_defn): Make extern.
9123 (_initialize_go_language): Remove add_language call.
9124 * language.c: Include <algorithm>.
9125 (languages): Redefine as const array.
9126 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9127 (set_language_command): Handle "local". Use for-range loop.
9128 (set_language): Remove loop.
9129 (language_enum): Rewrite.
9130 (language_def, language_str): Remove loops.
9131 (add_language): Delete.
9132 (add_set_language_command): New, based on add_languages.
9133 (skip_language_trampoline): Adjust.
9134 (local_language_defn): Delete.
9135 (language_gdbarch_post_init): Adjust.
9136 (_initialize_language): Remove add_language calls. Call
9137 add_set_language_command.
9138 * language.h (add_language): Delete.
9139 (auto_language_defn)
9140 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9141 (asm_language_defn, c_language_defn, cplus_language_defn)
9142 (d_language_defn, f_language_defn, go_language_defn)
9143 (m2_language_defn, objc_language_defn, opencl_language_defn)
9144 (pascal_language_defn, rust_language_defn): Declare.
9145 * m2-lang.c (m2_language_defn): Make extern.
9146 (_initialize_m2_language): Remove add_language call.
9147 * objc-lang.c (objc_language_defn): Make extern.
9148 (_initialize_objc_language): Remove add_language call.
9149 * opencl-lang.c (opencl_language_defn): Make extern.
9150 (_initialize_opencl_language): Remove add_language call.
9151 * p-lang.c (pascal_language_defn): Make extern.
9152 (_initialize_pascal_language): Delete.
9153 * rust-lang.c (rust_language_defn): Make extern.
9154 (_initialize_rust_language): Delete.
9155 * utils.h (compare_cstrings): New static inline function.
9156
9157 2017-07-20 Pedro Alves <palves@redhat.com>
9158
9159 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9160 (get_var_value): Constify parameters.
9161 (get_int_var_value): Change prototype.
9162 (to_fixed_range_type): Adjust.
9163 * ada-lang.h (get_int_var_value): Change prototype.
9164
9165 2017-07-20 Pedro Alves <palves@redhat.com>
9166
9167 * dwarf2read.c (dw2_lookup_symbol): Use
9168 SYMBOL_MATCHES_SEARCH_NAME.
9169 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9170
9171 2017-07-20 Pedro Alves <palves@redhat.com>
9172
9173 * block.c (block_iter_name_step, block_iter_name_first)
9174 (block_iter_name_next): Delete.
9175 (block_lookup_symbol_primary): Adjust to use
9176 dict_iter_match_first/dict_iter_match_next.
9177 * block.h (block_iter_name_first, block_iter_name_next): Delete
9178 declarations.
9179 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9180 dict_iter_match_first/dict_iter_match_next.
9181
9182 2017-07-20 Pedro Alves <palves@redhat.com>
9183
9184 * cp-support.c (cp_find_first_component_aux): Add missing case for
9185 end of string.
9186
9187 2017-07-18 David Blaikie <dblaikie@gmail.com>
9188
9189 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9190 of dwo_cu's dwo_file.
9191
9192 2017-07-18 Yao Qi <yao.qi@linaro.org>
9193
9194 * remote.c (store_registers_using_G): Remove one line comment.
9195
9196 2017-07-18 Yao Qi <yao.qi@linaro.org>
9197
9198 * regcache.c (regcache_cpy): Simplify it.
9199 (regcache::cpy_no_passthrough): Remove it.
9200 * regcache.h (cpy_no_passthrough): Remove it.
9201 (regcache_dup, regcache_cpy): Update comments.
9202
9203 2017-07-18 Pedro Alves <palves@redhat.com>
9204
9205 * remote-sim.c (sim_command_completer): Adjust to work with a
9206 completion_tracker instead of a VEC.
9207
9208 2017-07-17 Pedro Alves <palves@redhat.com>
9209
9210 * completer.c (complete_source_filenames): New function.
9211 (complete_address_and_linespec_locations): New function.
9212 (location_completer): Use complete_address_and_linespec_locations.
9213 (completion_tracker::build_completion_result): Honor the tracker's
9214 request to suppress append.
9215 * completer.h (completion_tracker::suppress_append_ws)
9216 (completion_tracker::set_suppress_append_ws): New methods.
9217 (completion_tracker::m_suppress_append_ws): New field.
9218 (complete_source_filenames): New declaration.
9219 * linespec.c (linespec_complete_what): New.
9220 (struct ls_parser) <complete_what, completion_word,
9221 completion_quote_char, completion_quote_end, completion_tracker>:
9222 New fields.
9223 (string_find_incomplete_keyword_at_end): New.
9224 (linespec_lexer_lex_string): Record quote char. If in completion
9225 mode, don't throw.
9226 (linespec_lexer_consume_token): Advance the completion word point.
9227 (linespec_lexer_peek_token): Save/restore completion info.
9228 (save_stream_and_consume_token): New.
9229 (set_completion_after_number): New.
9230 (linespec_parse_basic): Set what to complete next depending on
9231 token. Handle function and label completions specially.
9232 (parse_linespec): Disable objc shortcut in completion mode. Set
9233 what to complete next depending on token type. Skip keyword if in
9234 completion mode.
9235 (complete_linespec_component, linespec_complete): New.
9236 * linespec.h (linespec_complete): Declare.
9237
9238 2017-07-17 Pedro Alves <palves@redhat.com>
9239
9240 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9241 Handle 'operator<' / 'operator<<'.
9242
9243 2017-07-17 Pedro Alves <palves@redhat.com>
9244
9245 * completer.c (collect_explicit_location_matches): Handle
9246 MATCH_LABEL.
9247 (convert_explicit_location_to_linespec): New, factored out from
9248 ...
9249 (convert_explicit_location_to_sals): ... this.
9250 (complete_label): New.
9251 (linespec_complete_label, find_label_symbols_in_block): New.
9252 (find_label_symbols): Add completion_mode parameter and adjust to
9253 call find_label_symbols_in_block.
9254 * linespec.h (linespec_complete_label): Declare.
9255
9256 2017-07-17 Pedro Alves <palves@redhat.com>
9257
9258 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9259 complete_symbol_mode parameter.
9260 * cli/cli-cmds.c (complete_command): Get the completion result out
9261 of the handle_brkchars tracker if used a custom word point.
9262 * completer.c: Include "linespec.h".
9263 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9264 (advance_to_expression_complete_word_point): New.
9265 (completion_tracker::completes_to_completion_word): New.
9266 (complete_files_symbols): Pass down
9267 complete_symbol_mode::EXPRESSION.
9268 (explicit_options, probe_options): New.
9269 (collect_explicit_location_matches): Complete on the
9270 explictit_loc->foo instead of word. Use
9271 linespec_complete_function. Handle MATCH_LINE. Handle offering
9272 keyword and options completions.
9273 (backup_text_ptr): Delete.
9274 (skip_keyword): New.
9275 (complete_explicit_location): Remove 'word' parameter. Add
9276 language, quoted_arg_start and quoted_arg_end parameters.
9277 Rewrite, parsing left to right.
9278 (location_completer): Rewrite.
9279 (location_completer_handle_brkchars): New function.
9280 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9281 (enum complete_line_internal_reason): Adjust comments.
9282 (completion_tracker::discard_completions): New.
9283 (completer_handle_brkchars_func_for_completer): Handle
9284 location_completer.
9285 (gdb_custom_word_point_brkchars)
9286 (gdb_org_rl_basic_quote_characters): New.
9287 (gdb_completion_word_break_characters_throw)
9288 (completion_find_completion_word): Handle trackers that use a
9289 custom word point.
9290 (completion_tracker::advance_custom_word_point_by): New.
9291 (completion_tracker::build_completion_result): Don't rely on
9292 readline appending the quote char.
9293 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9294 use a custom word point.
9295 (gdb_rl_attempted_completion_function): Restore
9296 rl_basic_quote_characters.
9297 * completer.h (class completion_tracker): Extend intro comment.
9298 (completion_tracker::set_quote_char)
9299 (completion_tracker::quote_char)
9300 (completion_tracker::set_use_custom_word_point)
9301 (completion_tracker::use_custom_word_point)
9302 (completion_tracker::custom_word_point)
9303 (completion_tracker::set_custom_word_point)
9304 (completion_tracker::advance_custom_word_point_by)
9305 (completion_tracker::completes_to_completion_word)
9306 (completion_tracker::discard_completions): New methods.
9307 (completion_tracker::m_quote_char)
9308 (completion_tracker::m_use_custom_word_point)
9309 (completion_tracker::m_custom_word_point): New fields.
9310 (advance_to_expression_complete_word_point): Declare.
9311 * f-lang.c (f_collect_symbol_completion_matches): Add
9312 complete_symbol_mode parameter.
9313 * language.h (struct language_defn)
9314 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9315 parameter.
9316 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9317 (linespec_complete_function): New function.
9318 (linespec_lexer_lex_keyword): Adjust.
9319 * linespec.h (linespec_keywords, linespec_complete_function): New
9320 declarations.
9321 * location.c (find_end_quote): New function.
9322 (explicit_location_lex_one): Add explicit_completion_info
9323 parameter. Save quoting info. Don't throw if being called for
9324 completion. Don't handle Ada operators here.
9325 (is_cp_operator, skip_op_false_positives, first_of)
9326 (explicit_location_lex_one_function): New function.
9327 (string_to_explicit_location): Replace 'dont_throw' parameter with
9328 an explicit_completion_info pointer parameter. Handle it. Don't
9329 use explicit_location_lex_one to lex function names. Use
9330 explicit_location_lex_one_function instead.
9331 * location.h (struct explicit_completion_info): New.
9332 (string_to_explicit_location): Replace 'dont_throw' parameter with
9333 an explicit_completion_info pointer parameter.
9334 * symtab.c (default_collect_symbol_completion_matches_break_on):
9335 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9336 (default_collect_symbol_completion_matches)
9337 (collect_symbol_completion_matches): Add complete_symbol_mode
9338 parameter.
9339 (collect_symbol_completion_matches_type): Pass down
9340 complete_symbol_mode::EXPRESSION.
9341 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9342 parameter. Handle LINESPEC mode.
9343 * symtab.h (complete_symbol_mode): New.
9344 (default_collect_symbol_completion_matches_break_on)
9345 (default_collect_symbol_completion_matches)
9346 (collect_symbol_completion_matches)
9347 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9348 parameter.
9349
9350 2017-07-17 Pedro Alves <palves@redhat.com>
9351
9352 * utils.c (enum class strncmp_iw_mode): New.
9353 (strcmp_iw): Rename to ...
9354 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9355 parameters. Handle them.
9356 (strncmp_iw): New.
9357 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9358 * utils.h (strncmp_iw): Declare.
9359 (strcmp_iw): Move describing comments here.
9360
9361 2017-07-17 Pedro Alves <palves@redhat.com>
9362
9363 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9364 CP_OPERATOR_STR.
9365 * c-typeprint.c (is_type_conversion_operator): Use
9366 CP_OPERATOR_STR.
9367 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9368 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9369 CP_OPERATOR_LEN.
9370 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9371 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9372 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9373 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9374 CP_OPERATOR_STR.
9375 * location.c: Include "cp-support.h".
9376 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9377 CP_OPERATOR_STR.
9378 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9379 CP_OPERATOR_LEN.
9380
9381 2017-07-17 Pedro Alves <palves@redhat.com>
9382
9383 * cli/cli-cmds.c (complete_command): Use a completion tracker
9384 along with completion_find_completion_word for handle_brkchars
9385 phase.
9386 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9387 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9388 (struct gdb_rl_completion_word_info): New.
9389 (gdb_rl_find_completion_word): New.
9390 (completion_find_completion_word): New.
9391 * completer.h (completion_find_completion_word): Declare.
9392
9393 2017-07-17 Pedro Alves <palves@redhat.com>
9394
9395 * ada-lang.c (symbol_completion_match): Adjust comments.
9396 (symbol_completion_add): Replace vector parameter with
9397 completion_tracker parameter. Use it.
9398 (ada_make_symbol_completion_list): Rename to...
9399 (ada_collect_symbol_completion_matches): ... this. Add
9400 completion_tracker parameter and use it.
9401 (ada_language_defn): Adjust.
9402 * break-catch-syscall.c (catch_syscall_completer): Adjust
9403 prototype and work with completion_tracker instead of VEC.
9404 * breakpoint.c (condition_completer): Adjust prototype and work
9405 with completion_tracker instead of VEC.
9406 * c-lang.c (c_language_defn, cplus_language_defn)
9407 (asm_language_defn, minimal_language_defn): Adjust to renames.
9408 * cli/cli-cmds.c (complete_command): Rework using
9409 completion_tracker. Catch exceptions when completing.
9410 * cli/cli-decode.c (integer_unlimited_completer)
9411 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9412 with completion_tracker instead of VEC.
9413 * command.h (struct completion_tracker): Forward declare.
9414 (completer_ftype, completer_handle_brkchars_ftype): Change
9415 types.
9416 (complete_on_cmdlist, complete_on_enum): Adjust.
9417 * completer.c: Include <algorithm>.
9418 (struct gdb_completer_state): New.
9419 (current_completion): New global.
9420 (readline_line_completion_function): Delete.
9421 (noop_completer, filename_completer)
9422 (filename_completer_handle_brkchars, complete_files_symbols)
9423 (linespec_location_completer): Adjust to work with a
9424 completion_tracker instead of a VEC.
9425 (string_or_empty): New.
9426 (collect_explicit_location_matches): Adjust to work with a
9427 completion_tracker instead of a VEC.
9428 (explicit_location_completer): Rename to ...
9429 (complete_explicit_location): ... this and adjust to work with a
9430 completion_tracker instead of a VEC.
9431 (location_completer): Adjust to work with a completion_tracker
9432 instead of a VEC.
9433 (add_struct_fields): Adjust to work with a completion_list instead
9434 of VEC.
9435 (expression_completer): Rename to ...
9436 (complete_expression): ... this and adjust to work with a
9437 completion_tracker instead of a VEC. Use complete_files_symbols.
9438 (expression_completer): Reimplement on top of complete_expression.
9439 (symbol_completer): Adjust to work with a completion_tracker
9440 instead of a VEC.
9441 (enum complete_line_internal_reason): Add describing comments.
9442 (complete_line_internal_normal_command): Adjust to work with a
9443 completion_tracker instead of a VEC.
9444 (complete_line_internal): Rename to ...
9445 (complete_line_internal_1): ... this and adjust to work with a
9446 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9447 handle_brkchars phase.
9448 (new_completion_tracker): Delete.
9449 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9450 complete_line_internal_1.
9451 (free_completion_tracker): Delete.
9452 (INITIAL_COMPLETION_HTAB_SIZE): New.
9453 (completion_tracker::completion_tracker)
9454 (completion_tracker::~completion_tracker): New.
9455 (maybe_add_completion): Delete.
9456 (completion_tracker::maybe_add_completion)
9457 (completion_tracker::add_completion)
9458 (completion_tracker::add_completions): New.
9459 (throw_max_completions_reached_error): Delete.
9460 (complete_line): Adjust to work with a completion_tracker instead
9461 of a VEC. Don't create a completion_tracker_t or check for max
9462 completions here.
9463 (command_completer, command_completer_handle_brkchars)
9464 (signal_completer, reg_or_group_completer_1)
9465 (reg_or_group_completer, default_completer_handle_brkchars):
9466 Adjust to work with a completion_tracker.
9467 (gdb_completion_word_break_characters_throw): New.
9468 (gdb_completion_word_break_characters): Reimplement.
9469 (line_completion_function): Delete.
9470 (completion_tracker::recompute_lowest_common_denominator)
9471 (expand_preserving_ws)
9472 (completion_tracker::build_completion_result)
9473 (completion_result::completion_result)
9474 (completion_result::completion_result)
9475 (completion_result::~completion_result)
9476 (completion_result::completion_result)
9477 (completion_result::release_match_list, compare_cstrings)
9478 (completion_result::sort_match_list)
9479 (completion_result::reset_match_list)
9480 (gdb_rl_attempted_completion_function_throw)
9481 (gdb_rl_attempted_completion_function): New.
9482 * completer.h (completion_list, struct completion_result)
9483 (class completion_tracker): New.
9484 (complete_line): Add completion_tracker parameter.
9485 (readline_line_completion_function): Delete.
9486 (gdb_rl_attempted_completion_function): New.
9487 (noop_completer, filename_completer, expression_completer)
9488 (location_completer, symbol_completer, command_completer)
9489 (signal_completer, reg_or_group_completer): Update prototypes.
9490 (completion_tracker_t, new_completion_tracker)
9491 (make_cleanup_free_completion_tracker): Delete.
9492 (enum maybe_add_completion_enum): Delete.
9493 (maybe_add_completion): Delete.
9494 (throw_max_completions_reached_error): Delete.
9495 * corefile.c (complete_set_gnutarget): Adjust to work with a
9496 completion_tracker instead of a VEC.
9497 * cp-abi.c (cp_abi_completer): Adjust to work with a
9498 completion_tracker instead of a VEC.
9499 * d-lang.c (d_language_defn): Adjust.
9500 * disasm.c (disassembler_options_completer): Adjust to work with a
9501 completion_tracker instead of a VEC.
9502 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9503 (f_collect_symbol_completion_matches): ... this. Adjust to work
9504 with a completion_tracker instead of a VEC.
9505 (f_language_defn): Adjust.
9506 * go-lang.c (go_language_defn): Adjust.
9507 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9508 Adjust to work with a completion_tracker instead of a VEC.
9509 * infrun.c (handle_completer): Likewise.
9510 * interps.c (interpreter_completer): Likewise.
9511 * interps.h (interpreter_completer): Likewise.
9512 * language.c (unknown_language_defn, auto_language_defn)
9513 (local_language_defn): Adjust.
9514 * language.h (language_defn::la_make_symbol_completion_list):
9515 Rename to ...
9516 (language_defn::la_collect_symbol_completion_matches): ... this
9517 and adjust to work with a completion_tracker instead of a VEC.
9518 * m2-lang.c (m2_language_defn): Adjust.
9519 * objc-lang.c (objc_language_defn): Adjust.
9520 * opencl-lang.c (opencl_language_defn): Adjust.
9521 * p-lang.c (pascal_language_defn): Adjust.
9522 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9523 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9524 with a completion_tracker.
9525 * rust-lang.c (rust_language_defn): Adjust.
9526 * symtab.c (free_completion_list, do_free_completion_list)
9527 (return_val, completion_tracker): Delete.
9528 (completion_list_add_name, completion_list_add_symbol)
9529 (completion_list_add_msymbol, completion_list_objc_symbol)
9530 (completion_list_add_fields, add_symtab_completions): Add
9531 completion_tracker parameter and use it.
9532 (default_make_symbol_completion_list_break_on_1): Rename to...
9533 (default_collect_symbol_completion_matches_break_on): ... this.
9534 Add completion_tracker parameter and use it instead of allocating
9535 a completion tracker here.
9536 (default_make_symbol_completion_list_break_on): Delete old
9537 implementation.
9538 (default_make_symbol_completion_list): Delete.
9539 (default_collect_symbol_completion_matches): New.
9540 (make_symbol_completion_list): Delete.
9541 (collect_symbol_completion_matches): New.
9542 (make_symbol_completion_type): Rename to ...
9543 (collect_symbol_completion_matches_type): ... this. Add
9544 completion_tracker parameter and use it instead of VEC.
9545 (make_file_symbol_completion_list_1): Rename to...
9546 (collect_file_symbol_completion_matches): ... this. Add
9547 completion_tracker parameter and use it instead of VEC.
9548 (make_file_symbol_completion_list): Delete.
9549 (add_filename_to_list): Use completion_list instead of a VEC.
9550 (add_partial_filename_data::list): Now a completion_list.
9551 (make_source_files_completion_list): Work with a completion_list
9552 instead of a VEC.
9553 * symtab.h: Include "completer.h".
9554 (default_make_symbol_completion_list_break_on)
9555 (default_make_symbol_completion_list, make_symbol_completion_list)
9556 (make_symbol_completion_type, make_file_symbol_completion_list)
9557 (make_source_files_completion_list): Delete.
9558 (default_collect_symbol_completion_matches_break_on)
9559 (default_collect_symbol_completion_matches)
9560 (collect_symbol_completion_matches)
9561 (collect_symbol_completion_matches_type)
9562 (collect_file_symbol_completion_matches)
9563 (make_source_files_completion_list): New.
9564 * top.c (init_main): Don't install a rl_completion_entry_function
9565 hook. Install a rl_attempted_completion_function hook instead.
9566 * tui/tui-layout.c (layout_completer): Adjust to work with a
9567 completion_tracker.
9568 * tui/tui-regs.c (tui_reggroup_completer):
9569 * tui/tui-win.c (window_name_completer, focus_completer)
9570 (winheight_completer): Adjust to work with a completion_tracker.
9571 * value.c: Include "completer.h".
9572 (complete_internalvar): Adjust to work with a completion_tracker.
9573 * value.h (complete_internalvar): Likewise.
9574
9575 2017-07-17 Pedro Alves <palves@redhat.com>
9576
9577 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9578 renames.
9579 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9580 comments to completer_ftype's declaration.
9581 <completer_handle_brkchars>: Change type to
9582 completer_handle_brkchars_ftype.
9583 * command.h (completer_ftype): Add describing comment and give
9584 names to parameters.
9585 (completer_ftype_void): Rename to ...
9586 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9587 (set_cmd_completer_handle_brkchars): Adjust.
9588 * completer.c (filename_completer_handle_brkchars): New function.
9589 (complete_line_internal_normal_command): New function, factored
9590 out from ...
9591 (complete_line_internal): ... here.
9592 (command_completer_handle_brkchars)
9593 (default_completer_handle_brkchars)
9594 (completer_handle_brkchars_func_for_completer): New functions.
9595 * completer.h (set_gdb_completion_word_break_characters): Delete
9596 declaration.
9597 (completer_handle_brkchars_func_for_completer): New declaration.
9598 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9599 completer_handle_brkchars_func_for_completer.
9600
9601 2017-07-17 Pedro Alves <palves@redhat.com>
9602
9603 * completer.c (symbol_completer): New function, based on
9604 make_symbol_completion_list_fn.
9605 * completer.h (symbol_completer): New declaration.
9606 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9607 * python/py-cmd.c (completers): Adjust.
9608 * symtab.c (make_symbol_completion_list_fn): Delete.
9609 * symtab.h (make_symbol_completion_list_fn): Delete.
9610 * cli/cli-decode.c (add_cmd): Adjust.
9611
9612 2017-07-17 Pedro Alves <palves@redhat.com>
9613
9614 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9615 * dwarf2read.c: Include "filename-seen-cache.h".
9616 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9617 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9618 * filename-seen-cache.c: New file.
9619 * filename-seen-cache.h: New file.
9620 * symtab.c: Include "filename-seen-cache.h".
9621 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9622 (create_filename_seen_cache, clear_filename_seen_cache)
9623 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9624 to filename-seen-cache.h/filename-seen-cache.c.
9625 (output_source_filename, sources_info)
9626 (maybe_add_partial_symtab_filename)
9627 (make_source_files_completion_list): Adjust to use
9628 filename_seen_cache.
9629
9630 2017-07-17 Pedro Alves <palves@redhat.com>
9631
9632 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9633 fields.
9634 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9635 dwarf2_debug_sections*)): New.
9636 (dwarf2_per_objfile::dwarf2_per_objfile(const
9637 dwarf2_per_objfile&)): Declare as deleted.
9638 (dwarf2_per_objfile::operator=): Declare as deleted.
9639 (dwarf2_per_objfile::dwarf2_per_objfile)
9640 (dwarf2_per_objfile::~dwarf2_per_objfile)
9641 (dwarf2_per_objfile::free_cached_comp_units): New.
9642 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9643 ctor. Call dwarf2_per_objfile's ctor manually.
9644 (dwarf2_locate_sections): Deleted/refactored as ...
9645 (dwarf2_per_objfile::locate_sections): ... this new method.
9646 (free_cached_comp_units): Defer to
9647 dwarf2_per_objfile::free_cached_comp_units.
9648 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9649
9650 2017-07-14 Tom Tromey <tom@tromey.com>
9651
9652 PR rust/21764:
9653 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9654 parameter.
9655 <UNOP_SIZEOF>: Split into separate case.
9656 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9657
9658 2017-07-14 Tom Tromey <tom@tromey.com>
9659
9660 PR rust/21763:
9661 * symtab.c (symbol_matches_domain): Add language_rust to special
9662 case.
9663 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9664 treat LOC_TYPEDEF symbols as variables.
9665
9666 2017-07-14 Pedro Alves <palves@redhat.com>
9667
9668 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9669 symtabs matching all symtabs with SRCFILE as file name instead of
9670 only considering the first hit, with lookup_symtab.
9671
9672 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9673
9674 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9675 operator_name parameters.
9676 (gen_expr): Update function call.
9677
9678 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9679
9680 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9681 parameter.
9682 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9683 Likewise.
9684 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9685 parameter, use agent_expr::gdbarch instead, update function
9686 calls.
9687 (locexpr_tracepoint_var_ref): Likewise.
9688 (loclist_tracepoint_var_ref): Likewise.
9689 * ax-gdb.c (gen_trace_static_fields): Likewise.
9690 (gen_traced_pop): Likewise.
9691 (gen_frame_args_address): Likewise.
9692 (gen_frame_locals_address): Likewise.
9693 (gen_var_ref): Likewise.
9694 (gen_struct_ref_recursive): Likewise.
9695 (gen_static_field): Likewise.
9696 (gen_maybe_namespace_elt): Likewise.
9697 (gen_expr): Likewise.
9698 (gen_trace_for_var): Likewise.
9699 (gen_trace_for_expr): Likewise.
9700 (gen_trace_for_return_address): Likewise.
9701
9702 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9703
9704 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9705 parameter.
9706 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9707
9708 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9709
9710 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9711 from ax, update calls.
9712 (gen_usual_arithmetic): Likewise.
9713 (gen_integral_promotions): Likewise.
9714 (gen_bitfield_ref): Likewise.
9715 (gen_primitive_field): Likewise.
9716 (gen_struct_ref_recursive): Likewise.
9717 (gen_struct_ref): Likewise.
9718 (gen_maybe_namespace_elt): Likewise.
9719 (gen_struct_elt_for_reference): Likewise.
9720 (gen_namespace_elt): Likewise.
9721 (gen_aggregate_elt_ref): Likewise.
9722 (gen_expr): Get gdbarch from ax, update calls.
9723 (gen_expr_binop_rest): Likewise.
9724
9725 2017-07-13 Pedro Alves <palves@redhat.com>
9726
9727 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9728 as default tdesc.
9729 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9730 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9731 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9732 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9733 tdep.
9734 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9735 Get final tdesc from the tdep.
9736 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9737 default tdesc.
9738 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9739 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9740 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9741 Use it as default tdesc.
9742 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9743 down to amd_init_abi. No longer handle fallback tdesc here.
9744 * amd64-tdep.h (tdesc_x32): Declare.
9745 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9746 parameter.
9747 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9748 as default tdesc.
9749
9750 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9751
9752 * s390-linux-tdep.c (s390_process_record): Add support for
9753 instructions new in arch12.
9754
9755 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9756
9757 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9758 PT_GETFSBASE and PT_GETGSBASE.
9759 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9760 PT_SETGSBASE.
9761
9762 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9763
9764 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9765 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9766 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9767 those rules.
9768 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9769 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9770 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9771 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9772 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9773 * features/i386/amd64.xml: Add 64bit-segments.xml.
9774 * features/i386/amd64-avx-avx512.c: Regenerated.
9775 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9776 * features/i386/amd64-avx-mpx.c: Regenerated.
9777 * features/i386/amd64-avx.c: Regenerated.
9778 * features/i386/amd64-mpx.c: Regenerated.
9779 * features/i386/amd64.c: Regenerated.
9780 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9781 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9782 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9783 * regformats/i386/amd64-avx.dat: Regenerated.
9784 * regformats/i386/amd64-mpx.dat: Regenerated.
9785 * regformats/i386/amd64.dat: Regenerated.
9786
9787 2017-07-10 Yao Qi <yao.qi@linaro.org>
9788
9789 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9790 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9791
9792 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9793
9794 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9795 unsetenv.
9796 * gnulib/aclocal.m4: Regenerate.
9797 * gnulib/config.in: Regenerate.
9798 * gnulib/configure: Regenerate.
9799 * gnulib/import/Makefile.am: Regenerate.
9800 * gnulib/import/Makefile.in: Regenerate.
9801 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9802 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9803 * gnulib/import/m4/environ.m4: New file.
9804 * gnulib/import/m4/setenv.m4: New file.
9805 * gnulib/import/setenv.c: New file.
9806 * gnulib/import/unsetenv.c: New file.
9807
9808 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9809
9810 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9811 address when op is DW_OP_addr.
9812
9813 2017-07-09 Tom Tromey <tom@tromey.com>
9814
9815 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9816 check and apply to outer type.
9817
9818 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9819
9820 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9821 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9822 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9823 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9824
9825 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9826
9827 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9828
9829 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9830
9831 * corelow.c (get_core_siginfo): Remove.
9832 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9833 instead of get_core_siginfo.
9834 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9835 * gdbarch.h: Re-generate.
9836 * gdbarch.c: Re-generate.
9837 * linux-tdep.c (linux_core_xfer_siginfo): New.
9838 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9839
9840 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9841
9842 * corelow.c (thread_section_name): Move to ...
9843 * gdbcore.h (thread_section_name): ... here.
9844
9845 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9846
9847 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9848 (struct siginfo32): New.
9849 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9850 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9851 via ptrace(PT_LWPINFO).
9852
9853 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9854
9855 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9856 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9857 (fbsd_get_siginfo_type): New.
9858 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9859 (_initialize_fbsd_tdep): New.
9860
9861 2017-07-06 David Blaikie <dblaikie@gmail.com>
9862
9863 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9864 a singular dwo_unit*) to support multiple CUs in the same way that
9865 multiple TUs are supported.
9866 (create_cus_hash_table): Replace create_dwo_cu with a function for
9867 parsing multiple CUs from a DWO file.
9868 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9869 create_dwo_cu.
9870 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9871 htab_find, rather than comparing the signature to a singleton CU in
9872 the dwo_file.
9873
9874 2017-07-06 Pedro Alves <palves@redhat.com>
9875
9876 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9877
9878 2017-07-04 Pedro Alves <palves@redhat.com>
9879
9880 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9881 * gdbtypes.h (TYPE_STATIC): Delete.
9882 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9883 is_synchronized, is_native>: Delete.
9884 <dummy>: Bump.
9885 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9886 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9887 (TYPE_FN_FIELD_ABSTRACT): Delete.
9888
9889 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9890
9891 * buffer.h (buffer_finish): Fix spelling mistakes.
9892
9893 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9894
9895 * .dir-locals.el: Automatically switch to C-style comments in
9896 versions of Emacs that support the feature.
9897
9898 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9899 Pedro Alves <palves@redhat.com>
9900
9901 PR cli/21688
9902 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9903 (process_next_line): New variable 'inline_cmd'.
9904 Adjust 'if' clauses for "python", "compile" and "guile" to use
9905 'command_name_equals' and check for '!inline_cmd'.
9906
9907 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9908
9909 PR cli/21688
9910 * cli/cli-script.c (command_name_equals_not_inline): New function.
9911 (process_next_line): Adjust 'if' clauses for "python", "compile"
9912 and "guile" to use command_name_equals_not_inline.
9913
9914 2017-06-29 Pedro Alves <palves@redhat.com>
9915
9916 * completer.c (expression_completer): Call
9917 linespec_location_completer instead of location_completer.
9918
9919 2017-06-29 Pedro Alves <palves@redhat.com>
9920
9921 * completer.c (expression_completer): Remove code that recomputes
9922 'text' from 'word'.
9923
9924 2017-06-29 Yao Qi <yao.qi@linaro.org>
9925
9926 * regformats/regdat.sh: Generate code with
9927 "ifndef IN_PROCESS_AGENT".
9928
9929 2017-06-28 Pedro Alves <palves@redhat.com>
9930
9931 * command.h: Include "common/scoped_restore.h".
9932
9933 2017-06-28 Yao Qi <yao.qi@linaro.org>
9934
9935 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9936 instead of obstack_grow.
9937
9938 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9939
9940 PR gdb/21337
9941 * symfile.c (reread_symbols): Call objfiles_changed just before
9942 read_symbols.
9943
9944 2017-06-27 Pedro Alves <palves@redhat.com>
9945
9946 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9947 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9948 (completion_list_add_symbol, completion_list_add_msymbol):
9949 ... these new functions.
9950 (add_symtab_completions)
9951 (default_make_symbol_completion_list_break_on_1): Adjust.
9952
9953 2017-06-27 Pedro Alves <palves@redhat.com>
9954
9955 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9956 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9957 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9958 dtor.
9959 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9960 'storage_obstack' field an auto_obstack. In-class initialize all
9961 non-bitfield fields. Make minsyms_read bool.
9962 * symfile.c (read_symbols): Adjust.
9963
9964 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9965
9966 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9967 (gdbsim_store_register): Likewise.
9968
9969 2017-06-27 Pedro Alves <palves@redhat.com>
9970
9971 * c-exp.y (name_obstack): Now an auto_obstack.
9972 (yylex): Use auto_obstack::clear.
9973 (c_parse): Use auto_obstack::clear instead of reinitializing and
9974 freeing the obstack.
9975 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9976 * d-exp.y (name_obstack): Now an auto_obstack.
9977 (yylex): Use auto_obstack::clear.
9978 (d_parse): Use auto_obstack::clear instead of reinitializing and
9979 freeing the obstack.
9980 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9981 auto_obstack.
9982 * dwarf2read.c (create_addrmap_from_index)
9983 (dwarf2_build_psymtabs_hard)
9984 (update_enumeration_type_from_children): Likewise.
9985 * gdb_obstack.h (auto_obstack): New type.
9986 * go-exp.y (name_obstack): Now an auto_obstack.
9987 (build_packaged_name): Use auto_obstack::clear.
9988 (go_parse): Use auto_obstack::clear instead of reinitializing and
9989 freeing the obstack.
9990 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9991 auto_obstack.
9992 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9993 * rust-exp.y (work_obstack): Now an auto_obstack.
9994 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9995 reinitializing and freeing the obstack.
9996 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9997 (host_char_to_target): Use auto_obstack.
9998 * utils.h (make_cleanup_obstack_free): Delete declaration.
9999 * valprint.c (generic_emit_char, generic_printstr): Use
10000 auto_obstack.
10001
10002 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10003
10004 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10005 thread.
10006 (darwin_init_thread_list): Don't update dummy thread.
10007 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10008
10009 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10010
10011 * record-full.c (netorder16): Remove.
10012
10013 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10014
10015 * common/diagnostics.h: Define macros for GCC.
10016 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10017 * common/vec.h: Include diagnostics.h.
10018 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10019 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10020 warning.
10021
10022 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10023
10024 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10025 New macro.
10026 * ada-lex.l: Ignore deprecated register warnings.
10027
10028 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10029
10030 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10031 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10032
10033 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10034
10035 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10036 its own line.
10037
10038 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10039
10040 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10041
10042 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10043
10044 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10045 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10046 (xtensa_register_read_masked): Likewise.
10047
10048 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10049
10050 * common/environ.c (gdb_environ::unset): Update comment.
10051
10052 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10053
10054 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10055 registers.
10056
10057 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10058
10059 * record-full.c (record_full_exec_insn): Use byte_vector.
10060
10061 2017-06-22 Yao Qi <yao.qi@linaro.org>
10062
10063 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10064 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10065
10066 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10067
10068 * remote.c (cached_reg): Move from here...
10069 * regcache.h (cached_reg): ...to here.
10070 * python/py-unwind.c (struct reg_info): Remove.
10071 (cached_frame_info): Use cached_reg_t.
10072 (pyuw_prev_register): Likewise.
10073 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10074 (pyuw_dealloc_cache): Free all registers.
10075
10076 2017-06-22 Pedro Alves <palves@redhat.com>
10077 Simon Marchi <simon.marchi@ericsson.com>
10078
10079 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10080 warning.
10081 * common/diagnostics.h: New file.
10082
10083 2017-06-22 Pedro Alves <palves@redhat.com>
10084
10085 * common/agent.h: Add include guards.
10086
10087 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10088
10089 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10090 talk about addressable units instead of bytes.
10091
10092 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10093
10094 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10095 of '::const_iterator'.
10096
10097 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10098
10099 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10100 'unittests/environ-selftests.c'.
10101 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10102 * charset.c (find_charset_names): Declare object 'iconv_env'.
10103 Update code to use 'iconv_env' object. Remove call to
10104 'free_environ'.
10105 * common/environ.c: Include <utility>.
10106 (make_environ): Delete function.
10107 (free_environ): Delete function.
10108 (gdb_environ::clear): New function.
10109 (gdb_environ::operator=): New function.
10110 (gdb_environ::get): Likewise.
10111 (environ_vector): Delete function.
10112 (set_in_environ): Delete function.
10113 (gdb_environ::set): New function.
10114 (unset_in_environ): Delete function.
10115 (gdb_environ::unset): New function.
10116 (gdb_environ::envp): Likewise.
10117 * common/environ.h: Include <vector>.
10118 (struct gdb_environ): Delete; transform into...
10119 (class gdb_environ): ... this class.
10120 (free_environ): Delete prototype.
10121 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10122 environ_vector): Likewise.
10123 * infcmd.c (run_command_1): Update code to call
10124 'envp' from 'gdb_environ' class.
10125 (environment_info): Update code to call methods from 'gdb_environ'
10126 class.
10127 (unset_environment_command): Likewise.
10128 (path_info): Likewise.
10129 (path_command): Likewise.
10130 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10131 (inferior::inferior): Initialize 'environment' using the host's
10132 information.
10133 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10134 Include "environ.h".
10135 (class inferior) <environment>: Change type from 'struct
10136 gdb_environ' to 'gdb_environ'.
10137 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10138 methods from 'gdb_environ' class.
10139 * solib.c (solib_find_1): Likewise
10140 * unittests/environ-selftests.c: New file.
10141
10142 2017-06-20 Yao Qi <yao.qi@linaro.org>
10143
10144 * features/i386/i386-linux.xml: Exchange the order of including
10145 32bit-linux.xml and 32bit-sse.xml.
10146 * features/i386/i386-linux.c: Regenerated.
10147
10148 2017-06-20 Yao Qi <yao.qi@linaro.org>
10149
10150 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10151 Delete copy ctor and assignment operator.
10152 (tdesc_type): Likewise.
10153 (tdesc_feature): Likewise.
10154 (tdesc_free_reg): Remove.
10155 (tdesc_create_reg): Use new.
10156 (tdesc_free_type): Remove.
10157 (tdesc_create_vector): Use new.
10158 (tdesc_create_union): Likewise.
10159 (tdesc_create_flags): Likewise.
10160 (tdesc_create_enum): Likewise.
10161 (tdesc_free_feature): Delete.
10162 (free_target_description): Use delete.
10163
10164 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10165
10166 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10167 registers.
10168
10169 2017-06-19 Pedro Alves <palves@redhat.com>
10170
10171 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10172 after gdb::unlinker.
10173
10174 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10175
10176 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10177 gdb_environ to access an environment variable.
10178
10179 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10180
10181 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10182 gdb_byte*.
10183
10184 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10185
10186 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10187
10188 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10189
10190 * configure: Re-generate.
10191 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10192
10193 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10194
10195 * configure: Re-generate.
10196 * warning.m4: Pass -Werror to compiler when checking for
10197 supported warning flags.
10198
10199 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10200
10201 * Makefile.in (COMPILE.pre): Add "-x c++".
10202
10203 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10204 Pedro Alves <palves@redhat.com>
10205 Yao Qi <yao.qi@linaro.org>
10206
10207 * defs.h (RequireLongest): New.
10208 (extract_integer): Declare function template.
10209 (extract_signed_integer): Remove the declaration, but define it
10210 static inline.
10211 (extract_unsigned_integer): Likewise.
10212 (store_integer): Declare function template.
10213 (store_signed_integer): Remove the declaration, but define it
10214 static inline.
10215 (store_unsigned_integer): Likewise.
10216 * findvar.c (extract_integer): New function template.
10217 (extract_signed_integer): Remove.
10218 (extract_unsigned_integer): Remove.
10219 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10220 instantiations.
10221 (store_integer): New function template.
10222 (store_signed_integer): Remove.
10223 (store_unsigned_integer): Remove.
10224 (store_integer): Explicit instantiations.
10225 * regcache.c (regcache_raw_read_signed): Update.
10226 (regcache::raw_read): New function.
10227 (regcache::raw_read_signed): Remove.
10228 (regcache::raw_read_unsigned): Remove.
10229 (regcache_raw_read_unsigned): Update.
10230 (regcache_raw_write_unsigned): Update.
10231 (regcache::raw_write_signed): Remove.
10232 (regcache::raw_write): New function.
10233 (regcache_cooked_read_signed): Update.
10234 (regcache::raw_write_unsigned): Remove.
10235 (regcache::cooked_read_signed): Remove.
10236 (regcache_cooked_read_unsigned): Update.
10237 (regcache::cooked_read_unsigned): Remove.
10238 (regcache_cooked_write_signed): Update.
10239 (regcache_cooked_write_unsigned): Update.
10240 * regcache.h (regcache) <raw_read_signed>: Remove.
10241 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10242 <raw_read, raw_write>: New.
10243 <cooked_read_signed, cooked_write_signed>: Remove.
10244 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10245 <cooked_read, cooked_write>: New.
10246 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10247 (sh64_pseudo_register_write): Update.
10248
10249 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10250
10251 * arc-tdep.c (arc_disassembler_options): New variable.
10252 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10253 of default_print_insn.
10254 (arc_delayed_print_insn): Set info->section when needed,
10255 use default_print_insn to retrieve a disassembler.
10256
10257 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10258
10259 PR gdb/21574
10260 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10261 to mention $SHELL and startup-with-shell.
10262
10263 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10264
10265 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10266
10267 2017-06-14 Yao Qi <yao.qi@linaro.org>
10268
10269 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10270 default_print_insn instead of print_insn_aarch64.
10271 * arm-tdep.c (gdb_print_insn_arm): Call
10272 default_print_insn instead of print_insn_big_arm
10273 and print_insn_little_arm.
10274 * i386-tdep.c (i386_print_insn): Call default_print_insn
10275 instead of print_insn_i386.
10276 * ia64-tdep.c (ia64_print_insn): Call
10277 default_print_insn instead of print_insn_ia64.
10278 * mips-tdep.c (gdb_print_insn_mips): Call
10279 default_print_insn instead of print_insn_big_mips
10280 and print_insn_little_mips.
10281 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10282 instead of print_insn_spu.
10283
10284 2017-06-14 Pedro Alves <palves@redhat.com>
10285
10286 * ada-lang.c: Include "common/byte-vector.h".
10287 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10288 * charset.c (wchar_iterator::iterate): Resize the vector instead
10289 of reserving it.
10290 * common/byte-vector.h: Include "common/def-vector.h".
10291 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10292 * cli/cli-dump.c: Include "common/byte-vector.h".
10293 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10294 * common/byte-vector.h: New file.
10295 * common/def-vector.h: New file.
10296 * common/default-init-alloc.h: New file.
10297 * dwarf2loc.c: Include "common/byte-vector.h".
10298 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10299 instead of reserving it.
10300 * dwarf2read.c: Include "common/byte-vector.h".
10301 (data_buf::m_vec): Now a gdb::byte_vector.
10302 * gdb_regex.c: Include "common/def-vector.h".
10303 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10304 * mi/mi-main.c: Include "common/byte-vector.h".
10305 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10306 * printcmd.c: Include "common/byte-vector.h".
10307 (print_scalar_formatted): Use gdb::byte_vector.
10308 * valprint.c: Include "common/byte-vector.h".
10309 (maybe_negate_by_bytes, print_decimal_chars): Use
10310 gdb::byte_vector.
10311
10312 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10313
10314 * darwin-nat.c: Include "nat/fork-inferior.h".
10315
10316 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10317
10318 * configure.nat: Factor out Darwin bits that are not
10319 architecture-specific. Add fork-inferior.o.
10320
10321 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10322
10323 * configure.nat: Factor out AIX bits that are not
10324 architecture-specific. Add fork-inferior.o.
10325
10326 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10327
10328 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10329 (read_pieced_value, write_pieced_value): ...here. Reduce to
10330 wrappers that just call rw_pieced_value.
10331
10332 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10333
10334 * dwarf2loc.c (write_pieced_value): When writing the data for a
10335 memory piece, use write_memory_with_notification instead of
10336 write_memory.
10337
10338 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10339
10340 * valops.c (read_value_memory): Change embedded_offset to
10341 represent a bit offset instead of a byte offset.
10342 * value.h (read_value_memory): Adjust comment.
10343
10344 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10345
10346 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10347 dest_offset_bits and source_offset_bits.
10348 (write_pieced_value): Likewise.
10349
10350 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10351
10352 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10353 given by DW_OP_bit_piece.
10354 (write_pieced_value): Likewise.
10355
10356 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10357
10358 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10359 some other preparations to the places where sufficient information
10360 is available.
10361 (write_pieced_value): Likewise.
10362
10363 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10364
10365 * dwarf2loc.c (bits_to_bytes): New function.
10366 (read_pieced_value): Fix offset calculations for register pieces
10367 on big-endian targets.
10368 (write_pieced_value): Likewise.
10369
10370 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10371
10372 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10373 (write_pieced_value): Likewise.
10374
10375 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10376
10377 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10378 transfer the source value's least significant bits, instead of its
10379 lowest-addressed ones. Rename type_len to max_offset.
10380 (read_pieced_value): Mirror above changes to write_pieced_value as
10381 applicable.
10382
10383 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10384
10385 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10386 truncate full bytes from dest_offset_bits before using it as an
10387 offset into the buffer.
10388
10389 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10390
10391 * dwarf2loc.c (write_pieced_value): Include transfer size in
10392 byte-wise check.
10393
10394 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10395
10396 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10397 calculation of this_size.
10398
10399 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10400
10401 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10402 when targeting a bit-field.
10403 (write_pieced_value): Likewise.
10404
10405 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10406
10407 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10408 (allocate_piece_closure): Drop addr_size parameter.
10409 (dwarf2_evaluate_loc_desc_full): Adjust call to
10410 allocate_piece_closure.
10411
10412 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10413
10414 PR gdb/21226
10415 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10416 the LSB end, independent of endianness.
10417
10418 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10419
10420 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10421 size capping.
10422
10423 2017-06-13 Yao Qi <yao.qi@linaro.org>
10424
10425 * mips-linux-nat.c: Move include features/mips*-linux.c to
10426 mips-linux-tdep.c.
10427 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10428 to mips-linux-tdep.c.
10429 * mips-linux-tdep.c: Include features/mips*-linux.c
10430 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10431 functions.
10432 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10433 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10434 (tdesc_mips64_dsp_linux): Declare.
10435
10436 2017-06-12 Tom Tromey <tom@tromey.com>
10437
10438 * valprint.h (val_print_type_code_int): Remove.
10439 * valprint.c (generic_val_print_int): Always call
10440 val_print_scalar_formatted.
10441 (val_print_type_code_int): Remove.
10442 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10443 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10444 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10445 * ada-valprint.c (ada_val_print_num): Use
10446 val_print_scalar_formatted.
10447
10448 2017-06-12 Tom Tromey <tom@tromey.com>
10449
10450 * printcmd.c (print_scalar_formatted): Unify the two switches.
10451 Don't convert scalars to LONGEST.
10452
10453 2017-06-12 Tom Tromey <tom@tromey.com>
10454
10455 PR exp/16225:
10456 * valprint.h (print_decimal_chars): Update.
10457 * valprint.c (maybe_negate_by_bytes): New function.
10458 (print_decimal_chars): Add "is_signed" argument.
10459 * printcmd.c (print_scalar_formatted): Update.
10460
10461 2017-06-12 Tom Tromey <tom@tromey.com>
10462
10463 PR exp/16225:
10464 * valprint.h (print_binary_chars, print_hex_chars): Update.
10465 * valprint.c (val_print_type_code_int): Update.
10466 (print_binary_chars): Add "zero_pad" argument.
10467 (emit_octal_digit): New function.
10468 (print_octal_chars): Don't zero-pad.
10469 (print_decimal_chars): Likewise.
10470 (print_hex_chars): Add "zero_pad" argument.
10471 * sh64-tdep.c (sh64_do_fp_register): Update.
10472 * regcache.c (regcache::dump): Update.
10473 * printcmd.c (print_scalar_formatted): Update.
10474 * infcmd.c (default_print_one_register_info): Update.
10475
10476 2017-06-12 Pedro Alves <palves@redhat.com>
10477 Alan Hayward <alan.hayward@arm.com>
10478
10479 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10480 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10481 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10482 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10483 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10484
10485 2017-06-12 Pedro Alves <palves@redhat.com>
10486
10487 * dwarf2read.c (mapped_symtab::data): Now a vector of
10488 symtab_index_entry instead of vector of
10489 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10490 whether an element's name is NULL instead of checking whether the
10491 element itself is NULL.
10492 (find_slot): Change return type. Adjust.
10493 (hash_expand, , add_index_entry, uniquify_cu_indices)
10494 (write_hash_table): Adjust.
10495
10496 2017-06-12 Pedro Alves <palves@redhat.com>
10497
10498 * dwarf2read.c (recursively_count_psymbols): New function.
10499 (write_psymtabs_to_index): Call it to compute number of psyms and
10500 pass estimate size of psyms_seen to unordered_set's ctor.
10501
10502 2017-06-12 Pedro Alves <palves@redhat.com>
10503
10504 * dwarf2read.c (write_hash_table): Check if key already exists
10505 before emplacing.
10506
10507 2017-06-12 Pedro Alves <palves@redhat.com>
10508
10509 * dwarf2read.c (data_buf::append_space): Rename to...
10510 (data_buf::grow): ... this, and make private. Adjust all callers.
10511 (data_buf::append_uint): New method.
10512 (add_address_entry, write_one_signatured_type)
10513 (write_psymtabs_to_index): Use it.
10514
10515 2017-06-12 Pedro Alves <palves@redhat.com>
10516
10517 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10518 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10519 (data_buf::file_write): Call ::fwrite directly.
10520
10521 2017-06-12 Pedro Alves <palves@redhat.com>
10522
10523 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10524 std::vector::erase.
10525
10526 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10527
10528 Code cleanup: C++ify .gdb_index producer.
10529 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10530 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10531 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10532 (create_strtab, add_string): Remove.
10533 (file_write, data_buf): New.
10534 (struct symtab_index_entry): Use std::vector for cu_indices.
10535 (struct mapped_symtab): Use std::vector for data.
10536 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10537 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10538 Remove.
10539 (find_slot): Change return type. Update it to the new data structures.
10540 (hash_expand, add_index_entry): Update it to the new data structures.
10541 (offset_type_compare): Remove.
10542 (uniquify_cu_indices): Update it to the new data structures.
10543 (c_str_view, c_str_view_hasher, vector_hasher): New.
10544 (add_indices_to_cpool): Remove.
10545 (write_hash_table): Update it to the new data structures.
10546 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10547 (eq_psymtab_cu_index): Remove.
10548 (psym_index_map): New typedef.
10549 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10550 reference and std::unordered_map for cu_index_htab.
10551 (add_address_entry, add_address_entry_worker, write_address_map)
10552 (write_psymbols): Update it to the new data structures.
10553 (write_obstack): Remove.
10554 (struct signatured_type_index_data): Change types_list to a data_buf
10555 reference and psyms_seen to a std::unordered_set reference.
10556 (write_one_signatured_type, recursively_write_psymbols)
10557 (write_psymtabs_to_index): Update it to the new data structures.
10558
10559 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10560
10561 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10562 separate-debug-file commands.
10563 * symfile.h (separate_debug_file_debug): New global.
10564 * symfile.c (separate_debug_file_debug): New global.
10565 (separate_debug_file_exists, find_separate_debug_file): Add
10566 debug output.
10567 (_initialize_symfile): Add "set debug separate-debug-file"
10568 command.
10569 * build-id.c (build_id_to_debug_bfd,
10570 find_separate_debug_file_by_buildid): Add debug output.
10571
10572 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10573
10574 * gdbarch.sh (displaced_step_free_closure): Remove.
10575 * gdbarch.h, gdbarch.c: Re-generate.
10576 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10577 displaced_step_free_closure.
10578 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10579 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10580 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10581 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10582 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10583 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10584 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10585 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10586 * infrun.c (displaced_step_clear): Call xfree instead of
10587 gdbarch_displaced_step_free_closure.
10588
10589 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10590
10591 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10592 NULL".
10593
10594 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10595
10596 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10597 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10598 (mn10300_push_dummy_call): Likewise.
10599
10600 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10601
10602 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10603
10604 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10605
10606 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10607
10608 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10609
10610 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10611 able to start inferiors using a shell.
10612 (New remote packets): Announce new packet "QStartupWithShell".
10613 * remote.c: Add PACKET_QStartupWithShell.
10614 (extended_remote_create_inferior): Handle new
10615 PACKET_QStartupWithShell.
10616 (remote_protocol_features) <QStartupWithShell>: New entry for
10617 PACKET_QStartupWithShell.
10618 (_initialize_remote): Call "add_packet_config_cmd" for
10619 QStartupShell.
10620
10621 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10622 Pedro Alves <palves@redhat.com>
10623
10624 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10625 and "nat/fork-inferior.h".
10626 * common/common-inferior.h: New file, with contents from
10627 "gdb/inferior.h".
10628 * commom/common-utils.c: Include "common-utils.h".
10629 (stringify_argv): New function.
10630 * common/common-utils.h (stringify_argv): New prototype.
10631 * configure.nat: Add "fork-inferior.o" as a dependency for
10632 "*linux*", "fbsd*" and "nbsd*" hosts.
10633 * corefile.c (get_exec_file): Update comment.
10634 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10635 instead of "startup_inferior".
10636 (darwin_create_inferior): Call "add_thread_silent" after
10637 "fork_inferior".
10638 * fork-child.c: Cleanup unnecessary includes.
10639 (SHELL_FILE): Move to "common/common-fork-child.c".
10640 (environ): Likewise.
10641 (exec_wrapper): Initialize.
10642 (get_exec_wrapper): New function.
10643 (breakup_args): Move to "common/common-fork-child.c"; rename to
10644 "breakup_args_for_exec".
10645 (escape_bang_in_quoted_argument): Move to
10646 "common/common-fork-child.c".
10647 (saved_ui): New variable.
10648 (prefork_hook): New function.
10649 (postfork_hook): Likewise.
10650 (postfork_child_hook): Likewise.
10651 (gdb_startup_inferior): Likewise.
10652 (fork_inferior): Move to "common/common-fork-child.c". Update
10653 function to support gdbserver.
10654 (startup_inferior): Likewise.
10655 * gdbcore.h (get_exec_file): Remove declaration.
10656 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10657 instead of "startup_inferior". Call "add_thread_silent" after
10658 "fork_inferior".
10659 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10660 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10661 instead of "startup_inferior". Call "add_thread_silent" after
10662 "fork_inferior".
10663 * inferior.h: Include "common-inferior.h".
10664 (trace_start_error): Move to "common/common-utils.h".
10665 (trace_start_error_with_name): Likewise.
10666 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10667 (startup_inferior): Likewise.
10668 (gdb_startup_inferior): New prototype.
10669 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10670 * nat/fork-inferior.h: New file.
10671 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10672 instead of "startup_inferior". Call "add_thread_silent" after
10673 "fork_inferior".
10674 * target.h (target_terminal_init): Move prototype to
10675 "target/target.h".
10676 (target_terminal_inferior): Likewise.
10677 (target_terminal_ours): Likewise.
10678 * target/target.h (target_terminal_init): New prototype, moved
10679 from "target.h".
10680 (target_terminal_inferior): Likewise.
10681 (target_terminal_ours): Likewise.
10682 * utils.c (gdb_flush_out_err): New function.
10683
10684 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10685
10686 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10687 * common/common-gdbthread.h: New file, with parts from
10688 "gdb/gdbthread.h".
10689 * gdbthread.h: Include "common-gdbthread.h".
10690 (switch_to_thread): Moved to "common/common-gdbthread.h".
10691
10692 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10693
10694 * Makefile.in (SFILES): Add "common/job-control.c".
10695 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10696 (COMMON_OBS): Add "job-control.o".
10697 * common/job-control.c: New file, with contents from
10698 "gdb/inflow.c".
10699 * common/job-control.h: New file, with contents from "terminal.h".
10700 * fork-child.c: Include "job-control.h".
10701 * inflow.c: Include "job-control.h".
10702 (gdb_setpgid): Move to "common/common-inflow.c".
10703 (_initialize_inflow): Move setting of "job_control" to
10704 "handle_job_control".
10705 * terminal.h (job_control): Moved to "common/common-terminal.h".
10706 (gdb_setpgid): Likewise.
10707 * top.c: Include "job_control.h".
10708 * utils.c: Likewise.
10709 (job_control): Moved to "job-control.c".
10710
10711 2017-06-07 Pedro Alves <palves@redhat.com>
10712
10713 * Makefile.in (SFILES): Add gdb_regex.c.
10714 (COMMON_OBS): Add gdb_regex.o.
10715 * ada-lang.c (ada_add_standard_exceptions)
10716 (ada_add_exceptions_from_frame, name_matches_regex)
10717 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10718 parameter type to compiled_regex. Adjust.
10719 (ada_exceptions_list): Use compiled_regex.
10720 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10721 std::unique_ptr<compiled_regex>.
10722 (exception_catchpoint::~exception_catchpoint): Remove regfree
10723 call.
10724 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10725 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10726 * breakpoint.c (solib_catchpoint::compiled): Now a
10727 std::unique_ptr<compiled_regex>.
10728 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10729 (check_status_catch_solib): Adjust to use compiled_regex.
10730 (add_solib_catchpoint): Adjust to use compiled_regex.
10731 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10732 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10733 compiled_regex reference. Adjust to use it.
10734 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10735 declaration. Include "gdb_regex.h".
10736 (apropos_cmd): Change regex parameter to compiled_regex reference.
10737 * gdb_regex.c: New file.
10738 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10739 declarations.
10740 (class compiled_regex): New.
10741 * linux-tdep.c: Include "common/gdb_optional.h".
10742 (struct mapping_regexes): New, factored out from
10743 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10744 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10745 gdb::optional and remove cleanups. Adjust to compiled_regex.
10746 * probe.c: Include "common/gdb_optional.h".
10747 (collect_probes): Use compiled_regex and gdb::optional and remove
10748 cleanups.
10749 * skip.c: Include "common/gdb_optional.h".
10750 (skiplist_entry::compiled_function_regexp): Now a
10751 gdb::optional<compiled_regex>.
10752 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10753 (free_skiplist_entry): Remove regfree call.
10754 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10755 compiled_regex and gdb::optional.
10756 * symtab.c: Include "common/gdb_optional.h".
10757 (search_symbols): Use compiled_regex and gdb::optional.
10758 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10759 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10760 to gdb_regex.c.
10761
10762 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10763
10764 * regcache.c (regcache::save): Avoid buffer use.
10765 (regcache::dump): Likewise.
10766
10767 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10768
10769 * sh-tdep.c (sh_pseudo_register_read): Remove
10770 MAX_REGISTER_SIZE.
10771 (sh_pseudo_register_write): Likewise.
10772 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10773 (sh64_pseudo_register_write): Likewise
10774
10775 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10776
10777 * aarch64-tdep.c (aarch64_store_return_value): Use
10778 V_REGISTER_SIZE.
10779 (aarch64_pseudo_read_value): Likewise.
10780 (aarch64_pseudo_write): Likewise.
10781
10782 2017-06-06 Yao Qi <yao.qi@linaro.org>
10783
10784 * regformats/regdef.h (set_register_cache): Remove the
10785 declaration.
10786
10787 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10788
10789 * frame.c (frame_unwind_register_signed): Use
10790 frame_unwind_register_value.
10791
10792 2017-06-06 Pedro Alves <palves@redhat.com>
10793
10794 PR breakpoints/21553
10795 * breakpoint.c (create_breakpoints_sal_default)
10796 (init_breakpoint_sal, create_breakpoint_sal): Use
10797 gdb::unique_xmalloc_ptr for string parameters.
10798 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10799 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10800 (base_breakpoint_create_breakpoints_sal)
10801 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10802 (strace_marker_create_breakpoints_sal)
10803 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10804 string parameters.
10805 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10806 gdb::unique_xmalloc_ptr for string parameters.
10807 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10808 parameters.
10809
10810 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10811
10812 * alpha-tdep.c (alpha_register_to_value): Use
10813 get_frame_register_value.
10814 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10815
10816 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10817
10818 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10819 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10820 (ia64_value_to_register): Likewise.
10821 (ia64_extract_return_value): Likewise.
10822 (ia64_store_return_value): Likewise.
10823 (ia64_push_dummy_call): Likewise.
10824
10825 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10826
10827 GDB 8.0 released.
10828
10829 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10830
10831 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10832
10833 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10834
10835 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10836 parameter.
10837 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10838
10839 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10840
10841 * event-loop.c (poll_timers): Unallocate timer using delete
10842 instead of xfree.
10843
10844 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10845
10846 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10847 (struct breakpoint) <~breakpoint>: New.
10848 (struct watchpoint): Inherit from breakpoint.
10849 <~watchpoint>: New.
10850 <base>: Remove.
10851 (struct tracepoint): Inherit from breakpoint.
10852 <base>: Remove.
10853 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10854 (struct longjmp_breakpoint): Inherit from breakpoint.
10855 <~longjmp_breakpoint>: New.
10856 <base>: Remove.
10857 (new_breakpoint_from_type): Remove casts.
10858 (watchpoint_in_thread_scope): Remove reference to base field.
10859 (watchpoint_del_at_next_stop): Likewise.
10860 (update_watchpoint): Likewise.
10861 (watchpoint_check): Likewise.
10862 (bpstat_check_watchpoint): Likewise.
10863 (set_longjmp_breakpoint): Likewise.
10864 (struct fork_catchpoint): Inherit from breakpoint.
10865 <base>: Remove.
10866 (struct solib_catchpoint): Inherit from breakpoint.
10867 <~solib_catchpoint>: New.
10868 <base>: Remove.
10869 (dtor_catch_solib): Change to ...
10870 (solib_catchpoint::~solib_catchpoint): ... this.
10871 (breakpoint_hit_catch_solib): Remove reference to base field.
10872 (add_solib_catchpoint): Likewise.
10873 (create_fork_vfork_event_catchpoint): Likewise.
10874 (struct exec_catchpoint): Inherit from breakpoint.
10875 <~exec_catchpoint>: New.
10876 <base>: Remove.
10877 (dtor_catch_exec): Change to ...
10878 (exec_catchpoint::~exec_catchpoint): ... this.
10879 (dtor_watchpoint): Change to ...
10880 (watchpoint::~watchpoint): ... this.
10881 (watch_command_1): Remove reference to base field.
10882 (catch_exec_command_1): Likewise.
10883 (base_breakpoint_dtor): Change to ...
10884 (breakpoint::~breakpoint): ... this.
10885 (base_breakpoint_ops): Remove dtor field value.
10886 (longjmp_bkpt_dtor): Change to ...
10887 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10888 (strace_marker_create_breakpoints_sal): Remove reference to base
10889 field.
10890 (delete_breakpoint): Don't manually call breakpoint destructor.
10891 (create_tracepoint_from_upload): Remove reference to base field.
10892 (trace_pass_set_count): Likewise.
10893 (initialize_breakpoint_ops): Don't initialize
10894 momentary_breakpoint_ops, don't set dtors.
10895 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10896 <~ada_catchpoint>: New.
10897 <base>: Remove.
10898 (create_excep_cond_exprs): Remove reference to base field.
10899 (dtor_exception): Change to ...
10900 (ada_catchpoint::~ada_catchpoint): ... this.
10901 (dtor_catch_exception): Remove.
10902 (dtor_catch_exception_unhandled): Remove.
10903 (dtor_catch_assert): Remove.
10904 (create_ada_exception_catchpoint): Remove reference to base
10905 field.
10906 (initialize_ada_catchpoint_ops): Don't set dtors.
10907 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10908 breakpoint.
10909 <~signal_catchpoint>: New.
10910 <base>: Remove.
10911 (signal_catchpoint_dtor): Change to ...
10912 (signal_catchpoint::~signal_catchpoint): ... this.
10913 (create_signal_catchpoint): Remove reference to base field.
10914 (initialize_signal_catchpoint_ops): Don't set dtor.
10915 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10916 from breakpoint.
10917 <~syscall_catchpoint>: New.
10918 <base>: Remove.
10919 (dtor_catch_syscall): Change to ...
10920 (syscall_catchpoint::~syscall_catchpoint): ... this.
10921 (create_syscall_event_catchpoint): Remove reference to base
10922 field.
10923 (initialize_syscall_catchpoint_ops): Don't set dtor.
10924 * break-catch-throw.c (struct exception_catchpoint): Inherit
10925 from breakpoint.
10926 <~exception_catchpoint>: New.
10927 <base>: Remove.
10928 (dtor_exception_catchpoint): Change to ...
10929 (exception_catchpoint::~exception_catchpoint): ... this.
10930 (handle_gnu_v3_exceptions): Remove reference to base field.
10931 (initialize_throw_catchpoint_ops): Don't set dtor.
10932 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10933 field.
10934 * remote.c (remote_get_tracepoint_status): Likewise.
10935 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10936 * tracefile.c (tracefile_fetch_registers): Likewise.
10937 * tracepoint.c (actions_command): Likewise.
10938 (validate_actionline): Likewise.
10939 (tfind_1): Likewise.
10940 (get_traceframe_location): Likewise.
10941 (find_matching_tracepoint_location): Likewise.
10942 (parse_tracepoint_status): Likewise.
10943 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10944
10945 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10946
10947 * breakpoint.c (struct longjmp_breakpoint): New struct.
10948 (is_tracepoint_type): Change return type to bool.
10949 (is_longjmp_type): New function.
10950 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10951 (set_raw_breakpoint_without_location): Use
10952 new_breakpoint_from_type.
10953 (set_raw_breakpoint): Likewise.
10954
10955 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10956
10957 * breakpoint.c (new_breakpoint_from_type): New function.
10958 (create_breakpoint_sal): Use new_breakpoint_from_type and
10959 unique_ptr.
10960 (create_breakpoint): Likewise.
10961
10962 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10963
10964 * memattr.c (mem_info_command): Rename to ...
10965 (info_mem_command): ... this.
10966 (mem_enable_command): Rename to ...
10967 (enable_mem_command): ... this.
10968 (mem_disable_command): Rename to ...
10969 (disable_mem_command): ... this.
10970 (mem_delete_command): Rename to ...
10971 (delete_mem_command): ... this.
10972 (_initialize_mem): Adjust function names.
10973
10974 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10975
10976 * btrace.c (handle_pt_insn_events): New.
10977 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10978 STATUS. Split into this and ...
10979 (handle_pt_insn_event_flags): ... this.
10980
10981 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10982
10983 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10984 and struct pt_insn.resynced.
10985 * configure: Regenerated.
10986 * config.in: Regenerated.
10987
10988 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10989
10990 * btrace.c (ftrace_find_call_by_number): New function.
10991 (ftrace_new_function): Store objects, not pointers.
10992 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10993 ftrace_new_gap, ftrace_update_function,
10994 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10995 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10996 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10997 btrace_ends_with_single_insn, btrace_call_get): Account for
10998 btrace_thread_info::functions now storing objects.
10999 * btrace.h (struct btrace_thread_info): Add constructor.
11000 (struct btrace_thread_info) <functions>: Make std::vector.
11001 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11002 Initialize with default values.
11003 * record-btrace.c (record_btrace_frame_sniffer): Account for
11004 btrace_thread_info::functions now storing objects.
11005
11006 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11007
11008 * btrace.c: Remove typedef bfun_s.
11009 (ftrace_new_gap): Directly add gaps to the list of gaps.
11010 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11011 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11012 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11013 instead of gdb VEC.
11014
11015 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11016
11017 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11018 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11019 with btrace_thread_info::next_segment and
11020 btrace_thread_info::prev_segment.
11021 * btrace.h: Remove struct btrace_func_link.
11022 (struct btrace_function): Replace pair of function segment pointers
11023 with pair of indices.
11024 * python/py-record-btrace.c (btpy_call_prev_sibling,
11025 btpy_call_next_sibling): Replace references to
11026 btrace_thread_info::segment with btrace_thread_info::next_segment and
11027 btrace_thread_info::prev_segment.
11028 * record-btrace.c (record_btrace_frame_this_id): Use
11029 btrace_find_call_by_number.
11030
11031 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11032
11033 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11034 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11035 btrace_insn_next, btrace_insn_prev): Remove references to
11036 btrace_thread_info::flow.
11037 * btrace.h (struct btrace_function): Remove FLOW.
11038
11039 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11040
11041 * btrace.c (ftrace_find_call_by_number): New function.
11042 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11043 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11044 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11045 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11046 index.
11047 * btrace.h (struct btrace_function): Turn UP into an index.
11048 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11049 as an index.
11050 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11051 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11052 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11053
11054 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11055
11056 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11057 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11058 ftrace_update_function, ftrace_compute_global_level_offset,
11059 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11060 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11061 btrace_insn_end, btrace_is_empty): Remove references to
11062 btrace_thread_info::begin and btrace_thread_info::end.
11063 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11064 (struct btrace_thread_info) <functions>: Adjust comment.
11065 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11066 btrace_thread_info::begin.
11067
11068 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11069
11070 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11071 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11072 ftrace_update_function): Remove arguments that implicitly were always
11073 BTINFO->END.
11074 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11075 Don't pass BTINFO->END.
11076
11077 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11078
11079 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11080 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11081 btrace_find_insn_by_number): Replace function segment pointer with
11082 index.
11083 (btrace_insn_cmp): Simplify.
11084 * btrace.h: (struct btrace_insn_iterator) Rename index to
11085 insn_index. Replace function segment pointer with index into function
11086 segment vector.
11087 * record-btrace.c (record_btrace_call_history): Replace function
11088 segment pointer use with index.
11089 (record_btrace_frame_sniffer): Retrieve function call segment through
11090 vector.
11091 (record_btrace_set_replay): Remove defunc't safety check.
11092
11093 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11094
11095 * btrace.c (btrace_ends_with_single_insn): New function.
11096 (btrace_call_get, btrace_call_number, btrace_call_begin,
11097 btrace_call_end, btrace_call_next, btrace_call_prev,
11098 btrace_find_call_by_number): Use index into call segment vector
11099 instead of pointer.
11100 (btrace_call_cmp): Simplify.
11101 * btrace.h (struct btrace_call_iterator): Replace function call segment
11102 pointer with index into vector.
11103 * record-btrace.c (record_btrace_call_history): Use index instead of
11104 pointer.
11105
11106 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11107
11108 * btrace.c (btrace_insn_begin, btrace_insn_end,
11109 btrace_find_insn_by_number): Add btinfo to iterator.
11110 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11111
11112 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11113
11114 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11115 and save pointers directly.
11116 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11117 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11118 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11119 changed signature of functions.
11120 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11121 (btrace_fetch): Remove code that adds btrace_function pointers to
11122 vector of btrace_functions.
11123 (btrace_clear): Simplify freeing vector of btrace_functions.
11124
11125 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11126
11127 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11128 Replace VEC_* with std::vector functions.
11129 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11130 (struct btrace_thread_info)<functions>: Change type to std::vector.
11131
11132 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11133
11134 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11135 "Removed targets and native configurations" up. Merge duplicate
11136 "New commands" sub-sections. Add "New options" sub-sections.
11137
11138 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11139
11140 * defs.h (copy_integer_to_size): New declaration.
11141 * findvar.c (copy_integer_to_size): New function.
11142 (do_cint_test): New selftest function.
11143 (copy_integer_to_size_test): Likewise.
11144 (_initialize_findvar): Likewise.
11145 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11146 (mips_fbsd_collect_reg): Use raw_collect_integer.
11147 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11148 (mips64_fill_gregset): Use raw_collect_integer
11149 (mips64_fill_fpregset): Use raw_supply_integer.
11150 * regcache.c (regcache::raw_supply_integer): New function.
11151 (regcache::raw_collect_integer): Likewise.
11152 * regcache.h: (regcache::raw_supply_integer): New declaration.
11153 (regcache::raw_collect_integer): Likewise.
11154
11155 2017-05-24 Yao Qi <yao.qi@linaro.org>
11156
11157 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11158 (COMMON_OBS): Add gdbarch-selftests.o.
11159 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11160 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11161 * gdbarch-selftests.c: New file.
11162 * regcache.h (regcache) <~regcache>: Mark it virtual if
11163 GDB_SELF_TEST.
11164 <raw_write>: Likewise.
11165
11166 2017-05-24 Yao Qi <yao.qi@linaro.org>
11167
11168 * regcache.c (current_regcache): Change it to
11169 regcache::current_regcache.
11170 (regcache_observer_target_changed): Update.
11171 (regcache_thread_ptid_changed): Make it a regcache static
11172 method.
11173 (regcache_thread_ptid_changed): Update.
11174 (class regcache_access): New.
11175 (current_regcache_test): Update.
11176 (_initialize_regcache): Update.
11177 * regcache.h: Include forward_list.
11178 (regcache): Declare regcache_thread_ptid_changed and declare
11179 registers_changed_ptid as friend.
11180
11181 2017-05-24 Yao Qi <yao.qi@linaro.org>
11182
11183 * i387-tdep.c (i387_register_to_value): Use register_size
11184 instead of TYPE_LENGTH.
11185 * m68k-tdep.c (m68k_register_to_value): Likewise.
11186
11187 2017-05-24 Yao Qi <yao.qi@linaro.org>
11188
11189 * i387-tdep.c (i387_convert_register_p): Return false if type
11190 code isn't TYPE_CODE_FLT.
11191
11192 2017-05-24 Yao Qi <yao.qi@linaro.org>
11193
11194 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11195 length is 4.
11196 (alpha_register_to_value): Remove type length check.
11197 (alpha_value_to_register): Likewise.
11198
11199 2017-05-24 Yao Qi <yao.qi@linaro.org>
11200
11201 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11202 TYPE_CODE_FLT.
11203
11204 2017-05-24 Yao Qi <yao.qi@linaro.org>
11205
11206 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11207 TYPE_CODE_FLT or not.
11208
11209 2017-05-24 Yao Qi <yao.qi@linaro.org>
11210
11211 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11212 * avr-tdep.c (avr_gdbarch_init): Likewise.
11213 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11214 * cris-tdep.c (cris_gdbarch_init): Likewise.
11215 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11216 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11217 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11218 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11219 * mep-tdep.c (mep_gdbarch_init): Likewise.
11220 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11221 * mips-tdep.c (mips_gdbarch_init): Likewise.
11222 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11223 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11224 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11225 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11226 * v850-tdep.c (v850_gdbarch_init): Likewise.
11227
11228 2017-05-24 Yao Qi <yao.qi@linaro.org>
11229
11230 * selftest-arch.c (tests_with_arch): Call registers_changed
11231 and reinit_frame_cache.
11232 * selftest.c (run_self_tests): Likewise.
11233
11234 2017-05-24 Yao Qi <yao.qi@linaro.org>
11235
11236 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11237 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11238
11239 2017-05-24 Yao Qi <yao.qi@linaro.org>
11240
11241 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11242 set_gdbarch_print_insn.
11243
11244 2017-05-24 Yao Qi <yao.qi@linaro.org>
11245
11246 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11247 set_gdbarch_print_insn.
11248
11249 2017-05-24 Yao Qi <yao.qi@linaro.org>
11250
11251 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11252 set_gdbarch_print_insn.
11253 * arc-tdep.c (arc_gdbarch_init): Likewise.
11254 * arch-utils.c: include dis-asm.h.
11255 (default_print_insn): New function.
11256 * arch-utils.h (default_print_insn): Declare.
11257 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11258 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11259 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11260 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11261 * frv-tdep.c (frv_gdbarch_init): Likewise.
11262 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11263 * gdbarch.sh (print_insn): Use default_print_insn.
11264 * gdbarch.c: Regenerated.
11265 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11266 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11267 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11268 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11269 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11270 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11271 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11272 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11273 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11274 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11275 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11276 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11277 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11278 * mt-tdep.c (mt_gdbarch_init): Likewise.
11279 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11280 * nios2-tdep.c (nios2_print_insn): Remove.
11281 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11282 * rx-tdep.c (rx_gdbarch_init): Likewise.
11283 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11284 * score-tdep.c (score_print_insn): Remove.
11285 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11286 * sh-tdep.c (sh_gdbarch_init): Likewise.
11287 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11288 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11289 * tic6x-tdep.c (tic6x_print_insn): Remove.
11290 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11291 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11292 * v850-tdep.c (v850_gdbarch_init): Likewise.
11293 * vax-tdep.c (vax_gdbarch_init): Likewise.
11294 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11295 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11296
11297 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11298
11299 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11300 (MIPS_FP0_REGNUM): Remove.
11301 (MIPS_FSR_REGNUM): Remove.
11302 (mips_fbsd_supply_fpregs): Use mips_regnum.
11303 (mips_fbsd_supply_gregs): Likewise.
11304 (mips_fbsd_collect_fpregs): Likewise.
11305 (mips_fbsd_collect_gregs): Likewise.
11306
11307 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11308
11309 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11310 (getpfpregs_supplies): New function.
11311 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11312 getfpregs_supplies.
11313 (mips_fbsd_store_inferior_registers): Likewise.
11314
11315 2017-05-22 Pedro Alves <palves@redhat.com>
11316
11317 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11318 maintainer.
11319
11320 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11321
11322 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11323 (store_register): Likewise.
11324 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11325 (get_decimal_float_return_value): Likewise.
11326 (do_ppc_sysv_return_value): Likewise.
11327 (ppc64_sysv_abi_push_integer): Likewise.
11328 (ppc64_sysv_abi_push_freg): Likewise.
11329 (ppc64_sysv_abi_return_value_base): Likewise.
11330 (ppc64_sysv_abi_return_value): Likewise.
11331 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11332 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11333 * rs6000-nat.c: Likewise.
11334 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11335 (rs6000_value_to_register): Likewise.
11336 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11337
11338 2017-05-21 Tom Tromey <tom@tromey.com>
11339
11340 PR rust/21466:
11341 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11342 arrays as "[T]", not "[T; ]".
11343
11344 2017-05-19 Tom Tromey <tom@tromey.com>
11345
11346 PR rust/21484:
11347 * rust-lang.c (exp_descriptor_rust): New function.
11348 (rust_language_defn): Use it.
11349 * p-lang.c (pascal_language_defn): Update.
11350 * opencl-lang.c (opencl_language_defn): Update.
11351 * objc-lang.c (objc_language_defn): Update.
11352 * m2-lang.c (m2_language_defn): Update.
11353 * language.h (struct language_defn)
11354 <la_watch_location_expression>: New member.
11355 * language.c (unknown_language_defn, auto_language_defn)
11356 (local_language_defn): Update.
11357 * go-lang.c (go_language_defn): Update.
11358 * f-lang.c (f_language_defn): Update.
11359 * d-lang.c (d_language_defn): Update.
11360 * c-lang.h (c_watch_location_expression): Declare.
11361 * c-lang.c (c_watch_location_expression): New function.
11362 (c_language_defn, cplus_language_defn, asm_language_defn)
11363 (minimal_language_defn): Use it.
11364 * breakpoint.c (watch_command_1): Call
11365 la_watch_location_expression.
11366 * ada-lang.c (ada_language_defn): Update.
11367
11368 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11369
11370 PR tui/21482
11371 * gdb_curses.h (NOMACROS): Define.
11372 (NCURSES_NOMACROS): Define.
11373
11374 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11375
11376 PR tui/21482
11377 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11378 arg to char *.
11379 * tui/tui-wingeneral.c (box_win): Likewise.
11380 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11381 (tui_show_source_line): Likewise.
11382 (tui_show_exec_info_content): Likewise.
11383
11384 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11385
11386 * sparc-tdep.c (sparc_structure_return_p)
11387 (sparc_arg_on_registers_p): New functions.
11388 (sparc32_store_arguments): Use them.
11389 * sparc64-tdep.c (sparc64_16_byte_align_p)
11390 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11391 Handle TYPE_CODE_ARRAY.
11392
11393 2017-05-17 Yao Qi <yao.qi@linaro.org>
11394
11395 * cli/cli-decode.c (add_alias_cmd): New function.
11396 * command.h (add_alias_cmd): Declare.
11397 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11398 instead call add_alias_cmd.
11399
11400 2017-05-17 Pedro Alves <palves@redhat.com>
11401
11402 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11403 (nat_makefile_frag): ... this. All references updated.
11404 * configure.ac: Likewise.
11405 * configure.nat: Likewise. Enhance comments.
11406 * configure: Regenerate.
11407
11408 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11409
11410 * procfs.c (procfs_create_inferior): Change prototype to match
11411 definition.
11412
11413 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11414
11415 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11416 C++ compiler warning.
11417
11418 2017-05-12 Tom Tromey <tom@tromey.com>
11419
11420 PR rust/21483:
11421 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11422 recurse, just call value_struct_elt directly.
11423
11424 2017-05-12 Tom Tromey <tom@tromey.com>
11425
11426 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11427 OP_RUST_ARRAY>: Fix.
11428
11429 2017-05-12 Tom Tromey <tom@tromey.com>
11430
11431 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11432
11433 2017-05-09 Yao Qi <yao.qi@linaro.org>
11434
11435 * regcache.c: Include <forward_list>.
11436 (struct regcache_list): Remove.
11437 (current_regcache): Update.
11438 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11439 (regcache_thread_ptid_changed): Likewise.
11440 (registers_changed_ptid): Likewise.
11441 (current_regcache_size): Likewise.
11442
11443 2017-05-09 Yao Qi <yao.qi@linaro.org>
11444
11445 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11446 (current_regcache_size): New function.
11447 (current_regcache_test): New function.
11448 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11449
11450 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11451
11452 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11453 (print_gp_register_row): Use get_frame_register_value.
11454
11455 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11456
11457 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11458 (mips_supply_fpregset): Likewise.
11459 (mips64_supply_gregset): Likewise.
11460
11461 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11462
11463 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11464 regcache->raw_supply_zeroed.
11465
11466 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11467
11468 * configure.nat: Rearrange 'case' statements to match
11469 host before cpu.
11470
11471 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11472
11473 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11474 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11475 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11476 "@nat_extra_makefile_frag@".
11477 (Makefile): Remove dependency on "@frags@".
11478 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11479 (data-directory/Makefile): Likewise.
11480 * config/aarch64/linux.mh: Deleted; moved contents to
11481 "gdb/configure.nat".
11482 * config/alpha/alpha-linux.mh: Likewise.
11483 * config/alpha/nbsd.mh: Likewise.
11484 * config/arm/linux.mh: Likewise.
11485 * config/arm/nbsdelf.mh: Likewise.
11486 * config/i386/cygwin.mh: Likewise.
11487 * config/i386/cygwin64.mh: Likewise.
11488 * config/i386/darwin.mh: Likewise.
11489 * config/i386/fbsd.mh: Likewise.
11490 * config/i386/fbsd64.mh: Likewise.
11491 * config/i386/go32.mh: Likewise.
11492 * config/i386/i386gnu.mh: Likewise.
11493 * config/i386/i386sol2.mh: Likewise.
11494 * config/i386/linux.mh: Likewise.
11495 * config/i386/linux64.mh: Likewise.
11496 * config/i386/mingw.mh: Likewise.
11497 * config/i386/mingw64.mh: Likewise.
11498 * config/i386/nbsd64.mh: Likewise.
11499 * config/i386/nbsdelf.mh: Likewise.
11500 * config/i386/nto.mh: Likewise.
11501 * config/i386/obsd.mh: Likewise.
11502 * config/i386/obsd64.mh: Likewise.
11503 * config/i386/sol2-64.mh: Likewise.
11504 * config/ia64/linux.mh: Likewise.
11505 * config/m32r/linux.mh: Likewise.
11506 * config/m68k/linux.mh: Likewise.
11507 * config/m68k/nbsdelf.mh: Likewise.
11508 * config/m68k/obsd.mh: Likewise.
11509 * config/m88k/obsd.mh: Likewise.
11510 * config/mips/fbsd.mh: Likewise.
11511 * config/mips/linux.mh: Likewise.
11512 * config/mips/nbsd.mh: Likewise.
11513 * config/mips/obsd64.mh: Likewise.
11514 * config/pa/linux.mh: Likewise.
11515 * config/pa/nbsd.mh: Likewise.
11516 * config/pa/obsd.mh: Likewise.
11517 * config/powerpc/aix.mh: Likewise.
11518 * config/powerpc/fbsd.mh: Likewise.
11519 * config/powerpc/linux.mh: Likewise.
11520 * config/powerpc/nbsd.mh: Likewise.
11521 * config/powerpc/obsd.mh: Likewise.
11522 * config/powerpc/ppc64-linux.mh: Likewise.
11523 * config/powerpc/spu-linux.mh: Likewise.
11524 * config/s390/linux.mh: Likewise.
11525 * config/sh/nbsd.mh: Likewise.
11526 * config/sparc/fbsd.mh: Likewise.
11527 * config/sparc/linux.mh: Likewise.
11528 * config/sparc/linux64.mh: Likewise.
11529 * config/sparc/nbsd64.mh: Likewise.
11530 * config/sparc/nbsdelf.mh: Likewise.
11531 * config/sparc/obsd64.mh: Likewise.
11532 * config/sparc/sol2.mh: Likewise.
11533 * config/tilegx/linux.mh: Likewise.
11534 * config/vax/nbsdelf.mh: Likewise.
11535 * config/vax/obsd.mh: Likewise.
11536 * config/xtensa/linux.mh: Likewise.
11537 * config/i386/i386gnu.mn: New file, with excerpts from
11538 "config/i386/i386gnu.mh".
11539 * configure: Regenerate.
11540 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11541 *.mh files under "gdb/config".
11542 * configure.nat: New file, with contents from the
11543 "gdb/config/*/*.mh" files.
11544
11545 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11546
11547 * btrace.c (btrace_clear): Free insn vector.
11548
11549 2017-05-05 Pedro Alves <palves@redhat.com>
11550
11551 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11552 * configure: Regenerate.
11553
11554 2017-05-04 Pedro Alves <palves@redhat.com>
11555
11556 * Makefile.in (SFILES): Add progspace-and-thread.c.
11557 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11558 (COMMON_OBS): Add progspace-and-thread.o.
11559 * breakpoint.c: Include "progspace-and-thread.h".
11560 (update_inserted_breakpoint_locations)
11561 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11562 Use scoped_restore_current_pspace_and_thread.
11563 (create_std_terminate_master_breakpoint): Use
11564 scoped_restore_current_program_space.
11565 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11566 (print_breakpoint_location): Use
11567 scoped_restore_current_program_space.
11568 (bp_loc_is_permanent): Use
11569 scoped_restore_current_pspace_and_thread.
11570 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11571 (download_tracepoint_locations): Use
11572 scoped_restore_current_pspace_and_thread.
11573 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11574 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11575 (enum step_over_calls_kind): Moved from inferior.h.
11576 (class scoped_restore_current_thread): New class.
11577 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11578 declaration.
11579 (scoped_restore_current_thread): New class.
11580 * infcmd.c: Include "common/gdb_optional.h".
11581 (continue_1, proceed_after_attach): Use
11582 scoped_restore_current_thread.
11583 (notice_new_inferior): Use scoped_restore_current_thread.
11584 * inferior.c: Include "progspace-and-thread.h".
11585 (restore_inferior, save_current_inferior): Delete.
11586 (add_inferior_command, clone_inferior_command): Use
11587 scoped_restore_current_pspace_and_thread.
11588 * inferior.h (scoped_restore_current_inferior): New class.
11589 * infrun.c: Include "progspace-and-thread.h" and
11590 "common/gdb_optional.h".
11591 (follow_fork_inferior): Use
11592 scoped_restore_current_pspace_and_thread.
11593 (scoped_restore_exited_inferior): New class.
11594 (handle_vfork_child_exec_or_exit): Use
11595 scoped_restore_exited_inferior,
11596 scoped_restore_current_pspace_and_thread,
11597 scoped_restore_current_thread and scoped_restore.
11598 (fetch_inferior_event): Use scoped_restore_current_thread.
11599 * linespec.c (decode_line_full, decode_line_1): Use
11600 scoped_restore_current_program_space.
11601 * mi/mi-main.c: Include "progspace-and-thread.h".
11602 (exec_continue): Use scoped_restore_current_thread.
11603 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11604 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11605 * proc-service.c (ps_pglobal_lookup): Use
11606 scoped_restore_current_program_space.
11607 * progspace-and-thread.c: New file.
11608 * progspace-and-thread.h: New file.
11609 * progspace.c (release_program_space, clone_program_space): Use
11610 scoped_restore_current_program_space.
11611 (restore_program_space, save_current_program_space)
11612 (save_current_space_and_thread): Delete.
11613 (switch_to_program_space_and_thread): Moved to
11614 progspace-and-thread.c.
11615 * progspace.h (save_current_program_space)
11616 (save_current_space_and_thread): Delete declarations.
11617 (scoped_restore_current_program_space): New class.
11618 * remote.c (remote_btrace_maybe_reopen): Use
11619 scoped_restore_current_thread.
11620 * symtab.c: Include "progspace-and-thread.h".
11621 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11622 * thread.c (print_thread_info_1): Use
11623 scoped_restore_current_thread.
11624 (struct current_thread_cleanup): Delete.
11625 (do_restore_current_thread_cleanup)
11626 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11627 (scoped_restore_current_thread::~scoped_restore_current_thread):
11628 ... this new dtor.
11629 (make_cleanup_restore_current_thread): Rename/convert to ...
11630 (scoped_restore_current_thread::scoped_restore_current_thread):
11631 ... this new ctor.
11632 (thread_apply_all_command): Use scoped_restore_current_thread.
11633 (thread_apply_command): Use scoped_restore_current_thread.
11634 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11635 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11636
11637 2017-05-04 Pedro Alves <palves@redhat.com>
11638
11639 * thread.c (make_cleanup_restore_current_thread): Move
11640 find_thread_ptid call before the is_stopped call. Assert that the
11641 thread is found. Replace is_stopped call by checking the thread's
11642 state directly. Remove unnecessary NULL-thread check.
11643
11644 2017-05-04 Pedro Alves <palves@redhat.com>
11645
11646 * corelow.c (thread_section_name): New class.
11647 (get_core_register_section, get_core_siginfo): Use it.
11648
11649 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11650
11651 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11652 (get_core_register_section): Remove xfree of NULL pointer.
11653
11654 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11655
11656 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11657 * regcache.c (regcache::raw_supply_zeroed): New function.
11658 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11659
11660 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11661
11662 * gdbarch.sh: Remove commented out definition of
11663 TARGET_CHAR_BIT.
11664 * gdbarch.h: Re-generate.
11665
11666 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11667
11668 * configure: Regenerate.
11669
11670 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11671
11672 * solib-target.c (solib_target_relocate_section_addresses):
11673 Remove num_section_bases, num_bases, segment_bases variables.
11674
11675 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11676
11677 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11678
11679 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11680
11681 * solib-target.c: Include <vector>
11682 (struct lm_info_target) <~lm_info_target>: Remove.
11683 <segment_bases, section_bases>: Change type to
11684 std::vector<CORE_ADDR>.
11685 (library_list_start_segment, library_list_start_section,
11686 library_list_end_library,
11687 solib_target_relocate_section_addresses): Adjust.
11688
11689 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11690
11691 * gdbarch.sh (software_single_step): Change return type to
11692 std::vector<CORE_ADDR>.
11693 * gdbarch.c, gdbarch.h: Re-generate.
11694 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11695 Adjust.
11696 (arm_deal_with_atomic_sequence_raw): Adjust.
11697 (thumb_get_next_pcs_raw): Adjust.
11698 (arm_get_next_pcs_raw): Adjust.
11699 (arm_get_next_pcs): Adjust.
11700 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11701 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11702 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11703 (alpha_software_single_step): Adjust.
11704 * alpha-tdep.h (alpha_software_single_step): Adjust.
11705 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11706 * arm-tdep.c (arm_software_single_step): Adjust.
11707 (arm_breakpoint_kind_from_current_state): Adjust.
11708 * arm-tdep.h (arm_software_single_step): Adjust.
11709 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11710 * cris-tdep.c (cris_software_single_step): Adjust.
11711 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11712 (micromips_deal_with_atomic_sequence): Adjust.
11713 (deal_with_atomic_sequence): Adjust.
11714 (mips_software_single_step): Adjust.
11715 * mips-tdep.h (mips_software_single_step): Adjust.
11716 * moxie-tdep.c (moxie_software_single_step): Adjust.
11717 * nios2-tdep.c (nios2_software_single_step): Adjust.
11718 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11719 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11720 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11721 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11722 * sparc-tdep.c (sparc_software_single_step): Adjust.
11723 * spu-tdep.c (spu_software_single_step): Adjust.
11724 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11725
11726 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11727
11728 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11729 * gdbarch.h: Re-generate.
11730
11731 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11732
11733 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11734 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11735 * python/py-instruction.c, python/py-instruction.h: New file.
11736 * python/py-record.c: Add py-instruction.h include.
11737 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11738 gdb.RecordInstruction.
11739 * python/python-internal.h: Add gdbpy_initialize_instruction
11740 declaration.
11741 * python/python.c (do_start_initialization): Add
11742 gdbpy_initialize_instruction.
11743
11744 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11745
11746 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11747 Remove.
11748 (btrace_func_from_recpy_func): New function.
11749 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11750 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11751 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11752 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11753 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11754 Also, use new helper functions.
11755 (btpy_list_item): Use new helper functions.
11756 (recpy_bt_function_call_history): Use new type name.
11757 (btpy_call_getset): Remove.
11758 (gdbpy_initialize_btrace): Remove code to initialize
11759 gdb.BtraceFunctionCall.
11760 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11761 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11762 recpy_bt_func_prev, recpy_bt_func_next): New export.
11763 * python/py-record.c (recpy_func_type): New static object.
11764 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11765 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11766 recpy_func_next): New function.
11767 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11768 (recpy_func_getset): New static object.
11769 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11770 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11771
11772 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11773
11774 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11775 (btpy_object, btpy_insn_type, btpy_new): Remove.
11776 (btpy_list_object): Use gdb.RecordInstruction type instead of
11777 gdb.BtraceInstruction type.
11778 (btrace_insn_from_recpy_insn): New function.
11779 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11780 btpy_new.
11781 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11782 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11783 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11784 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11785 instead of btpy_object.
11786 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11787 btpy_insn_data, btpy_insn_decode): Rename to ...
11788 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11789 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11790 recpy_bt_insn_decode): This. Also, use new helper functions.
11791 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11792 recpy_insn_type.
11793 (btpy_insn_getset): Remove.
11794 (gdbpy_initialize_btrace): Remove code to initialize
11795 gdb.BtraceInstruction. Use recpy_element_object.
11796 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11797 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11798 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11799 * python/py-record.c (recpy_insn_type): New static object.
11800 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11801 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11802 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11803 New function.
11804 (recpy_insn_getset): New static object.
11805 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11806 * python/py-record.h (recpy_element_object): New typedef.
11807 (recpy_insn_type, recpy_insn_new): New export.
11808
11809 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11810
11811 * py-record-btrace.c (btpy_insn_new): Removed.
11812 (btpy_insn_or_gap_new): New function.
11813 (btpy_insn_error): Removed.
11814 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11815 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11816 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11817 btpy_insn_or_gap_new instead of btpy_insn_new.
11818 (btpy_insn_getset): Remove btpy_insn_error.
11819 * py-record.c (recpy_gap_type): New static object.
11820 (recpy_gap_object): New typedef.
11821 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11822 recpy_gap_reason_string): New function.
11823 (recpy_gap_getset): New static object.
11824 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11825 * py-record.h (recpy_gap_new): New export.
11826
11827 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11828
11829 * python/py-record.c (recpy_ptid): Remove.
11830 (recpy_record_getset): Remove recpy_ptid.
11831
11832 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11833
11834 * btrace.c (btrace_fetch): Set inferior_ptid.
11835 * python/py-record-btrace.c: Add "py-record.h" include.
11836 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11837 recpy_bt_end, recpy_bt_instruction_history,
11838 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11839 in gdb.Record object instead of current ptid.
11840 * python/py-record.c: Include new "py-record.h" file.
11841 (recpy_record_object): Moved to py-record.h.
11842 * python/py-record.h: New file.
11843
11844 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11845
11846 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11847 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11848 indentation.
11849
11850 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11851
11852 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11853 the past maintainers section.
11854
11855 2017-04-28 Yao Qi <yao.qi@linaro.org>
11856
11857 * infcmd.c (get_return_value): Use regcache ctor, and remove
11858 cleanup.
11859
11860 2017-04-28 Yao Qi <yao.qi@linaro.org>
11861 Pedro Alves <palves@redhat.com>
11862
11863 * regcache.c (regcache::regcache): New tag dispatch ctor.
11864 (do_cooked_read): Moved above.
11865 (regcache_dup): Use the tag dispatch ctor..
11866 * regcache.h (regcache): Declare ctor, delete copy ctor and
11867 assignment operator, remove friend regcache_dup.
11868
11869 2017-04-28 Yao Qi <yao.qi@linaro.org>
11870
11871 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11872 call method save instead of regcache_cpy.
11873 * regcache.h (struct regcache): Make regcache_dup a friend.
11874
11875 2017-04-28 Yao Qi <yao.qi@linaro.org>
11876
11877 * regcache.c (struct regcache): Move to regcache.h
11878 (regcache::arch): New method.
11879 (regcache_get_ptid): Update.
11880 (get_regcache_arch): Call arch method.
11881 (get_regcache_aspace): Call method aspace.
11882 (register_buffer): Change it to method.
11883 (regcache_save): Change it to regcache::save.
11884 (regcache_restore): Likewise.
11885 (regcache_cpy_no_passthrough): Remove the declaration.
11886 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11887 (regcache_cpy_no_passthrough): Change it to method
11888 cpy_no_passthrough.
11889 (regcache_register_status): Change it to method
11890 get_register_status.
11891 (regcache_invalidate): Change it to method invalidate.
11892 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11893 (regcache_raw_update): Change it to method raw_update.
11894 (regcache_raw_read): Likewise.
11895 (regcache_raw_read_signed): Likewise.
11896 (regcache_raw_read_unsigned): Likewise.
11897 (regcache_raw_write_signed): Likewise.
11898 (regcache_raw_write_unsigned): Likewise.
11899 (regcache_cooked_read): Likewise.
11900 (regcache_cooked_read_value): Likewise.
11901 (regcache_cooked_read_signed): Likewise.
11902 (regcache_cooked_read_unsigned): Likewise.
11903 (regcache_cooked_write_signed): Likewise.
11904 (regcache_cooked_write_unsigned): Likewise.
11905 (regcache_raw_set_cached_value): Likewise.
11906 (regcache_raw_write): Likewise.
11907 (regcache_cooked_write): Likewise.
11908 (regcache_xfer_part): Likewise.
11909 (regcache_raw_read_part): Likewise.
11910 (regcache_raw_write_part): Likewise.
11911 (regcache_cooked_read_part): Likewise.
11912 (regcache_cooked_write_part): Likewise.
11913 (regcache_raw_supply): Likewise.
11914 (regcache_raw_collect): Likewise.
11915 (regcache_transfer_regset): Likewise.
11916 (regcache_supply_regset): Likewise.
11917 (regcache_collect_regset): Likewise.
11918 (regcache_debug_print_register): Likewise.
11919 (enum regcache_dump_what): Move it to regcache.h.
11920 (regcache_dump): Change it to method dump.
11921 * regcache.h (enum regcache_dump_what): New.
11922 (class regcache): New.
11923 * target.c (target_fetch_registers): Call method
11924 debug_print_register.
11925 (target_store_registers): Likewise.
11926
11927 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11928
11929 * windows-nat.c (struct lm_info_windows): Initialize field.
11930 (windows_make_so): Allocate lm_info_windows with new.
11931 (windows_free_so): Free lm_info_windows with delete.
11932
11933 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11934
11935 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11936 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11937 cleanup.
11938 (darwin_free_so): Free lm_info_darwin with delete.
11939
11940 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11941
11942 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11943 <l_addr_p>: Change type to bool.
11944 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11945 (svr4_free_so): Free lm_info_svr4 with delete.
11946 (svr4_copy_library_list): Replace memcpy with call to copy
11947 constructor.
11948 (library_list_start_library, svr4_default_sos): Allocate
11949 lm_info_svr4 with new.
11950
11951 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11952
11953 * solib-target.c (struct lm_info_target): Add destructor,
11954 initialize fields.
11955 <name>: Change type to std::string.
11956 (library_list_start_library): Allocate lm_info_target with new.
11957 (solib_target_free_library_list): Free lm_info_target with
11958 delete.
11959 (solib_target_current_sos): Adapt to std::string.
11960 (solib_target_free_so): Free lm_info_target with delete.
11961
11962 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11963
11964 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11965 fields.
11966 (frv_current_sos): Allocate lm_info_frv with new.
11967 (frv_relocate_main_executable): Free lm_info_frv with delete,
11968 allocate with new.
11969 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11970
11971 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11972
11973 * solib-frv.c (struct lm_info_frv): Fix indentation.
11974
11975 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11976
11977 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11978 map field.
11979 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11980 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11981 and allocate with new.
11982 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11983
11984 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11985
11986 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11987 <filename, member_name>: Change type to std::string.
11988 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11989 (library_list_start_library): Allocate lm_info_aix with new.
11990 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11991 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11992 with copy constructor.
11993
11994 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11995
11996 * solist.h (struct lm_info): Remove.
11997 (struct lm_info_base): New class.
11998 (struct so_list) <lm_info>: Change type to lm_info_base *.
11999 * nto-tdep.c (struct lm_info): Remove.
12000 (lm_addr): Adjust.
12001 * solib-aix.c (struct lm_info): Rename to ...
12002 (struct lm_info_aix): ... this. Extend lm_info_base.
12003 (lm_info_p): Rename to ...
12004 (lm_info_aix_p): ... this, and adjust.
12005 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12006 solib_aix_parse_libraries, library_list_start_library,
12007 solib_aix_free_library_list, solib_aix_parse_libraries,
12008 solib_aix_get_library_list,
12009 solib_aix_relocate_section_addresses, solib_aix_free_so,
12010 solib_aix_get_section_offsets,
12011 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12012 Adjust.
12013 (struct solib_aix_inferior_data) <library_list>: Adjust.
12014 * solib-darwin.c (struct lm_info): Rename to ...
12015 (struct lm_info_darwin): ... this. Extend lm_info_base.
12016 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12017 * solib-dsbt.c (struct lm_info): Rename to ...
12018 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12019 (struct dsbt_info) <main_executable_lm_info): Adjust.
12020 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12021 dsbt_relocate_section_addresses): Adjust.
12022 * solib-frv.c (struct lm_info): Rename to ...
12023 (struct lm_info_frv): ... this. Extend lm_info_base.
12024 (main_executable_lm_info): Adjust.
12025 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12026 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12027 find_canonical_descriptor_in_load_object,
12028 frv_fdpic_find_canonical_descriptor): Adjust.
12029 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12030 to lm_info_svr4.
12031 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12032 svr4_clear_so, svr4_copy_library_list,
12033 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12034 svr4_current_sos, svr4_fetch_objfile_link_map,
12035 solist_update_incremental): Adjust.
12036 * solib-svr4.h (struct lm_info_svr4): Move here from
12037 solib-svr4.c.
12038 * solib-target.c (struct lm_info): Rename to ...
12039 (struct lm_info_target): ... this. Extend lm_info_base.
12040 (lm_info_p): Rename to ...
12041 (lm_info_target_p): ... this.
12042 (solib_target_parse_libraries, library_list_start_segment,
12043 library_list_start_section, library_list_start_library,
12044 library_list_end_library, solib_target_free_library_list,
12045 solib_target_current_sos, solib_target_free_so,
12046 solib_target_relocate_section_addresses): Adjust.
12047 * windows-nat.c (struct lm_info): Rename to ...
12048 (struct lm_info_windows): ... this. Extend lm_info_base.
12049 (windows_make_so, handle_load_dll, handle_unload_dll,
12050 windows_xfer_shared_libraries): Adjust.
12051
12052 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12053
12054 * solib-darwin.c (struct darwin_so_list): Remove.
12055 (darwin_current_sos): Allocate an so_list object instead of a
12056 darwin_so_list, separately allocate an lm_info object.
12057 (darwin_free_so): Free lm_info.
12058
12059 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12060
12061 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12062 with fprintf_filtered.
12063
12064 2017-04-28 Yao Qi <yao.qi@linaro.org>
12065
12066 * regcache.c (regcache::regcache): New function.
12067 (regcache::~regcache): New function.
12068 (regcache_xmalloc_1): Remove.
12069 (regcache_xmalloc): Call new regcache.
12070 (regcache_xfree): Call delete regcache.
12071 (get_thread_arch_aspace_regcache): Call new regcache.
12072
12073 2017-04-28 Yao Qi <yao.qi@linaro.org>
12074
12075 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12076 lwp instead of ptid_get_lwp.
12077
12078 2017-04-28 Yao Qi <yao.qi@linaro.org>
12079
12080 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12081 lwp_info instead of getting from inferior_ptid.
12082
12083 2017-04-27 Keith Seitz <keiths@redhat.com>
12084
12085 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12086 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12087 (CV_CONVERSION_BADNESS): Define.
12088 (rank_one_type): Remove overly restrictive rvalue reference
12089 rank checks.
12090 Add cv-qualifier checks and subranks for type equality.
12091 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12092 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12093 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12094
12095 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12096
12097 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12098 count when creating the object.
12099
12100 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12101 Ulrich Weigand <uweigand@de.ibm.com>
12102
12103 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12104 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12105 is used in AIX.
12106 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12107 (process_xcoff_symbol): Likewise.
12108 (scan_xcoff_symtab): Likewise.
12109
12110 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12111
12112 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12113 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12114 (ia64_access_reg): Use get_frame_register_unsigned.
12115 (ia64_access_rse_reg): Likewise.
12116 (ia64_libunwind_frame_prev_register): Likewise.
12117
12118 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12119
12120 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12121 * gdbarch.c: Regenerated.
12122 * gdbarch.h: Regenerated.
12123 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12124 visibility external.
12125 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12126 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12127 (enum cfa_how_kind): Move to ...
12128 (struct dwarf2_frame_state_reg_info): Likewise.
12129 (struct dwarf2_frame_state): Likewise.
12130 * dwarf2-frame.h: ... here.
12131 (dwarf2_frame_state_alloc_regs): New declaration.
12132 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12133 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12134
12135 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12136
12137 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12138 regcache_raw_read_unsigned.
12139 (xtensa_pseudo_register_write): Likewise.
12140
12141 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12142
12143 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12144 (nds32_pseudo_register_write): Likewise.
12145
12146 2017-04-25 Yao Qi <yao.qi@linaro.org>
12147
12148 * regcache.c (struct regcache) <readonly_p>: Change its type
12149 to bool.
12150 (regcache_xmalloc_1): Update parameter type and callers update.
12151
12152 2017-04-25 Yao Qi <yao.qi@linaro.org>
12153
12154 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12155 set_gdbarch_wchar_bit.
12156 * arm-tdep.c (arm_gdbarch_init): Likewise.
12157
12158 2017-04-25 Pedro Alves <palves@redhat.com>
12159
12160 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12161 (BothAreRelocatable, memcopy, memmove): Don't define.
12162 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12163 macros.
12164
12165 2017-04-25 Pedro Alves <palves@redhat.com>
12166
12167 * common/common-defs.h: Include "common/poison.h".
12168 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12169 and adjust.
12170 * common/poison.h: New file.
12171 * common/traits.h: Include <type_traits>.
12172 (Not, Or, Requires): New, moved from common/function-view.h.
12173
12174 2017-04-25 Pedro Alves <palves@redhat.com>
12175
12176 * breakpoint.h (struct breakpoint): In-class initialize all
12177 fields. Make boolean fields "bool".
12178 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12179 memset call and initializations no longer necessary.
12180
12181 2017-04-25 Pedro Alves <palves@redhat.com>
12182
12183 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12184 reference.
12185 (pt_btrace_insn): New function.
12186 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12187
12188 2017-04-25 Pedro Alves <palves@redhat.com>
12189
12190 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12191 "base" field and inherit from "bp_location" instead. Add
12192 non-default ctor.
12193 (allocate_location_exception): Use new non-default ctor.
12194 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12195 (init_bp_location): Convert to ...
12196 (bp_location::bp_location): ... this new ctor, and remove memset
12197 call.
12198 (base_breakpoint_allocate_location): Use the new non-default ctor.
12199 * breakpoint.h (bp_location): Now a class. Declare default and
12200 non-default ctors. In-class initialize all members.
12201 (init_bp_location): Remove declaration.
12202
12203 2017-04-25 Pedro Alves <palves@redhat.com>
12204
12205 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12206 assignment operator.
12207
12208 2017-04-24 Yao Qi <yao.qi@linaro.org>
12209
12210 * doublest.c (convert_doublest_to_floatformat): Call
12211 floatformat_totalsize_bytes.
12212
12213 2017-04-22 Tom Tromey <tom@tromey.com>
12214
12215 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12216 ui_out_emit_list.
12217 * stack.c (print_frame): Use ui_out_emit_list.
12218 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12219 ui_out_emit_list.
12220 * mi/mi-main.c (print_one_inferior)
12221 (mi_cmd_data_list_register_names)
12222 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12223 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12224 ui_out_emit_list.
12225 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12226 (mi_output_solib_attribs): Use ui_out_emit_list,
12227 ui_out_emit_tuple.
12228 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12229 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12230 (mi_cmd_stack_list_args, list_args_or_locals): Use
12231 ui_out_emit_list.
12232 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12233 * breakpoint.c (print_solib_event, output_thread_groups): Use
12234 ui_out_emit_list.
12235
12236 2017-04-22 Tom Tromey <tom@tromey.com>
12237
12238 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12239 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12240 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12241
12242 2017-04-22 Tom Tromey <tom@tromey.com>
12243
12244 * tracepoint.c (tvariables_info_1)
12245 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12246
12247 2017-04-22 Tom Tromey <tom@tromey.com>
12248
12249 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12250 annotate_arg_emitter.
12251 * breakpoint.c (print_mention_watchpoint)
12252 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12253 * annotate.h (struct annotate_arg_emitter): New.
12254
12255 2017-04-22 Tom Tromey <tom@tromey.com>
12256
12257 * record-btrace.c (record_btrace_insn_history)
12258 (record_btrace_insn_history_range, record_btrace_call_history)
12259 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12260 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12261 ui_out_emit_tuple.
12262 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12263 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12264 * skip.c (skip_info): Use ui_out_emit_tuple.
12265 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12266 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12267 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12268 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12269 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12270 ui_out_emit_tuple.
12271 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12272 (output_register, mi_cmd_data_read_memory)
12273 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12274 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12275 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12276 Use ui_out_emit_tuple.
12277 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12278 ui_out_emit_tuple.
12279 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12280 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12281 * linux-thread-db.c (info_auto_load_libthread_db): Use
12282 ui_out_emit_tuple.
12283 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12284 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12285 * disasm.c (do_mixed_source_and_assembly_deprecated)
12286 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12287 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12288 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12289 * breakpoint.c (print_one_breakpoint_location)
12290 (print_one_breakpoint): Use ui_out_emit_tuple.
12291 * auto-load.c (print_script, info_auto_load_cmd): Use
12292 ui_out_emit_tuple.
12293 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12294
12295 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12296
12297 * thread.c (print_thread_info_1): Remove dead code.
12298
12299 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12300
12301 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12302 GDB_SELF_TEST.
12303 * arm-tdep.c (selftests::arm_record_test): Likewise.
12304
12305 2017-04-21 Yao Qi <yao.qi@linaro.org>
12306
12307 * regcache.c (regcache_restore): Remove argument 2. Replace
12308 argument 3 with regcache. Get register status from
12309 src->register_status and get register contents from
12310 register_buffer (src, regnum).
12311 (regcache_cpy): Update.
12312
12313 2017-04-19 Pedro Alves <palves@redhat.com>
12314
12315 * gdbthread.h (thread): Add missing closing parenthesis in
12316 comment.
12317
12318 2017-04-19 Pedro Alves <palves@redhat.com>
12319
12320 * common/refcounted-object.h: New file.
12321 * gdbthread.h: Include "common/refcounted-object.h".
12322 (thread_info): Inherit from refcounted_object and add comments.
12323 (thread_info::incref, thread_info::decref)
12324 (thread_info::m_refcount): Delete.
12325 (thread_info::deletable): Use the refcounted_object::refcount()
12326 method.
12327 * inferior.c (current_inferior_): Add comment.
12328 (set_current_inferior): Increment/decrement refcounts.
12329 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12330 not-deletable instead of comparing with the current inferior.
12331 (initialize_inferiors): Increment the initial inferior's refcount.
12332 * inferior.h (struct inferior): Forward declare.
12333 Include "common/refcounted-object.h".
12334 (current_inferior, set_current_inferior): Move declaration to
12335 before struct inferior's definition, and fix comment.
12336 (inferior): Inherit from refcounted_object. Add comments.
12337 * thread.c (switch_to_thread_no_regs): Reference the thread's
12338 inferior pointer directly instead of doing a ptid lookup.
12339 (switch_to_no_thread): New function.
12340 (switch_to_thread(thread_info *)): New function, factored out
12341 from ...
12342 (switch_to_thread(ptid_t)): ... this.
12343 (restore_current_thread): Delete.
12344 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12345 fields, and add 'inf' field.
12346 (do_restore_current_thread_cleanup): Check whether old->inf is
12347 alive instead of looking up an inferior by ptid. Use
12348 switch_to_thread and switch_to_no_thread.
12349 (restore_current_thread_cleanup_dtor): Use old->inf directly
12350 instead of lookup up an inferior by id. Decref the inferior.
12351 Don't restore 'removable'.
12352 (make_cleanup_restore_current_thread): Same the inferior pointer
12353 in old, instead of the inferior number. Incref the inferior.
12354 Don't save/clear 'removable'.
12355
12356 2017-04-19 Pedro Alves <palves@redhat.com>
12357
12358 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12359 unittests/scoped_restore-selftests.c.
12360 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12361 * common/scoped_restore.h (scoped_restore_base): Make "class".
12362 (scoped_restore_base::release): New public method.
12363 (scoped_restore_base::scoped_restore_base): New protected ctor.
12364 (scoped_restore_base::m_saved_var): New protected field.
12365 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12366 scoped_restore_base base class instead of m_saved_var directly.
12367 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12368 (scoped_restore_tmpl::scoped_restore_tmpl(const
12369 scoped_restore_tmpl<T>&)): Likewise.
12370 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12371 method.
12372 (scoped_restore_tmpl::saved_var): New method.
12373 (scoped_restore_tmpl::m_saved_var): Delete.
12374 * inferior.h (inferior::detaching): Now a bool.
12375 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12376 cleanup.
12377 * unittests/scoped_restore-selftests.c: New file.
12378
12379 2017-04-19 Pedro Alves <palves@redhat.com>
12380
12381 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12382 Re-sort in alphabetic order.
12383
12384 2017-04-18 Pedro Alves <palves@redhat.com>
12385
12386 * xml-support.c (obstack_xml_printf): Delete.
12387 * xml-support.h (obstack_xml_printf): Delete.
12388
12389 2017-04-18 Pedro Alves <palves@redhat.com>
12390
12391 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12392 vdebug, verror, body_text, start_element, end_element, name,
12393 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12394 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12395 is_xinclude>: Make private and add m_ prefix.
12396 (gdb_xml_parser::body_text): New method, based on ...
12397 (gdb_xml_body_text): ... this. Adjust.
12398 (gdb_xml_parser::vdebug): New method, based on ...
12399 (gdb_xml_debug): ... this. Adjust.
12400 (gdb_xml_parser::verror): New method, based on ...
12401 (gdb_xml_error): ... this. Adjust.
12402 (gdb_xml_parser::start_element): New method, based on ...
12403 (gdb_xml_start_element): ... this. Adjust.
12404 (gdb_xml_start_element_wrapper): Defer to
12405 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12406 (gdb_xml_parser::end_element): New method, based on ...
12407 (gdb_xml_end_element_wrapper): ... this. Adjust.
12408 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12409 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12410 (gdb_xml_parser::use_dtd): New method, based on ...
12411 (gdb_xml_use_dtd): ... this. Adjust.
12412 (gdb_xml_parser::parse): New method, based on ...
12413 (gdb_xml_parse): ... this. Adjust.
12414 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12415 (xinclude_start_include): Adjust to call the parser's name method.
12416 (xml_xinclude_default, xml_xinclude_start_doctype)
12417 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12418 method.
12419 (xml_process_xincludes): Adjust to call parser methods.
12420 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12421 declarations.
12422
12423 2017-04-18 Pedro Alves <palves@redhat.com>
12424
12425 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12426 gdb::optional<std::string>.
12427 * xml-support.c: Include <string>.
12428 (scope_level::scope_level(scope_level &&))
12429 (scope_level::~scope_level): Delete.
12430 (scope_level::body): Now a std::string.
12431 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12432 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12433 parameter.
12434 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12435 (xinclude_parsing_data::output): Now a std::string reference.
12436 (xinclude_start_include): Adjust.
12437 (xml_xinclude_default): Adjust.
12438 (xml_process_xincludes): Add 'output' parameter, and return bool.
12439 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12440 and return bool.
12441 * xml-tdesc.c: Include <unordered_map> and <string>.
12442 (tdesc_xml_cache): Delete.
12443 (tdesc_xml_cache_s): Delete.
12444 (xml_cache): Now an std::unordered_map.
12445 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12446 (target_fetch_description_xml): Change return type to
12447 gdb::optional<std::string>, and adjust.
12448 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12449 (target_fetch_description_xml): Change return type to
12450 gdb::optional<std::string>.
12451
12452 2017-04-18 Pedro Alves <palves@redhat.com>
12453
12454 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12455 unittests/optional-selftests.c.
12456 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12457 * unittests/optional-selftests.c: New file.
12458 * unittests/optional/assignment/1.cc: New file.
12459 * unittests/optional/assignment/2.cc: New file.
12460 * unittests/optional/assignment/3.cc: New file.
12461 * unittests/optional/assignment/4.cc: New file.
12462 * unittests/optional/assignment/5.cc: New file.
12463 * unittests/optional/assignment/6.cc: New file.
12464 * unittests/optional/assignment/7.cc: New file.
12465 * unittests/optional/cons/copy.cc: New file.
12466 * unittests/optional/cons/default.cc: New file.
12467 * unittests/optional/cons/move.cc: New file.
12468 * unittests/optional/cons/value.cc: New file.
12469 * unittests/optional/in_place.cc: New file.
12470 * unittests/optional/observers/1.cc: New file.
12471 * unittests/optional/observers/2.cc: New file.
12472
12473 2017-04-18 Pedro Alves <palves@redhat.com>
12474
12475 * common/gdb_optional.h: Include common/traits.h.
12476 (in_place_t): New type.
12477 (in_place): New constexpr variable.
12478 (optional::optional): Remove member initialization of
12479 m_instantiated.
12480 (optional::optional(in_place_t...)): New constructor.
12481 (optional::~optional): Use reset.
12482 (optional::optional(const optional&)): New.
12483 (optional::optional(const optional&&)): New.
12484 (optional::optional(T &)): New.
12485 (optional::optional(T &&)): New.
12486 (operator::operator=(const optional &)): New.
12487 (operator::operator=(optional &&)): New.
12488 (operator::operator= (const T &))
12489 (operator::operator= (T &&))
12490 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12491 (operator::reset): New.
12492 (operator::m_instantiated):: Add in-class initializer.
12493 * common/traits.h: Include <type_traits>.
12494 (struct And): New types.
12495
12496 2017-04-18 Pedro Alves <palves@redhat.com>
12497
12498 * xml-support.c: Include <vector>.
12499 (scope_level::scope_level(const gdb_xml_element *))
12500 (scope_level::scope_level(scope_level&&)): New.
12501 (scope_level::~scope_level): New.
12502 (scope_level_s): Delete.
12503 (gdb_xml_parser::scopes): Now a std::vector.
12504 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12505 Use std::vector.
12506 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12507 scope cleanup code.
12508 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12509 of the scopes member. Use std::vector::emplace_back.
12510
12511 2017-04-18 Pedro Alves <palves@redhat.com>
12512
12513 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12514 a bool.
12515 (gdb_xml_end_element): Change type of first parameter.
12516 (gdb_xml_cleanup): Rename to ...
12517 (gdb_xml_parser::~gdb_xml_parser): ... this.
12518 (gdb_xml_create_parser_and_cleanup): Delete with ...
12519 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12520 to this new ctor.
12521 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12522 using gdb_xml_create_parser_and_cleanup.
12523 (xinclude_parsing_data): Add ctor/dtor.
12524 (xml_xinclude_cleanup): Delete.
12525 (xml_process_xincludes): Create a local xinclude_parsing_data
12526 instead of heap-allocating one. Create a local gdb_xml_parser
12527 instead of heap-allocating one with
12528 gdb_xml_create_parser_and_cleanup.
12529
12530 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12531
12532 PR threads/20743
12533 * fbsd-nat.c (resume_one_thread_cb): Remove.
12534 (resume_all_threads_cb): Remove.
12535 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12536 iterate_over_threads.
12537
12538 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12539
12540 * NEWS: Create a new section for the next release branch.
12541 Rename the section of the current branch, now that it has
12542 been cut.
12543
12544 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12545
12546 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12547 * version.in: Bump version to 8.0.50.DATE-git.
12548
12549 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12550
12551 PR gdb/21385
12552 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12553 independently of the host, and fix build breakage on Cygwin.
12554
12555 2017-04-13 Pedro Alves <palves@redhat.com>
12556
12557 * inferior.c (free_inferior): Convert to ...
12558 (inferior::~inferior): ... this dtor.
12559 (inferior::inferior): New ctor, factored out from ...
12560 (add_inferior_silent): ... here. Allocate the inferior with a new
12561 expression.
12562 (delete_inferior): Call delete instead of free_inferior.
12563 * inferior.h (gdb_environ, continuation): Forward declare.
12564 (inferior): Now a class. Add in-class initialization to all
12565 members. Make boolean fields bool, except 'detaching'.
12566 (inferior::inferior): New explicit ctor.
12567 (inferior::~inferior): New.
12568
12569 2017-04-13 Pedro Alves <palves@redhat.com>
12570
12571 * inferior.c (init_inferior_list): Delete.
12572 * inferior.h (init_inferior_list): Delete.
12573
12574 2017-04-13 Pedro Alves <palves@redhat.com>
12575
12576 PR threads/13217
12577 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12578 (top level): Call it twice, with different thread sets.
12579
12580 2017-04-13 Pedro Alves <palves@redhat.com>
12581
12582 * thread.c: Include <algorithm>.
12583 (thread_array_cleanup): Delete.
12584 (scoped_inc_dec_ref): New class.
12585 (live_threads_count): New function.
12586 (set_thread_refcount): Delete.
12587 (tp_array_compar_ascending): Now a bool.
12588 (tp_array_compar): Convert to a std::sort comparison function.
12589 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12590 and live_threads_count.
12591
12592 2017-04-13 Pedro Alves <palves@redhat.com>
12593
12594 * infrun.c (follow_fork_inferior): Also switch the current
12595 inferior.
12596
12597 2017-04-13 Pedro Alves <palves@redhat.com>
12598
12599 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12600 before calling create_internal_breakpoint.
12601
12602 2017-04-13 Pedro Alves <palves@redhat.com>
12603
12604 * fork-child.c (execv_argv): New class.
12605 (breakup_args): Refactored as ...
12606 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12607 Copy arguments to storage and replace separators with NULL
12608 terminators in place.
12609 (escape_bang_in_quoted_argument): Adjust to return bool.
12610 (execv_argv::execv_argv): New ctor.
12611 (execv_argv::init_for_shell): New method, factored out from
12612 fork_inferior. Don't strdup strings into the vector.
12613 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12614 Remove free_vector_argv call.
12615
12616 2017-04-13 Yao Qi <yao.qi@linaro.org>
12617
12618 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12619 tdep->rx_psw_type.
12620
12621 2017-04-13 Yao Qi <yao.qi@linaro.org>
12622
12623 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12624 * rx-tdep.c (rx_gdbarch_init): Likewise.
12625
12626 2017-04-13 Pedro Alves <palves@redhat.com>
12627
12628 * breakpoint.h (struct breakpoint): Reindent.
12629
12630 2017-04-13 Pedro Alves <palves@redhat.com>
12631
12632 * breakpoint.c (bp_location): Rename to ...
12633 (bp_locations): ... this. All references updated.
12634 (bp_location_count): Rename to ...
12635 (bp_locations_count): ... this. All references updated.
12636 (bp_location_placed_address_before_address_max): Rename to ...
12637 (bp_locations_placed_address_before_address_max): ... this. All
12638 references updated.
12639 (bp_location_shadow_len_after_address_max): Rename to ...
12640 (bp_locations_shadow_len_after_address_max): ... this. All
12641 references updated.
12642 (bp_location_compare_addrs): Rename to ...
12643 (bp_locations_compare_addrs): ... this. All references updated.
12644 (bp_location_compare):Rename to ...
12645 (bp_locations_compare): ... this. All references updated.
12646 (bp_location_target_extensions_update): Rename to ...
12647 (bp_locations_target_extensions_update): ... this. All references
12648 updated.
12649
12650 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12651
12652 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12653 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12654 'sgtty.h'.
12655 * common/gdb_termios.h: New file, with parts of "terminal.h".
12656 * inflow.c: Include "gdb_termios.h".
12657 * ser-unix.c: Include "gdb_termios.h".
12658 * terminal.h: Move terminal-related defines to
12659 "common/gdb_termios.h".
12660
12661 2017-04-12 Tom Tromey <tom@tromey.com>
12662
12663 * probe.c (parse_probes): Update.
12664 * location.h (delete_event_location): Don't declare.
12665 (event_location_deleter::operator()): Update.
12666 * location.c (event_location_deleter::operator()): Rename from
12667 delete_event_location.
12668 * linespec.h (linespec_result) <location>: Change type to
12669 event_location_up.
12670 * linespec.c (canonicalize_linespec, event_location_to_sals)
12671 (decode_objc): Update.
12672 (linespec_result): Don't call delete_event_location.
12673 * breakpoint.c (create_breakpoints_sal)
12674 (bkpt_probe_create_sals_from_location)
12675 (strace_marker_create_sals_from_location): Update.
12676
12677 2017-04-12 Tom Tromey <tom@tromey.com>
12678
12679 * linespec.h (struct linespec_result): Add constructor and
12680 destructor.
12681 (init_linespec_result, destroy_linespec_result)
12682 (make_cleanup_destroy_linespec_result): Don't declare.
12683 * linespec.c (init_linespec_result): Remove.
12684 (linespec_result::~linespec_result): Rename from
12685 destroy_linespec_result. Update.
12686 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12687 Remove.
12688 * breakpoint.c (create_breakpoint, break_range_command)
12689 (decode_location_default): Update.
12690 * ax-gdb.c (agent_command_1): Update.
12691
12692 2017-04-12 Tom Tromey <tom@tromey.com>
12693
12694 * remote.c (remote_download_tracepoint): Update.
12695 * python/py-breakpoint.c (bppy_get_location): Update.
12696 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12697 (gdbscm_breakpoint_location): Update.
12698 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12699 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12700 Change type to event_location_up.
12701 * breakpoint.c (create_overlay_event_breakpoint)
12702 (create_longjmp_master_breakpoint)
12703 (create_std_terminate_master_breakpoint)
12704 (create_exception_master_breakpoint)
12705 (breakpoint_event_location_empty_p, print_breakpoint_location)
12706 (print_one_breakpoint_location, create_thread_event_breakpoint)
12707 (init_breakpoint_sal, create_breakpoint)
12708 (print_recreate_ranged_breakpoint, break_range_command)
12709 (init_ada_exception_breakpoint, say_where): Update.
12710 (base_breakpoint_dtor): Don't call delete_event_location.
12711 (bkpt_print_recreate, tracepoint_print_recreate)
12712 (dprintf_print_recreate, update_static_tracepoint)
12713 (breakpoint_re_set_default): Update.
12714
12715 2017-04-12 Tom Tromey <tom@tromey.com>
12716
12717 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12718 type of "to_do". Update.
12719 (compute_stack_depth): Use std::vector.
12720
12721 2017-04-12 Tom Tromey <tom@tromey.com>
12722
12723 * printcmd.c (find_instruction_backward): Use std::vector.
12724
12725 2017-04-12 Tom Tromey <tom@tromey.com>
12726
12727 * symfile.c (objfilep): Remove typedef.
12728 (reread_symbols): Use a std::vector.
12729
12730 2017-04-12 Tom Tromey <tom@tromey.com>
12731
12732 * mi/mi-main.c (exec_direction_forward): Remove.
12733 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12734 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12735 scoped_restore.
12736 * guile/guile.c (guile_repl_command, guile_command)
12737 (gdbscm_execute_gdb_command): Use scoped_restore.
12738 * go-exp.y (go_parse): Use scoped_restore.
12739 * d-exp.y (d_parse): Use scoped_restore.
12740 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12741 * c-exp.y (c_parse): Use scoped_restore.
12742
12743 2017-04-12 Tom Tromey <tom@tromey.com>
12744
12745 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12746 (mi_parse): Update return type.
12747 (mi_parse_free): Remove.
12748 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12749 (mi_parse::~mi_parse): Rename from mi_parse_free.
12750 (mi_parse_cleanup): Remove.
12751 (mi_parse): Return a unique_ptr. Use new.
12752 * mi/mi-main.c (mi_execute_command): Update.
12753
12754 2017-04-12 Tom Tromey <tom@tromey.com>
12755
12756 * location.c (explicit_location_lex_one): Return a
12757 unique_xmalloc_ptr.
12758 (string_to_explicit_location): Update. Remove cleanups.
12759
12760 2017-04-12 Tom Tromey <tom@tromey.com>
12761
12762 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12763 (compare_value_and_voffset): Change type. Update.
12764 (compute_vtable_size): Change type of "offset_vec".
12765 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12766 (gnuv3_get_typeid): Remove extraneous declaration.
12767
12768 2017-04-12 Tom Tromey <tom@tromey.com>
12769
12770 * charset.h (wchar_iterator): Fix comment.
12771
12772 2017-04-12 Tom Tromey <tom@tromey.com>
12773
12774 * charset.c (iconv_wrapper): New class.
12775 (cleanup_iconv): Remove.
12776 (convert_between_encodings): Use it.
12777
12778 2017-04-12 Tom Tromey <tom@tromey.com>
12779
12780 * symfile.h (increment_reading_symtab): Update type.
12781 * symfile.c (decrement_reading_symtab): Remove.
12782 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12783 * psymtab.c (psymtab_to_symtab): Update.
12784 * dwarf2read.c (dw2_instantiate_symtab): Update.
12785
12786 2017-04-12 Tom Tromey <tom@tromey.com>
12787
12788 * jit.c (struct jit_reader): Declare separately. Add constructor
12789 and destructor. Change type of "handle".
12790 (loaded_jit_reader): Define separately.
12791 (jit_reader_load): Update. New "new".
12792 (jit_reader_unload_command): Use "delete".
12793 * gdb-dlfcn.h (struct dlclose_deleter): New.
12794 (gdb_dlhandle_up): New typedef.
12795 (gdb_dlopen, gdb_dlsym): Update types.
12796 (gdb_dlclose): Remove.
12797 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12798 (gdb_dlsym): Change type of "handle".
12799 (make_cleanup_dlclose): Remove.
12800 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12801 * compile/compile-c-support.c (load_libcc): Update.
12802
12803 2017-04-12 Tom Tromey <tom@tromey.com>
12804
12805 * symtab.h (find_pcs_for_symtab_line): Change return type.
12806 * symtab.c (find_pcs_for_symtab_line): Change return type.
12807 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12808 type of "vec". Update.
12809 (ltpy_get_pcs_for_line): Update.
12810 * linespec.c (decode_digits_ordinary): Update.
12811
12812 2017-04-12 Tom Tromey <tom@tromey.com>
12813
12814 * tracepoint.c (actions_command): Update.
12815 * python/python.c (python_command, python_interactive_command):
12816 Update.
12817 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12818 * guile/guile.c (guile_command): Update.
12819 * defs.h (read_command_lines, read_command_lines_1): Return
12820 command_line_up.
12821 (command_lines_deleter): New struct.
12822 (command_line_up): New typedef.
12823 * compile/compile.c (compile_code_command)
12824 (compile_print_command): Update.
12825 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12826 command_line_up.
12827 (make_cleanup_free_command_lines): Remove.
12828 * cli/cli-script.c (get_command_line, read_command_lines_1)
12829 (copy_command_lines): Return command_line_up.
12830 (while_command, if_command, read_command_lines, define_command)
12831 (document_command): Update.
12832 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12833 Remove.
12834 * breakpoint.h (breakpoint_set_commands): Change type of
12835 "commands".
12836 * breakpoint.c (breakpoint_set_commands): Change type of
12837 "commands". Update.
12838 (do_map_commands_command, update_dprintf_command_list)
12839 (create_tracepoint_from_upload): Update.
12840
12841 2017-04-12 Tom Tromey <tom@tromey.com>
12842
12843 * tracepoint.c (scope_info): Update.
12844 * spu-tdep.c (spu_catch_start): Update.
12845 * python/python.c (gdbpy_decode_line): Update.
12846 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12847 * python/py-breakpoint.c (bppy_init): Update.
12848 * probe.c (parse_probes): Update.
12849 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12850 * location.h (event_location_deleter): New struct.
12851 (event_location_up): New typedef.
12852 (new_linespec_location, new_address_location, new_probe_location)
12853 (new_explicit_location, copy_event_location)
12854 (string_to_event_location, string_to_event_location_basic)
12855 (string_to_explicit_location): Update return type.
12856 (make_cleanup_delete_event_location): Remove.
12857 * location.c (new_linespec_location, new_address_location)
12858 (new_probe_location, new_explicit_location, copy_event_location):
12859 Return event_location_up.
12860 (delete_event_location_cleanup)
12861 (make_cleanup_delete_event_location): Remove.
12862 (string_to_explicit_location, string_to_event_location_basic)
12863 (string_to_event_location): Return event_location_up.
12864 * linespec.c (canonicalize_linespec, event_location_to_sals)
12865 (decode_line_with_current_source)
12866 (decode_line_with_last_displayed, decode_objc): Update.
12867 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12868 * completer.c (location_completer): Update.
12869 * cli/cli-cmds.c (edit_command, list_command): Update.
12870 * breakpoint.c (create_overlay_event_breakpoint)
12871 (create_longjmp_master_breakpoint)
12872 (create_std_terminate_master_breakpoint)
12873 (create_exception_master_breakpoint)
12874 (create_thread_event_breakpoint): Update.
12875 (init_breakpoint_sal): Update. Remove some dead code.
12876 (create_breakpoint_sal): Change type of "location". Update.
12877 (create_breakpoints_sal, create_breakpoint, break_command_1)
12878 (dprintf_command, break_range_command, until_break_command)
12879 (init_ada_exception_breakpoint)
12880 (strace_marker_create_sals_from_location)
12881 (update_static_tracepoint, trace_command, ftrace_command)
12882 (strace_command, create_tracepoint_from_upload): Update.
12883 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12884 * ax-gdb.c (agent_command_1): Update.
12885
12886 2017-04-12 Pedro Alves <palves@redhat.com>
12887
12888 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12889 * configure.tgt: Handle i[34567]86-*-go32* and
12890 i[34567]86-*-msdosdjgpp*.
12891 * i386-tdep.c (i386_svr4_reg_to_regnum):
12892 Make extern.
12893 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12894 i386-go32-tdep.c.
12895 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12896 * i386-go32-tdep.c: New file.
12897 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12898 declarations.
12899
12900 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12901
12902 * aix-thread.c (pd_status2str): Change return type to const char *.
12903
12904 2017-04-12 Pedro Alves <palves@redhat.com>
12905
12906 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12907 calls to set_gdbarch_gnu_triplet_regexp.
12908
12909 2017-04-12 Pedro Alves <palves@redhat.com>
12910
12911 PR gdb/21323
12912 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12913 New enum value.
12914 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12915 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12916 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12917 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12918 * gdbarch.h, gdbarch.c: Regenerate.
12919 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12920 gdbarch_wchar_bit and gdbarch_wchar_signed.
12921 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12922 * arm-tdep.c (arm_gdbarch_init): Likewise.
12923 * avr-tdep.c (avr_gdbarch_init): Likewise.
12924 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12925 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12926 * i386-tdep.c (i386_go32_init_abi): Likewise.
12927 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12928 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12929 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12930 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12931 * sh-tdep.c (sh_gdbarch_init): Likewise.
12932 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12933 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12934 * windows-tdep.c (windows_init_abi): Likewise.
12935 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12936
12937 2017-04-12 Pedro Alves <palves@redhat.com>
12938
12939 PR c++/21323
12940 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12941 cplus_primitive_type_char32_t>: New enum values.
12942 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12943 and cplus_primitive_type_char32_t.
12944 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12945 32, use the archtecture's built-in type for char16_t and char32_t,
12946 respectively. Otherwise, fallback to init_integer_type as before,
12947 but make the type unsigned, and issue a complaint.
12948 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12949
12950 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12951
12952 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12953 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12954
12955 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12956
12957 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12958 'const char *'.
12959
12960 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12961
12962 * common/common-utils.c (free_vector_argv): New function.
12963 * common/common-utils.h: Include <vector>.
12964 (free_vector_argv): New prototype.
12965 * darwin-nat.c (darwin_create_inferior): Rewrite function
12966 prototype in order to constify "exec_file" and accept a
12967 "std::string" for "allargs".
12968 * fork-child.c: Include <vector>.
12969 (breakup_args): Rewrite function, using C++.
12970 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12971 and accept "std::string" for "allargs". Update the code to
12972 calculate "argv" based on "allargs". Update calls to "exec_fun"
12973 and "execvp".
12974 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12975 order to constify "exec_file" and accept a "std::string" for
12976 "allargs".
12977 * go32-nat.c (go32_create_inferior): Likewise.
12978 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12979 * infcmd.c (run_command_1): Constify "exec_file". Use
12980 "std::string" for inferior arguments.
12981 * inferior.h (fork_inferior): Update prototype.
12982 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12983 prototype in order to constify "exec_file" and accept a
12984 "std::string" for "allargs".
12985 * nto-procfs.c (procfs_create_inferior): Likewise.
12986 * procfs.c (procfs_create_inferior): Likewise.
12987 * remote-sim.c (gdbsim_create_inferior): Likewise.
12988 * remote.c (extended_remote_run): Update code to accept
12989 "std::string" as argument.
12990 (extended_remote_create_inferior): Rewrite function prototype in
12991 order to constify "exec_file" and accept a "std::string" for
12992 "allargs".
12993 * rs6000-nat.c (super_create_inferior): Likewise.
12994 (rs6000_create_inferior): Likewise.
12995 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12996 * windows-nat.c (windows_create_inferior): Likewise.
12997
12998 2017-04-11 Pedro Alves <palves@redhat.com>
12999
13000 * thread.c: Fix whitespace throughout.
13001
13002 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13003
13004 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13005
13006 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13007
13008 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13009
13010 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13011
13012 PR gdb/21364
13013 * osdata.c (info_osdata): Check if 'type' is an empty string
13014 instead of NULL.
13015
13016 2017-04-10 Pedro Alves <palves@redhat.com>
13017
13018 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13019 (ptid_to_global_thread_id, in_thread_list)
13020 (do_captured_list_thread_ids, set_resumed, set_running)
13021 (set_executing, set_stop_requested, finish_thread_state)
13022 (validate_registers_access, can_access_registers_ptid)
13023 (print_thread_info_1, switch_to_thread)
13024 (do_restore_current_thread_cleanup)
13025 (make_cleanup_restore_current_thread, thread_command)
13026 (thread_name_command): Use operator== instead of ptid_equal.
13027
13028 2017-04-10 Pedro Alves <palves@redhat.com>
13029
13030 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13031 (current_thread_cleanup_chain): Delete.
13032 (restore_current_thread_cleanup_dtor)
13033 (make_cleanup_restore_current_thread): Remove references to
13034 current_thread_cleanup_chain.
13035
13036 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13037
13038 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13039 REG_UNKNOWN.
13040
13041 2017-04-10 Yao Qi <yao.qi@linaro.org>
13042
13043 PR gdb/19942
13044 * gdbthread.h (thread_info::deletable): New method.
13045 (thread_info::incref): New method.
13046 (thread_info::decref): New method.
13047 (thread_info::refcount): Move it to private.
13048 * infrun.c (save_stop_context): Call inc_refcount.
13049 (release_stop_context_cleanup): Likewise.
13050 * thread.c (set_thread_exited): New function.
13051 (init_thread_list): Delete "tp" only it is deletable, otherwise
13052 call set_thread_exited.
13053 (delete_thread_1): Call set_thread_exited.
13054 (current_thread_cleanup) <inferior_pid>: Remove.
13055 <thread>: New field.
13056 (restore_current_thread_ptid_changed): Removed.
13057 (do_restore_current_thread_cleanup): Adjust.
13058 (restore_current_thread_cleanup_dtor): Don't call
13059 find_thread_ptid.
13060 (set_thread_refcount): Use dec_refcount.
13061 (make_cleanup_restore_current_thread): Adjust.
13062 (thread_apply_all_command): Call inc_refcount.
13063 (_initialize_thread): Don't call
13064 observer_attach_thread_ptid_changed.
13065
13066 2017-04-10 Yao Qi <yao.qi@linaro.org>
13067
13068 * thread.c (delete_thread_1): Hoist code on marking thread as
13069 exited.
13070
13071 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13072
13073 * windows-nat.c (windows_detach): Initialize ptid with
13074 minus_one_ptid.
13075
13076 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13077
13078 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13079
13080 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13081
13082 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13083 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13084 (bfin_pseudo_register_write): Likewise
13085
13086 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13087
13088 * common/ptid.h (struct ptid): Change to...
13089 (class ptid_t): ... this.
13090 <ptid_t>: New constructors.
13091 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13092 matches>: New methods.
13093 <make_null, make_minus_one>: New static methods.
13094 <pid>: Rename to...
13095 <m_pid>: ...this.
13096 <lwp>: Rename to...
13097 <m_lwp>: ...this.
13098 <tid>: Rename to...
13099 <m_tid>: ...this.
13100 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13101 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13102 as references, move comment to class ptid_t.
13103 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13104 ptid_t static methods.
13105 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13106 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13107 Take ptid arguments as references, implement using ptid_t methods.
13108 * unittests/ptid-selftests.c: New file.
13109 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13110 unittests/ptid-selftests.c.
13111 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13112
13113 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13114
13115 * python/python.c (python_run_simple_file): Cast mode literal to
13116 non-const char pointer as expected by PyFile_FromString.
13117
13118 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13119
13120 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13121 minus_one_ptid and null_ptid.
13122
13123 2017-04-05 Pedro Alves <palves@redhat.com>
13124
13125 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13126 * configure: Regenerate.
13127
13128 2017-04-05 Pedro Alves <palves@redhat.com>
13129
13130 * ada-exp.y (yyerror): Constify.
13131 * ada-lang.c (bound_name, get_selections)
13132 (ada_variant_discrim_type)
13133 (ada_variant_discrim_name, ada_value_struct_elt)
13134 (ada_lookup_struct_elt_type, is_unchecked_variant)
13135 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13136 (catch_ada_exception_command_split)
13137 (catch_ada_assert_command_split, catch_assert_command)
13138 (ada_op_name): Constify.
13139 * ada-lang.h (ada_yyerror, get_selections)
13140 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13141 * arc-tdep.c (arc_print_frame_cache): Constify.
13142 * arm-tdep.c (arm_skip_stub): Constify.
13143 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13144 (gen_aggregate_elt_ref): Constify.
13145 * bcache.c (print_bcache_statistics): Constify.
13146 * bcache.h (print_bcache_statistics): Constify.
13147 * break-catch-throw.c (catch_exception_command_1):
13148 * breakpoint.c (struct ep_type_description::description):
13149 Constify.
13150 (add_solib_catchpoint): Constify.
13151 (catch_fork_command_1): Add cast.
13152 (add_catch_command): Constify.
13153 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13154 Constify.
13155 * bsd-uthread.c (bsd_uthread_state): Constify.
13156 * buildsym.c (patch_subfile_names): Constify.
13157 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13158 Constify.
13159 * c-exp.y (yyerror): Constify.
13160 (token::oper): Constify.
13161 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13162 * c-varobj.c (cplus_describe_child): Constify.
13163 * charset.c (find_charset_names): Add cast.
13164 (find_charset_names): Constify array and add const_cast.
13165 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13166 (edit_command): Constify.
13167 * cli/cli-decode.c (lookup_cmd): Constify.
13168 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13169 Constify.
13170 (struct dump_context): Constify.
13171 (add_dump_command, restore_command): Constify.
13172 * cli/cli-script.c (get_command_line): Constify.
13173 * cli/cli-script.h (get_command_line): Constify.
13174 * cli/cli-utils.c (check_for_argument): Constify.
13175 * cli/cli-utils.h (check_for_argument): Constify.
13176 * coff-pe-read.c (struct read_pe_section_data): Constify.
13177 * command.h (lookup_cmd): Constify.
13178 * common/print-utils.c (decimal2str): Constify.
13179 * completer.c (gdb_print_filename): Constify.
13180 * corefile.c (set_gnutarget): Constify.
13181 * cp-name-parser.y (yyerror): Constify.
13182 * cp-valprint.c (cp_print_class_member): Constify.
13183 * cris-tdep.c (cris_register_name, crisv32_register_name):
13184 Constify.
13185 * d-exp.y (yyerror): Constify.
13186 (struct token::oper): Constify.
13187 * d-lang.h (d_yyerror): Constify.
13188 * dbxread.c (struct header_file_location::name): Constify.
13189 (add_old_header_file, add_new_header_file, last_function_name)
13190 (dbx_next_symbol_text, add_bincl_to_list)
13191 (find_corresponding_bincl_psymtab, set_namestring)
13192 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13193 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13194 * defs.h (command_line_input, print_address_symbolic)
13195 (deprecated_readline_begin_hook): Constify.
13196 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13197 Constify.
13198 * event-top.c (handle_line_of_input): Constify and add cast.
13199 * exceptions.c (catch_errors): Constify.
13200 * exceptions.h (catch_errors): Constify.
13201 * expprint.c (print_subexp_standard, op_string, op_name)
13202 (op_name_standard, dump_raw_expression, dump_raw_expression):
13203 * expression.h (op_name, op_string, dump_raw_expression):
13204 Constify.
13205 * f-exp.y (yyerror): Constify.
13206 (struct token::oper): Constify.
13207 (struct f77_boolean_val::name): Constify.
13208 * f-lang.c (f_word_break_characters): Constify.
13209 * f-lang.h (f_yyerror): Constify.
13210 * fork-child.c (fork_inferior): Add cast.
13211 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13212 (new_variant): Constify.
13213 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13214 * gdbarch.c: Regenerate.
13215 * gdbcore.h (set_gnutarget): Constify.
13216 * go-exp.y (yyerror): Constify.
13217 (token::oper): Constify.
13218 * go-lang.h (go_yyerror): Constify.
13219 * go32-nat.c (go32_sysinfo): Constify.
13220 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13221 * guile/scm-cmd.c (cmdscm_function): Constify.
13222 * guile/scm-param.c (pascm_param_value): Constify.
13223 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13224 (h8300sx_register_name): Constify.
13225 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13226 Constify.
13227 * ia64-tdep.c (ia64_register_names): Constify.
13228 * infcmd.c (construct_inferior_arguments): Constify.
13229 (path_command, attach_post_wait): Constify.
13230 * language.c (show_range_command, show_case_command)
13231 (unk_lang_error): Constify.
13232 * language.h (language_defn::la_error)
13233 (language_defn::la_name_of_this): Constify.
13234 * linespec.c (decode_line_2): Constify.
13235 * linux-thread-db.c (thread_db_err_str): Constify.
13236 * lm32-tdep.c (lm32_register_name): Constify.
13237 * m2-exp.y (yyerror): Constify.
13238 * m2-lang.h (m2_yyerror): Constify.
13239 * m32r-tdep.c (m32r_register_names): Constify and make static.
13240 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13241 * m88k-tdep.c (m88k_register_name): Constify.
13242 * macroexp.c (appendmem): Constify.
13243 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13244 (upgrade_type, parse_external, parse_partial_symbols)
13245 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13246 (new_symbol): Constify.
13247 * memattr.c (mem_info_command): Constify.
13248 * mep-tdep.c (register_name_from_keyword): Constify.
13249 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13250 Constify.
13251 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13252 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13253 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13254 cast.
13255 (mi_execute_async_cli_command): Constify.
13256 * mips-tdep.c (mips_register_name): Constify.
13257 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13258 (am33_register_name, am33_2_register_name)
13259 * moxie-tdep.c (moxie_register_names): Constify.
13260 * nat/linux-osdata.c (osdata_type): Constify fields.
13261 * nto-tdep.c (nto_parse_redirection): Constify.
13262 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13263 (lookup_child_selector): Constify.
13264 (objc_methcall::name): Constify.
13265 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13266 (lookup_struct_typedef): Constify.
13267 * objfiles.c (pc_in_section): Constify.
13268 * objfiles.h (pc_in_section): Constify.
13269 * p-exp.y (struct token::oper): Constify.
13270 (yyerror): Constify.
13271 * p-lang.h (pascal_yyerror): Constify.
13272 * parser-defs.h (op_name_standard): Constify.
13273 (op_print::string): Constify.
13274 (exp_descriptor::op_name): Constify.
13275 * printcmd.c (print_address_symbolic): Constify.
13276 * psymtab.c (print_partial_symbols): Constify.
13277 * python/py-breakpoint.c (stop_func): Constify.
13278 (bppy_get_expression): Constify.
13279 * python/py-cmd.c (cmdpy_completer::name): Constify.
13280 (cmdpy_function): Constify.
13281 * python/py-event.c (evpy_add_attribute)
13282 (gdbpy_initialize_event_generic): Constify.
13283 * python/py-event.h (evpy_add_attribute)
13284 (gdbpy_initialize_event_generic): Constify.
13285 * python/py-evts.c (add_new_registry): Constify.
13286 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13287 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13288 * python/py-inferior.c (get_buffer): Add cast.
13289 * python/py-param.c (parm_constant::name): Constify.
13290 * python/py-unwind.c (fprint_frame_id): Constify.
13291 * python/python.c (gdbpy_parameter_value): Constify.
13292 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13293 * remote.c (memory_packet_config::name): Constify.
13294 (show_packet_config_cmd, remote_write_bytes)
13295 (remote_buffer_add_string):
13296 * reverse.c (exec_reverse_once): Constify.
13297 * rs6000-tdep.c (variant::name, variant::description): Constify.
13298 * rust-exp.y (rustyyerror): Constify.
13299 * rust-lang.c (rust_op_name): Constify.
13300 * rust-lang.h (rustyyerror): Constify.
13301 * serial.h (serial_ops::name): Constify.
13302 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13303 (sh_sh3e_register_name, sh_sh2e_register_name)
13304 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13305 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13306 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13307 (sh_sh4al_dsp_register_name): Constify.
13308 * sh64-tdep.c (sh64_register_name): Constify.
13309 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13310 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13311 * stabsread.c (patch_block_stabs, read_type_number)
13312 (ref_map::stabs, ref_add, process_reference)
13313 (symbol_reference_defined, define_symbol, define_symbol)
13314 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13315 (read_one_struct_field, read_struct_fields, read_baseclasses)
13316 (read_tilde_fields, read_struct_type, read_array_type)
13317 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13318 (read_huge_number, read_range_type, read_args, common_block_start)
13319 (find_name_end): Constify.
13320 * stabsread.h (common_block_start, define_symbol)
13321 (process_one_symbol, symbol_reference_defined, ref_add):
13322 * symfile.c (get_section_index, add_symbol_file_command):
13323 * symfile.h (get_section_index): Constify.
13324 * target-descriptions.c (tdesc_type::name): Constify.
13325 (tdesc_free_type): Add cast.
13326 * target.c (find_default_run_target):
13327 (add_deprecated_target_alias, find_default_run_target)
13328 (target_announce_detach): Constify.
13329 (do_option): Constify.
13330 * target.h (add_deprecated_target_alias): Constify.
13331 * thread.c (print_thread_info_1): Constify.
13332 * top.c (deprecated_readline_begin_hook, command_line_input):
13333 Constify.
13334 (init_main): Add casts.
13335 * top.h (handle_line_of_input): Constify.
13336 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13337 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13338 (tfind_command): Rename to ...
13339 (tfind_command_1): ... this and constify.
13340 (tfind_command): New function.
13341 (tfind_end_command, tfind_start_command): Adjust.
13342 (encode_source_string): Constify.
13343 * tracepoint.h (encode_source_string): Constify.
13344 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13345 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13346 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13347 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13348 * tui/tui-win.c (parse_scrolling_args): Constify.
13349 * tui/tui-windata.c (tui_erase_data_content): Constify.
13350 * tui/tui-windata.h (tui_erase_data_content): Constify.
13351 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13352 * tui/tui.c (tui_enable): Add cast.
13353 * utils.c (defaulted_query): Constify.
13354 (init_page_info): Add cast.
13355 (puts_debug, subset_compare): Constify.
13356 * utils.h (subset_compare): Constify.
13357 * varobj.c (varobj_format_string): Constify.
13358 * varobj.h (varobj_format_string): Constify.
13359 * vax-tdep.c (vax_register_name): Constify.
13360 * windows-nat.c (windows_detach): Constify.
13361 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13362 * xml-support.c (gdb_xml_end_element): Constify.
13363 * xml-tdesc.c (tdesc_start_reg): Constify.
13364 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13365 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13366 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13367
13368 2017-04-05 Pedro Alves <palves@redhat.com>
13369
13370 * proc-api.c (struct trans): Constify.
13371 (procfs_note): Constify.
13372 * proc-events.c (struct trans, syscall_table):
13373 * proc-flags.c (struct trans): Constify.
13374 * proc-utils.h (procfs_note): Constify.
13375 * proc-why.c (struct trans): Constify.
13376 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13377 (procfs_detach): Constify.
13378 * sol-thread.c (struct string_map): Constify.
13379 (td_err_string, td_state_string): Constify.
13380
13381 2017-04-05 Pedro Alves <palves@redhat.com>
13382
13383 * proc-api.c (procfs_filename): Don't initialize
13384 procfs_filename.
13385 (prepare_to_trace): Assume procfs_filename is non-NULL.
13386 (_initialize_proc_api): Give procfs_filename a default value here.
13387
13388 2017-04-05 Pedro Alves <palves@redhat.com>
13389
13390 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13391 'cond_string' parameter.
13392 (extract_exception_regexp): Constify 'string' parameter.
13393 (catch_exception_command_1): Constify.
13394 * breakpoint.c (init_catchpoint)
13395 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13396 parameter.
13397 (ep_parse_optional_if_clause, catch_fork_command_1)
13398 (catch_exec_command_1): Constify.
13399 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13400 parameter.
13401 (ep_parse_optional_if_clause): Constify.
13402 * cli/cli-utils.c (remove_trailing_whitespace)
13403 (check_for_argument): Constify.
13404 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13405 non-const overload.
13406 (check_for_argument): Likewise.
13407
13408 2017-04-05 Pedro Alves <palves@redhat.com>
13409
13410 * event-top.c (command_line_handler): Add cast to execute_command
13411 call.
13412 * record-btrace.c (cmd_record_btrace_bts_start)
13413 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13414 (cmd_record_btrace_start): Add cast to execute_command call.
13415 * record-full.c (record_full_goto_insn):
13416 * record.c (record_start, record_stop): Add cast to
13417 execute_command_to_string calls.
13418 (cmd_record_start): Add cast to execute_command calls.
13419
13420 2017-04-05 Pedro Alves <palves@redhat.com>
13421
13422 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13423 static inline function.
13424 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13425 array and use gdb_PyArg_ParseTupleAndKeywords.
13426 * python/py-cmd.c (cmdpy_init): Likewise.
13427 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13428 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13429 (infpy_search_memory): Likewise.
13430 * python/py-objfile.c (objfpy_add_separate_debug_file)
13431 (gdbpy_lookup_objfile): Likewise.
13432 * python/py-symbol.c (gdbpy_lookup_symbol)
13433 (gdbpy_lookup_global_symbol): Likewise.
13434 * python/py-type.c (gdbpy_lookup_type): Likewise.
13435 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13436 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13437 Likewise.
13438
13439 2017-04-05 Pedro Alves <palves@redhat.com>
13440
13441 * python/python-internal.h (gdb_PyGetSetDef): New type.
13442 * python/py-block.c (block_object_getset)
13443 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13444 * python/py-event.c (event_object_getset)
13445 (finish_breakpoint_object_getset): Likewise.
13446 * python/py-inferior.c (inferior_object_getset): Likewise.
13447 * python/py-infthread.c (thread_object_getset): Likewise.
13448 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13449 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13450 * python/py-objfile.c (objfile_getset): Likewise.
13451 * python/py-progspace.c (pspace_getset): Likewise.
13452 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13453 Likewise.
13454 * python/py-record.c (recpy_record_getset): Likewise.
13455 * python/py-symbol.c (symbol_object_getset): Likewise.
13456 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13457 Likewise.
13458 * python/py-type.c (type_object_getset, field_object_getset):
13459 Likewise.
13460 * python/py-value.c (value_object_getset): Likewise.
13461
13462 2017-04-05 Pedro Alves <palves@redhat.com>
13463
13464 * python/python-internal.h (gdb_PyObject_CallMethod)
13465 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13466 New functions.
13467 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13468 (PySys_GetObject, PySys_SetPath): New macros.
13469
13470 2017-04-05 Pedro Alves <palves@redhat.com>
13471
13472 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13473 info_osdata_command.
13474 * osdata.c (info_osdata_command): Rename to ...
13475 (info_osdata): ... this. Constify 'type' parameter, and remove
13476 the 'from_tty' parameter. Accept NULL TYPE.
13477 (info_osdata_command): New function.
13478 * osdata.h (info_osdata_command): Remove declaration.
13479 (info_osdata): New declaration.
13480
13481 2017-04-05 Pedro Alves <palves@redhat.com>
13482
13483 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13484 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13485 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13486 parameter.
13487 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13488 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13489 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13490 parameter.
13491 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13492 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13493 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13494 (mi_cmd_file_list_exec_source_files)
13495 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13496 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13497 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13498 parameter.
13499 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13500 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13501 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13502 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13503 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13504 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13505 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13506 'command' parameter.
13507 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13508 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13509 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13510 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13511 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13512 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13513 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13514 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13515 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13516 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13517 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13518 parameter.
13519 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13520 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13521 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13522 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13523 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13524 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13525 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13526 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13527 (mi_cmd_data_list_changed_registers)
13528 (mi_cmd_data_write_register_values)
13529 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13530 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13531 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13532 (mi_cmd_list_features, mi_cmd_list_target_features)
13533 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13534 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13535 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13536 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13537 (mi_cmd_trace_frame_collected): Constify 'command'
13538 parameter.
13539 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13540 'command' parameter.
13541
13542 2017-04-05 Pedro Alves <palves@redhat.com>
13543
13544 * ada-lang.c (ada_completer_word_break_characters): Now a const
13545 array.
13546 (ada_get_gdb_completer_word_break_characters): Constify.
13547 * completer.c (gdb_completer_command_word_break_characters)
13548 (gdb_completer_file_name_break_characters)
13549 (gdb_completer_quote_characters): Now const arrays.
13550 (get_gdb_completer_quote_characters): Constify.
13551 (set_rl_completer_word_break_characters): New function.
13552 (set_gdb_completion_word_break_characters)
13553 (complete_line_internal): Use it.
13554 * completer.h (get_gdb_completer_quote_characters): Constify.
13555 (set_rl_completer_word_break_characters): Declare.
13556 * f-lang.c (f_word_break_characters): Constify.
13557 * language.c (default_word_break_characters): Constify.
13558 * language.h (language_defn::la_word_break_characters): Constify.
13559 (default_word_break_characters): Constify.
13560 * top.c (init_main): Use set_rl_completer_word_break_characters.
13561
13562 2017-04-05 Pedro Alves <palves@redhat.com>
13563
13564 * aix-thread.c (aix_thread_pid_to_str)
13565 (aix_thread_extra_thread_info): Constify.
13566 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13567 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13568 (bsd_uthread_pid_to_str): Constify.
13569 * corelow.c (core_pid_to_str): Constify.
13570 * darwin-nat.c (darwin_pid_to_str): Constify.
13571 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13572 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13573 Constify.
13574 * gnu-nat.c (gnu_pid_to_str): Constify.
13575 * go32-nat.c (go32_pid_to_str): Constify.
13576 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13577 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13578 * inferior.c (inferior_pid_to_str): Constify.
13579 * linux-nat.c (linux_nat_pid_to_str): Constify.
13580 * linux-tdep.c (linux_core_pid_to_str): Constify.
13581 * linux-thread-db.c (thread_db_pid_to_str)
13582 (thread_db_extra_thread_info): Constify.
13583 * nto-tdep.c (nto_extra_thread_info): Constify.
13584 * nto-tdep.h (nto_extra_thread_info): Constify.
13585 * obsd-nat.c (obsd_pid_to_str): Constify.
13586 * procfs.c (procfs_pid_to_str): Constify.
13587 * ravenscar-thread.c (ravenscar_extra_thread_info)
13588 (ravenscar_pid_to_str): Constify.
13589 * remote-sim.c (gdbsim_pid_to_str): Constify.
13590 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13591 Constify.
13592 * sol-thread.c (solaris_pid_to_str): Constify.
13593 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13594 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13595 * target.c (default_pid_to_str, target_pid_to_str)
13596 (normal_pid_to_str, default_pid_to_str): Constify.
13597 * target.h (target_ops::to_pid_to_str)
13598 (target_ops::to_extra_thread_info): Constify.
13599 (target_pid_to_str, normal_pid_to_str): Constify.
13600 * windows-nat.c (windows_pid_to_str): Constify.
13601 * gdbarch.sh (core_pid_to_str): Constify.
13602 * target-delegates.c: Regenerate.
13603 * gdbarch.h, gdbarch.c: Regenerate.
13604
13605 2017-04-05 Pedro Alves <palves@redhat.com>
13606
13607 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13608 the memory of the temporary warning_pre_print override.
13609 * utils.c (warning_pre_print): Constify.
13610 * utils.h (warning_pre_print): Constify.
13611
13612 2017-04-05 Pedro Alves <palves@redhat.com>
13613
13614 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13615 (shell_command): New function.
13616 (make_command): Use std::string.
13617 (init_cli_cmds): Register shell_command instead of shell_escape.
13618
13619 2017-04-05 Pedro Alves <palves@redhat.com>
13620
13621 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13622 * tracepoint.c (default_collect): Don't initialize.
13623
13624 2017-04-05 Pedro Alves <palves@redhat.com>
13625
13626 * macroexp.c (macro_buffer::shared): Now a bool.
13627 (init_buffer): Update.
13628 (init_shared_buffer): Constify 'addr' parameter.
13629 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13630 casts.
13631
13632 2017-04-05 Pedro Alves <palves@redhat.com>
13633
13634 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13635 * disasm.c (set_disassembler_options): Constify local.
13636 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13637
13638 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13639
13640 PR gdb/21352
13641 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13642 option.
13643
13644 2017-04-05 Yao Qi <yao.qi@linaro.org>
13645
13646 * frame.c (frame_unwind_register_unsigned): Call
13647 frame_unwind_register_value.
13648
13649 2017-04-05 Yao Qi <yao.qi@linaro.org>
13650
13651 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13652 Use gdb_test_multiple, and don't match anchor.
13653
13654 2017-04-05 Pedro Alves <palves@redhat.com>
13655
13656 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13657 (Write After Approval): Remove Simon Marchi.
13658
13659 2017-04-05 Pedro Alves <palves@redhat.com>
13660
13661 * common/gdb_optional.h (optional::optional): Make constexpr and
13662 initialize m_dummy.
13663
13664 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13665
13666 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13667 (amd64fbsd_jmp_buf_reg_offset): Remove.
13668 (amd64fbsd_supply_uthread): Remove function.
13669 (amd64fbsd_collect_uthread): Remove function.
13670 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13671 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13672 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13673 (fbsd-nat.c): Update comment.
13674 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13675 (i386fbsd_jmp_buf_reg_offset): Remove.
13676 (i386fbsd_supply_uthread): Remove function.
13677 (i386fbsd_collect_uthread): Remove function.
13678 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13679
13680 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13681
13682 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13683 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13684 * NEWS: Mention that support for FreeBSD/alpha was removed.
13685 * alpha-fbsd-tdep.c: Delete file.
13686 * config/alpha/fbsd.mh: Delete file.
13687 * configure.host: Delete alpha*-*-freebsd* and
13688 alpha*-*-kfreebsd*-gnu.
13689 * configure.tgt: Delete alpha*-*-freebsd* and
13690 alpha*-*-kfreebsd*-gnu.
13691
13692 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13693
13694 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13695 amd64bsd_store_inferior_registers): Use ptid from regcache.
13696
13697 2017-04-04 Pedro Alves <palves@redhat.com>
13698
13699 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13700 data fields, make them private and add "m_" prefixes.
13701 (lnp_state_machine::lnp_state_machine): New ctor.
13702 (record_line, check_line_address, handle_set_discriminator)
13703 (handle_set_address, handle_advance_pc, handle_special_opcode)
13704 (handle_advance_line, handle_set_file, handle_negate_stmt)
13705 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13706 (end_sequence, advance_line): New methods.
13707 (m_gdbarch, m_record_lines_p): New fields.
13708 (lnp_reader_state): Delete.
13709 (dwarf_record_line): Rename to ...
13710 (lnp_state_machine::record_line): ... adjust.
13711 (init_lnp_state_machine): Delete.
13712 (lnp_state_machine::lnp_state_machine): New.
13713 (check_line_address): Rename to ...
13714 (lnp_state_machine::check_line_address): This.
13715 (dwarf_decode_lines_1): Remove reference to "reader_state".
13716 Adjust lnp_state_machine having a non-default ctor. Use bool.
13717 State machine internal state manipulation moved to
13718 lnp_state_machine methods.
13719
13720 2017-04-04 Pedro Alves <palves@redhat.com>
13721
13722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13723 unittests/offset-type-selftests.c.
13724 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13725 * common/offset-type.h: New file.
13726 * common/preprocessor.h: New file.
13727 * common/traits.h: New file.
13728 * common/valid-expr.h: New file.
13729 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13730 sect_offset and cu_offset strong typedefs throughout.
13731 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13732 typedefs throughout.
13733 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13734 sect_offset and cu_offset strong typedefs throughout.
13735 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13736 typedefs throughout.
13737 * gdbtypes.h: Include "common/offset-type.h".
13738 (cu_offset): Now an offset type (strong typedef) instead of a
13739 struct.
13740 (sect_offset): Likewise.
13741 (union call_site_parameter_u): Rename "param_offset" field to
13742 "param_cu_off".
13743 * unittests/offset-type-selftests.c: New file.
13744
13745 2017-04-04 Pedro Alves <palves@redhat.com>
13746
13747 * common/underlying.h: New file.
13748 * dwarf2read.c: Include "common/gdb_optional.h" and
13749 "common/underlying.h".
13750 (dir_index, file_name_index): New types.
13751 (file_entry): Use them.
13752 (file_entry::include): Use to_underlying.
13753 (line_header::add_file_name): Use dir_index.
13754 (read_formatted_entries): Use gdb::optional. Read form before
13755 writting to file_entry.
13756 (dwarf_decode_line_header): Use dir_index.
13757 (lnp_state_machine::current_file): Use to_underlying.
13758 (lnp_state_machine::file): Change type to file_name_index.
13759 (dwarf_record_line): Use to_underlying.
13760 (init_lnp_state_machine): Use file_name_index.
13761 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13762
13763 2017-04-04 Pedro Alves <palves@redhat.com>
13764
13765 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13766 operator bool, has_value and get methods.
13767
13768 2017-04-04 Pedro Alves <palves@redhat.com>
13769
13770 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13771 fields.
13772 (line_header): Initialize all data fields. Change type of
13773 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13774 Change type of include_dirs to std::vector<const char *>. Remove
13775 num_include_dirs, include_dirs_size. Change type of file_names to
13776 std::vector<file_entry>. Remove num_file_names, file_names_size.
13777 (line_header::line_header): New.
13778 (line_header::add_include_dir, line_header::add_file_name): New
13779 methods.
13780 (line_header::include_dir_at): Remove NULL check.
13781 (line_header::file_name_at): Add const overload.
13782 (line_header_up): New unique_ptr typedef.
13783 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13784 std::vector. Remove free_line_header call.
13785 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13786 free_line_header call.
13787 (free_cu_line_header): Delete.
13788 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13789 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13790 Adjust to use std::vector.
13791 (free_line_header): Delete.
13792 (free_line_header_voidp): Use delete.
13793 (add_include_dir): Replace with ...
13794 (line_header::add_include_dir): ... this method. Use std::vector.
13795 (add_file_name): Replace with ...
13796 (line_header::add_file_name): ... this method. Use std::vector.
13797 (add_include_dir_stub): Delete.
13798 (read_formatted_entries): Remove memset.
13799 (dwarf_decode_line_header): Return a line_header_up instead of a
13800 raw pointer. Remove cleanup handling. Pass lambdas to
13801 read_formatted_entries. Adjust to use line_header methods.
13802 (dwarf_decode_lines_1): Adjust to use line_header methods.
13803 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13804 use std::vector.
13805
13806 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13807
13808 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13809 instead of struct ptid.
13810
13811 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13812
13813 * frame.c (get_frame_register_bytes): Unwind using value.
13814 (put_frame_register_bytes): Likewise.
13815
13816 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13817
13818 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13819 aggregate-like.
13820
13821 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13822
13823 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13824
13825 2017-03-29 Yao Qi <yao.qi@linaro.org>
13826
13827 * gdbthread.h (struct thread_info): Declare constructor and
13828 destructor. Add some in-class member initializers.
13829 * thread.c (free_thread): Remove.
13830 (init_thread_list): Call delete instead of free_thread.
13831 (new_thread): Call thread_info constructor.
13832 (thread_info::thread_info): New function.
13833 (thread_info::~thread_info): New function.
13834 (delete_thread_1): Call delete instead of free_thread.
13835 (make_cleanup_restore_current_thread): Move tp and frame to
13836 inner block.
13837
13838 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13839
13840 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13841 (arc_skip_prologue): Likewise.
13842 (arc_make_frame_cache): Likewise.
13843 (arc_pv_get_operand): New function.
13844 (arc_is_in_prologue): Likewise.
13845 (arc_analyze_prologue): Likewise.
13846 (arc_print_frame_cache): Likewise.
13847 (MAX_PROLOGUE_LENGTH): New constant.
13848
13849 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13850
13851 * configure.tgt: Add arc-insn.o.
13852 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13853 (dump_arc_instruction_command): New function.
13854 (arc_fprintf_disasm): Likewise.
13855 (arc_disassemble_info): Likewise.
13856 (arc_insn_get_operand_value): Likewise.
13857 (arc_insn_get_operand_value_signed): Likewise.
13858 (arc_insn_get_memory_base_reg): Likewise.
13859 (arc_insn_get_memory_offset): Likewise.
13860 (arc_insn_get_branch_target): Likewise.
13861 (arc_insn_dump): Likewise.
13862 (arc_insn_get_linear_next_pc): Likewise.
13863 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13864 (arc_disassemble_info): Likewise.
13865 (arc_insn_get_branch_target): Likewise.
13866 (arc_insn_get_linear_next_pc): Likewise.
13867 * NEWS: Mention new "maint print arc arc-instruction".
13868
13869 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13870
13871 * arc-tdep (maintenance_print_arc_list): New variable.
13872 (maintenance_print_arc_command): New function.
13873
13874 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13875
13876 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13877 Add "limm" and "reserved".
13878 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13879 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13880 * arc-tdep.h (arc_regnum): Likewise.
13881
13882 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13883
13884 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13885 for THREADPTR register.
13886 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13887 register.
13888 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13889 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13890 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13891
13892 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13893
13894 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13895 registers above gdbarch_num_regs (gdbarch) as privileged in
13896 call0 ABI.
13897
13898 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13899
13900 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13901 for a single specified register or for all registers in
13902 a0_base..a0_base + C0_NREGS range.
13903 (supply_gregset_reg): Call regcache_raw_supply for a single
13904 specified register or for all registers in a0_base..a0_base +
13905 C0_NREGS range.
13906
13907 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13908
13909 * arch/xtensa.h (C0_NREGS): Add definition.
13910 * xtensa-tdep.c (C0_NREGS): Remove definition.
13911
13912 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13913
13914 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13915 Drop xtensa_default_isa initialization.
13916 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13917
13918 2017-03-27 Pedro Alves <palves@redhat.com>
13919
13920 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13921 (file_entry::include_dir): New method.
13922 (line_header::include_dir_at, line_header::file_name_at): New
13923 methods.
13924 (setup_type_unit_groups, setup_type_unit_groups)
13925 (psymtab_include_file_name): Simplify using the new methods.
13926 (lnp_state_machine) <the_line_header>: New field.
13927 <file>: Add comment.
13928 (lnp_state_machine::current_file): New method.
13929 (dwarf_record_line): Simplify using the new methods.
13930 (init_lnp_state_machine): Initialize the "the_line_header" field.
13931 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13932 Simplify using the new methods.
13933
13934 2017-03-27 Pedro Alves <palves@redhat.com>
13935
13936 * cp-name-parser.y (make_empty): Delete.
13937 (demangler_special, nested_name, ptr_operator, array_indicator)
13938 (direct_declarator, declarator_1): Use fill_comp instead of
13939 make_empty.
13940
13941 2017-03-27 Pedro Alves <palves@redhat.com>
13942
13943 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13944 to ATTRIBUTE_PRINTF.
13945 * solib-target.c (library_list_start_list): Print "string" not
13946 "version".
13947 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13948 gdb_xml_error call.
13949
13950 2017-03-27 Pedro Alves <palves@redhat.com>
13951
13952 * dwarf2read.c (struct file_and_directory): New.
13953 (dwarf2_get_dwz_file): Adjust to use std::string.
13954 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13955 (find_file_and_directory): Adjust to return a file_and_directory
13956 object.
13957 (read_file_scope): Adjust to use file_and_directory. Remove
13958 make_cleanup/do_cleanups calls.
13959 (open_and_init_dwp_file): Adjust to use std::string. Remove
13960 make_cleanup/do_cleanups calls.
13961 * python/python.c (do_start_initialization): Adjust to ldirname
13962 returning a std::string.
13963 * utils.c (ldirname): Now returns a std::string.
13964 * utils.h (ldirname): Change return type to std::string.
13965 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13966 returning a std::string.
13967 * xml-tdesc.c (file_read_description_xml): Likewise.
13968
13969 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13970
13971 * regcache.c (regcache_debug_print_register): New function.
13972 * regcache.h (regcache_debug_print_register): New declaration.
13973 * target.c (debug_print_register): Remove.
13974 (target_fetch_registers): Call regcache_debug_print_register.
13975 (target_store_registers): Likewise.
13976
13977 2017-03-24 Pádraig Brady <pbrady@fb.com>
13978
13979 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13980 reference beyond the 'lh->include_dirs' array before accessing to
13981 it.
13982 (psymtab_include_file_name): Likewise.
13983 (dwarf_decode_lines_1): Likewise.
13984 (dwarf_decode_lines): Likewise.
13985 (file_file_name): Likewise.
13986
13987 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13988
13989 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13990 inferior_ptid.
13991 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13992 ps_lsetfpregs): Likewise.
13993 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13994 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13995 ps_lsetfpregs): Likewise.
13996 * target.c (target_fetch_registers, target_store_registers):
13997 Remove asserts.
13998
13999 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14000
14001 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14002
14003 2017-03-23 Yao Qi <yao.qi@linaro.org>
14004
14005 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14006 (_initialize_aarch64_tdep): Register it.
14007 (aarch64_record_load_store): Handle PRFM instruction.
14008 (aarch64_process_record_test): New function.
14009
14010 2017-03-23 Yao Qi <yao.qi@linaro.org>
14011
14012 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14013 indentation.
14014
14015 2017-03-23 Yao Qi <yao.qi@linaro.org>
14016
14017 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14018
14019 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14020
14021 python/python.c (do_start_initialization): Fix memory leak.
14022
14023 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14024
14025 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14026 using get_ptrace_pid.
14027 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14028 inferior_ptid.
14029 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14030 inferior_ptid instead of pid.
14031
14032 2017-03-22 Yao Qi <yao.qi@linaro.org>
14033
14034 * aarch64-tdep.c: Wrap locally used classes in anonymous
14035 namespace.
14036 * arm-tdep.c: Likewise.
14037 * linespec.c: Likewise.
14038 * ui-out.c: Likewise.
14039
14040 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14041
14042 PR gdb/19637
14043 * python/lib/gdb/printer/bound_registers.py: Import sys.
14044
14045 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14046
14047 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14048 windows_thread_info parameter and use it instead of
14049 current_thread.
14050 (windows_fetch_inferior_registers): Don't set current_thread,
14051 pass the thread to do_windows_fetch_inferior_registers. Use
14052 ptid from regcache instead of inferior_ptid.
14053 (do_windows_store_inferior_registers): Add windows_thread_info
14054 parameter and use it instead of current_thread.
14055 (windows_store_inferior_registers): Don't set current_thread,
14056 pass the thread to do_windows_store_inferior_registers. Use
14057 ptid from regcache instead of inferior_ptid.
14058
14059 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14060
14061 * ser-mingw.c (ser_windows_raw): Remove reference to
14062 struct serial::current_timeout.
14063
14064 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14065
14066 PR tdep/20928
14067 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14068 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14069 (sparc64_fsr_type): Fix %fsr decoding.
14070
14071 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14072
14073 * python/py-record-btrace.c (btpy_insn_data): Change return type
14074 for Python 2.
14075
14076 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14077
14078 * spu-linux-nat.c (spu_fetch_inferior_registers,
14079 spu_store_inferior_registers): Use ptid from regcache, set and
14080 restore inferior_ptid.
14081 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14082 Likewise.
14083
14084 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14085
14086 * i386-linux-nat.c (fetch_register, store_register,
14087 i386_linux_fetch_inferior_registers,
14088 i386_linux_store_inferior_registers): Use ptid from regcache.
14089 * ia64-linux-nat.c (ia64_linux_fetch_register,
14090 ia64_linux_store_register): Likewise.
14091 * inf-ptrace.c (inf_ptrace_fetch_register,
14092 inf_ptrace_store_register): Likewise.
14093 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14094 m32r_linux_store_inferior_registers): Likewise.
14095 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14096 m68kbsd_store_inferior_registers): Likewise.
14097 * m68k-linux-nat.c (fetch_register, store_register,
14098 m68k_linux_fetch_inferior_registers,
14099 m68k_linux_store_inferior_registers): Likewise.
14100 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14101 m88kbsd_store_inferior_registers): Likewise.
14102 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14103 mips_fbsd_store_inferior_registers): Likewise.
14104 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14105 mips64_linux_regsets_store_registers): Likewise.
14106 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14107 mipsnbsd_store_inferior_registers): Likewise.
14108 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14109 mips64obsd_store_inferior_registers): Likewise.
14110 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14111 Likewise.
14112 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14113 ppcfbsd_store_inferior_registers): Likewise.
14114 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14115 ppc_linux_store_inferior_registers): Likewise.
14116 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14117 ppcnbsd_store_inferior_registers): Likewise.
14118 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14119 ppcobsd_store_registers): Likewise.
14120 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14121 Likewise.
14122 * ravenscar-thread.c (ravenscar_fetch_registers,
14123 ravenscar_store_registers, ravenscar_prepare_to_store):
14124 Likewise.
14125 * record-btrace.c (record_btrace_fetch_registers,
14126 record_btrace_store_registers, record_btrace_prepare_to_store):
14127 Likewise.
14128 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14129 Lookup inferior using ptid from regcache, instead of
14130 current_inferior.
14131 * remote.c (remote_fetch_registers, remote_store_registers): Use
14132 ptid from regcache.
14133 * rs6000-nat.c (fetch_register, store_register): Likewise.
14134 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14135 s390_linux_store_inferior_registers): Likewise.
14136 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14137 shnbsd_store_inferior_registers): Likewise.
14138 * sol-thread.c (sol_thread_fetch_registers,
14139 sol_thread_store_registers): Likewise.
14140 * sparc-nat.c (sparc_fetch_inferior_registers,
14141 sparc_store_inferior_registers): Likewise.
14142 * tilegx-linux-nat.c (fetch_inferior_registers,
14143 store_inferior_registers): Likewise.
14144 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14145 vaxbsd_store_inferior_registers): Likewise.
14146 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14147 store_xtregs): Likewise.
14148
14149 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14150
14151 PR gdb/14441
14152 * NEWS: Mention support for rvalue references in GDB and python.
14153 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14154 supports both lvalue and rvalue references.
14155
14156 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14157
14158 PR gdb/14441
14159 * gdbtypes.c (rank_one_type): Implement overloading
14160 resolution rules regarding rvalue references.
14161
14162 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14163
14164 PR gdb/14441
14165 * aarch64-tdep.c (aarch64_type_align)
14166 (aarch64_extract_return_value, aarch64_store_return_value): Change
14167 lvalue reference type checks to general reference type checks.
14168 * amd64-tdep.c (amd64_classify): Likewise.
14169 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14170 Likewise.
14171 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14172 (arm_store_return_value): Likewise.
14173 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14174 * c-typeprint.c (c_print_type): Likewise.
14175 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14176 (cplus_number_of_children, cplus_describe_child): Likewise.
14177 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14178 * completer.c (expression_completer): Likewise.
14179 * cp-support.c (make_symbol_overload_list_adl_namespace):
14180 Likewise.
14181 * darwin-nat-info.c (info_mach_region_command): Likewise.
14182 * dwarf2loc.c (entry_data_value_coerce_ref)
14183 (value_of_dwarf_reg_entry): Likewise.
14184 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14185 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14186 Likewise.
14187 * findvar.c (extract_typed_address, store_typed_address):
14188 Likewise.
14189 * gdbtypes.c (rank_one_type): Likewise.
14190 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14191 * infcall.c (value_arg_coerce): Likewise.
14192 * language.c (pointer_type): Likewise.
14193 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14194 Likewise.
14195 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14196 * mn10300-tdep.c (mn10300_type_align): Likewise.
14197 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14198 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14199 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14200 Likewise.
14201 * printcmd.c (print_formatted, x_command): Likewise.
14202 * python/py-type.c (typy_get_composite, typy_template_argument):
14203 Likewise.
14204 * python/py-value.c (valpy_referenced_value)
14205 (valpy_get_dynamic_type, value_has_field): Likewise.
14206 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14207 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14208 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14209 * spu-tdep.c (spu_scalar_value_p): Likewise.
14210 * symtab.c (lookup_symbol_aux): Likewise.
14211 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14212 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14213 Likewise.
14214 * valops.c (value_cast_pointers, value_cast)
14215 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14216 (value_struct_elt, value_struct_elt_bitpos)
14217 (value_find_oload_method_list, find_overload_match)
14218 (value_rtti_indirect_type): Likewise.
14219 * valprint.c (val_print_scalar_type_p, generic_val_print):
14220 Likewise.
14221 * value.c (value_actual_type, value_as_address, unpack_long)
14222 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14223 (coerce_ref): Likewise.
14224 * varobj.c (varobj_get_value_type): Likewise.
14225
14226 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14227
14228 PR gdb/14441
14229 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14230 table of constants.
14231 * python/lib/gdb/command/explore.py: Support exploring values
14232 of rvalue reference types.
14233 * python/lib/gdb/types.py: Implement get_basic_type() for
14234 rvalue reference types.
14235 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14236 constant.
14237 * python/py-value.c (valpy_getitem): Add an rvalue reference
14238 check.
14239 (valpy_reference_value): Add new parameter "refcode".
14240 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14241 New wrappers for valpy_reference_value().
14242 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14243 (gdbpy_invoke_xmethod): Likewise.
14244
14245 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14246
14247 PR gdb/14441
14248 * dwarf2read.c (process_die, read_type_die_1): Handle the
14249 DW_TAG_rvalue_reference_type DIE.
14250 (read_tag_reference_type): Add new parameter "refcode".
14251
14252 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14253
14254 PR gdb/14441
14255 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14256 (c_type_print_modifier, c_type_print_varspec_suffix)
14257 (c_type_print_base): Support printing rvalue reference types.
14258 * c-valprint.c (c_val_print, c_value_print): Support printing
14259 rvalue reference values.
14260
14261 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14262
14263 PR gdb/14441
14264 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14265 typename.
14266 * cp-support.c (replace_typedefs): Handle
14267 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14268 * python/py-type.c (typy_lookup_type): Likewise.
14269
14270 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14271
14272 PR gdb/14441
14273 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14274 * parse.c (insert_type): Change assert statement.
14275 (follow_types): Handle rvalue reference types.
14276 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14277 constant.
14278
14279 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14280
14281 PR gdb/14441
14282 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14283 value_ref() interface.
14284 * c-valprint.c (c_value_print): Likewise.
14285 * infcall.c (value_arg_coerce): Likewise.
14286 * python/py-value.c (valpy_reference_value): Likewise.
14287 * valops.c (value_cast, value_reinterpret_cast)
14288 (value_dynamic_cast, typecmp): Likewise.
14289 (value_ref): Parameterize by kind of return value reference type.
14290 * value.h (value_ref): Add new parameter "refcode".
14291
14292 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14293
14294 PR gdb/14441
14295 * dwarf2read.c (read_tag_reference_type): Use
14296 lookup_lvalue_reference_type() instead of lookup_reference_type().
14297 * eval.c (evaluate_subexp_standard): Likewise.
14298 * f-exp.y: Likewise.
14299 * gdbtypes.c (make_reference_type, lookup_reference_type):
14300 Generalize with rvalue reference types.
14301 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14302 convenience wrappers for lookup_reference_type().
14303 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14304 reference kind parameter.
14305 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14306 wrappers for lookup_reference_type().
14307 * guile/scm-type.c (gdbscm_type_reference): Use
14308 lookup_lvalue_reference_type() instead of lookup_reference_type().
14309 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14310 * parse.c (follow_types): Likewise.
14311 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14312 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14313 Likewise.
14314 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14315 (gdbpy_invoke_xmethod): Likewise.
14316 * stabsread.c: Provide extra argument to make_reference_type()
14317 call.
14318 * valops.c (value_ref, value_rtti_indirect_type): Use
14319 lookup_lvalue_reference_type() instead of lookup_reference_type().
14320
14321 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14322
14323 PR gdb/14441
14324 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14325 (TYPE_IS_REFERENCE): New macro.
14326 (struct type): Add rvalue_reference_type field.
14327 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14328
14329 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14330
14331 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14332 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14333 New function definition.
14334 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14335 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14336 New function declaration.
14337 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14338 * mi/mi-interp.h: New file.
14339 * solib.c (info_sharedlibrary_command): Replace for loop with
14340 ALL_SO_LIBS macro
14341 * solib.h (update_solib_list): New function declaration.
14342 (so_list_head): Move macro.
14343 * solist.h (ALL_SO_LIBS): New macro.
14344
14345 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14346
14347 * infcmd.c (post_create_inferior): Remove unused argument in
14348 call to solib_add.
14349 * remote.c (remote_start_remote): Likewise.
14350 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14351 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14352 (enable_break): Likewise.
14353 * solib.c (update_solib_list): Remove unused target argument
14354 and its documentation.
14355 (solib_add): Remove unused target argument. Remove unused
14356 argument in call to update_solib_list.
14357 (info_sharedlibrary_command): Remove unused argument in call
14358 to update_solib_list.
14359 (sharedlibrary_command): Remove unused argument in call to
14360 solib_add.
14361 (handle_solib_event): Likewise.
14362 (reload_shared_libraries): Likewise.
14363 * solib.h (solib_add): Remove unused target argument.
14364
14365 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14366
14367 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14368 (s390_displaced_step_fixup): Cover relative branches with the
14369 default fixup handling. This fixes lack of support for some
14370 relative branch instructions.
14371
14372 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14373
14374 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14375 ptid from regcache.
14376
14377 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14378
14379 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14380 i386_darwin_store_inferior_registers): Use ptid from regcache.
14381
14382 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14383
14384 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14385 i386bsd_store_inferior_registers): Use ptid from regcache.
14386
14387 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14388
14389 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14390 hppaobsd_store_registers): Use ptid from regcache.
14391
14392 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14393
14394 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14395 hppanbsd_store_registers): Use ptid from regcache.
14396
14397 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14398
14399 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14400 from regcache. Use get_ptrace_pid.
14401
14402 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14403
14404 * corelow.c (get_core_register_section): Use ptid from regcache,
14405 update doc.
14406
14407 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14408
14409 * bsd-uthread.c (bsd_uthread_fetch_registers,
14410 bsd_uthread_store_registers): Use ptid from regcache, set and
14411 restore inferior_ptid.
14412
14413 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14414
14415 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14416 fetch_fp_regs, store_register, store_regs, store_fp_register,
14417 store_fp_regs): Use ptid from regcache.
14418
14419 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14420
14421 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14422 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14423 store_vfp_regs): Use ptid from regcache.
14424
14425 2017-03-17 Pedro Alves <palves@redhat.com>
14426
14427 PR remote/21188
14428 * ser-base.c (ser_base_wait_for): Add comment.
14429 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14430 version.
14431 * ser-unix.c (hardwire_raw): Remove reference to
14432 scb->current_timeout.
14433 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14434 (hardwire_ops): Install ser_base_readchar instead of
14435 hardwire_readchar.
14436 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14437 Remove fields.
14438
14439 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14440
14441 PR gdb/19637
14442 * python/lib/gdb/printer/bound_registers.py: Add support for
14443 Python 3.
14444
14445 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14446
14447 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14448 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14449 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14450 byte_offset to subobj_byte_offset. Fix the handling of
14451 DWARF_VALUE_STACK on big-endian targets when coming via an
14452 implicit pointer.
14453 (dwarf2_evaluate_loc_desc): Adjust call to
14454 dwarf2_evaluate_loc_desc_full.
14455 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14456 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14457
14458 2017-03-16 Yao Qi <yao.qi@linaro.org>
14459
14460 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14461 and REVSH instructions.
14462
14463 2017-03-16 Yao Qi <yao.qi@linaro.org>
14464
14465 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14466 (arm_record_test): Declare.
14467 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14468 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14469 align with the manual.
14470 (thumb_record_misc): Adjust the code order to align with the
14471 manual.
14472 (thumb2_record_decode_insn_handler): Fix instruction matching.
14473 (instruction_reader_thumb): New class.
14474 (arm_record_test): New function.
14475
14476 2017-03-16 Yao Qi <yao.qi@linaro.org>
14477
14478 * arm-tdep.c (abstract_memory_reader): New class.
14479 (instruction_reader): New class.
14480 (extract_arm_insn): Add argument 'reader'. Callers updated.
14481 (decode_insn): Likewise.
14482
14483 2017-03-16 Doug Evans <dje@google.com>
14484
14485 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14486 member. Change type of TYPE member to SCM. All uses updated.
14487 (lsscm_make_lazy_string_smob): Add assert.
14488 (lsscm_make_lazy_string): Flag bad length values.
14489 (lsscm_elt_type): New function.
14490 (gdbscm_lazy_string_to_value): Rewrite to use
14491 lsscm_safe_lazy_string_to_value.
14492 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14493 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14494 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14495 in incoming type.
14496 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14497 * guile/scm-type.c (tyscm_scm_to_type): New function.
14498
14499 2017-03-15 Doug Evans <dje@google.com>
14500
14501 PR python/17728, python/18439, python/18779
14502 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14503 member. Change type of TYPE member to PyObject *. All uses updated.
14504 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14505 (gdbpy_create_lazy_string_object): Flag bad length values.
14506 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14507 Handle typedefs in incoming type.
14508 (stpy_lazy_string_elt_type): New function.
14509 (gdbpy_extract_lazy_string): Call it.
14510 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14511 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14512 typedefs in incoming type.
14513
14514 2017-03-16 Doug Evans <dje@google.com>
14515
14516 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14517 * guile/scm-type.c (tyscm_scm_to_type): New function.
14518
14519 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14520
14521 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14522 "ULONGEST" for "skip".
14523
14524 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14525
14526 PR gdb/21220
14527 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14528 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14529 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14530 over ptrace peek/poke until end of buffer or error.
14531
14532 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14533
14534 * parse.c (length_of_subexp): Make static.
14535 * parser-defs.h (length_of_subexp): Remove.
14536
14537 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14538
14539 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14540 as well.
14541
14542 2017-03-14 Pedro Alves <palves@redhat.com>
14543
14544 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14545 (main): Use std::unique_ptr. Remove calls to
14546 cp_demangled_name_parse_free.
14547
14548 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14549
14550 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14551 alphabsd_store_inferior_registers): Use regcache->ptid instead
14552 of inferior_ptid.
14553
14554 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14555
14556 * aix-thread.c (aix_thread_fetch_registers,
14557 aix_thread_store_registers): Use regcache->ptid instead of
14558 inferior_ptid.
14559
14560 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14561
14562 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14563 store_gregs_to_thread, fetch_fpregs_from_thread,
14564 store_fpregs_to_thread): Use regcache->ptid instead of
14565 inferior_ptid.
14566
14567 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14568
14569 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14570 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14571 instead of inferior_ptid.
14572
14573 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14574
14575 * target.c (target_fetch_registers, target_store_registers): Add
14576 assert.
14577
14578 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14579
14580 * regcache.h (regcache_get_ptid): New function.
14581 * regcache.c (regcache_get_ptid): New function.
14582
14583 2017-03-13 Mark Wielaard <mark@klomp.org>
14584
14585 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14586
14587 2017-03-10 Keith Seitz <keiths@redhat.com>
14588
14589 PR c++/8218
14590 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14591
14592 2017-03-08 Pedro Alves <palves@redhat.com>
14593
14594 PR gdb/18360
14595 * infrun.c (start_step_over, do_target_resume, resume)
14596 (restart_threads): Assert we're not resuming a thread that is
14597 meant to be stopped.
14598 (infrun_thread_stop_requested_callback): Delete.
14599 (infrun_thread_stop_requested): If the thread is internally
14600 stopped, queue a pending stop event and clear the thread's
14601 inline-frame state.
14602 (handle_stop_requested): New function.
14603 (handle_syscall_event, handle_inferior_event_1): Use
14604 handle_stop_requested.
14605 (handle_stop_requested): New function.
14606 (handle_signal_stop): Set the thread's stop_signal here instead of
14607 at caller.
14608 (finish_step_over): Clear step over info unconditionally.
14609 (handle_signal_stop): If the user had interrupted the event
14610 thread, consider the stop a random signal.
14611 (handle_signal_stop) <signal arrived while stepping over
14612 breakpoint>: Don't restart threads here.
14613 (stop_waiting): Don't clear step-over info here.
14614
14615 2017-03-08 Pedro Alves <palves@redhat.com>
14616
14617 PR 21206
14618 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14619 goes to argument 2, not 1.
14620
14621 2017-03-08 Pedro Alves <palves@redhat.com>
14622
14623 PR cli/21218
14624 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14625 display_gdb_prompt.
14626 (command_line_input): Add comment.
14627
14628 2017-03-08 Pedro Alves <palves@redhat.com>
14629
14630 PR tui/21216
14631 * tui/tui-file.c (tui_file::write): New.
14632 * tui/tui-file.h (tui_file): Override "write".
14633 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14634 factored out from ...
14635 (tui_puts): ... here.
14636 (tui_putc): Use them.
14637 (tui_write): New function.
14638 * tui/tui-io.h (tui_write): Declare.
14639
14640 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14641
14642 * Makefile.in (SFILES): Replace "environ.c" with
14643 "common/environ.c".
14644 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14645 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14646 to...
14647 * common/environ.c: ... here.
14648 * environ.h: Moved to...
14649 * common/environ.h: ... here.
14650
14651 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14652
14653 * gdbarch.sh (pstring_ptr): New static function.
14654 (gdbarch_disassembler_options): Use it.
14655 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14656 not valid_disassembler_option->name.
14657 * gdbarch.c: Regenerate.
14658
14659 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14660
14661 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14662
14663 2017-03-07 Pedro Alves <palves@redhat.com>
14664
14665 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14666
14667 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14668
14669 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14670 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14671 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14672 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14673
14674 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14675
14676 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14677
14678 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14679
14680 * remote.c (remote_add_target_side_commands): Use range-based
14681 for loop.
14682
14683 2017-03-03 Yao Qi <yao.qi@linaro.org>
14684
14685 PR gdb/21165
14686 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14687 value is lazy.
14688 * valprint.c (common_val_print): Likewise.
14689
14690 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14691
14692 * NEWS: Mention new set/show disassembler-options commands.
14693 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14694 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14695 (prospective_options): New static variable.
14696 (gdb_disassembler::gdb_disassembler): Initialize
14697 m_di.disassembler_options.
14698 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14699 (get_disassembler_options): New function.
14700 (set_disassembler_options): Likewise.
14701 (set_disassembler_options_sfunc): Likewise.
14702 (show_disassembler_options_sfunc): Likewise.
14703 (disassembler_options_completer): Likewise.
14704 (_initialize_disasm): Likewise.
14705 * disasm.h (get_disassembler_options): New prototype.
14706 (set_disassembler_options): Likewise.
14707 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14708 (gdbarch_verify_disassembler_options): Likewise.
14709 * gdbarch.c: Regenerate.
14710 * gdbarch.h: Likewise.
14711 * arm-tdep.c (num_disassembly_options): Delete.
14712 (set_disassembly_style): Likewise.
14713 (arm_disassembler_options): New static variable.
14714 (set_disassembly_style_sfunc): Convert short style name into long
14715 option name. Call set_disassembler_options.
14716 (show_disassembly_style_sfunc): New function.
14717 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14718 set_gdbarch_verify_disassembler_options.
14719 (_initialize_arm_tdep): Delete regnames variable and update callers.
14720 (arm_disassembler_options): Initialize.
14721 (disasm_options): New variable.
14722 (num_disassembly_options): Rename from this...
14723 (num_disassembly_styles): ...to this. Compute by scanning through
14724 disasm_options.
14725 (valid_disassembly_styles): Initialize using disasm_options.
14726 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14727 set_arm_regname_option.
14728 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14729 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14730 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14731 set_gdbarch_verify_disassembler_options.
14732 * s390-tdep.c (s390_disassembler_options): New static variable.
14733 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14734 set_gdbarch_verify_disassembler_options.
14735
14736 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14737
14738 * remote.c (remote_add_target_side_condition): Remove "struct"
14739 keyword from range-based for loop.
14740
14741 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14742
14743 * remote.c (remote_add_target_side_condition): Use range-based
14744 for loop. Update comment.
14745
14746 2017-02-27 Yao Qi <yao.qi@linaro.org>
14747
14748 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14749
14750 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14751
14752 * regcache.c (regcache_raw_update): New function.
14753 (regcache_raw_read): Move code to regcache_raw_update.
14754 * regcache.h (regcache_raw_update): New declaration.
14755 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14756
14757 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14758
14759 * dwarf2read.c (create_debug_type_hash_table): Initialize
14760 header.signature and header.type_offset_in_tu.
14761
14762 2017-02-24 Pedro Alves <palves@redhat.com>
14763
14764 * symtab.c (make_file_symbol_completion_list_1): Use
14765 add_symtab_completions.
14766
14767 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14768
14769 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14770
14771 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14772
14773 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14774 I386_MAX_REGISTER_SIZE.
14775 (i386_pseudo_register_write): Likewise.
14776 (i386_process_record): Likewise.
14777 * i387-tdep.c (i387_supply_xsave): Likewise.
14778 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14779 (store_register): Likewise.
14780
14781 2017-02-23 Pedro Alves <palves@redhat.com>
14782
14783 * ada-lang.c: Include "common/function-view.h".
14784 (ada_iterate_over_symbols): Adjust to use function_view as
14785 callback type.
14786 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14787 (ada_make_symbol_completion_list): Use a lambda.
14788 (ada_exc_search_name_matches): Delete.
14789 (name_matches_regex): New.
14790 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14791 * compile/compile-c-support.c: Include "common/function-view.h".
14792 (print_one_macro): Change prototype to accept a ui_file pointer.
14793 (write_macro_definitions): Use a lambda.
14794 * dwarf2read.c: Include "common/function-view.h".
14795 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14796 (dw2_expand_symtabs_matching): Adjust to use function_view as
14797 callback type.
14798 * language.h: Include "common/function-view.h".
14799 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14800 function_view as callback type.
14801 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14802 * linespec.c: Include "common/function-view.h".
14803 (collect_info::add_symbol): New method.
14804 (struct symbol_and_data_callback, iterate_inline_only, struct
14805 symbol_matcher_data, iterate_name_matcher): Delete.
14806 (iterate_over_all_matching_symtabs): Adjust to use function_view
14807 as callback type and lambdas.
14808 (iterate_over_file_blocks): Adjust to use function_view as
14809 callback type.
14810 (decode_compound_collector): Now a class with private fields.
14811 (decode_compound_collector::release_symbols): New method.
14812 (collect_one_symbol): Rename to...
14813 (decode_compound_collector::operator()): ... this and adjust.
14814 (lookup_prefix_sym): decode_compound_collector construction bits
14815 move to decode_compound_collector ctor. Pass the
14816 decode_compound_collector object directly as callback. Remove
14817 cleanups and use decode_compound_collector::release_symbols
14818 instead.
14819 (symtab_collector): Now a class with private fields.
14820 (symtab_collector::release_symtabs): New method.
14821 (add_symtabs_to_list): Rename to...
14822 (symtab_collector::operator()): ... this and adjust.
14823 (collect_symtabs_from_filename): symtab_collector construction
14824 bits move to symtab_collector ctor. Pass the symtab_collector
14825 object directly as callback. Remove cleanups and use
14826 symtab_collector::release_symtabs instead.
14827 (collect_symbols): Delete.
14828 (add_matching_symbols_to_info): Use lambdas.
14829 * macrocmd.c (print_macro_callback): Delete.
14830 (info_macro_command): Use a lambda.
14831 (info_macros_command): Pass print_macro_definition as callable
14832 directly.
14833 (print_one_macro): Remove 'ignore' parameter.
14834 (macro_list_command): Adjust.
14835 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14836 (macro_for_each_data::user_data): Delete field.
14837 (foreach_macro): Adjust to call the function_view.
14838 (macro_for_each): Adjust to use function_view as callback type.
14839 (foreach_macro_in_scope): Adjust to call the function_view.
14840 (macro_for_each_in_scope): Adjust to use function_view as callback
14841 type.
14842 * macrotab.h: Include "common/function-view.h".
14843 (macro_callback_fn): Declare a prototype instead of a pointer.
14844 Remove "user_data" parameter.
14845 (macro_for_each, macro_for_each_in_scope): Adjust to use
14846 function_view as callback type.
14847 * psymtab.c (partial_map_expand_apply)
14848 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14849 Adjust to use function_view as callback type and to return bool.
14850 (psym_expand_symtabs_matching): Adjust to use function_view as
14851 callback types.
14852 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14853 to use function_view as callback type and to return bool.
14854 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14855 callback types.
14856 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14857 as callback types.
14858 * symfile.h: Include "common/function-view.h".
14859 (expand_symtabs_file_matcher_ftype)
14860 (expand_symtabs_symbol_matcher_ftype)
14861 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14862 return bool.
14863 (quick_symbol_functions::map_symtabs_matching_filename)
14864 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14865 function_view as callback type and return bool.
14866 (expand_symtabs_matching): Adjust to use function_view as callback
14867 type.
14868 (maintenance_expand_name_matcher)
14869 (maintenance_expand_file_matcher): Delete.
14870 (maintenance_expand_symtabs): Use lambdas.
14871 * symtab.c (iterate_over_some_symtabs): Adjust to use
14872 function_view as callback types and return bool.
14873 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14874 of a cleanup.
14875 (lookup_symtab_callback): Delete.
14876 (lookup_symtab): Use a lambda.
14877 (iterate_over_symbols): Adjust to use function_view as callback
14878 type.
14879 (struct search_symbols_data, search_symbols_file_matches)
14880 (search_symbols_name_matches): Delete.
14881 (search_symbols): Use a pair of lambdas.
14882 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14883 (symtab_expansion_callback): Delete.
14884 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14885 * symtab.h: Include "common/function-view.h".
14886 (iterate_over_some_symtabs): Adjust to use function_view as
14887 callback type and return bool.
14888 (iterate_over_symtabs): Adjust to use function_view as callback
14889 type.
14890 (symbol_found_callback_ftype): Remove 'data' parameter and return
14891 bool.
14892 (iterate_over_symbols): Adjust to use function_view as callback
14893 type.
14894
14895 2017-02-23 Pedro Alves <palves@redhat.com>
14896
14897 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14898 (%.o) <unittests/%.c>: New pattern.
14899 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14900 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14901 * common/function-view.h: New file.
14902 * unittests/function-view-selftests.c: New file.
14903 * configure: Regenerate.
14904
14905 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14906
14907 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14908 inferior_ptid.
14909 * go32-nat.c (go32_thread_alive): Likewise.
14910
14911 2017-02-23 Yao Qi <yao.qi@linaro.org>
14912
14913 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14914 delete.
14915
14916 2017-02-23 Yao Qi <yao.qi@linaro.org>
14917
14918 * varobj.c (varobj_clear_saved_item): Use delete instead of
14919 xfree.
14920 (update_dynamic_varobj_children): Likewise.
14921
14922 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14923
14924 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14925
14926 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14927
14928 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14929 m_enum_value to 0 in default constructor.
14930
14931 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14932
14933 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14934 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14935 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14936 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14937 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14938 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14939 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14940 IS_STORE_CONDITIONAL_INSN.
14941
14942 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14943
14944 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14945
14946 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14947
14948 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14949
14950 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14951
14952 * dwarf2read.c (skip_one_die, read_attribute_value)
14953 (dwarf2_const_value_attr, dump_die_shallow)
14954 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14955 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14956
14957 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14958
14959 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14960 (dwarf_parse_macro_header): Accept DWARF version 5.
14961 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14962
14963 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14964
14965 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14966 DW_AT_GNU_*.
14967 * common/common-exceptions.h (enum errors): Likewise.
14968 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14969 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14970 (dwarf_expr_context::execute_stack_op): Likewise.
14971 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14972 Likewise.
14973 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14974 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14975 (show_entry_values_debug, call_site_to_target_addr)
14976 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14977 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14978 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14979 (value_of_dwarf_block_entry, indirect_pieced_value)
14980 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14981 (disassemble_dwarf_expression): Likewise.
14982 * dwarf2read.c (process_die, inherit_abstract_dies)
14983 (read_call_site_scope): Likewise.
14984 * gdbtypes.h (struct func_type, struct call_site_parameter)
14985 (struct call_site): Likewise.
14986 * stack.c (read_frame_arg): Likewise.
14987 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14988
14989 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14990
14991 * defs.h (read_unsigned_leb128): New declaration.
14992 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14993 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14994 (dwarf2_find_location_expression): Call also
14995 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14996 * dwarf2loc.h (dwarf2_version): New declaration.
14997 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14998 rnglists.
14999 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15000 .debug_rnglists.
15001 (struct dwop_section_names): Add loclists_dwo.
15002 (dwop_section_names): Add .debug_loclists.dwo.
15003 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15004 (struct dwarf2_per_cu_data): Add dwarf_version.
15005 (struct dwo_sections): Add loclists.
15006 (struct attr_abbrev): Add implicit_const.
15007 (read_indirect_line_string): New declaration.
15008 (read_unsigned_leb128): Delete declaration.
15009 (rcuh_kind): New definition.
15010 (read_and_check_comp_unit_head): Change parameter
15011 is_debug_types_section to section_kind.
15012 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15013 (read_comp_unit_head): Change parameter abfd to section, add parameter
15014 section_kind. Handle DWARF-5.
15015 (error_check_comp_unit_head): Accept also DWARF version 5.
15016 (read_and_check_comp_unit_head): Change parameter
15017 is_debug_types_section to section_kind.
15018 (read_and_check_type_unit_head): Delete function.
15019 (read_abbrev_offset): Handle DWARF-5.
15020 (create_debug_type_hash_table): Add parameter section_kind. Process
15021 only DW_UT_type. Use signature and type_offset_in_tu from struct
15022 comp_unit_head.
15023 (create_debug_types_hash_table): Update create_debug_type_hash_table
15024 caller.
15025 (create_all_type_units): Call create_debug_type_hash_table.
15026 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15027 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15028 caller.
15029 (skip_one_die): Handle DW_FORM_implicit_const.
15030 (dwarf2_rnglists_process): New function.
15031 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15032 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15033 (read_attribute_value): Handle DW_FORM_implicit_const,
15034 DW_FORM_line_strp.
15035 (read_attribute): Handle DW_FORM_implicit_const.
15036 (read_indirect_string_at_offset_from): New function from
15037 read_indirect_string_at_offset.
15038 (read_indirect_string_at_offset): Call
15039 read_indirect_string_at_offset_from.
15040 (read_indirect_line_string_at_offset): New function.
15041 (read_indirect_string): New function comment.
15042 (read_indirect_line_string): New function.
15043 (read_unsigned_leb128): Make it global.
15044 (dwarf2_string_attr): Handle DWARF-5.
15045 (add_include_dir_stub, read_formatted_entries): New functions.
15046 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15047 Handle DWARF-5.
15048 (per_cu_header_read_in): Update read_comp_unit_head caller.
15049 (dwarf2_version): New function.
15050 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15051 rnglists.
15052 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15053 fields.
15054
15055 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15056
15057 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15058
15059 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15060
15061 * dwarf2read.c (dwarf2_ranges_process): New function from
15062 dwarf2_ranges_read.
15063 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15064 dwarf2_ranges_process.
15065
15066 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15067
15068 * dwarf2read.c (create_debug_type_hash_table): New function from
15069 create_debug_types_hash_table.
15070 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15071 (create_all_type_units, open_and_init_dwo_file): Update
15072 create_debug_types_hash_table callers.
15073
15074 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15075
15076 PR gdb/16188
15077 * fork-child.c (trace_start_error): Fix thinko. va_end should
15078 refer to 'ap', not 'args'.
15079
15080 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15081 Pedro Alves <palves@redhat.com>
15082
15083 PR gdb/16188
15084 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15085 calls succeeded.
15086 * fork-child.c (trace_start_error): New function.
15087 (trace_start_error_with_name): Likewise.
15088 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15089 * inf-ptrace.c (inf_ptrace_me): Likewise.
15090 * inferior.h (trace_start_error): New prototype.
15091 (trace_start_error_with_name): Likewise.
15092
15093 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15094
15095 PR gdb/21164
15096 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15097 NULL before using it.
15098 * symmisc.c (maintenance_print_symbols): Likewise.
15099 (maintenance_print_msymbols): Likewise.
15100
15101 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15102
15103 * NEWS: Add record Python bindings entry.
15104
15105 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15106
15107 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15108 py-record-full.o.
15109 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15110 * python/py-record-btrace.c, python/py-record-btrace.h,
15111 python/py-record-full.c, python/py-record-full.h: New file.
15112 * python/py-record.c: Add include for py-record-btrace.h and
15113 py-record-full.h.
15114 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15115 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15116 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15117 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15118 New definition.
15119 (gdbpy_initialize_btrace): New export.
15120 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15121
15122 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15123
15124 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15125 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15126 * python/py-record.c: New file.
15127 * python/python-internal.h (gdbpy_start_recording,
15128 gdbpy_current_recording, gdpy_stop_recording,
15129 gdbpy_initialize_record): New export.
15130 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15131 (python_GdbMethods): Add gdbpy_start_recording,
15132 gdbpy_current_recording and gdbpy_stop_recording.
15133
15134 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15135
15136 * record-btrace.c (record_btrace_record_method): New function.
15137 (init_record_btrace_ops): Initialize to_record_method.
15138 * record-full.c (record_full_record_method): New function.
15139 (init_record_full_ops, init_record_full_core_ops): Add
15140 record_full_record_method.
15141 * record.h (enum record_method): New enum.
15142 * target-debug.h (target_debug_print_enum_record_method: New define.
15143 * target-delegates.c: Regenerate.
15144 * target.c (target_record_method): New function.
15145 * target.h: Include record.h.
15146 (struct target_ops) <to_record_method>: New field.
15147 (target_record_method): New export.
15148
15149 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15150
15151 * record.h (record_start, record_stop): New export.
15152 * record.c (record_start, record_stop): New function.
15153
15154 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15155
15156 * btrace.c (btrace_fetch): Copy function call segments pointer
15157 into a vector.
15158 (btrace_clear): Clear the vector.
15159 (btrace_find_insn_by_number): Use binary search to find the correct
15160 function call segment.
15161 * btrace.h (brace_fun_p): New typedef.
15162 (struct btrace_thread_info) <functions>: New field.
15163
15164 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15165
15166 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15167 * btrace.c (btrace_decode_error): ... here. New function.
15168 * btrace.h (btrace_decode_error): New export.
15169
15170 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15171
15172 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15173 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15174 btrace_find_insn_by_number): Remove special case for gaps.
15175 * btrace.h (btrace_insn_get_error): New export.
15176 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15177 * record-btrace.c (btrace_insn_history): Print number for gaps.
15178 (record_btrace_info, record_btrace_goto): Handle gaps.
15179
15180 2017-02-14 Tom Tromey <tom@tromey.com>
15181
15182 PR python/13598:
15183 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15184 event.
15185 * python/py-evts.c (gdbpy_initialize_py_events): Add
15186 before_prompt registry.
15187 * python/py-events.h (events_object) <before_prompt>: New field.
15188
15189 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15190
15191 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15192
15193 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15194
15195 * symfile (_initialize_symfile): Add usage text to the load command's
15196 help text.
15197
15198 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15199
15200 * utils.c (defaulted_query): Don't query on secondary UIs.
15201
15202 2017-02-10 Tom Tromey <tom@tromey.com>
15203
15204 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15205
15206 2017-02-10 Tom Tromey <tom@tromey.com>
15207
15208 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15209 "cleanup" local.
15210 * python/py-type.c (typy_legacy_template_argument): Remove
15211 unnecessary "cleanup" local.
15212
15213 2017-02-10 Tom Tromey <tom@tromey.com>
15214
15215 * python/python.c (do_start_initialization): New function, from
15216 _initialize_python.
15217 (_initialize_python): Call do_start_initialization.
15218 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15219 goto.
15220
15221 2017-02-10 Tom Tromey <tom@tromey.com>
15222
15223 * python/py-prettyprint.c (pretty_print_one_value): Use
15224 gdbpy_ref.
15225
15226 2017-02-10 Tom Tromey <tom@tromey.com>
15227
15228 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15229 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15230 gdbpy_ref.
15231 * python/py-type.c (field_new): Use gdbpy_ref.
15232 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15233 gdbpy_ref.
15234 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15235 (py_free_pspace): Likewise.
15236 (pspace_to_pspace_object): Likewise.
15237 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15238 (py_free_objfile): Likewise.
15239 (objfile_to_objfile_object): Likewise.
15240 * python/py-inferior.c (delete_thread_object): Use
15241 gdbpy_ref.
15242 (infpy_read_memory): Likewise.
15243 (py_free_inferior): Likewise.
15244 * python/py-evtregistry.c (create_eventregistry_object): Use
15245 gdbpy_ref.
15246 * python/py-event.c (create_event_object): Use gdbpy_ref.
15247
15248 2017-02-10 Tom Tromey <tom@tromey.com>
15249
15250 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15251 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15252 used.
15253 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15254 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15255 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15256 python/py-framefilter.c, python/py-function.c,
15257 python/py-inferior.c, python/py-infevents.c,
15258 python/py-linetable.c, python/py-newobjfileevent.c,
15259 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15260 python/py-signalevent.c, python/py-stopevent.c,
15261 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15262 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15263 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15264 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15265
15266 2017-02-10 Tom Tromey <tom@tromey.com>
15267
15268 * ui-out.h (ui_out_emit_type): New class.
15269 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15270 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15271 and ui_out_emit_tuple.
15272 (enumerate_locals): Likewise.
15273 (py_mi_print_variables, py_print_locals, py_print_args): Use
15274 ui_out_emit_list.
15275 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15276 ui_out_emit_list.
15277 * common/gdb_optional.h: New file.
15278
15279 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15280
15281 * MAINTAINERS (Write After Approval): Update my e-mail address.
15282
15283 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15284
15285 PR gdb/21122
15286 * breakpoint.c (_initialize_breakpoint): Update the help description
15287 of the 'commands' command to indicate that it takes a list argument.
15288
15289 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15290
15291 * interps.c (current_interp_set_logging): Remove "return".
15292
15293 2017-02-09 Gary Benson <gbenson@redhat.com>
15294
15295 * symtab.c (add_symtab_completions): Prevent NULL pointer
15296 dereference.
15297
15298 2017-02-08 Pedro Alves <palves@redhat.com>
15299
15300 * interps.c (interp::interp): Remove reference to quiet_p.
15301 (interp_set): Make static. Remove dead "Switching to" output
15302 code.
15303 (interp_quiet_p, interp_set_quiet): Delete.
15304 (interpreter_exec_cmd): Don't set the interpreter quiet.
15305 * interps.h (interp_quiet_p): Make static.
15306 (class interp) <quiet_p>: Remove field
15307
15308 2017-02-08 Jerome Guitton <guitton@adacore.com>
15309
15310 * cli/cli-decode.c (find_command_name_length): Make it extern.
15311 * cli/cli-decode.h (find_command_name_length): Declare.
15312 * cli/cli-script.c (command_name_equals, line_first_arg):
15313 New functions.
15314 (process_next_line): Use cli-decode to parse command names.
15315 (build_command_line): Make args a constant pointer.
15316
15317 2017-02-08 Jerome Guitton <guitton@adacore.com>
15318
15319 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15320 Remove case-insensitive search.
15321
15322 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15323
15324 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15325 at the end of the line. Avoids an ARI warning.
15326
15327 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15328
15329 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15330 rdseed instructions.
15331 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15332
15333 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15334
15335 PR tdep/20936
15336 Provide and use sparc32 and sparc64 target description XML files.
15337 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15338 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15339 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15340 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15341 * features/sparc/sparc32-solaris.xml: New file.
15342 * features/sparc/sparc64-solaris.xml: New file.
15343 * features/sparc/sparc32-solaris.c: Generated.
15344 * features/sparc/sparc64-solaris.c: Generated.
15345 * sparc-tdep.h: Account for differences in target descriptions.
15346 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15347 (sparc32_register_type): Use target provided registers.
15348 (validate_tdesc_registers): New function.
15349 (sparc32_gdbarch_init): Use tdesc_has_registers.
15350 Set pseudoregister functions.
15351 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15352 (sparc64_register_type): Use target provided registers.
15353 (sparc64_init_abi): Set pseudoregister functions.
15354
15355 2017-02-03 Tom Tromey <tom@tromey.com>
15356
15357 PR rust/21097:
15358 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15359 with a single member.
15360
15361 2017-02-03 Pedro Alves <palves@redhat.com>
15362
15363 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15364 (cli_interp_base::~cli_interp_base): New.
15365 (cli_interp): New struct.
15366 (as_cli_interp): Cast the interp itself to cli_interp.
15367 (cli_interpreter_pre_command_loop): Rename to ...
15368 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15369 parameter.
15370 (cli_interpreter_init): Rename to ...
15371 (cli_interp::init): ... this. Remove 'self' parameter. Use
15372 boolean. Make extern.
15373 (cli_interpreter_resume): Rename to ...
15374 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15375 extern.
15376 (cli_interpreter_suspend): Rename to ...
15377 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15378 extern.
15379 (cli_interpreter_exec): Rename to ...
15380 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15381 extern.
15382 (cli_interpreter_supports_command_editing): Rename to ...
15383 (cli_interp_base::supports_command_editing): ... this. Remove
15384 'interp' parameter. Make extern.
15385 (cli_ui_out): Rename to ...
15386 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15387 Make extern.
15388 (cli_set_logging): Rename to ...
15389 (cli_interp_base::set_logging): ... this. Remove 'interp'
15390 parameter. Make extern.
15391 (cli_interp_procs): Delete.
15392 (cli_interp_factory): Adjust to use "new".
15393 * cli/cli-interp.h: Include "interps.h".
15394 (struct cli_interp_base): New struct.
15395 * interps.c (struct interp): Delete. Fields moved to interps.h.
15396 (interp_new): Delete.
15397 (interp::interp, interp::~interp): New.
15398 (interp_set): Use bool, and return void. Assume the interpreter
15399 has suspend, init and resume methods, and that the all return
15400 void.
15401 (set_top_level_interpreter): interp_set returns void.
15402 (interp_ui_out): Adapt.
15403 (current_interp_set_logging): Adapt.
15404 (interp_data): Delete.
15405 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15406 (interp_exec): Adapt.
15407 (top_level_interpreter_data): Delete.
15408 * interps.h (interp_init_ftype, interp_resume_ftype)
15409 (interp_suspend_ftype, interp_exec_ftype)
15410 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15411 (class interp): New.
15412 (interp_new): Delete.
15413 (interp_set): Now returns void. Use bool.
15414 (interp_data, top_level_interpreter_data): Delete.
15415 * mi/mi-common.h: Include interps.h.
15416 (class mi_interp): Inherit from interp. Define a ctor. Declare
15417 init, resume, suspect, exec, interp_ui_out, set_logging and
15418 pre_command_loop methods.
15419 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15420 (mi_interpreter_init): Rename to ...
15421 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15422 bool, return void and make extern. Adjust.
15423 (mi_interpreter_resume): ... Rename to ...
15424 (mi_interp::resume): ... this. Remove the 'data' parameter,
15425 return void and make extern. Adjust.
15426 (mi_interpreter_suspend): ... Rename to ...
15427 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15428 return void and make extern. Adjust.
15429 (mi_interpreter_exec): ... Rename to ...
15430 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15431 extern. Adjust.
15432 (mi_interpreter_pre_command_loop): ... Rename to ...
15433 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15434 parameter and make extern.
15435 (mi_on_normal_stop_1): Adjust.
15436 (mi_ui_out): Rename to ...
15437 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15438 parameter and make extern. Adjust.
15439 (mi_set_logging): Rename to ...
15440 (mi_interp::set_logging): ... this. Remove the 'interp'
15441 parameter and make extern. Adjust.
15442 (mi_interp_procs): Delete.
15443 (mi_interp_factory): Adjust to use 'new'.
15444 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15445 (mi_print_exception, mi_execute_command, mi_load_progress):
15446 Adjust.
15447 * tui/tui-interp.c (tui_interp): New class.
15448 (as_tui_interp): Return a tui_interp pointer.
15449 (tui_on_normal_stop, tui_on_signal_received)
15450 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15451 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15452 to use interp::interp_ui_out.
15453 (tui_init): Rename to ...
15454 (tui_interp::init): ... this. Remove the 'self' parameter, use
15455 bool, return void and make extern. Adjust.
15456 (tui_resume): Rename to ...
15457 (tui_interp::resume): ... this. Remove the 'data' parameter,
15458 return void and make extern. Adjust.
15459 (tui_suspend): Rename to ...
15460 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15461 return void and make extern. Adjust.
15462 (tui_ui_out): Rename to ...
15463 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15464 parameter, and make extern. Adjust.
15465 (tui_exec): Rename to ...
15466 (tui_interp::exec): ... this. Remove the 'data' parameter and
15467 make extern.
15468 (tui_interp_procs): Delete.
15469 (tui_interp_factory): Use "new".
15470
15471 2017-02-02 Tom Tromey <tom@tromey.com>
15472
15473 * rust-exp.y (ends_raw_string, space_then_number)
15474 (rust_identifier_start_p): Return bool.
15475 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15476 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15477 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15478 (rust_chartype_p): Return bool.
15479 (val_print_struct, rust_print_struct_def, rust_print_type):
15480 Update.
15481 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15482 Return bool.
15483
15484 2017-02-02 Tom Tromey <tom@tromey.com>
15485
15486 * rust-lang.c: Reindent.
15487
15488 2017-02-02 Tom Tromey <tom@tromey.com>
15489
15490 * rust-lang.h (rust_crate_for_block): Update.
15491 * rust-lang.c (rust_crate_for_block): Return std::string.
15492 (rust_get_disr_info): Use std:;string, not
15493 gdb::unique_xmalloc_ptr.
15494 * rust-exp.y (crate_name): Update.
15495
15496 2017-02-02 Pedro Alves <palves@redhat.com>
15497
15498 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15499 field out of gdb_disassembler_test and make it static.
15500
15501 2017-02-02 Pedro Alves <palves@redhat.com>
15502
15503 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15504 mi1_interp and mi_interp fields.
15505
15506 2017-02-02 Pedro Alves <palves@redhat.com>
15507
15508 * cli/cli-interp.c (struct saved_output_files, saved_output):
15509 Moved from cli/cli-logging.c.
15510 (cli_set_logging): New function.
15511 (cli_interp_procs): Install cli_set_logging.
15512 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15513 Declare.
15514 * cli/cli-logging.c (struct saved_output_files, saved_output):
15515 Moved to cli/cli-interp.c.
15516 (pop_output_files): Don't save outputs here.
15517 (make_logging_output): New function.
15518 (handle_redirections): Don't build tee nor save previous outputs
15519 here.
15520 * interps.c (current_interp_set_logging): Change prototype.
15521 Assume there's always a set_logging_proc method installed.
15522 * interps.h (interp_set_logging_ftype): Change prototype.
15523 (current_interp_set_logging): Change prototype and adjust comment.
15524 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15525 use make_logging_output.
15526 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15527 2017-02-02 Pedro Alves <palves@redhat.com>
15528
15529 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15530 from ...
15531 (set_logging_overwrite): ... here.
15532 (logging_no_redirect_file): Delete.
15533 (set_logging_redirect): Don't handle redirection on the fly.
15534 Instead warn that "logging off" / "logging on" is necessary.
15535 (pop_output_files): Delete references to logging_no_redirect_file.
15536 (show_logging_command): Always speak in terms of what will happen
15537 once logging is reenabled.
15538
15539 2017-02-02 Pedro Alves <palves@redhat.com>
15540
15541 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15542
15543 2017-02-02 Pedro Alves <palves@redhat.com>
15544
15545 * disasm.c (gdb_pretty_print_insn): Rename to ...
15546 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15547 Remove gdbarch parameter. Adapt to clear the object's buffers
15548 instead of allocating new buffers, and to print using the object's
15549 gdb_disassembler instead of calling gdb_print_insn.
15550 (dump_insns): Use gdb_pretty_print_disassembler.
15551 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15552 (gdb_pretty_print_disassembler): New class.
15553 * record-btrace.c (btrace_insn_history): Use
15554 gdb_pretty_print_disassembler.
15555
15556 2017-02-02 Pedro Alves <palves@redhat.com>
15557
15558 * ada-lang.c (type_as_string): Use string_file.
15559 * ada-valprint.c (ada_print_floating): Use string_file.
15560 * ada-varobj.c (ada_varobj_scalar_image)
15561 (ada_varobj_get_value_image): Use string_file.
15562 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15563 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15564 * breakpoint.c (update_inserted_breakpoint_locations)
15565 (insert_breakpoint_locations, reattach_breakpoints)
15566 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15567 (print_it_watchpoint): Use string_file.
15568 (save_breakpoints): Use stdio_file.
15569 * c-exp.y (oper): Use string_file.
15570 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15571 tee_file.
15572 (pop_output_files): Use delete.
15573 (handle_redirections): Use stdio_file and tee_file.
15574 * cli/cli-setshow.c (do_show_command): Use string_file.
15575 * compile/compile-c-support.c (c_compute_program): Use
15576 string_file.
15577 * compile/compile-c-symbols.c (generate_vla_size): Take a
15578 'string_file &' instead of a 'ui_file *'.
15579 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15580 of a 'ui_file *'. Use string_file.
15581 (generate_c_for_variable_locations): Take a 'string_file &'
15582 instead of a 'ui_file *'.
15583 * compile/compile-internal.h (generate_c_for_for_one_variable):
15584 Take a 'string_file &' instead of a 'ui_file *'.
15585 * compile/compile-loc2c.c (push, pushf, unary, binary)
15586 (print_label, pushf_register_address, pushf_register)
15587 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15588 'ui_file *'. Adjust.
15589 * compile/compile.c (compile_to_object): Use string_file.
15590 * compile/compile.h (compile_dwarf_expr_to_c)
15591 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15592 'ui_file *'.
15593 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15594 (replace_typedefs_qualified_name): Use string_file and
15595 obstack_copy0.
15596 * disasm.c (gdb_pretty_print_insn): Use string_file.
15597 (gdb_disassembly): Adjust reference the null_stream global.
15598 (do_ui_file_delete): Delete.
15599 (gdb_insn_length): Use null_stream.
15600 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15601 * dwarf2loc.c (dwarf2_compile_property_to_c)
15602 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15603 'string_file &' instead of a 'ui_file *'.
15604 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15605 * dwarf2read.c (do_ui_file_peek_last): Delete.
15606 (dwarf2_compute_name): Use string_file.
15607 * event-top.c (gdb_setup_readline): Use stdio_file.
15608 * gdbarch.sh (verify_gdbarch): Use string_file.
15609 * gdbtypes.c (safe_parse_type): Use null_stream.
15610 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15611 string_file.
15612 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15613 'string_file *' instead of a 'ui_file *'.
15614 (gdbscm_arch_disassemble): Use string_file.
15615 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15616 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15617 inherits from ui_file.
15618 (ioscm_file_port_delete, ioscm_file_port_rewind)
15619 (ioscm_file_port_put): Delete.
15620 (ioscm_file_port_write): Rename to ...
15621 (ioscm_file_port::write): ... this. Remove file_port_magic
15622 checks.
15623 (ioscm_file_port_new): Delete.
15624 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15625 ui_file_up.
15626 * guile/scm-type.c (tyscm_type_name): Use string_file.
15627 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15628 Use string_file.
15629 * infcmd.c (print_return_value_1): Use string_file.
15630 * infrun.c (print_target_wait_results): Use string_file.
15631 * language.c (add_language): Use string_file.
15632 * location.c (explicit_to_string_internal): Use string_file.
15633 * main.c (captured_main_1): Use null_file.
15634 * maint.c (maintenance_print_architecture): Use stdio_file.
15635 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15636 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15637 event_channel>: Change type to mi_console_file pointer.
15638 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15639 (mi_console_file_delete): Delete.
15640 (struct mi_console_file): Delete.
15641 (mi_console_file_magic): Delete.
15642 (mi_console_file_new): Delete.
15643 (mi_console_file::mi_console_file): New.
15644 (mi_console_file_delete): Delete.
15645 (mi_console_file_fputs): Delete.
15646 (mi_console_file::write): New.
15647 (mi_console_raw_packet): Delete.
15648 (mi_console_file::flush): New.
15649 (mi_console_file_flush): Delete.
15650 (mi_console_set_raw): Rename to ...
15651 (mi_console_file::set_raw): ... this.
15652 * mi/mi-console.h (class mi_console_file): New class.
15653 (mi_console_file_new, mi_console_set_raw): Delete.
15654 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15655 (mi_set_logging): Use delete and tee_file. Adjust.
15656 * mi/mi-main.c (output_register): Use string_file.
15657 (mi_cmd_data_evaluate_expression): Use string_file.
15658 (mi_cmd_data_read_memory): Use string_file.
15659 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15660 * mi/mi-out.c (mi_ui_out::main_stream): New.
15661 (mi_ui_out::rewind): Use main_stream and
15662 string_file.
15663 (mi_ui_out::put): Use main_stream and string_file.
15664 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15665 Allocate a 'string_file' instead.
15666 (mi_out_new): Don't allocate a mem_fileopen stream here.
15667 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15668 (mi_ui_out::main_stream): Declare method.
15669 * printcmd.c (eval_command): Use string_file.
15670 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15671 * python/py-arch.c (archpy_disassemble): Use string_file.
15672 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15673 * python/py-frame.c (frapy_str): Use string_file.
15674 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15675 Use string_file.
15676 * python/py-type.c (typy_str): Use string_file.
15677 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15678 * python/py-value.c (valpy_str): Use string_file.
15679 * record-btrace.c (btrace_insn_history): Use string_file.
15680 * regcache.c (regcache_print): Use stdio_file.
15681 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15682 * remote.c (escape_buffer): Use string_file.
15683 * rust-lang.c (rust_get_disr_info): Use string_file.
15684 * serial.c (serial_open_ops_1): Use stdio_file.
15685 (do_serial_close): Use delete.
15686 * stack.c (print_frame_arg): Use string_file.
15687 (print_frame_args): Remove local mem_fileopen stream, not used.
15688 (print_frame): Use string_file.
15689 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15690 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15691 Take a 'string_file *' instead of a 'ui_file *'.
15692 * top.c (new_ui): Use stdio_file and stderr_file.
15693 (free_ui): Use delete.
15694 (execute_command_to_string): Use string_file.
15695 (quit_confirm): Use string_file.
15696 * tracepoint.c (collection_list::append_exp): Use string_file.
15697 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15698 * tui/tui-file.c: Don't include "ui-file.h".
15699 (enum streamtype, struct tui_stream): Delete.
15700 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15701 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15702 (tui_file::tui_file): New method.
15703 (tui_file_fputs): Delete.
15704 (tui_file_get_strbuf): Delete.
15705 (tui_file::puts): New method.
15706 (tui_file_adjust_strbuf): Delete.
15707 (tui_file_flush): Delete.
15708 (tui_file::flush): New method.
15709 * tui/tui-file.h: Tweak intro comment.
15710 Include ui-file.h.
15711 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15712 (tui_file_adjust_strbuf): Delete declarations.
15713 (class tui_file): New class.
15714 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15715 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15716 (tui_register_format): Use string_stream.
15717 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15718 (tui_get_function_from_frame): Use string_file.
15719 * typeprint.c (type_to_string): Use string_file.
15720 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15721 (null_stream): New global.
15722 (ui_file_delete): Delete.
15723 (ui_file::ui_file): New.
15724 (null_file_isatty): Delete.
15725 (ui_file::~ui_file): New.
15726 (null_file_rewind): Delete.
15727 (ui_file::printf): New.
15728 (null_file_put): Delete.
15729 (null_file_flush): Delete.
15730 (ui_file::putstr): New.
15731 (null_file_write): Delete.
15732 (ui_file::putstrn): New.
15733 (null_file_read): Delete.
15734 (ui_file::putc): New.
15735 (null_file_fputs): Delete.
15736 (null_file_write_async_safe): Delete.
15737 (ui_file::vprintf): New.
15738 (null_file_delete): Delete.
15739 (null_file::write): New.
15740 (null_file_fseek): Delete.
15741 (null_file::puts): New.
15742 (ui_file_data): Delete.
15743 (null_file::write_async_safe): New.
15744 (gdb_flush, ui_file_isatty): Adjust.
15745 (ui_file_put, ui_file_rewind): Delete.
15746 (ui_file_write): Adjust.
15747 (ui_file_write_for_put): Delete.
15748 (ui_file_write_async_safe, ui_file_read): Adjust.
15749 (ui_file_fseek): Delete.
15750 (fputs_unfiltered): Adjust.
15751 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15752 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15753 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15754 (set_ui_file_data): Delete.
15755 (string_file::~string_file, string_file::write)
15756 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15757 (do_ui_file_as_string, ui_file_as_string): Delete.
15758 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15759 (struct mem_file): Delete.
15760 (mem_file_new): Delete.
15761 (stdio_file::stdio_file): New.
15762 (mem_file_delete): Delete.
15763 (stdio_file::stdio_file): New.
15764 (mem_fileopen): Delete.
15765 (stdio_file::~stdio_file): New.
15766 (mem_file_rewind): Delete.
15767 (stdio_file::set_stream): New.
15768 (mem_file_put): Delete.
15769 (stdio_file::open): New.
15770 (mem_file_write): Delete.
15771 (stdio_file_magic, struct stdio_file): Delete.
15772 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15773 (stdio_file::flush): New.
15774 (stdio_file_read): Rename to ...
15775 (stdio_file::read): ... this. Adjust.
15776 (stdio_file_write): Rename to ...
15777 (stdio_file::write): ... this. Adjust.
15778 (stdio_file_write_async_safe): Rename to ...
15779 (stdio_file::write_async_safe) ... this. Adjust.
15780 (stdio_file_fputs): Rename to ...
15781 (stdio_file::puts) ... this. Adjust.
15782 (stdio_file_isatty): Delete.
15783 (stdio_file_fseek): Delete.
15784 (stdio_file::isatty): New.
15785 (stderr_file_write): Rename to ...
15786 (stderr_file::write) ... this. Adjust.
15787 (stderr_file_fputs): Rename to ...
15788 (stderr_file::puts) ... this. Adjust.
15789 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15790 (stderr_file::stderr_file): New.
15791 (tee_file_magic): Delete.
15792 (struct tee_file): Delete.
15793 (tee_file::tee_file): New.
15794 (tee_file_new): Delete.
15795 (tee_file::~tee_file): New.
15796 (tee_file_delete): Delete.
15797 (tee_file_flush): Rename to ...
15798 (tee_file::flush): ... this. Adjust.
15799 (tee_file_write): Rename to ...
15800 (tee_file::write): ... this. Adjust.
15801 (tee_file::write_async_safe): New.
15802 (tee_file_fputs): Rename to ...
15803 (tee_file::puts): ... this. Adjust.
15804 (tee_file_isatty): Rename to ...
15805 (tee_file::isatty): ... this. Adjust.
15806 * ui-file.h (struct obstack, struct ui_file): Don't
15807 forward-declare.
15808 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15809 (ui_file_write_ftype)
15810 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15811 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15812 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15813 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15814 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15815 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15816 (set_ui_file_fseek): Delete.
15817 (ui_file_data, ui_file_delete, ui_file_rewind)
15818 (struct ui_file): New.
15819 (ui_file_up): New.
15820 (class null_file): New.
15821 (null_stream): Declare.
15822 (ui_file_write_for_put, ui_file_put): Delete.
15823 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15824 Delete.
15825 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15826 (gdb_fopen, tee_file_new): Delete.
15827 (struct string_file): New.
15828 (struct stdio_file): New.
15829 (stdio_file_up): New.
15830 (struct stderr_file): New.
15831 (class tee_file): New.
15832 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15833 of a 'ui_file *'. Adjust.
15834 * ui-out.h (class ui_out) <field_stream>: Likewise.
15835 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15836 (null_stream): Delete.
15837 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15838 Adjust.
15839 * utils.h (struct ui_file): Delete forward declaration..
15840 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15841 (error_stream): Take a 'string_file &' instead of a
15842 'ui_file *'.
15843 * varobj.c (varobj_value_get_print_value): Use string_file.
15844 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15845 * gdbarch.c: Regenerate.
15846
15847 2017-02-02 Pedro Alves <palves@redhat.com>
15848
15849 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15850 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15851 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15852 Adjust to call gdb_print_insn instead of
15853 gdb_disassembler::print_insn.
15854 (dump_insns, do_mixed_source_and_assembly_deprecated)
15855 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15856 'gdbarch' parameter. Remove gdb_disassembler parameter.
15857 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15858 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15859 declaration.
15860 (gdb_pretty_print_insn): Re-add declaration.
15861 * record-btrace.c (btrace_insn_history): Don't allocate a
15862 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15863
15864 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15865
15866 * disasm.h (gdb_disassembly): Remove file_string parameter.
15867 * disasm.c (gdb_disassembly): Likewise.
15868 * cli/cli-cmds.c (print_disassembly): Adapt.
15869 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15870 * stack.c (do_gdb_disassembly): Likewise.
15871
15872 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15873
15874 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15875 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15876 targets. And if the implicit value is longer than needed, extract
15877 the first bytes instead of the "least significant" ones.
15878
15879 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15880
15881 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15882 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15883 (btrace_fetch): Assert can_access_registers_ptid.
15884 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15885 validate_registers_access.
15886
15887 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15888
15889 * gdbthread.h (can_access_registers_ptid): New.
15890 * thread.c (can_access_registers_ptid): New.
15891
15892 2017-02-01 Pedro Alves <palves@redhat.com>
15893
15894 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15895
15896 2017-01-31 Pedro Alves <palves@redhat.com>
15897
15898 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15899 Fix typos.
15900
15901 2017-01-31 Pedro Alves <palves@redhat.com>
15902
15903 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15904 not used.
15905
15906 2017-01-31 Pedro Alves <palves@redhat.com>
15907
15908 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15909
15910 2017-01-31 Pedro Alves <palves@redhat.com>
15911
15912 * common/scoped_restore.h
15913 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15914 change the value's parameter type to T2.
15915 (make_scoped_restore): Likewise.
15916
15917 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15918 Richard Henderson <rth@redhat.com>
15919
15920 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15921 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15922 GS_BASE for older kernels.
15923 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15924 GS_BASE for older kernels.
15925 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15926 and GS_BASE to the offset table.
15927 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15928 system register group.
15929 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15930 for older kernels.
15931 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15932 amd64 ABI.
15933 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15934 AMD64_GSBASE_REGNUM.
15935 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15936 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15937 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15938 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15939 i386/64bit-segments.xml in those rules.
15940 * features/i386/64bit-segments.xml: New file.
15941 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15942 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15943 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15944 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15945 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15946 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15947 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15948 * features/i386/amd64-avx-linux.c: Regenerated.
15949 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15950 * features/i386/amd64-avx-mpx.c: Regenerated.
15951 * features/i386/amd64-avx512-linux.c: Regenerated.
15952 * features/i386/amd64-linux.c: Regenerated.
15953 * features/i386/amd64-mpx-linux.c: Regenerated.
15954 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15955 * features/i386/i386-avx-mpx.c: Regenerated.
15956 * features/i386/x32-avx-linux.c: Regenerated.
15957 * features/i386/x32-avx512-linux.c: Regenerated.
15958 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15959 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15960 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15961 * regformats/i386/amd64-linux.dat: Regenerated.
15962 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15963 * regformats/i386/x32-avx-linux.dat: Regenerated.
15964 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15965 * regformats/i386/x32-linux.dat: Regenerated.
15966
15967 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15968
15969 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15970 Set to AMD64_NUM_REGS.
15971
15972 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15973
15974 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15975 that checks validity of a register number.
15976
15977 2017-01-27 Kees Cook <keescook@google.com>
15978
15979 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15980 fetch_fpregs if target has fpa registers.
15981 (arm_linux_store_inferior_registers): Call store_fpregs if target
15982 has fpa registers.
15983
15984 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15985
15986 * cris-tdep.c (cris_gdbarch_init): Remove check for
15987 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15988
15989 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15990
15991 * corelow.c (get_core_register_section): Check for regset
15992 existence before checking for REGSET_VARIABLE_SIZE.
15993
15994 2017-01-26 Yao Qi <yao.qi@linaro.org>
15995 Pedro Alves <palves@redhat.com>
15996
15997 PR gdb/20939
15998 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15999 call memory_error, save memaddr instead.
16000 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16001 negative, cal memory_error.
16002 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16003
16004 2017-01-26 Yao Qi <yao.qi@linaro.org>
16005
16006 * disasm-selftests.c (memory_error_test): New function.
16007 (_initialize_disasm_selftests): Register memory_error_test.
16008
16009 2017-01-26 Yao Qi <yao.qi@linaro.org>
16010
16011 * Makefile.in (SFILES): Add disasm-selftests.c and
16012 selftest-arch.c.
16013 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16014 * disasm-selftests.c: New file.
16015 * selftest-arch.c: New file.
16016 * selftest-arch.h: New file.
16017
16018 2017-01-26 Yao Qi <yao.qi@linaro.org>
16019
16020 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16021 to bfd_arch_mep. Don't return 0 if section is not
16022 found. Call print_insn_mep.
16023
16024 2017-01-26 Pedro Alves <palves@redhat.com>
16025 Yao Qi <yao.qi@linaro.org>
16026
16027 * arm-tdep.c: Include "disasm.h".
16028 (gdb_print_insn_arm): Update code to get gdbarch.
16029 * disasm.c (dis_asm_read_memory): Change it to
16030 gdb_disassembler::dis_asm_read_memory.
16031 (dis_asm_memory_error): Likewise.
16032 (dis_asm_print_address): Likewise.
16033 (gdb_pretty_print_insn): Change it to
16034 gdb_disassembler::pretty_print_insn.
16035 (dump_insns): Add one argument gdb_disassemlber. All
16036 callers updated.
16037 (do_mixed_source_and_assembly_deprecated): Likewise.
16038 (do_mixed_source_and_assembly): Likewise.
16039 (do_assembly_only): Likewise.
16040 (gdb_disassembler::gdb_disassembler): New.
16041 (gdb_disassembler::print_insn): New.
16042 * disasm.h (class gdb_disassembler): New.
16043 (gdb_pretty_print_insn): Remove declaration.
16044 (gdb_disassemble_info): Likewise.
16045 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16046 (gdbscm_disasm_read_memory_worker): Update.
16047 (gdbscm_disasm_read_memory): Update.
16048 (gdbscm_disasm_memory_error): Remove.
16049 (gdbscm_disasm_print_address): Remove.
16050 (gdbscm_disassembler::gdbscm_disassembler): New.
16051 (gdbscm_print_insn_from_port): Update.
16052 * mips-tdep.c: Include disasm.h.
16053 (gdb_print_insn_mips): Update code to get gdbarch.
16054 * record-btrace.c (btrace_insn_history): Update.
16055 * spu-tdep.c: Include disasm.h.
16056 (struct spu_dis_asm_data): Remove.
16057 (struct spu_dis_asm_info): New.
16058 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16059 SPU id.
16060 (gdb_print_insn_spu): Cast disassemble_info to
16061 spu_dis_asm_info.
16062
16063 2017-01-26 Yao Qi <yao.qi@linaro.org>
16064
16065 * disasm.c (do_ui_file_delete): Delete.
16066 (gdb_insn_length): Move code creating stream to ...
16067 * utils.c (null_stream): ... here. New function.
16068 * utils.h (null_stream): Declare.
16069
16070 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16071
16072 * python/py-inferior.c (find_thread_object): Return directly
16073 from the loop. Remove "found" variable.
16074
16075 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16076
16077 GDB 7.12.1 released.
16078
16079 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16080
16081 * python/py-function.c (fnpy_call): Reorder declarations to have
16082 the gdbpy_enter object declared first.
16083 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16084
16085 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16086
16087 PR python/21068
16088 * python/python-internal.h (PyMem_RawMalloc): Define for
16089 Python < 3.4.
16090 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16091 PyMem_RawMalloc instead of PyMem_Malloc.
16092
16093 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16094 Luis Machado <lgustavo@codesourcery.com>
16095
16096 * NEWS (New commands): Mention flash-erase.
16097 (New MI commands): Mention target-flash-erase.
16098 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16099 command.
16100 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16101 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16102 * target.c (flash_erase_command): New function.
16103 (initialize_targets): Add new flash-erase command.
16104 * target.h (flash_erase_command): New declaration.
16105
16106 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16107
16108 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16109 HAVE_SYS_PROCFS_H is defined.
16110
16111 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16112
16113 * remote.c (struct cached_reg): Change data into a pointer.
16114 * (stop_reply_dtr): Free data pointers before deleting vector.
16115 (process_stop_reply): Likewise.
16116 (remote_parse_stop_reply): Allocate space for data
16117
16118 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16119
16120 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16121 MAX_REGISTER_SIZE.
16122 (amd64_pseudo_register_read_value): Likewise.
16123 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16124 (store_register_using_P): Likewise.
16125 * regcache.c (regcache_xfer_part): Likewise.
16126
16127 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16128
16129 Split real and pseudo registers.
16130 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16131 (sparc32_pseudo_regnum): New enum.
16132 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16133 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16134 (SPARC32_CP0_REGISTERS): New macro.
16135 (sparc32_pseudo_register_name): New function.
16136 (sparc32_register_name): Use sparc32_pseudo_register_name.
16137 (sparc32_pseudo_register_type): New function.
16138 (sparc32_register_type): Use sparc32_pseudo_register_type.
16139 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16140 pseudo register numbers.
16141 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16142 (SPARC64_CP0_REGISTERS): New macro.
16143 (sparc64_pseudo_register_name): New function.
16144 (sparc64_register_name): Use sparc64_pseudo_register_name.
16145 (sparc64_pseudo_register_type): New function.
16146 (sparc64_register_type): Use sparc64_pseudo_register_type.
16147 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16148 pseudo register numbers.
16149 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16150 sparc64_store_arguments): Handle pseudo register numbers.
16151
16152 2017-01-13 Yao Qi <yao.qi@linaro.org>
16153
16154 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16155 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16156 output.
16157 (getpkt_or_notif_sane_1): Likewise.
16158
16159 2017-01-13 Yao Qi <yao.qi@linaro.org>
16160
16161 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16162 of CC. Pass "-x c++-header" instead of "-x c".
16163
16164 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16165
16166 * remote.c (remote_can_async_p): Update comment.
16167
16168 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16169
16170 * linux-nat.c (linux_nat_can_async_p): Update comment.
16171
16172 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16173
16174 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16175
16176 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16177
16178 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16179
16180 2017-01-10 Tom Tromey <tom@tromey.com>
16181
16182 * python/py-type.c (typy_legacy_template_argument): Update.
16183 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16184 ~demangle_parse_info): Declare new members.
16185 (cp_demangled_name_to_comp): Return unique_ptr.
16186 (cp_demangled_name_parse_free)
16187 (make_cleanup_cp_demangled_name_parse_free)
16188 (cp_new_demangle_parse_info): Remove.
16189 * cp-support.c (do_demangled_name_parse_free_cleanup)
16190 (make_cleanup_cp_demangled_name_parse_free): Remove.
16191 (inspect_type, cp_canonicalize_string_full)
16192 (cp_canonicalize_string): Update.
16193 (mangled_name_to_comp): Change return type.
16194 (cp_class_name_from_physname, method_name_from_physname)
16195 (cp_func_name, cp_remove_params): Update.
16196 * cp-name-parser.y (demangle_parse_info): New constructor, from
16197 cp_new_demangle_parse_info.
16198 (~demangle_parse_info): New destructor, from
16199 cp_demangled_name_parse_free.
16200 (cp_merge_demangle_parse_infos): Update.
16201 (cp_demangled_name_to_comp): Change return type.
16202
16203 2017-01-10 Tom Tromey <tom@tromey.com>
16204
16205 * top.c (prevent_dont_repeat): Change return type.
16206 * python/python.c (execute_gdb_command): Use std::string.
16207 Update.
16208 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16209 * command.h (prevent_dont_repeat): Change return type.
16210 * breakpoint.c (bpstat_do_actions_1): Update.
16211
16212 2017-01-10 Tom Tromey <tom@tromey.com>
16213
16214 * value.h (scoped_value_mark::~scoped_value_mark): Call
16215 free_to_mark.
16216 (scoped_value_mark::free_to_mark): New method.
16217 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16218 scoped_value_mark.
16219
16220 2017-01-10 Tom Tromey <tom@tromey.com>
16221
16222 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16223 (valpy_reference_value, valpy_const_value, valpy_get_address)
16224 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16225 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16226 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16227 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16228 scoped_value_mark.
16229 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16230 * value.h (scoped_value_mark): New class.
16231
16232 2017-01-10 Tom Tromey <tom@tromey.com>
16233
16234 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16235 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16236 * psymtab.c (discard_psymtabs_upto): Remove.
16237 (make_cleanup_discard_psymtabs): Remove.
16238 (struct psymtab_state): Remove.
16239
16240 2017-01-10 Tom Tromey <tom@tromey.com>
16241
16242 * record-full.c (record_full_save_cleanups): Remove.
16243 (record_full_save): Use gdb::unlinker.
16244 * gcore.c (do_bfd_delete_cleanup): Remove.
16245 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16246 cleanups.
16247 * dwarf2read.c (unlink_if_set): Remove.
16248 (write_psymtabs_to_index): Use gdb::unlinker.
16249 * common/gdb_unlinker.h: New file.
16250
16251 2017-01-10 Tom Tromey <tom@tromey.com>
16252
16253 * windows-tdep.c (windows_xfer_shared_library): Update.
16254 * windows-nat.c (windows_make_so): Update.
16255 * utils.h (make_cleanup_bfd_unref): Remove.
16256 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16257 * symfile.h (symfile_bfd_open)
16258 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16259 * symfile.c (read_symbols, symbol_file_add)
16260 (separate_debug_file_exists): Update.
16261 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16262 (generic_load, reread_symbols): Update.
16263 * symfile-mem.c (symbol_file_add_from_memory): Update.
16264 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16265 (spu_symbol_file_add_from_memory): Update.
16266 * solist.h (struct target_so_ops) <bfd_open>: Return
16267 gdb_bfd_ref_ptr.
16268 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16269 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16270 gdb_bfd_ref_ptr.
16271 (solib_map_sections, reload_shared_libraries_1): Update.
16272 * solib-svr4.c (enable_break): Update.
16273 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16274 * solib-frv.c (enable_break2): Update.
16275 * solib-dsbt.c (enable_break): Update.
16276 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16277 gdb_bfd_ref_ptr.
16278 (darwin_solib_get_all_image_info_addr_at_init): Update.
16279 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16280 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16281 * record-full.c (record_full_save): Update.
16282 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16283 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16284 * minidebug.c (find_separate_debug_file_in_section): Return
16285 gdb_bfd_ref_ptr.
16286 * machoread.c (macho_add_oso_symfile): Change abfd to
16287 gdb_bfd_ref_ptr.
16288 (macho_symfile_read_all_oso): Update.
16289 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16290 (macho_symfile_read): Update.
16291 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16292 (jit_bfd_try_read_symtab): Update.
16293 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16294 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16295 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16296 gdb_bfd_ref_ptr.
16297 (gdb_bfd_ref_policy): New struct.
16298 (gdb_bfd_ref_ptr): New typedef.
16299 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16300 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16301 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16302 gdb_bfd_ref_ptr.
16303 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16304 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16305 (gcore_command): Update.
16306 * exec.c (exec_file_attach): Update.
16307 * elfread.c (elf_symfile_read): Update.
16308 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16309 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16310 (open_and_init_dwo_file): Update.
16311 (open_dwp_file): Return gdb_bfd_ref_ptr.
16312 (open_and_init_dwp_file): Update.
16313 * corelow.c (core_open): Update.
16314 * compile/compile-object-load.c (compile_object_load): Update.
16315 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16316 * coffread.c (coff_symfile_read): Update.
16317 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16318 gdb_bfd_ref_ptr. Rename.
16319 (dump_bfd_file, restore_command): Update.
16320 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16321 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16322 (find_separate_debug_file_by_buildid): Update.
16323
16324 2017-01-10 Tom Tromey <tom@tromey.com>
16325
16326 * common/gdb_ref_ptr.h: New file.
16327 * python/py-ref.h (struct gdbpy_ref_policy): New.
16328 (gdbpy_ref): Now a typedef.
16329
16330 2017-01-10 Tom Tromey <tom@tromey.com>
16331
16332 * utils.h (make_cleanup_htab_delete): Don't declare.
16333 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16334 Remove.
16335 * linespec.c (decode_compound_collector): Add constructor,
16336 destructor.
16337 (lookup_prefix_sym): Remove cleanup.
16338 (symtab_collector): Add constructor, destructor.
16339 (collect_symtabs_from_filename): Remove cleanup.
16340 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16341 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16342 Use htab_up.
16343 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16344 * dwarf2read.c (dw2_expand_symtabs_matching)
16345 (dw2_map_symbol_filenames, dwarf_decode_macros)
16346 (write_psymtabs_to_index): Use htab_up.
16347 * dwarf2loc.c (func_verify_no_selftailcall)
16348 (call_site_find_chain_1, func_verify_no_selftailcall)
16349 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16350 std::vector, gdb::unique_xmalloc_ptr.
16351 (call_sitep): Remove typedef.
16352 (dwarf2_locexpr_baton_eval): Remove unused variable.
16353
16354 2017-01-10 Tom Tromey <tom@tromey.com>
16355
16356 * python/python-internal.h (make_cleanup_py_decref)
16357 (make_cleanup_py_xdecref): Don't declare.
16358 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16359 (py_xdecref, make_cleanup_py_xdecref): Remove.
16360
16361 2017-01-10 Tom Tromey <tom@tromey.com>
16362
16363 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16364 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16365
16366 2017-01-10 Tom Tromey <tom@tromey.com>
16367
16368 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16369
16370 2017-01-10 Tom Tromey <tom@tromey.com>
16371
16372 * python/py-utils.c (unicode_to_encoded_string)
16373 (python_string_to_target_string)
16374 (python_string_to_target_python_string)
16375 (python_string_to_host_string, gdbpy_obj_to_string)
16376 (get_addr_from_python): Use gdbpy_ref.
16377
16378 2017-01-10 Tom Tromey <tom@tromey.com>
16379
16380 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16381 gdbpy_ref.
16382
16383 2017-01-10 Tom Tromey <tom@tromey.com>
16384
16385 * python/python.c (eval_python_command, gdbpy_decode_line)
16386 (gdbpy_run_events, gdbpy_start_type_printers)
16387 (gdbpy_apply_type_printers): Use gdbpy_ref.
16388
16389 2017-01-10 Tom Tromey <tom@tromey.com>
16390
16391 * python/py-param.c (get_doc_string, compute_enum_values): Use
16392 gdbpy_ref.
16393
16394 2017-01-10 Tom Tromey <tom@tromey.com>
16395
16396 * python/py-inferior.c (find_thread_object, build_inferior_list):
16397 Use gdbpy_ref.
16398
16399 2017-01-10 Tom Tromey <tom@tromey.com>
16400
16401 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16402
16403 2017-01-10 Tom Tromey <tom@tromey.com>
16404
16405 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16406 gdbpy_ref.
16407
16408 2017-01-10 Tom Tromey <tom@tromey.com>
16409
16410 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16411 extra incref.
16412 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16413 Use gdbpy_ref.
16414
16415 2017-01-10 Tom Tromey <tom@tromey.com>
16416
16417 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16418 gdbpy_ref.
16419
16420 2017-01-10 Tom Tromey <tom@tromey.com>
16421
16422 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16423 decref results of PyArg_ParseTupleAndKeywords.
16424
16425 2017-01-10 Tom Tromey <tom@tromey.com>
16426
16427 * python/python.c (python_run_simple_file): Use
16428 unique_xmalloc_ptr, gdbpy_ref.
16429
16430 2017-01-10 Tom Tromey <tom@tromey.com>
16431
16432 * python/py-prettyprint.c (print_stack_unless_memory_error)
16433 (print_string_repr, print_children): Use gdbpy_ref.
16434 (dummy_python_frame): New class.
16435 (dummy_python_frame::dummy_python_frame): Rename from
16436 push_dummy_python_frame.
16437 (py_restore_tstate): Remove.
16438
16439 2017-01-10 Tom Tromey <tom@tromey.com>
16440
16441 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16442
16443 2017-01-10 Tom Tromey <tom@tromey.com>
16444
16445 * python/python.c (ensure_python_env, restore_python_env):
16446 Remove.
16447 * python/python-internal.h (ensure_python_env): Don't declare.
16448 * varobj.h (varobj_ensure_python_env): Don't declare.
16449 * varobj.c (varobj_ensure_python_env): Remove.
16450
16451 2017-01-10 Tom Tromey <tom@tromey.com>
16452
16453 * varobj.c (varobj_value_get_print_value): Use
16454 gdbpy_enter_varobj.
16455
16456 2017-01-10 Tom Tromey <tom@tromey.com>
16457
16458 * python/py-prettyprint.c (print_string_repr, print_children):
16459 Update.
16460 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16461 of "encoding".
16462 * varobj.c (varobj_value_get_print_value): Update.
16463 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16464
16465 2017-01-10 Tom Tromey <tom@tromey.com>
16466
16467 * varobj.c (varobj_get_display_hint)
16468 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16469 (varobj_set_visualizer, free_variable): Use
16470 gdbpy_enter_varobj.
16471
16472 2017-01-10 Tom Tromey <tom@tromey.com>
16473
16474 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16475 (do_finish_initialization): New function. Use gdbpy_ref.
16476 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16477 do_finish_initialization.
16478
16479 2017-01-10 Tom Tromey <tom@tromey.com>
16480
16481 * python/py-param.c (get_set_value, get_show_value): Use
16482 gdbpy_enter, gdbpy_ref.
16483
16484 2017-01-10 Tom Tromey <tom@tromey.com>
16485
16486 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16487
16488 2017-01-10 Tom Tromey <tom@tromey.com>
16489
16490 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16491
16492 2017-01-10 Tom Tromey <tom@tromey.com>
16493
16494 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16495 Use gdbpy_enter_varobj.
16496
16497 2017-01-10 Tom Tromey <tom@tromey.com>
16498
16499 * varobj.c (gdbpy_enter_varobj): New constructor.
16500 * python/python-internal.h (gdbpy_enter_varobj): New class.
16501 * python/py-varobj.c (py_varobj_get_iterator): Use
16502 gdbpy_enter_varobj.
16503
16504 2017-01-10 Tom Tromey <tom@tromey.com>
16505
16506 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16507 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16508 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16509 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16510 unique_xmalloc_ptr.
16511 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16512
16513 2017-01-10 Tom Tromey <tom@tromey.com>
16514
16515 * python/py-xmethods.c (invoke_match_method): Use
16516 gdbpy_ref.
16517
16518 2017-01-10 Tom Tromey <tom@tromey.com>
16519
16520 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16521 gdbpy_enter, gdbpy_ref.
16522
16523 2017-01-10 Tom Tromey <tom@tromey.com>
16524
16525 * python/python.c (python_interactive_command): Use gdbpy_enter.
16526
16527 2017-01-10 Tom Tromey <tom@tromey.com>
16528
16529 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16530 gdbpy_ref.
16531
16532 2017-01-10 Tom Tromey <tom@tromey.com>
16533
16534 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16535 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16536
16537 2017-01-10 Tom Tromey <tom@tromey.com>
16538
16539 * utils.h (htab_deleter): New struct.
16540 (htab_up): New typedef.
16541 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16542 gdbpy_enter, gdbpy_ref, htab_up.
16543
16544 2017-01-10 Tom Tromey <tom@tromey.com>
16545
16546 * python/py-unwind.c (pending_frame_invalidate): Remove.
16547 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16548
16549 2017-01-10 Tom Tromey <tom@tromey.com>
16550
16551 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16552 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16553
16554 2017-01-10 Tom Tromey <tom@tromey.com>
16555
16556 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16557
16558 2017-01-10 Tom Tromey <tom@tromey.com>
16559
16560 * python/python.c (gdbpy_eval_from_control_command)
16561 (gdbpy_source_script, gdbpy_run_events)
16562 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16563 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16564 gdbpy_enter.
16565
16566 2017-01-10 Tom Tromey <tom@tromey.com>
16567
16568 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16569
16570 2017-01-10 Tom Tromey <tom@tromey.com>
16571
16572 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16573
16574 2017-01-10 Tom Tromey <tom@tromey.com>
16575
16576 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16577 (python_on_inferior_call_pre, python_on_inferior_call_post)
16578 (python_on_memory_change, python_on_register_change)
16579 (python_inferior_exit, python_new_objfile, add_thread_object)
16580 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16581
16582 2017-01-10 Tom Tromey <tom@tromey.com>
16583
16584 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16585 (bpfinishpy_handle_exit): Use gdbpy_enter.
16586
16587 2017-01-10 Tom Tromey <tom@tromey.com>
16588
16589 * python/py-cmd.c (cmdpy_destroyer)
16590 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16591 gdbpy_enter.
16592
16593 2017-01-10 Tom Tromey <tom@tromey.com>
16594
16595 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16596 gdbpy_enter.
16597 (gdbpy_breakpoint_has_cond): Likewise.
16598
16599 2017-01-10 Tom Tromey <tom@tromey.com>
16600
16601 * python/python.c (gdbpy_enter): New constructor.
16602 (~gdbpy_enter): New destructor.
16603 (restore_python_env, ensure_python_env): Rewrite.
16604 * python/python-internal.h (gdbpy_enter): New class.
16605
16606 2017-01-10 Tom Tromey <tom@tromey.com>
16607
16608 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16609
16610 2017-01-10 Tom Tromey <tom@tromey.com>
16611
16612 * python/py-value.c (value_has_field, get_field_flag)
16613 (get_field_type, valpy_getitem, convert_value_from_python): Use
16614 gdbpy_ref.
16615
16616 2017-01-10 Tom Tromey <tom@tromey.com>
16617
16618 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16619 gdbpy_ref.
16620
16621 2017-01-10 Tom Tromey <tom@tromey.com>
16622
16623 * python/py-prettyprint.c (search_pp_list)
16624 (find_pretty_printer_from_objfiles)
16625 (find_pretty_printer_from_progspace)
16626 (find_pretty_printer_from_gdb, find_pretty_printer)
16627 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16628 gdbpy_ref.
16629
16630 2017-01-10 Tom Tromey <tom@tromey.com>
16631
16632 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16633
16634 2017-01-10 Tom Tromey <tom@tromey.com>
16635
16636 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16637 (ltpy_get_all_source_lines): Use gdbpy_ref.
16638
16639 2017-01-10 Tom Tromey <tom@tromey.com>
16640
16641 * python/py-framefilter.c (extract_sym, extract_value)
16642 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16643 gdbpy_ref.
16644
16645 2017-01-10 Tom Tromey <tom@tromey.com>
16646
16647 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16648
16649 2017-01-10 Tom Tromey <tom@tromey.com>
16650
16651 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16652
16653 2017-01-10 Tom Tromey <tom@tromey.com>
16654
16655 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16656 gdbpy_ref.
16657
16658 2017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16661
16662 2017-01-10 Tom Tromey <tom@tromey.com>
16663
16664 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16665 (typy_range): Use gdbpy_ref.
16666
16667 2017-01-10 Tom Tromey <tom@tromey.com>
16668
16669 * python/py-threadevent.c (create_thread_event_object): Use
16670 gdbpy_ref.
16671 * python/py-stopevent.c (create_stop_event_object): Simplify.
16672 (emit_stop_event): Use gdbpy_ref.
16673 * python/py-signalevent.c (create_signal_event_object): Use
16674 gdbpy_ref.
16675 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16676 (emit_new_objfile_event, create_clear_objfiles_event_object)
16677 (emit_clear_objfiles_event): Use gdbpy_ref.
16678 * python/py-infevents.c (create_inferior_call_event_object)
16679 (create_register_changed_event_object)
16680 (create_memory_changed_event_object, emit_inferior_call_event)
16681 (emit_memory_changed_event, emit_register_changed_event): Use
16682 gdbpy_ref.
16683 * python/py-exitedevent.c (create_exited_event_object)
16684 (emit_exited_event): Use gdbpy_ref.
16685 * python/py-event.h (evpy_emit_event): Remove
16686 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16687 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16688 * python/py-continueevent.c (emit_continue_event): Use
16689 gdbpy_ref.
16690 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16691 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16692 gdbpy_ref.
16693 * python/py-bpevent.c (create_breakpoint_event_object): Use
16694 gdbpy_ref.
16695
16696 2017-01-10 Tom Tromey <tom@tromey.com>
16697
16698 * python/py-ref.h: New file.
16699
16700 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16701
16702 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16703 void.
16704 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16705 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16706 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16707 * ui-out.c (ui_out::redirect): Likewise.
16708 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16709 * cli/cli-logging.c (set_logging_redirect): Update call site of
16710 ui_out::redirect.
16711 (handle_redirections): Likewise.
16712 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16713 * top.c (execute_command_to_string): Likewise.
16714 * utils.c (do_ui_out_redirect_pop): Likewise.
16715
16716 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16717
16718 * stack.c (_initialize_stack): Update "frame" command help message.
16719
16720 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16721
16722 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16723
16724 2017-01-06 Yao Qi <yao.qi@linaro.org>
16725
16726 * x86-linux-nat.h: Include gdb_proc_service.h.
16727
16728 2017-01-06 Yao Qi <yao.qi@linaro.org>
16729
16730 * ser-base.h: Include serial.h.
16731
16732 2017-01-06 Yao Qi <yao.qi@linaro.org>
16733
16734 * ppc-linux-tdep.h: Include ppc-tdep.h.
16735
16736 2017-01-06 Yao Qi <yao.qi@linaro.org>
16737
16738 * nat/amd64-linux-siginfo.h: Include signal.h.
16739
16740 2017-01-06 Yao Qi <yao.qi@linaro.org>
16741
16742 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16743
16744 2017-01-06 Yao Qi <yao.qi@linaro.org>
16745
16746 * mi/mi-parse.h: Include mi-cmds.h.
16747
16748 2017-01-06 Yao Qi <yao.qi@linaro.org>
16749
16750 * inf-loop.c: Don't include "target.h".
16751 * inf-loop.h: Include it here.
16752
16753 2017-01-06 Yao Qi <yao.qi@linaro.org>
16754
16755 * dfp.h: Include "dboulest.h" and "expression.h".
16756
16757 2017-01-06 Yao Qi <yao.qi@linaro.org>
16758
16759 * ax-gdb.h: Include "ax.h".
16760
16761 2017-01-06 Yao Qi <yao.qi@linaro.org>
16762
16763 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16764 with nat/gdb_ptrace.h.
16765
16766 2017-01-05 Yao Qi <yao.qi@linaro.org>
16767
16768 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16769 new line.
16770 (mips64_fbsd_sigframe_init): Likewise.
16771
16772 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16773
16774 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16775 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16776
16777 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16778
16779 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16780 * NEWS: Mention new FreeBSD/mips native configuration.
16781 * config/mips/fbsd.mh: New file.
16782 * configure.host: Add mips*-*-freebsd*.
16783 * mips-fbsd-nat.c: New file.
16784
16785 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16786
16787 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16788 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16789 * NEWS: Mention new FreeBSD/mips target.
16790 * configure.tgt: Add mips*-*-freebsd*.
16791 * mips-fbsd-tdep.c: New file.
16792 * mips-fbsd-tdep.h: New file.
16793
16794 2017-01-04 Yao Qi <yao.qi@linaro.org>
16795
16796 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16797 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16798
16799 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16800
16801 Update copyright year range in all GDB files.
16802
16803 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16804
16805 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16806
16807 For older changes see ChangeLog-2016.
16808 \f
16809 Local Variables:
16810 mode: change-log
16811 left-margin: 8
16812 fill-column: 74
16813 version-control: never
16814 coding: utf-8
16815 End: