1d77d85de6fffc5def06c1cec90537e935cc76c4
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-26 Tom Tromey <tom@tromey.com>
2
3 * nat/linux-personality.h (class
4 maybe_disable_address_space_randomization): New class.
5 (maybe_disable_address_space_randomization): Don't declare
6 function.
7 * nat/linux-personality.c (restore_personality)
8 (make_disable_asr_cleanup): Remove.
9 (maybe_disable_address_space_randomization): Now a constructor.
10 (~maybe_disable_address_space_randomization): New destructor.
11 * linux-nat.c (linux_nat_create_inferior): Update.
12
13 2017-11-26 Tom Tromey <tom@tromey.com>
14
15 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
16
17 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
18
19 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
20 "cooked" register. Access only first four bytes of branch target
21 registers.
22
23 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
24
25 PR gdb/22491
26 * stap-probe.c (relocate_address): New function.
27 (stap_probe::get_relocated_address): Use 'relocate_address'.
28 (stap_probe::set_semaphore): Use 'relocate_address' and pass
29 'm_sem_addr'.
30 (stap_probe::clear_semaphore): Likewise.
31
32 2017-11-25 Pedro Alves <palves@redhat.com>
33
34 * dictionary.c: Include "safe-ctype.h".
35 * minsyms.c: Include "safe-ctype.h".
36 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
37
38 2017-11-25 Pedro Alves <palves@redhat.com>
39
40 * completer.c (complete_line_internal_1): Skip spaces until the
41 start of the command.
42
43 2017-11-24 Pedro Alves <palves@redhat.com>
44
45 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
46 cp_fq_symbol_name_matches. Pass language_cplus to
47 strncmp_with_mode.
48 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
49 (selftests::test_cp_symbol_name_cmp): New.
50 (_initialize_cp_support): Register "cp_symbol_name_matches"
51 selftests.
52 * language.c (default_symbol_name_matcher): Pass language_minimal
53 to strncmp_iw_with_mode.
54 * utils.c: Include "cp-support.h" and <algorithm>.
55 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
56 (cp_is_operator): New functions.
57 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
58 skip whitespace in the symbol name when the lookup name doesn't
59 have spaces, and vice versa.
60 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
61 * utils.h (strncmp_iw_with_mode): Add language parameter.
62
63 2017-11-24 Joel Brobecker <brobecker@adacore.com>
64
65 * ada-lang.c (ada_exception_message_1, ada_exception_message):
66 New functions.
67 (print_it_exception): If available, display the exception
68 message as well.
69 * NEWS: Document new feature.
70
71 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
72
73 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
74
75 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
76
77 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
78 (dtrace_probe::is_enabled, dtrace_probe::enable)
79 (dtrace_probe::disable): Remove keyword 'struct' at for-range
80 variable
81 * probe.c (gen_ui_out_table_header_info)
82 (print_ui_out_not_applicables): Remove keyword 'struct' at
83 for-range variable
84
85 2017-11-24 Alan Hayward <alan.hayward@arm.com>
86
87 * configure.tgt: Add arch/aarch64.o
88
89 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
90
91 * common/common-utils.h: Include poison.h.
92 (xfree): Remove declaration, add definition with static_assert.
93 * common/common-utils.c (xfree): Remove.
94 * common/poison.h (IsMallocatable): Define.
95 (IsFreeable): Define.
96 (free): Delete for non-freeable types.
97 (xnew): New.
98 (XNEW): Undef and redefine.
99 (xcnew): New.
100 (XCNEW): Undef and redefine.
101 (xdelete): New.
102 (XDELETE): Undef and redefine.
103 (xnewvec): New.
104 (XNEWVEC): Undef and redefine.
105 (xcnewvec): New.
106 (XCNEWVEC): Undef and redefine.
107 (xresizevec): New.
108 (XRESIZEVEC): Undef and redefine.
109 (xdeletevec): New.
110 (XDELETEVEC): Undef and redefine.
111 (xnewvar): New.
112 (XNEWVAR): Undef and redefine.
113 (xcnewvar): New.
114 (XCNEWVAR): Undef and redefine.
115 (xresizevar): New.
116 (XRESIZEVAR): Undef and redefine.
117
118 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
119
120 * gdbthread.h (private_thread_info): Define structure type, add
121 virtual pure destructor.
122 (thread_info) <priv>: Change type to unique_ptr.
123 <private_dtor>: Remove.
124 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
125 (private_thread_info::~private_thread_info): Provide default
126 implementation.
127 (thread_info::~thread_info): Don't call private_dtor nor
128 manually free priv.
129 * aix-thread.c (private_thread_info): Rename to ...
130 (aix_thread_info): ... this.
131 (get_aix_thread_info): New.
132 (sync_threadlists): Adjust.
133 (iter_tid): Adjust.
134 (aix_thread_resume): Adjust.
135 (aix_thread_fetch_registers): Adjust.
136 (aix_thread_store_registers): Adjust.
137 (aix_thread_extra_thread_info): Adjust.
138 * darwin-nat.h (private_thread_info): Rename to ...
139 (darwin_thread_info): ... this.
140 (get_darwin_thread_info): New.
141 * darwin-nat.c (darwin_init_thread_list): Adjust.
142 (darwin_check_new_threads): Adjust.
143 (thread_info_from_private_thread_info): Adjust.
144 * linux-thread-db.c (private_thread_info): Rename to ...
145 (thread_db_thread_info): ... this, initialize fields.
146 (get_thread_db_thread_info): New.
147 <dying>: Change type to bool.
148 (update_thread_state): Adjust to type rename.
149 (record_thread): Adjust to type rename an use of unique_ptr.
150 (thread_db_pid_to_str): Likewise.
151 (thread_db_extra_thread_info): Likewise.
152 (thread_db_thread_handle_to_thread_info): Likewise.
153 (thread_db_get_thread_local_address): Likewise.
154 * nto-tdep.h (private_thread_info): Rename to ...
155 (nto_thread_info): ... this, initialize fields.
156 (get_nto_thread_info): New.
157 <name>: Change type to std::string.
158 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
159 use of unique_ptr.
160 * nto-procfs.c (update_thread_private_data_name): Adjust to
161 std::string change, allocate nto_private_thread_info with new.
162 (update_thread_private_data): Adjust to unique_ptr.
163 * remote.c (private_thread_info): Rename to ...
164 (remote_thread_info): ... this, initialize data members with
165 default values.
166 <extra, name>: Change type to std::string.
167 <thread_handle>: Change type to non-pointer.
168 (free_private_thread_info): Remove.
169 (get_private_info_thread): Rename to...
170 (get_remote_thread_info): ... this, change return type, adjust to
171 use of unique_ptr, use remote_thread_info constructor.
172 (remote_add_thread): Adjust.
173 (get_private_info_ptid): Rename to...
174 (get_remote_thread_info): ...this, change return type.
175 (remote_thread_name): Use get_remote_thread_info, adjust to
176 change to std::string.
177 (struct thread_item) <~thread_item>: Remove.
178 <thread_handle>: Make non pointer.
179 (start_thread): Adjust to thread_item::thread_handle type
180 change.
181 (remote_update_thread_list): Adjust to type name change, move
182 strings from temporary to long-lived object instead of
183 duplicating.
184 (remote_threads_extra_info): Use get_remote_thread_info.
185 (process_initial_stop_replies): Likewise.
186 (resume_clear_thread_private_info): Likewise.
187 (remote_resume): Adjust to type name change.
188 (remote_commit_resume): Use get_remote_thread_info.
189 (process_stop_reply): Adjust to type name change.
190 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
191 (remote_stopped_by_hw_breakpoint): Likewise.
192 (remote_stopped_by_watchpoint): Likewise.
193 (remote_stopped_data_address): Likewise.
194 (remote_core_of_thread): Likewise.
195 (remote_thread_handle_to_thread_info): Use
196 get_private_info_thread, adjust to thread_handle field type
197 change.
198
199 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * remote.c (struct thread_item): Add constructor, disable copy
202 construction and copy assignment, define default move
203 construction and move assignment.
204 <extra, name>: Change type to std::string.
205 <core>: Initialize.
206 <thread_handle>: Make non-pointer.
207 (thread_item_t): Remove typedef.
208 (DEF_VEC_O(thread_item_t)): Remove.
209 (threads_listing_context) <contains_thread>: New method.
210 <remove_thread>: New method.
211 <items>: Change type to std::vector.
212 (clear_threads_listing_context): Remove.
213 (threads_listing_context_remove): Remove.
214 (remote_newthread_step): Use thread_item constructor, adjust to
215 change to std::vector.
216 (start_thread): Use thread_item constructor, adjust to change to
217 std::vector.
218 (end_thread): Adjust to change to std::vector and std::string.
219 (remote_get_threads_with_qthreadinfo): Use thread_item
220 constructor, adjust to std::vector.
221 (remote_update_thread_list): Adjust to change to std::vector and
222 std::string, use threads_listing_context methods.
223 (remove_child_of_pending_fork): Adjust.
224 (remove_new_fork_children): Adjust.
225 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
226 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
227 * unittests/rsp-low-selftests.c: New file.
228 * common/rsp-low.h: Include common/byte-vector.h.
229 (hex2bin): New overload.
230 * common/rsp-low.c (hex2bin): New overload.
231
232 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
233
234 * inferior.h (private_inferior): Define structure type, add
235 virtual pure destructor.
236 (inferior) <priv>: Change type to unique_ptr.
237 * inferior.c (private_inferior::~private_inferior): Provide
238 default implementation.
239 (inferior::~inferior): Don't free priv field.
240 (exit_inferior_1): Likewise.
241 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
242 (darwin_exception_info): Remove typedef.
243 (DEF_VEC_O (darwin_thread_t)); Remove.
244 (private_inferior): Rename to ...
245 (darwin_private_inferior): ... this, extend private_inferior.
246 (get_darwin_inferior): New.
247 <threads>: Change type to std::vector of darwin_thread_t pointers.
248 * darwin-nat.c (darwin_check_new_threads): Adjust.
249 (find_inferior_task_it): Adjust.
250 (darwin_find_thread); Adjust.
251 (darwin_suspend_inferior): Adjust.
252 (darwin_resume_inferior): Adjust.
253 (darwin_find_new_inferior): Adjust.
254 (darwin_decode_notify_message): Adjust.
255 (darwin_send_reply): Adjust.
256 (darwin_resume_inferior_threads): Adjust.
257 (darwin_suspend_inferior_threads): Adjust.
258 (darwin_decode_message): Adjust.
259 (darwin_wait): Adjust.
260 (darwin_interrupt): Adjust.
261 (darwin_deallocate_threads): Adjust.
262 (darwin_mourn_inferior): Adjust, don't free private data.
263 (darwin_reply_to_all_pending_messages): Adjust.
264 (darwin_stop_inferior): Adjust.
265 (darwin_setup_exceptions): Adjust.
266 (darwin_kill_inferior): Adjust.
267 (darwin_setup_request_notification): Adjust.
268 (darwin_attach_pid): Adjust.
269 (darwin_init_thread_list): Adjust.
270 (darwin_setup_fake_stop_event): Adjust.
271 (darwin_attach): Adjust.
272 (darwin_detach): Adjust.
273 (darwin_xfer_partial): Adjust.
274 (set_enable_mach_exceptions): Adjust.
275 (darwin_pid_to_exec_file): Adjust.
276 (darwin_get_ada_task_ptid): Adjust.
277 * darwin-nat-info.c (get_task_from_args): Adjust.
278 (info_mach_ports_command): Adjust.
279 (info_mach_region_command): Adjust.
280 (info_mach_exceptions_command): Adjust.
281 * remote.c (private_inferior): Rename to ...
282 (remote_private_inferior): ... this, initialize fields.
283 (get_remote_inferior); New.
284 (remote_commit_resume): Use get_remote_inferior.
285 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
286
287 2017-11-24 Pedro Alves <palves@redhat.com>
288
289 * NEWS: Mention linespecs and explicit locations, and completion
290 improvements.
291
292 2017-11-24 Yao Qi <yao.qi@linaro.org>
293
294 * regcache.c (regcache::dump): Remove footnote_register_size.
295
296 2017-11-24 Yao Qi <yao.qi@linaro.org>
297
298 * regcache.c (cooked_read_test): Add more test for readonly
299 regcache.
300
301 2017-11-24 Yao Qi <yao.qi@linaro.org>
302
303 * gdbarch-selftests.c (test_target_has_registers): Move it to
304 target.c.
305 (test_target_has_stack): Likewise.
306 (test_target_has_memory): Likewise.
307 (test_target_prepare_to_store): Likewise.
308 (test_target_store_registers): Likewise.
309 (test_target_ops): Likewise.
310 * regcache.c: Include selftest-arch.h and gdbthread.h.
311 (target_ops_no_register): New class.
312 (test_target_fetch_registers): New.
313 (test_target_store_registers): New.
314 (test_target_xfer_partial): New.
315 (readwrite_regcache): New.
316 (cooked_read_test): New.
317 (_initialize_regcache): Register the test.
318 * target.c: (test_target_has_registers): Moved from
319 gdbarch-selftests.c.
320 (test_target_has_stack): Likewise.
321 (test_target_has_memory): Likewise.
322 (test_target_prepare_to_store): Likewise.
323 (test_target_store_registers): Likewise.
324 * target.h (test_target_ops): New class.
325
326 2017-11-24 Alan Hayward <alan.hayward@arm.com>
327
328 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
329 selftest.
330
331 2017-11-24 Alan Hayward <alan.hayward@arm.com>
332
333 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
334 * arch/aarch64.c (aarch64_create_target_description): Create
335 new target description.
336 * features/Makefile: Add new files.
337 * features/aarch64.c: Remove file.
338 * features/aarch64-core.c: New autogenerated file.
339 * features/aarch64-fpu.c: New autogenerated file.
340 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
341
342 2017-11-24 Alan Hayward <alan.hayward@arm.com>
343
344 * Makefile.in: Add new files.
345 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
346 aarch64_read_description.
347 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
348 Call aarch64_read_description.
349 * aarch64-tdep.c (aarch64_read_description): New function.
350 (aarch64_gdbarch_init): Call aarch64_read_description.
351 * aarch64-tdep.h (aarch64_read_description): New function.
352 * arch/aarch64.c: New file.
353 * configure.tgt: Add new files.
354
355 2017-11-24 Yao Qi <yao.qi@linaro.org>
356
357 * mi/mi-main.c (register_changed_p): Update.
358 * value.c (value_contents_bits_eq): Change return type.
359 (value_contents_eq): Likewise.
360 * value.h: Update comments.
361
362 2017-11-24 Yao Qi <yao.qi@linaro.org>
363
364 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
365 local 'changed'. Remove error.
366 (register_changed_p): Change return type to bool.
367
368 2017-11-24 Yao Qi <yao.qi@linaro.org>
369
370 * arch/tic6x.c: New file.
371 * arch/tic6x.h: New file.
372 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
373 tic6x-core.xml and tic6x-gp.xml.
374 * features/tic6x-c6xp.c: Generated.
375 * features/tic6x-core.c: Generated.
376 * features/tic6x-gp.c: Generated.
377 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
378 "tic6x-".
379
380 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
381
382 * mi/mi-main.c (list_available_thread_groups): Change map value
383 type to std::vector.
384
385 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
386
387 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
388
389 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
390
391 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
392 back to...
393 <children_requested>: ... this.
394 (varobj_get_num_children, varobj_update): Adjust.
395
396 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
397
398 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
399 (ada_value_has_mutated): Likewise.
400 * c-varobj.c (varobj_is_anonymous_child): Likewise.
401 (c_is_path_expr_parent): Likewise.
402 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
403 (mi_cmd_var_set_frozen): Likewise.
404 (mi_cmd_var_update_iter): Likewise.
405 (mi_cmd_var_update): Likewise.
406 * varobj.c (pretty_printing): Likewise.
407 (varobj_enable_pretty_printing): Likewise.
408 (struct varobj_root) <floating, is_valid>: Likewise.
409 (struct varobj_dynamic) <children_requested>: Likewise.
410 (delete_variable): Likewise.
411 (delete_variable_1): Likewise.
412 (install_variable): Likewise.
413 (update_type_if_necessary): Likewise.
414 (install_new_value): Likewise.
415 (value_of_root): Likewise.
416 (is_root_p): Likewise.
417 (varobj_create): Likewise.
418 (varobj_delete): Likewise.
419 (varobj_has_more): Likewise.
420 (varobj_set_frozen): Likewise.
421 (varobj_get_frozen): Likewise.
422 (install_dynamic_child): Likewise.
423 (dynamic_varobj_has_child_method): Likewise.
424 (update_dynamic_varobj_children): Likewise.
425 (varobj_get_num_children): Likewise.
426 (varobj_list_children): Likewise.
427 (is_path_expr_parent): Likewise.
428 (varobj_default_is_path_expr_parent): Likewise.
429 (varobj_is_dynamic_p): Likewise.
430 (varobj_set_value): Likewise.
431 (varobj_value_has_mutated): Likewise.
432 (varobj_update): Likewise.
433 (check_scope): Likewise.
434 (value_of_root_1): Likewise.
435 (varobj_value_get_print_value): Likewise.
436 (varobj_editable_p): Likewise.
437 (varobj_value_is_changeable_p): Likewise.
438 (varobj_floating_p): Likewise.
439 (varobj_default_value_is_changeable_p): Likewise.
440 (varobj_invalidate_iter): Likewise.
441 * varobj.h (struct varobj_update_result) <type_changed,
442 children_changed, changed, value_installed>: Likewise.
443 (struct varobj) <updated, frozen, not_fetched>: Likewise.
444 (struct lang_varobj_ops) <value_is_changeable_p,
445 value_has_mutated, is_path_expr_parent>: Likewise.
446 (varobj_delete): Likewise.
447 (varobj_set_frozen): Likewise.
448 (varobj_get_frozen): Likewise.
449 (varobj_set_value): Likewise.
450 (varobj_update): Likewise.
451 (varobj_editable_p): Likewise.
452 (varobj_floating_p): Likewise.
453 (varobj_has_more): Likewise.
454 (varobj_is_dynamic_p): Likewise.
455 (varobj_default_value_is_changeable_p): Likewise.
456 (varobj_value_is_changeable_p): Likewise.
457 (varobj_is_anonymous_child): Likewise.
458 (varobj_default_is_path_expr_parent): Likewise.
459
460 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
461
462 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
463 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
464 <type_str>: Convert to 'std::string'.
465 <expr>: Convert to 'expression_up'.
466 (dtrace_probe_arg_s): Delete type and VEC.
467 (dtrace_probe_enabler_s): Likewise.
468 (struct dtrace_probe): Replace by...
469 (class dtrace_static_probe_ops): ...this and...
470 (class dtrace_probe): ...this.
471 (dtrace_probe_is_linespec): Rename to...
472 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
473 to reflect change.
474 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
475 Adjust code. Create new instance of 'dtrace_probe'.
476 (dtrace_build_arg_exprs): Rename to...
477 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
478 reflect change.
479 (dtrace_get_probes): Rename to...
480 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
481 to reflect change.
482 (dtrace_get_arg): Rename to...
483 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
484 reflect change.
485 (dtrace_probe_is_enabled): Rename to...
486 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
487 change.
488 (dtrace_get_probe_address): Rename to...
489 (dtrace_probe::get_relocated_address): ...this. Adjust code
490 to reflect change.
491 (dtrace_get_probe_argument_count): Rename to...
492 (dtrace_probe::get_argument_count): ...this. Adjust code to
493 reflect change.
494 (dtrace_can_evaluate_probe_arguments): Rename to...
495 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
496 to reflect change.
497 (dtrace_evaluate_probe_argument): Rename to...
498 (dtrace_probe::evaluate_argument): ...this. Adjust code to
499 reflect change.
500 (dtrace_compile_to_ax): Rename to...
501 (dtrace_probe::compile_to_ax): ...this. Adjust code to
502 reflect change.
503 (dtrace_probe_destroy): Delete.
504 (dtrace_type_name): Rename to...
505 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
506 reflect change.
507 (dtrace_probe::get_static_ops): New method.
508 (dtrace_gen_info_probes_table_header): Rename to...
509 (dtrace_static_probe_ops::gen_info_probes_table_header):
510 ...this. Adjust code to reflect change.
511 (dtrace_gen_info_probes_table_values): Rename to...
512 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
513 code to reflect change.
514 (dtrace_enable_probe): Rename to...
515 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
516 change.
517 (dtrace_disable_probe): Rename to...
518 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
519 change.
520 (struct probe_ops dtrace_probe_ops): Delete.
521 (info_probes_dtrace_command): Call 'info_probes_for_spops'
522 instead of 'info_probes_for_ops'.
523 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
524 of 'all_probe_ops'.
525
526 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
527 Simon Marchi <simark@simark.ca>
528
529 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
530 variable.
531 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
532 <aexpr>: Change type to 'expression_up'.
533 (stap_probe_arg_s): Delete type and VEC.
534 (struct stap_probe): Delete. Replace by...
535 (class stap_static_probe_ops): ...this and...
536 (class stap_probe): ...this. Rename variables to add 'm_'
537 prefix. Do not use 'union' for arguments anymore.
538 (stap_get_expected_argument_type): Receive probe name instead
539 of 'struct stap_probe'. Adjust code.
540 (stap_parse_probe_arguments): Rename to...
541 (stap_probe::parse_arguments): ...this. Adjust code to
542 reflect change.
543 (stap_get_probe_address): Rename to...
544 (stap_probe::get_relocated_address): ...this. Adjust code
545 to reflect change.
546 (stap_get_probe_argument_count): Rename to...
547 (stap_probe::get_argument_count): ...this. Adjust code
548 to reflect change.
549 (stap_get_arg): Rename to...
550 (stap_probe::get_arg_by_number'): ...this. Adjust code to
551 reflect change.
552 (can_evaluate_probe_arguments): Rename to...
553 (stap_probe::can_evaluate_arguments): ...this. Adjust code
554 to reflect change.
555 (stap_evaluate_probe_argument): Rename to...
556 (stap_probe::evaluate_argument): ...this. Adjust code
557 to reflect change.
558 (stap_compile_to_ax): Rename to...
559 (stap_probe::compile_to_ax): ...this. Adjust code to
560 reflect change.
561 (stap_probe_destroy): Delete.
562 (stap_modify_semaphore): Adjust comment.
563 (stap_set_semaphore): Rename to...
564 (stap_probe::set_semaphore): ...this. Adjust code to reflect
565 change.
566 (stap_clear_semaphore): Rename to...
567 (stap_probe::clear_semaphore): ...this. Adjust code to
568 reflect change.
569 (stap_probe::get_static_ops): New method.
570 (handle_stap_probe): Adjust code to create instance of
571 'stap_probe'.
572 (stap_get_probes): Rename to...
573 (stap_static_probe_ops::get_probes): ...this. Adjust code to
574 reflect change.
575 (stap_probe_is_linespec): Rename to...
576 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
577 reflect change.
578 (stap_type_name): Rename to...
579 (stap_static_probe_ops::type_name): ...this. Adjust code to
580 reflect change.
581 (stap_gen_info_probes_table_header): Rename to...
582 (stap_static_probe_ops::gen_info_probes_table_header):
583 ...this. Adjust code to reflect change.
584 (stap_gen_info_probes_table_values): Rename to...
585 (stap_probe::gen_info_probes_table_values): ...this. Adjust
586 code to reflect change.
587 (struct probe_ops stap_probe_ops): Delete.
588 (info_probes_stap_command): Use 'info_probes_for_spops'
589 instead of 'info_probes_for_ops'.
590 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
591 of 'all_probe_ops'.
592
593 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
594
595 * break-catch-throw.c (fetch_probe_arguments): Use
596 'probe.prob' instead of 'probe.probe'.
597 * breakpoint.c (create_longjmp_master_breakpoint): Call
598 'can_evaluate_arguments' and 'get_relocated_address' methods
599 from probe.
600 (create_exception_master_breakpoint): Likewise.
601 (add_location_to_breakpoint): Use 'sal->prob' instead of
602 'sal->probe'.
603 (bkpt_probe_insert_location): Call 'set_semaphore' method from
604 probe.
605 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
606 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
607 of 'probe_ops'.
608 (probe_key_free): Call 'delete' on probe.
609 (check_exception_resume): Use 'probe.prob' instead of
610 'probe.probe'.
611 * location.c (string_to_event_location_basic): Call
612 'probe_linespec_to_static_ops'.
613 * probe.c (class any_static_probe_ops): New class.
614 (any_static_probe_ops any_static_probe_ops): New variable.
615 (parse_probes_in_pspace): Receive 'static_probe_ops' as
616 argument. Adjust code to reflect change.
617 (parse_probes): Use 'static_probe_ops' instead of
618 'probe_ops'. Adjust code to reflect change.
619 (find_probes_in_objfile): Call methods to get name and
620 provider from probe.
621 (find_probe_by_pc): Use 'result.prob' instead of
622 'result.probe'. Call 'get_relocated_address' method from
623 probe.
624 (collect_probes): Adjust comment and argument list to receive
625 'static_probe_ops' instead of 'probe_ops'. Adjust code to
626 reflect change. Call necessary methods from probe.
627 (compare_probes): Call methods to get name and provider from
628 probes.
629 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
630 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
631 adjust code accordingly.
632 (print_ui_out_not_applicables): Likewise.
633 (info_probes_for_ops): Rename to...
634 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
635 as argument instead of 'probe_ops'. Adjust code. Call
636 necessary methods from probe.
637 (info_probes_command): Use 'info_probes_for_spops'.
638 (enable_probes_command): Pass correct argument to
639 'collect_probes'. Call methods from probe.
640 (disable_probes_command): Likewise.
641 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
642 (get_probe_argument_count): Move to
643 'any_static_probe_ops::get_argument_count'.
644 (can_evaluate_probe_arguments): Move to
645 'any_static_probe_ops::can_evaluate_arguments'.
646 (evaluate_probe_argument): Move to
647 'any_static_probe_ops::evaluate_argument'.
648 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
649 'probe.probe'.
650 (probe_linespec_to_ops): Rename to...
651 (probe_linespec_to_static_ops): ...this. Adjust code.
652 (probe_any_is_linespec): Rename to...
653 (any_static_probe_ops::is_linespec): ...this.
654 (probe_any_get_probes): Rename to...
655 (any_static_probe_ops::get_probes): ...this.
656 (any_static_probe_ops::type_name): New method.
657 (any_static_probe_ops::gen_info_probes_table_header): New
658 method.
659 (compute_probe_arg): Use 'pc_probe.prob' instead of
660 'pc_probe.probe'. Call methods from probe.
661 (compile_probe_arg): Likewise.
662 (std::vector<const probe_ops *> all_probe_ops): Delete.
663 (std::vector<const static_probe_ops *> all_static_probe_ops):
664 New variable.
665 (_initialize_probe): Use 'all_static_probe_ops' instead of
666 'all_probe_ops'.
667 * probe.h (struct info_probe_column) <field_name>: Delete
668 extraneous newline
669 (info_probe_column_s): Delete type and VEC.
670 (struct probe_ops): Delete. Replace with...
671 (class static_probe_ops): ...this and...
672 (clas probe): ...this.
673 (struct bound_probe) <bound_probe>: Delete extraneous
674 newline. Adjust constructor to receive 'probe' instead of
675 'struct probe'.
676 <probe>: Rename to...
677 <prob>: ...this. Delete extraneous newline.
678 <objfile>: Delete extraneous newline.
679 (register_probe_ops): Delete unused prototype.
680 (info_probes_for_ops): Rename to...
681 (info_probes_for_spops): ...this. Adjust comment.
682 (get_probe_address): Move to 'probe::get_address'.
683 (get_probe_argument_count): Move to
684 'probe::get_argument_count'.
685 (can_evaluate_probe_arguments): Move to
686 'probe::can_evaluate_arguments'.
687 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
688 * solib-svr4.c (struct svr4_info): Adjust comment.
689 (struct probe_and_action) <probe>: Rename to...
690 <prob>: ...this.
691 (register_solib_event_probe): Receive 'probe' instead of
692 'struct probe' as argument. Use 'prob' instead of 'probe'
693 when applicable.
694 (solib_event_probe_action): Call 'get_argument_count' method
695 from probe. Adjust comment.
696 (svr4_handle_solib_event): Adjust comment. Call
697 'evaluate_argument' method from probe.
698 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
699 from probe.
700 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
701 'struct probe'. Call 'can_evaluate_arguments' from probe.
702 * symfile.h: Forward declare 'class probe' instead of 'struct
703 probe'.
704 * symtab.h: Likewise.
705 (struct symtab_and_line) <probe>: Rename to...
706 <prob>: ...this.
707 * tracepoint.c (start_tracing): Use 'prob' when applicable.
708 Call probe methods.
709 (stop_tracing): Likewise.
710
711 2017-11-22 Joel Brobecker <brobecker@adacore.com>
712
713 * ravenscar-thread.c (ravenscar_inferior_created): Remove
714 trailing newline at end of string in call to warning.
715
716 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
717
718 * osdata.h: Include vector isntead of vec.h.
719 (osdata_column_s): Remove typedef.
720 (struct osdata_column): Add constructor.
721 <name, value>: Change type to std::string.
722 (DEF_VEC_O (osdata_column_s)): Remove.
723 (osdata_item_s): Remove typedef.
724 (struct osdata_item) <columns>: Change type to std::vector.
725 (DEF_VEC_O (osdata_item_s)): Remove.
726 (struct osdata): Add constructor.
727 <type>: Change type to std::string.
728 <items>: Change type to std::vector.
729 (osdata_p): Remove typedef.
730 (DEF_VEC_P (osdata_p)): Remove.
731 (osdata_parse): Return a unique_ptr.
732 (osdata_free): Remove.
733 (make_cleanup_osdata_free): Remove.
734 (get_osdata): Return a unique_ptr.
735 (get_osdata_column): Return pointer to std::string, take a
736 reference to osdata_item as parameter.
737 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
738 unique_ptr.
739 <property_name>: Change type to std::string.
740 (osdata_start_osdata): Allocate osdata with new and adjust.
741 (osdata_start_item): Adjust.
742 (osdata_start_column): Adjust.
743 (osdata_end_column): Adjust.
744 (clear_parsing_data): Remove.
745 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
746 (osdata_item_clear): Remove.
747 (get_osdata): return a unique_ptr and adjust.
748 (get_osdata_column): Return a pointer to std::string and adjust.
749 (info_osdata): Adjust.
750 * mi/mi-main.c: Include <map>.
751 (free_vector_of_osdata_items): Remove.
752 (list_available_thread_groups): Adjust, use std::map instead of
753 splay tree.
754
755 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
756
757 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
758 case in switch.
759
760 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
763
764 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * varobj.h (struct varobj_update_result): Add constructor, add
767 move constructor, disable copy and assign, initialize fields.
768 <newobj>: Change type to std::vector.
769 (varobj_update): Return std::vector.
770 * varobj.c (install_dynamic_child): Change VEC parameters to
771 std::vector and adjust.
772 (update_dynamic_varobj_children): Likewise.
773 (varobj_update): Return std::vector and adjust.
774 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
775
776 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
777
778 * varobj.h (struct varobj) <parent>: Remove const.
779 <children>: Change type to std::vector.
780 (varobj_list_children): Return std::vector const reference.
781 (varobj_restrict_range): Change parameter type to std::vector
782 const reference.
783 * varobj.c (varobj_has_more): Adjust.
784 (varobj_restrict_range): Change parameter type to std::vector
785 const reference and adjust.
786 (install_dynamic_child): Adjust.
787 (update_dynamic_varobj_children): Adjust.
788 (varobj_list_children): Return std::vector const reference and
789 adjust.
790 (varobj_add_child): Adjust.
791 (update_type_if_necessary): Adjust.
792 (varobj_update): Adjust.
793 (delete_variable_1): Adjust.
794 * ada-varobj.c (ada_value_has_mutated): Adjust.
795 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
796
797 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
798
799 * varobj.h (struct varobj): Add constructor and destructor,
800 initialize fields.
801 * varobj.c (struct varobj_root): Initialize fields.
802 (struct varobj_dynamic): Initialize fields.
803 (varobj_create): Use unique_ptr instead of cleanup. Create
804 varobj with new instead of new_root_variable.
805 (delete_variable_1): Free variable with delete instead of
806 free_variable.
807 (create_child_with_value): Create variable with new instead of
808 new_variable.
809 (varobj::varobj): New.
810 (varobj::~varobj): New (body mostly coming from free_variable).
811 (new_variable): Remove.
812 (free_variable): Remove.
813 (do_free_variable_cleanup): Remove.
814 (make_cleanup_free_variable): Remove.
815
816 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
817
818 * core-regset.c: Remove file.
819 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
820
821 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
822
823 * NEWS: Document use of GNU MPFR.
824 * README: Likewise.
825
826 * Makefile.in (LIBMPFR): Add define.
827 (CLIBS): Add $(LIBMPFR).
828 * configure.ac: Add --with-mpfr configure option.
829 * configure: Regenerate.
830 * config.in: Regenerate.
831
832 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
833 (class mpfr_float_ops): New type.
834 (mpfr_float_ops::from_target): Two new overloaded functions.
835 (mpfr_float_ops::to_target): Likewise.
836 (mpfr_float_ops::to_string): New function.
837 (mpfr_float_ops::from_string): Likewise.
838 (mpfr_float_ops::to_longest): Likewise.
839 (mpfr_float_ops::from_longest): Likewise.
840 (mpfr_float_ops::from_ulongest): Likewise.
841 (mpfr_float_ops::to_host_double): Likewise.
842 (mpfr_float_ops::from_host_double): Likewise.
843 (mpfr_float_ops::convert): Likewise.
844 (mpfr_float_ops::binop): Likewise.
845 (mpfr_float_ops::compare): Likewise.
846 (get_target_float_ops): Use mpfr_float_ops if available.
847
848 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
849
850 * target-float.c: Do not include <math.h>.
851 Include <cmath> and <limits>.
852 (DOUBLEST): Do not define.
853 (class target_float_ops): New type.
854 (class host_float_ops): New templated type.
855 (class decimal_float_ops): New type.
856
857 (floatformat_to_doublest): Rename to ...
858 (host_float_ops<T>::from_target): ... this. Use template type T
859 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
860 (host_float_ops<T>::from_target): New overload using a type argument.
861 (floatformat_from_doublest): Rename to ...
862 (host_float_ops<T>::to_target): ... this. Use template type T
863 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
864 (host_float_ops<T>::to_target): New overload using a type argument.
865 (floatformat_printf_format): New function.
866 (struct printf_length_modifier): New templated type.
867 (floatformat_to_string): Rename to ...
868 (host_float_ops<T>::to_string): ... this. Use type instead of
869 floatformat argument. Use floatformat_printf_format and
870 printf_length_modifier. Remove special handling of invalid numbers,
871 infinities and NaN (moved to target_float_to_string).
872 (struct scanf_length_modifier): New templated type.
873 (floatformat_from_string): Rename to ...
874 (host_float_ops<T>::from_string): ... this. Use type instead of
875 floatformat argument. Use scanf_length_modifier.
876 (floatformat_to_longest): Rename to ...
877 (host_float_ops<T>::to_longest): ... this. Use type instead of
878 floatformat argument. Handle out-of-range values deterministically.
879 (floatformat_from_longest): Rename to ...
880 (host_float_ops<T>::from_longest): ... this. Use type instead of
881 floatformat argument.
882 (floatformat_from_ulongest): Rename to ...
883 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
884 floatformat argument.
885 (floatformat_to_host_double): Rename to ...
886 (host_float_ops<T>::to_host_double): ... this. Use type instead of
887 floatformat argument.
888 (floatformat_from_host_double): Rename to ...
889 (host_float_ops<T>::from_host_double): ... this. Use type instead of
890 floatformat argument.
891 (floatformat_convert): Rename to ...
892 (host_float_ops<T>::convert): ... this. Use type instead of
893 floatformat arguments. Remove handling of no-op conversions.
894 (floatformat_binop): Rename to ...
895 (host_float_ops<T>::binop): ... this. Use type instead of
896 floatformat arguments.
897 (floatformat_compare): Rename to ...
898 (host_float_ops<T>::compare): ... this. Use type instead of
899 floatformat arguments.
900
901 (match_endianness): Use type instead of length/byte_order arguments.
902 (set_decnumber_context): Likewise.
903 (decimal_from_number): Likewise. Update calls.
904 (decimal_to_number): Likewise.
905 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
906 (decimal_float_ops::to_host_double): New dummy function.
907 (decimal_float_ops::from_host_double): Likewise.
908 (decimal_to_string): Rename to ...
909 (decimal_float_ops::to_string): ... this. Use type instead of
910 length/byte_order arguments. Update calls.
911 (decimal_from_string): Rename to ...
912 (decimal_float_ops::from_string): ... this. Use type instead of
913 length/byte_order arguments. Update calls.
914 (decimal_from_longest): Rename to ...
915 (decimal_float_ops::from_longest): ... this. Use type instead of
916 length/byte_order arguments. Update calls.
917 (decimal_from_ulongest): Rename to ...
918 (decimal_float_ops::from_ulongest): ... this. Use type instead of
919 length/byte_order arguments. Update calls.
920 (decimal_to_longest): Rename to ...
921 (decimal_float_ops::to_longest): ... this. Use type instead of
922 length/byte_order arguments. Update calls.
923 (decimal_binop): Rename to ...
924 (decimal_float_ops::binop): ... this. Use type instead of
925 length/byte_order arguments. Update calls.
926 (decimal_compare): Rename to ...
927 (decimal_float_ops::compare): ... this. Use type instead of
928 length/byte_order arguments. Update calls.
929 (decimal_convert): Rename to ...
930 (decimal_float_ops::convert): ... this. Use type instead of
931 length/byte_order arguments. Update calls.
932
933 (target_float_same_category_p): New function.
934 (target_float_same_format_p): Likewise.
935 (target_float_format_length): Likewise.
936 (enum target_float_ops_kind): New type.
937 (get_target_float_ops_kind): New function.
938 (get_target_float_ops): Three new overloaded functions.
939
940 (target_float_is_zero): Update call.
941 (target_float_to_string): Add special handling of invalid numbers,
942 infinities and NaN (moved from floatformat_to_string). Use
943 target_float_ops callback.
944 (target_float_from_string): Use target_float_ops callback.
945 (target_float_to_longest): Likewise.
946 (target_float_from_longest): Likewise.
947 (target_float_from_ulongest): Likewise.
948 (target_float_to_host_double): Likewise.
949 (target_float_from_host_double): Likewise.
950 (target_float_convert): Add special case for no-op conversions.
951 Use target_float_ops callback.
952 (target_float_binop): Use target_float_ops callback.
953 (target_float_compare): Likewise.
954
955 2017-11-22 Yao Qi <yao.qi@linaro.org>
956
957 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
958
959 2017-11-22 Yao Qi <yao.qi@linaro.org>
960
961 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
962 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
963
964 2017-11-21 Jerome Guitton <guitton@adacore.com>
965
966 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
967 with event ptid from the lower layer before doing the
968 ravenscar-specific update.
969
970 2017-11-21 Joel Brobecker <brobecker@adacore.com>
971
972 * ravenscar-thread.c (is_ravenscar_task): Also verify that
973 the ptid's TID is nonzero.
974
975 2017-11-21 Joel Brobecker <brobecker@adacore.com>
976
977 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
978 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
979 Make non-static. Change return type to char *. Adjust code
980 accordingly. Rewrite the function's documentation.
981 (read_atcb): Adjust call to get_tcb_types_info accordingly.
982 * ravenscar-thread.c (ravenscar_inferior_created): Check that
983 we have enough debugging information in the runtime to support
984 Ada task debugging before we enable the ravenscar-thread layer.
985
986 2017-11-21 Joel Brobecker <brobecker@adacore.com>
987
988 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
989 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
990 * ravenscar-thread.c: Add into comment.
991 (base_magic_null_ptid): Delete.
992 (base_ptid): Change documentation.
993 (ravenscar_active_task): Renames ravenscar_running_thread.
994 All callers updated throughout.
995 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
996 (ravenscar_task_is_currently_active): Likewise.
997 (get_base_thread_from_ravenscar_task): Ditto.
998 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
999 (ravenscar_runtime_initialized): Likewise.
1000 (get_running_thread_id): Add new parameter "cpu". Adjust
1001 implementation to handle this new parameter.
1002 (ravenscar_fetch_registers): Small adjustment to use
1003 is_ravenscar_task and ravenscar_task_is_currently_active in
1004 order to decide whether to use the target beneath or this
1005 module's arch_ops.
1006 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1007 (ravenscar_stopped_by_sw_breakpoint): Use
1008 get_base_thread_from_ravenscar_task to get the underlying
1009 thread, rather than using base_ptid.
1010 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1011 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1012 Likewise.
1013 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1014
1015 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1016
1017 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1018 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1019 (get_tcb_types_info): Set fieldnos.base_cpu.
1020 (read_atcb): Set task_info->base_cpu.
1021 (info_task): Print "Base CPU" info if set by runtime.
1022
1023 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1024
1025 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1026 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1027 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1028 New functions.
1029 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1030 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1031 to_stopped_data_address and to_core_of_thread fields of
1032 ravenscar_ops.
1033
1034 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1035
1036 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1037 (struct gdbarch_tdep): New member long_double_abi.
1038 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1039 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1040 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1041 format depending on long_double_abi tdep member.
1042 (ppc_floatformat_for_type): Handle __ibm128 type.
1043
1044 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1047
1048 2017-11-21 Pedro Alves <palves@redhat.com>
1049
1050 * dwarf2read.c (mapped_index::find_name_components_bounds)
1051 <completion mode, upper bound>: Use std::lower_bound instead of
1052 std::upper_bound.
1053 (test_mapped_index_find_name_component_bounds): Remove incorrect
1054 "t1_fund" from expected symbols.
1055
1056 2017-11-21 Pedro Alves <palves@redhat.com>
1057
1058 * dwarf2read.c (mapped_index::name_components_casing): New field.
1059 (mapped_index) <build_name_components,
1060 find_name_components_bounds): Declare new methods.
1061 (mapped_index::find_name_components_bounds)
1062 (mapped_index::build_name_components): New methods, factored out
1063 from dw2_expand_symtabs_matching_symbol.
1064 (check_find_bounds_finds)
1065 (test_mapped_index_find_name_component_bounds): New.
1066 (run_test): Rename to ...
1067 (test_dw2_expand_symtabs_matching_symbol): ... this.
1068 (run_test): Reimplement.
1069
1070 2017-11-21 Pedro Alves <palves@redhat.com>
1071
1072 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1073 (symbol_end): Use cp_ident_is_alnum.
1074 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1075 * dwarf2read.c (make_sort_after_prefix_name): New function.
1076 (dw2_expand_symtabs_matching_symbol): Use it.
1077 (test_symbols): Add more symbols.
1078 (run_test): Add tests.
1079
1080 2017-11-17 Tom Tromey <tom@tromey.com>
1081
1082 * symtab.h (enum symbol_subclass_kind): New.
1083 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1084 Remove.
1085 <subclass>: New member.
1086 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1087 * rust-lang.c (rust_get_trait_object_pointer): Update.
1088 * dwarf2read.c (read_func_scope): Update.
1089 (read_variable): Update.
1090
1091 2017-11-17 Tom Tromey <tom@tromey.com>
1092
1093 * dwarf2read.c (read_func_scope): Update.
1094 * symtab.h (struct template_symbol): Derive from symbol.
1095 <base>: Remove.
1096
1097 2017-11-17 Tom Tromey <tom@tromey.com>
1098
1099 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1100 (struct rust_vtable_symbol): New.
1101 (find_symbol_at_address): Declare.
1102 * symtab.c (find_symbol_at_address): New function.
1103 * symfile.h (struct quick_symbol_functions)
1104 <find_compunit_symtab_by_address>: New member.
1105 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1106 function.
1107 (debug_sym_quick_functions): Link to
1108 debug_qf_find_compunit_symtab_by_address.
1109 * rust-lang.c (rust_get_trait_object_pointer): New function.
1110 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1111 rust_get_trait_object_pointer.
1112 * psymtab.c (psym_relocate): Clear psymbol_map.
1113 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1114 functions.
1115 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1116 * objfiles.h (struct objfile) <psymbol_map>: New member.
1117 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1118 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1119 (rust_containing_type, read_variable): New functions.
1120
1121 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1122
1123 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1124
1125 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * common/filestuff.c: Include <algorithm>.
1128 (open_fds): Change type to std::vector<int>.
1129 (do_mark_open_fd): Adjust.
1130 (unmark_fd_no_cloexec): Adjust.
1131 (do_close): Adjust.
1132
1133 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1134
1135 * breakpoint.c (output_thread_groups): Take an std::vector.
1136 (print_one_breakpoint_location): Adjust.
1137
1138 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1139
1140 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1141 (ada_evaluate_subexp_for_cast): New function.
1142 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1143 ada_evaluate_subexp_for_cast.
1144 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1145 eval_skip_value.
1146 * eval.c (evaluate_var_value): Make non-static.
1147 (evaluate_var_msym_value, eval_skip_value): Likewise.
1148 * value.h (evaluate_var_value, evaluate_var_msym_value)
1149 (eval_skip_value): Declare.
1150
1151 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1152
1153 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1154 Update all callers.
1155
1156 2017-11-16 Pedro Alves <palves@redhat.com>
1157
1158 * python/py-unwind.c (pyuw_sniffer): Translate
1159 PyExc_KeyboardInterrupt to a GDB Quit exception.
1160
1161 2017-11-16 Pedro Alves <palves@redhat.com>
1162
1163 * infrun.c (resume_cleanups): Delete.
1164 (resume): No longer install a resume_cleanups cleanup nor call
1165 QUIT.
1166 (proceed): Pass the terminal to the inferior.
1167 (keep_going_pass_signal): No longer install a resume_cleanups
1168 cleanup.
1169
1170 2017-11-16 Pedro Alves <palves@redhat.com>
1171
1172 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1173 if the prompt is blocked.
1174
1175 2017-11-16 Pedro Alves <palves@redhat.com>
1176
1177 * breakpoint.c (insert_bp_location): Replace bp_err and
1178 bp_err_message locals by a gdb_exception local.
1179
1180 2017-11-16 Pedro Alves <palves@redhat.com>
1181
1182 * inflow.c (scoped_ignore_sigttou): New class.
1183 (child_terminal_ours_1, new_tty): Use it.
1184
1185 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1186
1187 * target-float.c (decimal_from_number): Add byte_order argument and
1188 call match_endianness. Error if unknown floating-point type.
1189 (decimal_to_number): Add byte_order argument and call match_endianness.
1190 (decimal_from_longest): Update call. Do not call match_endianness.
1191 (decimal_from_ulongest): Likewise.
1192 (decimal_binop): Likewise.
1193 (decimal_is_zero): Likewise.
1194 (decimal_compare): Likewise.
1195 (decimal_convert): Likewise.
1196
1197 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1198
1199 * python/python.c (gdbpy_rbreak): New function.
1200 * NEWS: Document Python rbreak feature.
1201
1202 2017-11-16 Yao Qi <yao.qi@linaro.org>
1203
1204 * features/tic6x-c62x.xml: Remove.
1205 * features/tic6x-c64x.xml: Remove.
1206 * features/tic6x-c64xp.xml: Remove.
1207
1208 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1209
1210 * symtab.h: Include <array>.
1211
1212 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1213
1214 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1215 (bsd_kvm_proc_cmd): Likewise.
1216
1217 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * tui/tui-win.c (window_name_completer): Replace VEC with
1220 std::vector.
1221
1222 2017-11-15 Andrew Cagney <cagney@gnu.org>
1223
1224 * MAINTAINERS: Remove no-longer applicable entries.
1225
1226 2017-11-15 Andrew Cagney <cagney@gnu.org>
1227
1228 * MAINTAINERS: Move self to Past Maintainers.
1229
1230 2017-11-15 Yao Qi <yao.qi@linaro.org>
1231
1232 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1233 * features/nios2-linux.c: Remove.
1234 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1235 initialize_tdesc_nios2_linux.
1236
1237 2017-11-15 Yao Qi <yao.qi@linaro.org>
1238
1239 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1240 M68HC11_LAST_HARD_REG + 1.
1241
1242 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1243
1244 PR gdb/22388
1245 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1246 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1247 Return TARGET_XFER_EOF if size of returned data is 0.
1248
1249 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1250
1251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1252 memory-map-selftests.c.
1253 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1254 * memory-map.c (memory_map_start_memory): Fix computation of hi
1255 address.
1256 * unittests/memory-map-selftests.c: New file.
1257
1258 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1259
1260 * ada-lang.c: Fix some typos in the general command documenting
1261 how Ada expressions are being evaluated and how their result
1262 is printed.
1263
1264 2017-11-09 Tom Tromey <tom@tromey.com>
1265
1266 * psymtab.c (psymbol_hash): Do not hash string contents.
1267 (psymbol_compare): Add comment.
1268
1269 2017-11-09 Tom Tromey <tom@tromey.com>
1270
1271 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1272
1273 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1274
1275 * ada-exp.y (write_var_from_sym): Remove parameter
1276 "orig_left_context". Update all callers.
1277
1278 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * tracepoint.h (class collection_list) <stringify>: Return
1281 std::vector<std::string>.
1282 (encode_actions_rsp): Change parameters to
1283 std::vector<std::string> *.
1284 * tracepoint.c (collection_list::stringify): Return
1285 std::vector<std::string> and adjust accordingly.
1286 (encode_actions_rsp): Changee parameters to
1287 std::vector<std::string> and adjust accordingly.
1288 * remote.c (free_actions_list),
1289 free_actions_list_cleanup_wrapper): Remove.
1290 (remote_download_tracepoint): Adjust to std::vector.
1291
1292 2017-11-08 Tom Tromey <tom@tromey.com>
1293
1294 * dwarf2read.c (symbolp): Remove typedef.
1295 (read_func_scope): Use std::vector.
1296 (process_structure_scope): Use std::vector.
1297
1298 2017-11-08 Pedro Alves <palves@redhat.com>
1299
1300 * ada-lang.c (ada_make_symbol_completion_list): Use
1301 completion_skip_symbol.
1302 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1303 (symbol_is_function_or_method(symbol*)): New.
1304 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1305 completion_skip_symbol.
1306 (default_collect_symbol_completion_matches_break_on): Use
1307 completion_skip_symbol. Pass down mode.
1308 (collect_file_symbol_completion_matches): Pass down mode.
1309 * symtab.h (symbol_is_function_or_method): New declarations.
1310 (completion_skip_symbol): New template function.
1311
1312 2017-11-08 Pedro Alves <palves@redhat.com>
1313
1314 * linespec.c (iterate_over_all_matching_symtabs): Add
1315 search_domain parameter. Pass it down to expand_symtabs_matching.
1316 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1317 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1318 search_domain.
1319 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1320 Pass it down.
1321 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1322 symbols.
1323 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1324 it down.
1325
1326 2017-11-08 Pedro Alves <palves@redhat.com>
1327
1328 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1329 text_len locals and don't pass them down.
1330 * symtab.c (completion_list_add_name): Remove
1331 sym_text/sym_text_len parameters and adjust.
1332 (completion_list_add_symbol, completion_list_add_msymbol)
1333 (completion_list_objc_symbol, completion_list_add_fields)
1334 (add_symtab_completions): Likewise.
1335 (default_collect_symbol_completion_matches_break_on)
1336 (collect_file_symbol_completion_matches): Remove sym_text_len
1337 local and don't pass it down.
1338 * symtab.h (completion_list_add_name): Remove
1339 sym_text/sym_text_len parameters.
1340
1341 2017-11-08 Pedro Alves <palves@redhat.com>
1342
1343 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1344 unittests/lookup_name_info-selftests.c.
1345 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1346 * cp-support.c: Include "selftest.h".
1347 (cp_remove_params_1): Rename from cp_remove_params. Add
1348 'require_param' parameter, and handle it.
1349 (cp_remove_params): Reimplement.
1350 (cp_remove_params_if_any): New.
1351 (selftests::quote): New.
1352 (selftests::check_remove_params): New.
1353 (selftests::test_cp_remove_params): New.
1354 (_initialize_cp_support): Install
1355 selftests::test_cp_remove_params.
1356 * cp-support.h (cp_remove_params_if_any): Declare.
1357 * dwarf2read.c :Include "selftest.h".
1358 (dw2_expand_symtabs_matching_symbol): Use
1359 lookup_name_info::make_ignore_params.
1360 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1361 (selftests::dw2_expand_symtabs_matching::string_or_null)
1362 (selftests::dw2_expand_symtabs_matching::check_match)
1363 (selftests::dw2_expand_symtabs_matching::test_symbols)
1364 (selftests::dw2_expand_symtabs_matching::run_test): New.
1365 (_initialize_dwarf2_read): Register
1366 selftests::dw2_expand_symtabs_matching::run_test.
1367 * psymtab.c (psym_expand_symtabs_matching): Use
1368 lookup_name_info::make_ignore_params.
1369 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1370 If the lookup name wants to ignore parameters, strip them.
1371 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1372 code handling '('.
1373 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1374 (default_collect_symbol_completion_matches_break_on): Don't try to
1375 strip parameters.
1376 * symtab.h (lookup_name_info::lookup_name_info): Add
1377 'ignore_parameters' parameter.
1378 (lookup_name_info::ignore_parameters)
1379 (lookup_name_info::make_ignore_params): New methods.
1380 (lookup_name_info::m_ignore_parameters): New field.
1381 * unittests/lookup_name_info-selftests.c: New file.
1382
1383 2017-11-08 Pedro Alves <palves@redhat.com>
1384
1385 * dwarf2read.c (dw2_expand_marked_cus)
1386 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1387 (dw2_expand_symtabs_matching): Move further below.
1388 (dw2_expand_marked_cus): Reindent.
1389
1390 2017-11-08 Pedro Alves <palves@redhat.com>
1391
1392 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1393 (struct name_component): New.
1394 (mapped_index::name_components): New field.
1395 (mapped_index::symbol_name_at): New method.
1396 (dwarf2_read_index): Call mapped_index ctor.
1397 (dw2_map_matching_symbols): Add comment about name_components
1398 table.
1399 (dw2_expand_symtabs_matching): Factor part to...
1400 (dw2_expand_symtabs_matching_symbol): ... this new function.
1401 Build name components table, and lookup symbols in it before
1402 calling the name matcher.
1403 (dw2_expand_marked_cus): New, factored out from
1404 dw2_expand_symtabs_matching.
1405 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1406
1407 2017-11-08 Pedro Alves <palves@redhat.com>
1408
1409 * ada-lang.c (ada_encode): Rename to ..
1410 (ada_encode_1): ... this. Add throw_errors parameter and handle
1411 it.
1412 (ada_encode): Reimplement.
1413 (match_name): Delete, folded into full_name.
1414 (resolve_subexp): No longer pass the encoded name to
1415 ada_lookup_symbol_list.
1416 (should_use_wild_match): Delete.
1417 (name_match_type_from_name): New.
1418 (ada_lookup_simple_minsym): Use lookup_name_info and the
1419 language's symbol_name_matcher_ftype.
1420 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1421 (ada_add_block_renamings): Adjust to use lookup_name_info.
1422 (ada_lookup_name): New.
1423 (add_nonlocal_symbols, ada_add_all_symbols)
1424 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1425 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1426 (ada_name_for_lookup): Delete.
1427 (ada_lookup_encoded_symbol): Construct a verbatim name.
1428 (wild_match): Reverse sense of return type. Use bool.
1429 (full_match): Reverse sense of return type. Inline bits of old
1430 match_name here.
1431 (ada_add_block_symbols): Adjust to use lookup_name_info.
1432 (symbol_completion_match): Delete, folded into...
1433 (ada_lookup_name_info::matches): ... .this new method.
1434 (symbol_completion_add): Delete.
1435 (ada_collect_symbol_completion_matches): Add name_match_type
1436 parameter. Adjust to use lookup_name_info and
1437 completion_list_add_name.
1438 (get_var_value, ada_add_global_exceptions): Adjust to use
1439 lookup_name_info.
1440 (ada_get_symbol_name_cmp): Delete.
1441 (do_wild_match, do_full_match): New functions.
1442 (ada_lookup_name_info::ada_lookup_name_info): New method.
1443 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1444 functions.
1445 (ada_language_defn): Install ada_get_symbol_name_matcher.
1446 * ada-lex.l (processId): If name starts with '<', copy it
1447 verbatim.
1448 * block.c (block_iter_match_step, block_iter_match_first)
1449 (block_iter_match_next, block_lookup_symbol)
1450 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1451 lookup_name_info.
1452 * block.h (block_iter_match_first, block_iter_match_next)
1453 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1454 * c-lang.c (c_language_defn, cplus_language_defn)
1455 (asm_language_defn, minimal_language_defn): Adjust comments to
1456 refer to la_get_symbol_name_matcher.
1457 * completer.c (complete_files_symbols)
1458 (collect_explicit_location_matches, symbol_completer): Pass a
1459 symbol_name_match_type down.
1460 * completer.h (class completion_match, completion_match_result):
1461 New classes.
1462 (completion_tracker::reset_completion_match_result): New method.
1463 (completion_tracker::m_completion_match_result): New field.
1464 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1465 lookup_name_info.
1466 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1467 functions.
1468 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1469 * d-lang.c: Adjust comments to refer to
1470 la_get_symbol_name_matcher.
1471 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1472 Adjust to use lookup_name_info.
1473 (dict_iter_match_first, dict_iter_match_next)
1474 (iter_match_first_hashed, iter_match_next_hashed)
1475 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1476 with a lookup_name_info.
1477 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1478 Likewise.
1479 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1480 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1481 (gdb_index_symbol_name_matcher): New class.
1482 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1483 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1484 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1485 with a symbol_name_match_type.
1486 (f_language_defn): Adjust comments to refer to
1487 la_get_symbol_name_matcher.
1488 * go-lang.c (go_language_defn): Adjust comments to refer to
1489 la_get_symbol_name_matcher.
1490 * language.c (default_symbol_name_matcher)
1491 (language_get_symbol_name_matcher): New functions.
1492 (unknown_language_defn, auto_language_defn): Adjust comments to
1493 refer to la_get_symbol_name_matcher.
1494 * language.h (symbol_name_cmp_ftype): Delete.
1495 (language_defn) <la_collect_symbol_completion_matches>: Add match
1496 type parameter.
1497 <la_get_symbol_name_cmp>: Delete field.
1498 <la_get_symbol_name_matcher>: New field.
1499 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1500 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1501 Declare.
1502 * linespec.c (iterate_over_all_matching_symtabs)
1503 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1504 (find_methods): Add language parameter, and use lookup_name_info
1505 and the language's symbol_name_matcher_ftype.
1506 (linespec_complete_function): Adjust.
1507 (lookup_prefix_sym): Use lookup_name_info.
1508 (add_all_symbol_names_from_pspace): Adjust.
1509 (find_superclass_methods): Add language parameter and pass it
1510 down.
1511 (find_method): Pass symbol language down.
1512 (find_linespec_symbols): Don't demangle or Ada encode here.
1513 (search_minsyms_for_name): Add lookup_name_info parameter.
1514 (add_matching_symbols_to_info): Add name_match_type parameter.
1515 Use lookup_name_info.
1516 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1517 la_get_symbol_name_matcher.
1518 * minsyms.c: Include <algorithm>.
1519 (add_minsym_to_demangled_hash_table): Remove table parameter and
1520 add objfile parameter. Use search_name_hash, and add language to
1521 demangled languages vector.
1522 (struct found_minimal_symbols): New struct.
1523 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1524 New functions.
1525 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1526 input names here. Use lookup_name_info instead. Lookup up
1527 demangled names once for each language in the demangled names
1528 vector.
1529 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1530 demangled names once for each language in the demangled names
1531 vector.
1532 (build_minimal_symbol_hash_tables): Adjust.
1533 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1534 lookup_name_info.
1535 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1536 la_get_symbol_name_matcher.
1537 * objfiles.h: Include <vector>.
1538 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1539 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1540 la_get_symbol_name_matcher.
1541 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1542 la_get_symbol_name_matcher.
1543 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1544 (match_partial_symbol): Use symbol_name_match_type,
1545 lookup_name_info and psymbol_name_matches.
1546 (lookup_partial_symbol): Use lookup_name_info.
1547 (map_block): Use symbol_name_match_type and lookup_name_info.
1548 (psym_map_matching_symbols): Use symbol_name_match_type.
1549 (psymbol_name_matches): New.
1550 (recursively_search_psymtabs): Use lookup_name_info and
1551 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1552 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1553 'kind' parameter to 'domain'.
1554 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1555 la_get_symbol_name_matcher.
1556 * symfile-debug.c (debug_qf_map_matching_symbols)
1557 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1558 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1559 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1560 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1561 Adjust to use symbol_name_match_type.
1562 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1563 (expand_symtabs_matching): Adjust to use lookup_name_info.
1564 * symmisc.c (maintenance_expand_symtabs): Use
1565 lookup_name_info::match_any ().
1566 * symtab.c (symbol_matches_search_name): New.
1567 (eq_symbol_entry): Adjust to use lookup_name_info and the
1568 language's matcher.
1569 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1570 (lookup_name_info::match_any): New.
1571 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1572 (compare_symbol_name): Add language, lookup_name_info and
1573 completion_match_result parameters, and use them.
1574 (completion_list_add_name): Make extern. Add language and
1575 lookup_name_info parameters. Use them.
1576 (completion_list_add_symbol, completion_list_add_msymbol)
1577 (completion_list_objc_symbol): Add lookup_name_info parameters and
1578 adjust. Pass down language.
1579 (completion_list_add_fields): Add lookup_name_info parameters and
1580 adjust. Pass down language.
1581 (add_symtab_completions): Add lookup_name_info parameters and
1582 adjust.
1583 (default_collect_symbol_completion_matches_break_on): Add
1584 name_match_type parameter, and use it. Use lookup_name_info.
1585 (default_collect_symbol_completion_matches)
1586 (collect_symbol_completion_matches): Add name_match_type
1587 parameter, and pass it down.
1588 (collect_symbol_completion_matches_type): Adjust.
1589 (collect_file_symbol_completion_matches): Add name_match_type
1590 parameter, and use lookup_name_info.
1591 * symtab.h: Include <string> and "common/gdb_optional.h".
1592 (enum class symbol_name_match_type): New.
1593 (class ada_lookup_name_info): New.
1594 (struct demangle_for_lookup_info): New.
1595 (class lookup_name_info): New.
1596 (symbol_name_matcher_ftype): New.
1597 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1598 (symbol_matches_search_name): Declare.
1599 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1600 (default_collect_symbol_completion_matches)
1601 (collect_symbol_completion_matches)
1602 (collect_file_symbol_completion_matches): Add name_match_type
1603 parameter.
1604 (iterate_over_symbols): Use lookup_name_info.
1605 (completion_list_add_name): Declare.
1606 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1607 (strncmp_iw_with_mode): Now extern.
1608 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1609 (strncmp_iw_with_mode): Declare.
1610
1611 2017-11-08 Keith Seitz <keiths@redhat.com>
1612 Pedro Alves <palves@redhat.com>
1613
1614 * ada-lang.c (ada_language_defn): Install
1615 default_search_name_hash.
1616 * buildsym.c (struct buildsym_compunit): <language>: New field.
1617 (finish_block_internal): Pass language when creating dictionaries.
1618 (start_buildsym_compunit, start_symtab): New language parameters.
1619 Use them.
1620 (restart_symtab): Pass down compilation unit's language.
1621 * buildsym.h (enum language): Forward declare.
1622 (start_symtab): New 'language' parameter.
1623 * c-lang.c (c_language_defn, cplus_language_defn)
1624 (asm_language_defn, minimal_language_defn): Install
1625 default_search_name_hash.
1626 * coffread.c (coff_start_symtab): Adjust.
1627 * d-lang.c (d_language_defn): Install default_search_name_hash.
1628 * dbxread.c (struct symloc): Add 'pst_language' field.
1629 (PST_LANGUAGE): Define.
1630 (start_psymtab, read_ofile_symtab): Use it.
1631 (process_one_symbol): New 'language' parameter. Pass it down.
1632 * dictionary.c (struct dictionary) <language>: New field.
1633 (DICT_LANGUAGE): Define.
1634 (dict_create_hashed, dict_create_hashed_expandable)
1635 (dict_create_linear, dict_create_linear_expandable): New parameter
1636 'language'. Set the dictionary's language.
1637 (iter_match_first_hashed): Adjust to rename.
1638 (insert_symbol_hashed): Assert we don't see mismatching
1639 languages. Adjust to rename.
1640 (dict_hash): Rename to ...
1641 (default_search_name_hash): ... this and make extern.
1642 * dictionary.h (struct language_defn): Forward declare.
1643 (dict_create_hashed): New parameter 'language'.
1644 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1645 * f-lang.c (f_language_defn): Install default_search_name_hash.
1646 * go-lang.c (go_language_defn): Install default_search_name_hash.
1647 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1648 creation.
1649 * language.c (unknown_language_defn, auto_language_defn):
1650 * language.h (language_defn::la_search_name_hash): New field.
1651 (default_search_name_hash): Declare.
1652 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1653 * mdebugread.c (new_block): New parameter 'language'.
1654 * mdebugread.c (parse_symbol): Pass symbol language to block
1655 allocation.
1656 (psymtab_to_symtab_1): Pass down language.
1657 (new_symtab): Pass compunit's language to block allocation.
1658 * objc-lang.c (objc_language_defn): Install
1659 default_search_name_hash.
1660 * opencl-lang.c (opencl_language_defn):
1661 * p-lang.c (pascal_language_defn): Install
1662 default_search_name_hash.
1663 * rust-lang.c (rust_language_defn): Install
1664 default_search_name_hash.
1665 * stabsread.h (enum language): Forward declare.
1666 (process_one_symbol): Add 'language' parameter.
1667 * symtab.c (search_name_hash): New function.
1668 * symtab.h (search_name_hash): Declare.
1669 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1670
1671 2017-11-08 Pedro Alves <palves@redhat.com>
1672
1673 * cp-name-parser.y (main): Don't initialize extra_chars.
1674
1675 2017-11-07 Tom Tromey <tom@tromey.com>
1676
1677 * event-top.h (command_handler): Constify.
1678 * record-full.c (cmd_record_full_start): Update.
1679 * thread.c (thread_apply_all_command): Update.
1680 * printcmd.c (eval_command): Update.
1681 * mi/mi-main.c (mi_execute_cli_command): Update.
1682 (mi_execute_async_cli_command): Update.
1683 * tui/tui-stack.c (tui_update_command): Update.
1684 * cli/cli-interp.c (safe_execute_command): Constify.
1685 * record.c (record_start): Update.
1686 (record_start, record_stop, cmd_record_start): Update.
1687 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1688 (cmd_record_btrace_pt_start): Update.
1689 (cmd_record_btrace_start): Update.
1690 (cmd_record_btrace_start): Update.
1691 * reverse.c (exec_reverse_once): Update.
1692 * python/python.c (execute_gdb_command): Don't copy the command.
1693 * event-top.c (command_line_handler): Update.
1694 (command_handler): Constify.
1695 * defs.h (deprecated_call_command_hook): Constify.
1696 * cli/cli-script.h (execute_user_command): Constify.
1697 * cli/cli-script.c (execute_user_command): Constify.
1698 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1699 (enum command_control_type): Update.
1700 * main.c (catch_command_errors): Remove non-const overload.
1701 (catch_command_errors_ftype): Remove.
1702 * python/py-cmd.c (cmdpy_function): Constify.
1703 * guile/scm-cmd.c (cmdscm_function): Constify.
1704 * cli/cli-dump.c (call_dump_func): Constify.
1705 * cli/cli-decode.c (do_const_cfunc): Constify.
1706 (do_sfunc): Constify.
1707 (cmd_func): Constify.
1708 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1709 * top.h (execute_command): Constify.
1710 * top.c (execute_command): Constify.
1711 (execute_command_to_string): Constify.
1712 (deprecated_call_command_hook): Constify.
1713 * command.h (cmd_func): Constify.
1714 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1715
1716 2017-11-07 Tom Tromey <tom@tromey.com>
1717
1718 * ada-lang.c (catch_ada_exception_command): Constify.
1719 (catch_assert_command): Constify.
1720 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1721 (catch_rethrow_command): Constify.
1722 (catch_exception_command_1): Constify.
1723 * breakpoint.h (add_catch_command): Constify.
1724 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1725 (catch_syscall_split_args): Constify.
1726 * break-catch-sig.c (catch_signal_command): Constify.
1727 (catch_signal_split_args): Constify.
1728 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1729 cmd_const_sfunc_ftype.
1730 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1731 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1732 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1733 (add_setshow_string_cmd, struct cmd_list_element)
1734 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1735 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1736 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1737 Constify.
1738 (set_cmd_sfunc): Constify.
1739 (empty_sfunc): Constify.
1740 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1741 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1742 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1743 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1744 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1745 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1746 Constify.
1747 (set_cmd_sfunc): Constify.
1748 (cmd_sfunc_ftype): Remove.
1749 * compile/compile.c (set_compile_args): Constify.
1750 * infrun.c (set_disable_randomization): Constify.
1751 * infcmd.c (set_args_command, set_cwd_command): Constify.
1752 * breakpoint.c (set_condition_evaluation_mode): Constify.
1753 (add_catch_command): Constify.
1754 (catch_fork_command_1, catch_exec_command_1)
1755 (catch_load_command_1, catch_unload_command_1): Constify.
1756 (catch_load_or_unload): Constify.
1757 * guile/scm-param.c (pascm_set_func): Constify.
1758 (add_setshow_generic): Constify.
1759 * python/py-param.c (get_set_value): Constify.
1760 * top.h (set_verbose): Constify.
1761 * tui/tui-win.c (tui_set_var_cmd): Constify.
1762 * mi/mi-main.c (set_mi_async_command): Constify.
1763 * cli/cli-logging.c (set_logging_overwrite)
1764 (set_logging_redirect): Constify.
1765 * value.c (set_max_value_size): Constify.
1766 * valprint.c (set_input_radix, set_output_radix): Constify.
1767 * utils.c (set_width_command, set_height_command): Constify.
1768 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1769 * tracepoint.c (set_disconnected_tracing)
1770 (set_circular_trace_buffer, set_trace_buffer_size)
1771 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1772 * top.c (set_history_size_command, set_verbose, set_editing)
1773 (set_gdb_datadir, set_history_filename): Constify.
1774 * target.c (set_targetdebug, maint_set_target_async_command)
1775 (maint_set_target_non_stop_command, set_target_permissions)
1776 (set_write_memory_permission): Constify.
1777 (open_target): Constify.
1778 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1779 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1780 * symtab.c (set_symbol_cache_size_handler): Constify.
1781 * symfile.c (set_ext_lang_command): Constify.
1782 * symfile-debug.c (set_debug_symfile): Constify.
1783 * source.c (set_directories_command): Constify.
1784 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1785 * serial.c (set_parity): Constify.
1786 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1787 * remote.c (set_remote_exec_file, set_remotebreak)
1788 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1789 * record.c (set_record_insn_history_size)
1790 (set_record_call_history_size): Constify.
1791 * record-full.c (set_record_full_insn_max_num): Constify.
1792 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1793 * osabi.c (set_osabi): Constify.
1794 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1795 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1796 * maint.c (maintenance_set_profile_cmd): Constify.
1797 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1798 * language.c (set_language_command, set_range_command)
1799 (set_case_command): Constify.
1800 * infrun.c (set_non_stop, set_observer_mode)
1801 (set_stop_on_solib_events, set_schedlock_func)
1802 (set_exec_direction_func): Constify.
1803 * infcmd.c (set_inferior_tty_command): Constify.
1804 * disasm.c (set_disassembler_options_sfunc): Constify.
1805 * demangle.c (set_demangling_command): Constify.
1806 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1807 * cris-tdep.c (set_cris_version, set_cris_mode)
1808 (set_cris_dwarf2_cfi): Constify.
1809 * corefile.c (set_gnutarget_command): Constify.
1810 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1811 (set_target_wide_charset_sfunc): Constify.
1812 * breakpoint.c (update_dprintf_commands): Constify.
1813 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1814 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1815 (set_disassembly_style_sfunc): Constify.
1816 * arch-utils.c (set_endian, set_architecture): Constify.
1817 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1818 * agent.c (set_can_use_agent): Constify.
1819
1820 2017-11-07 Tom Tromey <tom@tromey.com>
1821
1822 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1823 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1824 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1825 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1826 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1827 (parse_int_arg, show_thread_default_detach_sc_cmd)
1828 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1829 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1830 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1831 (show_task_pause_cmd, set_task_detach_sc_cmd)
1832 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1833 (set_noninvasive_cmd, set_thread_pause_cmd)
1834 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1835 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1836 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1837 * windows-nat.c (display_selectors): Constify.
1838 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1839 non-const "cfunc".
1840 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1841 (cmd_cfunc_eq): Likewise.
1842 (struct cmd_list_element): Likewise.
1843 (do_cfunc): Remove.
1844 (cli_user_command_p): Update.
1845 * command.h (add_cmd): Remove non-const overload.
1846 (cmd_cfunc_ftype): Remove typedef.
1847 (cmd_cfunc_eq): Remove non-const overload.
1848 * value.c (show_values): Constify.
1849 * thread.c (thread_apply_all_command): Constify.
1850 * symfile.c (load_command): Constify.
1851 * source.c (directory_command): Constify.
1852 * maint.c (maintenance_internal_error)
1853 (maintenance_demangler_warning, maintenance_space_display)
1854 (maintenance_print_architecture, maintenance_translate_address)
1855 (maintenance_info_selftests, maintenance_internal_warning):
1856 Constify.
1857 * breakpoint.c (disable_trace_command, enable_trace_command):
1858 Constify.
1859 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1860 Constify.
1861 (add_auto_load_safe_path): Constify.
1862 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1863 * top.h (show_commands): Constify.
1864 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1865 * sparc64-tdep.c (adi_examine_command): Constify.
1866 (adi_assign_command): Constify.
1867
1868 2017-11-07 Tom Tromey <tom@tromey.com>
1869
1870 * frame.h (info_locals_command, info_args_command): Constify.
1871 * auto-load.h (auto_load_info_scripts): Constify.
1872 * inferior.h (registers_info): Constify.
1873 * copying.c: Rebuild.
1874 * copying.awk: Constify generated commands.
1875 * auto-load.c (auto_load_info_scripts)
1876 (info_auto_load_gdb_scripts): Constify.
1877 * cli/cli-decode.c (struct cmd_list_element): Take a
1878 cmd_const_cfunc_ftype.
1879 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1880 * tui/tui-win.c (tui_all_windows_info): Constify.
1881 * python/py-auto-load.c (info_auto_load_python_scripts):
1882 Constify.
1883 * cli/cli-cmds.c (show_command): Remove non-const overload.
1884 * tracepoint.c (info_tvariables_command, info_scope_command):
1885 Constify.
1886 (info_static_tracepoint_markers_command): Constify.
1887 * thread.c (info_threads_command): Constify.
1888 (print_thread_info_1): Constify.
1889 * target.c (info_target_command): Constify.
1890 * symtab.c (info_sources_command, info_functions_command)
1891 (info_types_command): Constify.
1892 (info_variables_command): Remove non-const overload.
1893 * symfile.c (info_ext_lang_command): Constify.
1894 * stack.c (info_frame_command, info_locals_command)
1895 (info_args_command): Constify.
1896 (backtrace_command): Remove non-const overload.
1897 * source.c (info_source_command, info_line_command): Constify.
1898 * solib.c (info_sharedlibrary_command): Constify.
1899 * skip.c (info_skip_command): Constify.
1900 * ser-go32.c (info_serial_command): Constify.
1901 * reverse.c (info_bookmarks_command): Constify.
1902 * printcmd.c (info_symbol_command, info_address_command)
1903 (info_display_command): Constify.
1904 * osdata.c (info_osdata_command): Constify.
1905 * objc-lang.c (info_selectors_command, info_classes_command):
1906 Constify.
1907 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1908 * memattr.c (info_mem_command): Constify.
1909 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1910 * linux-fork.c (info_checkpoints_command): Constify.
1911 * infrun.c (info_signals_command): Constify.
1912 * inflow.c (info_terminal_command): Constify.
1913 * inferior.c (info_inferiors_command): Constify.
1914 (print_inferior): Constify.
1915 * infcmd.c (info_program_command, info_all_registers_command)
1916 (info_registers_command, info_vector_command)
1917 (info_float_command): Constify.
1918 (registers_info): Constify.
1919 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1920 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1921 Constify.
1922 * f-valprint.c (info_common_command): Constify.
1923 * dcache.c (info_dcache_command): Constify.
1924 (dcache_info_1): Constify.
1925 * darwin-nat-info.c (info_mach_tasks_command)
1926 (info_mach_task_command, info_mach_ports_command)
1927 (info_mach_port_command, info_mach_threads_command)
1928 (info_mach_thread_command, info_mach_regions_command)
1929 (info_mach_regions_recurse_command, info_mach_region_command)
1930 (info_mach_exceptions_command): Constify.
1931 (get_task_from_args): Constify.
1932 * cp-support.c (info_vtbl_command): Constify.
1933 * breakpoint.c (info_watchpoints_command)
1934 (info_tracepoints_command): Constify.
1935 (info_breakpoints_command): Remove non-const overload.
1936 * avr-tdep.c (avr_io_reg_read_command): Constify.
1937 * auxv.c (info_auxv_command): Constify.
1938 * ada-tasks.c (info_tasks_command): Constify.
1939 (info_task): Constify.
1940 * ada-lang.c (info_exceptions_command): Constify.
1941
1942 2017-11-07 Tom Tromey <tom@tromey.com>
1943
1944 * solib.h (no_shared_libraries): Constify.
1945 * frame.h (return_command): Constify.
1946 * cli/cli-cmds.h (quit_command): Constify.
1947 * top.h (quit_command, execute_command): Constify.
1948 * target.h (flash_erase_command): Constify.
1949 * inferior.h (set_inferior_args, attach_command): Constify.
1950 * tracepoint.h (start_tracing, stop_tracing): Constify.
1951 * breakpoint.h (break_command, tbreak_command)
1952 (hbreak_command_wrapper, thbreak_command_wrapper)
1953 (rbreak_command_wrapper, watch_command_wrapper)
1954 (awatch_command_wrapper, rwatch_command_wrapper)
1955 (get_tracepoint_by_number): Constify.
1956 * symtab.c (info_variables_command, rbreak_command)
1957 (symtab_symbol_info): Constify.
1958 (info_variables_command): Add non-const overload.
1959 * top.c (dont_repeat_command): Constify.
1960 * breakpoint.c (ignore_command, commands_command)
1961 (condition_command, tbreak_command, hbreak_command)
1962 (thbreak_command, clear_command, break_command)
1963 (info_breakpoints_command, watch_command, rwatch_command)
1964 (awatch_command, trace_command, ftrace_command, strace_command)
1965 (trace_pass_command, break_range_command, dprintf_command)
1966 (agent_printf_command, get_tracepoint_by_number)
1967 (watch_maybe_just_location, trace_pass_command): Constify.
1968 (info_breakpoints_command): Add non-const overload.
1969 * tracefile.c (tsave_command): Constify.
1970 * infcmd.c (attach_command, disconnect_command, signal_command)
1971 (queue_signal_command, stepi_command, nexti_command)
1972 (finish_command, next_command, step_command, until_command)
1973 (advance_command, jump_command, continue_command, run_command)
1974 (start_command, starti_command, interrupt_command)
1975 (run_command_1, set_inferior_args, step_1): Constify.
1976 * inferior.c (add_inferior_command, remove_inferior_command)
1977 (clone_inferior_command): Constify.
1978 * linux-fork.c (checkpoint_command, restart_command): Constify.
1979 * windows-nat.c (signal_event_command): Constify.
1980 * guile/guile.c (guile_repl_command, guile_command): Constify.
1981 * printcmd.c (x_command, display_command, printf_command)
1982 (output_command, set_command, call_command, print_command)
1983 (eval_command): Constify.
1984 (non_const_set_command): Remove.
1985 (_initialize_printcmd): Update.
1986 * source.c (forward_search_command, reverse_search_command):
1987 Constify.
1988 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1989 Constify.
1990 * infrun.c (handle_command): Constify.
1991 * memattr.c (mem_command): Constify.
1992 * stack.c (return_command, up_command, up_silently_command)
1993 (down_command, down_silently_command, frame_command)
1994 (backtrace_command, func_command, backtrace_command_1): Constify.
1995 (backtrace_command): Add non-const overload.
1996 * remote-sim.c (simulator_command): Constify.
1997 * exec.c (set_section_command): Constify.
1998 * tracepoint.c (tdump_command, trace_variable_command)
1999 (tstatus_command, tstop_command, tstart_command)
2000 (end_actions_pseudocommand, while_stepping_pseudocommand)
2001 (collect_pseudocommand, teval_pseudocommand, actions_command)
2002 (start_tracing, stop_tracing): Constify.
2003 * value.c (init_if_undefined_command): Constify.
2004 * tui/tui-stack.c (tui_update_command): Constify.
2005 * tui/tui-win.c (tui_refresh_all_command)
2006 (tui_set_tab_width_command, tui_set_win_height_command)
2007 (tui_set_focus_command, tui_scroll_forward_command)
2008 (tui_scroll_backward_command, tui_scroll_left_command)
2009 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2010 (tui_set_win_height): Constify.
2011 * tui/tui-layout.c (tui_layout_command): Constify.
2012 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2013 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2014 (proc_untrace_sysexit_cmd): Constify.
2015 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2016 (threadset_test_cmd, threadlist_update_test_cmd)
2017 (threadalive_test): Constify.
2018 * objc-lang.c (print_object_command): Constify.
2019 * command.h (add_com): Constify.
2020 * cli/cli-dump.c (restore_command): Constify.
2021 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2022 (help_command, complete_command, shell_command, edit_command)
2023 (list_command, disassemble_command, make_command)
2024 (apropos_command, alias_command): Constify.
2025 * cli/cli-script.c (document_command, define_command)
2026 (while_command, if_command, validate_comname): Constify.
2027 * cli/cli-decode.c (struct cmd_list_element): Change type of
2028 "fun".
2029 * target.c (do_monitor_command, flash_erase_command): Constify.
2030 * regcache.c (reg_flush_command): Constify.
2031 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2032 (reverse_nexti, reverse_continue, reverse_finish)
2033 (save_bookmark_command, goto_bookmark_command)
2034 (exec_reverse_once): Constify.
2035 * python/python.c (python_interactive_command, python_command):
2036 Constify.
2037 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2038 Constify.
2039 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2040 * gcore.c (gcore_command): Constify.
2041
2042 2017-11-07 Tom Tromey <tom@tromey.com>
2043
2044 * printcmd.c (x_command): Call set_repeat_arguments.
2045 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2046 * top.c (repeat_arguments): New global.
2047 (set_repeat_arguments): New function.
2048 (execute_command): Handle repeat_arguments.
2049 (show_commands): Calls set_repeat_arguments.
2050 * command.h (set_repeat_arguments): Declare.
2051
2052 2017-11-07 Tom Tromey <tom@tromey.com>
2053
2054 * stack.c (backtrace_command): Use std::string.
2055 (backtrace_command_1): Make "count_exp" const.
2056
2057 2017-11-07 Tom Tromey <tom@tromey.com>
2058
2059 * source.c (directory_switch, mod_path, add_path): Constify.
2060 * defs.h (add_path, mod_path, directory_switch): Constify.
2061 * mi/mi-cmd-env.c (env_mod_path): Constify.
2062
2063 2017-11-07 Tom Tromey <tom@tromey.com>
2064
2065 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2066 (run_command_1, continue_command, step_1, jump_command)
2067 (signal_command, until_command, advance_command, finish_command)
2068 (attach_command): Update.
2069
2070 2017-11-07 Tom Tromey <tom@tromey.com>
2071
2072 * command.h (set_cmd_cfunc): Don't declare.
2073 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2074
2075 2017-11-07 Tom Tromey <tom@tromey.com>
2076
2077 * stack.c (select_frame_command): Constify.
2078 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2079 * command.h (add_com_suppress_notification): Constify.
2080
2081 2017-11-07 Tom Tromey <tom@tromey.com>
2082
2083 * breakpoint.c (stop_command): Constify.
2084 * cli/cli-decode.c (struct cmd_list_element): Constify.
2085 * command.h (add_abbrev_prefix_cmd): Constify.
2086
2087 2017-11-07 Pedro Alves <palves@redhat.com>
2088
2089 * breakpoint.c (extract_bp_kind): New enum.
2090 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2091 factored out from ...
2092 (extract_bp_number_and_location): ... here.
2093 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2094
2095 2017-11-07 Pedro Alves <palves@redhat.com>
2096
2097 * breakpoint.c (extract_bp_number_and_location): Change return
2098 type to void. Throw error instead of warning.
2099 (enable_disable_command): Adjust.
2100
2101 2017-11-07 Xavier Roirand <roirand@adacore.com>
2102 Pedro Alves <palves@redhat.com>
2103
2104 * breakpoint.c (map_breakpoint_number_range): New, factored out
2105 from ...
2106 (map_breakpoint_numbers): ... here.
2107 (find_location_by_number): Change parameters from string to
2108 breakpoint number and location.
2109 (extract_bp_number_and_location): New function.
2110 (enable_disable_bp_num_loc)
2111 (enable_disable_breakpoint_location_range)
2112 (enable_disable_command): New functions, factored out ...
2113 (enable_command, disable_command): ... these functions, and
2114 adjusted to support ranges.
2115 * NEWS: Document enable/disable breakpoint location range feature.
2116
2117 2017-11-06 Luis Machado <luis.machado@linaro.org>
2118
2119 * MAINTAINERS (Write After Approval): Update my e-mail address.
2120
2121 2017-11-06 Pedro Alves <palves@redhat.com>
2122
2123 * gnu-nat.c (gnu_terminal_init): Delete.
2124 (gnu_target): Don't install gnu_terminal_init.
2125 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2126 (child_terminal_init): ... this function.
2127
2128 2017-11-06 Pedro Alves <palves@redhat.com>
2129
2130 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2131 sgtty.h.
2132 * config.in, configure: Regenerate.
2133
2134 2017-11-06 Pedro Alves <palves@redhat.com>
2135
2136 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2137 (async_init_signals): Adjust.
2138 (handle_stop_sig): Rename to ...
2139 (handle_sigtstp): ... this.
2140 (async_stop_sig): Rename to ...
2141 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2142 SIGTSTP path.
2143 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2144 instead of STOP_SIGNAL thoughout.
2145 (handle_stop_sig): Rename to ...
2146 (handle_sigtstp): ... this.
2147 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2148
2149 2017-11-06 Pedro Alves <palves@redhat.com>
2150
2151 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2152 longer set flags twice in row.
2153
2154 2017-11-06 Pedro Alves <palves@redhat.com>
2155
2156 * Makefile.in (SER_HARDWIRE): Update comment.
2157 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2158 * common/gdb_termios.h: Delete file.
2159 * common/job-control.c: Include termios.h and unistd.h instead of
2160 gdb_termios.h.
2161 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2162 check.
2163 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2164 Remove sgtty code.
2165 * configure.ac: No longer check for termio.h and sgtty.h.
2166 * configure: Regenerate.
2167 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2168 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2169 Replace PROCESS_GROUP_TYPE references with pid_t references
2170 throughout.
2171 (gdb_getpgrp): Delete.
2172 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2173 (child_terminal_inferior): Remove comment. Remove sgtty code.
2174 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2175 gdb_getpgrp. Use serial_set_tty_state instead aof
2176 serial_noflush_set_tty_state. Remove sgtty code.
2177 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2178 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2179 (inferior_process_group): Now returns pid_t.
2180 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2181 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2182 * ser-event.c (serial_event_ops): Update.
2183 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2184 (dos_ops): Update.
2185 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2186 * ser-pipe.c (pipe_ops): Update.
2187 * ser-tcp.c (tcp_ops): Update.
2188 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2189 HAVE_TERMIOS checks.
2190 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2191 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2192 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2193 assume termios.
2194 (hardwire_noflush_set_tty_state): Delete.
2195 (hardwire_print_tty_state, hardwire_drain_output)
2196 (hardwire_flush_output, hardwire_flush_input)
2197 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2198 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2199 code, and assume termios.
2200 (hardwire_ops): Update.
2201 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2202 * serial.c (serial_noflush_set_tty_state): Delete.
2203 * serial.h (serial_noflush_set_tty_state): Delete.
2204 (serial_ops::noflush_set_tty_state): Delete.
2205
2206 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2207
2208 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2209 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2210 (COMMON_OBS): Remove doublest.o and dfp.o.
2211 Do not build target-float.c (instead of doublest.c)
2212 with -Wformat-nonliteral.
2213
2214 * doublest.c: Remove file.
2215 * doublest.h: Remove file.
2216 * dfp.c: Remove file.
2217 * dfp.h: Remove file.
2218
2219 * target-float.c: Do not include "doublest.h" and "dfp.h".
2220 (DOUBLEST): Move here from doublest.h.
2221 (enum float_kind): Likewise.
2222 (FLOATFORMAT_CHAR_BIT): Likewise.
2223 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2224 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2225 (floatformat_precision): Likewise.
2226 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2227 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2228 Likewise.
2229 (host_float_format, host_double_format, host_long_double_format):
2230 Likewise.
2231 (floatformat_to_string, floatformat_from_string): Likewise.
2232 (floatformat_to_doublest): Likewise. Also, inline the original
2233 convert_floatformat_to_doublest.
2234 (floatformat_from_doublest): Likewise. Also, inline the original
2235 convert_floatformat_from_doublest.
2236
2237 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2238 (MAX_DECIMAL_STRING): Move here from dfp.c.
2239 (match_endianness): Likewise.
2240 (set_decnumber_context, decimal_check_errors): Likewise.
2241 (decimal_from_number, decimal_to_number): Likewise.
2242 (decimal_to_string, decimal_from_string): Likewise. Make static.
2243 (decimal_from_longest, decimal_from_ulongest): Likewise.
2244 (decimal_to_longest): Likewise.
2245 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2246 (decimal_convert): Likewise.
2247
2248 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2249
2250 * doublest.c: Do not include "gdbtypes.h".
2251 (extract_typed_floating): Remove.
2252 (store_typed_floating): Remove.
2253 (convert_typed_floating): Remove.
2254 * doublest.h (struct type): Remove.
2255 (DOUBLEST_PRINT_FORMAT): Remove.
2256 (DOUBLEST_SCAN_FORMAT): Remove.
2257 (extract_typed_floating): Remove.
2258 (store_typed_floating): Remove.
2259 (convert_typed_floating): Remove.
2260
2261 * dfp.c (decimal_from_doublest): Remove.
2262 (decimal_to_doublest): Remove.
2263 * dfp.h: Do not include "doublest.h".
2264 (decimal_from_doublest): Remove.
2265 (decimal_to_doublest): Remove.
2266
2267 * value.c: Do not include "doublest.h" and "dfp.h".
2268 (value_as_double): Remove.
2269 (unpack_double): Remove.
2270 (value_from_double): Remove.
2271 (value_from_decfloat): Remove.
2272 * value.h: Do not include "doublest.h".
2273 (value_as_double): Remove.
2274 (unpack_double): Remove.
2275 (value_from_double): Remove.
2276 (value_from_decfloat): Remove.
2277
2278 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2279
2280 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2281 (i386_extract_return_value): Use target_float_convert.
2282 (i386_store_return_value): Likewise.
2283 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2284 (i387_value_to_register): Likewise.
2285 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2286 (ia64_register_to_value): Use target_float_convert.
2287 (ia64_value_to_register): Likewise.
2288 (ia64_extract_return_value): Likewise.
2289 (ia64_store_return_value): Likewise.
2290 (ia64_push_dummy_call): Likewise.
2291 * m68k-tdep.c: Include "target-float.h".
2292 (m68k_register_to_value): Use target_float_convert.
2293 (m68k_value_to_register): Likewise.
2294 (m68k_svr4_extract_return_value): Likewise.
2295 (m68k_svr4_store_return_value): Likewise.
2296 * ppc-sysv-tdep.c: Include "target-float.h".
2297 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2298 (do_ppc_sysv_return_value): Likewise.
2299 (ppc64_sysv_abi_push_freg): Likewise.
2300 (ppc64_sysv_abi_return_value_base): Likewise.
2301 * rs6000-aix-tdep.c: Include "target-float.h".
2302 (rs6000_push_dummy_call): Use target_float_convert.
2303 (rs6000_return_value): Likewise.
2304 * rs6000-lynx178-tdep.c: Include "target-float.h".
2305 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2306 (rs6000_lynx178_return_value): Likewise.
2307 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2308 (rs6000_register_to_value): Use target_float_convert.
2309 (rs6000_value_to_register): Likewise.
2310 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2311 (arm_extract_return_value): Use target_float_convert.
2312 (arm_store_return_value): Likewise.
2313 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2314 (sh_register_convert_to_virtual): Use target_float_convert.
2315 (sh_register_convert_to_raw): Likewise.
2316 * sh64-tdep.c: Include "target-float.h".
2317 (sh64_extract_return_value): Use target_float_convert.
2318 (sh64_register_convert_to_virtual): Likewise.
2319 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2320
2321 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2322
2323 * target-float.c (floatformat_to_host_double): New function.
2324 (floatformat_from_host_double): Likewise.
2325 (target_float_to_host_double): Likewise.
2326 (target_float_from_host_double): Likewise.
2327 * target-float.h (target_float_to_host_double): Add prototype.
2328 (target_float_from_host_double): Likewise.
2329
2330 * guile/scm-value.c: Include "target-float.h".
2331 (gdbscm_value_to_real): Use target_float_to_host_double.
2332 Handle integer source values via value_as_long.
2333 * guile/scm-math.c: Include "target-float.h". Do not include
2334 "doublest.h", "dfp.h", and "expression.h".
2335 (vlscm_convert_typed_number): Use target_float_from_host_double.
2336 (vlscm_convert_number): Likewise.
2337
2338 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2339 (convert_value_from_python): Use target_float_from_host_double.
2340
2341 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2342
2343 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2344 (cast_from_fixed): Likewise.
2345 (ada_scaling_type): New function.
2346 (ada_delta): Return value instead of DOUBLEST. Perform target
2347 arithmetic instead of host arithmetic.
2348 (scaling_factor): Rename to ...
2349 (ada_scaling_factor) ... this. Make non-static. Return value instead
2350 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2351 (ada_fixed_to_float): Remove.
2352 (ada_float_to_fixed): Remove.
2353 * ada-lang.h (ada_fixed_to_float): Remove.
2354 (ada_float_to_fixed): Remove.
2355 (ada_delta): Return value instead of DOUBLEST.
2356 (ada_scaling_factor): Add prototype.
2357
2358 * ada-typeprint.c: Include "target-float.h".
2359 (print_fixed_point_type): Perform target arithmetic instead of
2360 host arithmetic.
2361 * ada-valprint.c: Include "target-float.h".
2362 (ada_val_print_num): Perform target arithmetic instead of
2363 host arithmetic for fixed-point types.
2364
2365 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2366
2367 * target-float.c: Include <math.h>.
2368 (floatformat_binop): New function.
2369 (floatformat_compare): Likewise.
2370 (target_float_binop): Likewise.
2371 (target_float_compare): Likewise.
2372 * target-float.h: Include "expression.h".
2373 (target_float_binop): Add prototype.
2374 (target_float_compare): Likewise.
2375
2376 * valarith.c: Do not include "doublest.h" and "dfp.h".
2377 Include "common/byte-vector.h".
2378 (value_args_as_decimal): Remove, replace by ...
2379 (value_args_as_target_float): ... this function. Handle both
2380 binary and decimal target floating-point formats.
2381 (scalar_binop): Handle both binary and decimal FP using
2382 value_args_as_target_float and target_float_binop.
2383 (value_equal): Handle both binary and decimal FP using
2384 value_args_as_target_float and target_float_compare.
2385 (value_less): Likewise.
2386 (value_pos): Handle all scalar types as simple copy.
2387 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2388 * dfp.c (decimal_binop): Throw error instead of internal_error
2389 when called with an unsupported operation code.
2390
2391 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2392
2393 * target-float.c (target_float_to_string): New function.
2394 (target_float_from_string): New function.
2395 * target-float.h (target_float_to_string): Add prototype.
2396 (target_float_from_string): Add prototype.
2397
2398 * valprint.c: Include "target-float.h". Do not include
2399 "doublest.h" and "dfp.h".
2400 (print_floating): Use target_float_to_string.
2401 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2402 (printf_floating): Use target_float_to_string.
2403 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2404 (print_i387_value): Use target_float_to_string.
2405 * mips-tdep.c: Include "target-float.h".
2406 (mips_print_fp_register): Use target_float_to_string.
2407 * sh64-tdep.c: Include "target-float.h".
2408 (sh64_do_fp_register): Use target_float_to_string.
2409
2410 * parse.c: Include "target-float.h". Do not include
2411 "doublest.h" and "dfp.h".
2412 (parse_float): Use target_float_from_string.
2413 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2414 (define_symbol): Use target_float_from_string.
2415 * gdbarch-selftests.c: Include "target-float.h".
2416 (register_to_value_test): Use target_float_from_string.
2417
2418 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2419
2420 * Makefile.c (SFILES): Add target-float.c.
2421 (HFILES_NO_SRCDIR): Add target-float.h.
2422 (COMMON_OBS): Add target-float.o.
2423 * target-float.h: New file.
2424 * target-float.c: New file.
2425
2426 * doublest.c (floatformat_classify): Fix detection of float_zero.
2427
2428 * gdbtypes.c (is_floating_type): New function.
2429 * gdbtypes.h (is_floating_type): Add prototype.
2430
2431 * value.c: Do not include "floatformat.h".
2432 (unpack_double): Use target_float_is_valid.
2433 (is_floating_value): New function.
2434 * value.h (is_floating_value): Add prototype-
2435
2436 * valarith.c: Include "target-float.h".
2437 (value_logical_not): Use target_float_is_zero.
2438
2439 * python/py-value.c: Include "target-float.h".
2440 (valpy_nonzero): Use target_float_is_zero.
2441
2442 2017-11-04 Tom Tromey <tom@tromey.com>
2443
2444 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2445
2446 2017-11-04 Tom Tromey <tom@tromey.com>
2447
2448 * breakpoint.c (set_momentary_breakpoint): Return
2449 breakpoint_up.
2450 (until_break_command): Update.
2451 (new_until_break_fsm): Change argument types to
2452 breakpoint_up.
2453 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2454 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2455 Remove.
2456 * infcmd.c (finish_forward): Update.
2457 * breakpoint.h (set_momentary_breakpoint)
2458 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2459 (make_cleanup_delete_breakpoint): Remove.
2460 (struct breakpoint_deleter): New.
2461 (breakpoint_up): New typedef.
2462 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2463 (insert_exception_resume_breakpoint): Update.
2464 (insert_exception_resume_from_probe): Update.
2465 (insert_longjmp_resume_breakpoint): Update.
2466 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2467 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2468 * infcall.c (call_function_by_hand_dummy): Update
2469
2470 2017-11-04 Tom Tromey <tom@tromey.com>
2471
2472 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2473
2474 2017-11-04 Tom Tromey <tom@tromey.com>
2475
2476 * linux-tdep.c (linux_core_info_proc_mappings): Use
2477 gdb::def_vector.
2478 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2479 "size" argument.
2480 (linux_corefile_thread): Update.
2481 (linux_make_corefile_notes): Remove unused variable.
2482
2483 2017-11-04 Tom Tromey <tom@tromey.com>
2484
2485 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2486 gdb::byte_vector.
2487
2488 2017-11-04 Tom Tromey <tom@tromey.com>
2489
2490 * objfiles.c (do_free_objfile_cleanup): Remove.
2491 * compile/compile-object-load.c (compile_object_load): Update.
2492 * objfiles.h (make_cleanup_free_objfile): Remove.
2493
2494 2017-11-04 Tom Tromey <tom@tromey.com>
2495
2496 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2497 (adi_read_versions): Change "tags" to "gdb_byte *".
2498 (adi_print_versions): Likewise.
2499
2500 2017-11-04 Tom Tromey <tom@tromey.com>
2501
2502 * breakpoint.c
2503 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2504 from start_rbreak_breakpoints.
2505 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2506 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2507 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2508 * symtab.c (do_end_rbreak_breakpoints): Remove.
2509 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2510
2511 2017-11-04 Tom Tromey <tom@tromey.com>
2512
2513 * cp-namespace.c (reset_directive_searched): Remove.
2514 (cp_lookup_symbol_via_imports): Use scoped_restore.
2515 * cp-support.c (reset_directive_searched): Remove.
2516 (make_symbol_overload_list_using): Use scoped_restore.
2517 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2518 (reset_directive_searched): Remove.
2519
2520 2017-11-04 Tom Tromey <tom@tromey.com>
2521
2522 * symfile.c (find_separate_debug_file_by_debuglink): Use
2523 unique_xmalloc_ptr.
2524
2525 2017-11-04 Tom Tromey <tom@tromey.com>
2526
2527 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2528 type of "info".
2529 (compute_stack_depth): Likewise.
2530 (do_compile_dwarf_expr_to_c): Use std::vector.
2531
2532 2017-11-04 Tom Tromey <tom@tromey.com>
2533
2534 * compile/compile-object-load.c (link_callbacks_einfo): Use
2535 std::string.
2536
2537 2017-11-04 Tom Tromey <tom@tromey.com>
2538
2539 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2540 Use scoped_free_pendings.
2541 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2542 scoped_free_pendings.
2543 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2544 (xcoff_initial_scan): Likewise.
2545 * buildsym.c (reset_symtab_globals): Update comment.
2546 (scoped_free_pendings): Rename from really_free_pendings.
2547 (prepare_for_building): Update comment.
2548 (buildsym_init): Likewise.
2549 * buildsym.h (class scoped_free_pendings): New class.
2550 (really_free_pendings): Don't declare.
2551
2552 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2553
2554 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2555 output when converting a zero value to a special byteorder format.
2556
2557 2017-11-02 Yao Qi <yao.qi@linaro.org>
2558
2559 * frame.c (do_frame_register_read): Remove aspace.
2560 * jit.c (jit_frame_sniffer): Likwise.
2561 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2562 * regcache.c (regcache::regcache): Pass nullptr.
2563 (regcache_print): Caller updated.
2564 * regcache.h (regcache::regcache): Remove one constructor
2565 parameter aspace.
2566
2567 2017-11-02 Yao Qi <yao.qi@linaro.org>
2568
2569 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2570
2571 2017-11-02 Yao Qi <yao.qi@linaro.org>
2572
2573 * breakpoint.c (insert_single_step_breakpoints): Update.
2574 * frame.c (struct frame_info) <aspace>: Add const.
2575 (frame_save_as_regcache): Add const.
2576 (get_frame_address_space): Return const address_space *.
2577 * frame.h (get_frame_address_space): Update declaration.
2578 * infrun.c (struct step_over_info) <aspace>: Add const.
2579 (set_step_over_info): Make aspace const.
2580 (displaced_step_prepare_throw): Change variable const.
2581 (resume): Likewise.
2582 (proceed): Likewise.
2583 (adjust_pc_after_break): Likewise.
2584 (save_waitstatus): Likewise.
2585 (handle_signal_stop): Likewise.
2586 (keep_going_pass_signal): Likewise.
2587 * jit.c (jit_frame_sniffer): Add const.
2588 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2589 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2590 * record-full.c (record_full_wait_1): Likewise.
2591 * regcache.c (regcache::regcache): Change parameter to const.
2592 * regcache.h (regcache::regcache): Likewise.
2593 (regcache::aspace): Return const address_space *.
2594 (regcache) <m_aspace>: Add const.
2595
2596 2017-11-02 Yao Qi <yao.qi@linaro.org>
2597
2598 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2599 * frame.c (create_sentinel_frame): Likewise.
2600 * infrun.c (displaced_step_prepare_throw): Likewise.
2601 (resume): Likewise.
2602 (thread_still_needs_step_over_bp): Likewise.
2603 (proceed): Likewise.
2604 (do_target_wait): Likewise.
2605 (adjust_pc_after_break): Likewise.
2606 (handle_syscall_event): Likewise.
2607 (save_waitstatus): Likewise.
2608 (handle_inferior_event_1): Likewise.
2609 (handle_signal_stop): Likewise.
2610 (keep_going_pass_signal): Likewise.
2611 * linux-nat.c (status_callback): Likewise.
2612 (save_stop_reason): Likewise.
2613 (resume_stopped_resumed_lwps): Likewise.
2614 * record-full.c (record_full_exec_insn): Likewise.
2615 (record_full_wait_1): Likewise.
2616 * regcache.c (get_regcache_aspace): Remove.
2617 * regcache.h (get_regcache_aspace): Remove.
2618
2619 2017-11-02 Yao Qi <yao.qi@linaro.org>
2620
2621 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2622 (init_regcache_descr): Use gdbarch_num_regs.
2623 (regcache::regcache): Likewise.
2624 (regcache::get_register_status): Likewise.
2625 (regcache::assert_raw_regnum): Likewise.
2626 (regcache::cooked_read): Likewise.
2627 (regcache::cooked_read_value): Likewise.
2628 (regcache::cooked_write): Likewise.
2629 (regcache::dump): Likewise.
2630 (regcache::num_raw_registers): New method.
2631 * regcache.h (class regcache) <num_raw_registers>: New.
2632
2633 2017-11-02 Yao Qi <yao.qi@linaro.org>
2634
2635 * regcache.c (regcache::assert_regnum): New method.
2636 (regcache::invalidate): Call assert_regnum.
2637 (regcache::raw_update): Likewise.
2638 (regcache::raw_write): Likewise.
2639 (regcache::raw_read_part): Likewise.
2640 (regcache::raw_write_part): Likewise.
2641 (regcache::raw_supply): Likewise.
2642 (regcache::raw_supply_integer): Likewise.
2643 (regcache::raw_supply_zeroed): Likewise.
2644 (regcache::raw_collect): Likewise.
2645 (regcache::raw_collect_integer): Likewise.
2646 * regcache.h (regcache::assert_regnum): Declare.
2647
2648 2017-11-02 Yao Qi <yao.qi@linaro.org>
2649
2650 * regcache.c (regcache::dump): Remove code.
2651
2652 2017-11-02 Yao Qi <yao.qi@linaro.org>
2653
2654 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2655 Remove.
2656 <sizeof_cooked_register_status>: Remove.
2657 (init_regcache_descr): Update.
2658 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2659 (regcache::save): Likewise.
2660 (regcache::dump): Likewise.
2661
2662 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2663
2664 * ft32-tdep.c (ft32_fetch_instruction): New function.
2665 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2666
2667 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2668
2669 * cli/cli-script.c (execute_control_command): Rename to ...
2670 (execute_control_command_1): ... this.
2671 (execute_control_command): New function.
2672
2673 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2674
2675 * tracepoint.c (tfind_command): Remove const_cast.
2676
2677 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2678
2679 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2680
2681 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2682
2683 * common/common-utils.h (in_inclusive_range): New function.
2684 * arm-tdep.c (arm_record_extension_space): Use
2685 in_inclusive_range.
2686 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2687 * cris-tdep.c (cris_spec_reg_applicable): Use
2688 in_inclusive_range.
2689
2690 2017-10-30 Pedro Alves <palves@redhat.com>
2691 Simon Marchi <simon.marchi@ericsson.com>
2692
2693 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2694 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2695
2696 2017-10-30 Pedro Alves <palves@redhat.com>
2697
2698 * common/common-utils.c (string_appendf, string_vappendf): New
2699 functions.
2700 * common/common-utils.h (string_appendf, string_vappendf): New
2701 declarations.
2702 * unittests/common-utils-selftests.c (string_appendf_func)
2703 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2704 (string_vappendf_tests): New functions.
2705 (_initialize_common_utils_selftests): Register "string_appendf" and
2706 "string_vappendf tests".
2707
2708 2017-10-30 Pedro Alves <palves@redhat.com>
2709
2710 * unittests/common-utils-selftests.c (format_func): New typedef.
2711 (string_printf_tests, string_vprintf_tests): Tests factored out
2712 and merged to ...
2713 (test_format_func): ... this new function.
2714 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2715 test_format_func.
2716
2717 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2718
2719 * darwin-nat.c: Remove include of gdb.h.
2720
2721 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * xtensa-xtregs.c: Fix formatting issues.
2724
2725 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2728
2729 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2730
2731 PR python/21213
2732 * python/py-infthread.c (thpy_get_inferior): Increment reference
2733 of inferior before returning it.
2734
2735 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 * unittests/common-utils-selftests.c (format): Add
2738 ATTRIBUTE_PRINTF.
2739
2740 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2741
2742 * xml-syscall.c (struct syscall_desc): Add constructor.
2743 <name>: Change type to std::string.
2744 (syscall_desc_up): New typedef.
2745 (syscall_desc_p): Remove typeder.
2746 (DEF_VEC_P(syscall_desc_p)): Remove.
2747 (struct syscall_group_desc): Add constructor.
2748 <name>: Change type to std::string.
2749 <syscalls>: Change type to std::vector.
2750 (syscall_group_desc_up): New typedef.
2751 (syscall_group_desc_p): Remove typedef.
2752 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2753 (struct syscalls_info) <syscalls>: Change type to std::vector of
2754 unique_ptr.
2755 <groups>: Likewise.
2756 <my_gdb_datadir>: Change type to std::string.
2757 (syscalls_info_up): New typedef.
2758 (allocate_syscalls_info): Remove.
2759 (syscalls_info_free_syscalls_desc): Remove.
2760 (syscalls_info_free_syscall_group_desc): Remove.
2761 (free_syscalls_info): Remove.
2762 (make_cleanup_free_syscalls_info): Remove.
2763 (syscall_group_create_syscall_group_desc): Adjust.
2764 (syscall_group_add_syscall): Adjust.
2765 (syscall_create_syscall_desc): Adjust.
2766 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2767 (init_syscalls_info): Adjust.
2768 (syscall_group_get_group_by_name): Adjust.
2769 (xml_get_syscall_number): Adjust.
2770 (xml_get_syscall_name): Adjust.
2771 (xml_list_of_syscalls): Adjust.
2772 (xml_list_syscalls_by_group): Adjust.
2773 (xml_list_of_groups): Adjust.
2774
2775 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2776
2777 * probe.h: Don't include gdb_vecs.h.
2778 (DEF_VEC_P (probe_p)): Remove.
2779 (find_probes_in_objfile): Return an std::vector.
2780 * probe.c (find_probes_in_objfile): Likewise.
2781 * breakpoint.c (breakpoint_objfile_data)
2782 <longjmp_probes>: Change type to std::vector.
2783 <exception_probes>: Likewise.
2784 (free_breakpoint_probes): Don't manually free vectors.
2785 (create_longjmp_master_breakpoint): Adjust.
2786 (create_exception_master_breakpoint): Adjust.
2787 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2788 parameter type, adjust.
2789 (svr4_create_solib_event_breakpoints): Adjust.
2790
2791 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2792
2793 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2794 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2795 with new.
2796 (free_breakpoint_probes): Rename to ...
2797 (free_breakpoint_objfile_data): ... this, and call delete on
2798 bp_objfile_data..
2799
2800 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2801
2802 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2803 (loaded_script_ptr): Remove typedef.
2804 (DEF_VEC_P (loaded_script_ptr)): Remove.
2805 (struct collect_matching_scripts_data): Add constructor.
2806 <scripts_p>: Change type to (pointer to) std::vector.
2807 (collect_matching_scripts_data): Adjust.
2808 (sort_scripts_by_name): Make suitable for std::sort.
2809 (print_scripts): Don't sort vector, adjust to std::vector.
2810 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2811
2812 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2813
2814 * symfile.c (filename_language): Make struct, not typedef. Add
2815 constructor.
2816 <ext>: Change type to std::string.
2817 (DEF_VEC_O (filename_language)): Remove.
2818 (filename_language_table): Change type to std::vector.
2819 (add_filename_language): Adjust.
2820 (set_ext_lang_command): Adjust.
2821 (info_ext_lang_command): Adjust.
2822 (deduce_language_from_filename): Adjust.
2823 (class scoped_restore_filename_language_table): Remove.
2824 (test_filename_language): Use scoped_restore.
2825 (test_set_ext_lang_command): Use scoped_restore, adjust to
2826 std::vector change.
2827
2828 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * symfile.c: Include selftest.h.
2831 (class scoped_restore_filename_language_table): New.
2832 (test_filename_language): New test.
2833 (test_set_ext_lang_command): New test.
2834 (_initialize_symfile): Register tests.
2835
2836 2017-10-27 Keith Seitz <keiths@redhat.com>
2837
2838 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2839 in the bp_location, falling back to find_pc_sect_function when
2840 needed.
2841 (add_location_to_breakpoint): Save sal->symbol.
2842 * breakpoint.h (struct bp_location) <symbol>: New field.
2843 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2844 * symtab.h (struct symtab_and_line) <symbol>: New field.
2845
2846 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2847
2848 PR gdb/13669
2849 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2850 to rewind obstack.
2851
2852 2017-10-26 Pedro Alves <palves@redhat.com>
2853
2854 * remote.c (remote_async_terminal_ours_p): Delete.
2855 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2856 Remove references to 'remote_async_terminal_ours_p'.
2857
2858 2017-10-26 Yao Qi <yao.qi@linaro.org>
2859
2860 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2861
2862 2017-10-26 Yao Qi <yao.qi@linaro.org>
2863
2864 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2865 aspace const.
2866 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2867 Likewise.
2868 * breakpoint.c (bpstat_check_location): Remove cast.
2869 (breakpoint_hit_catch_fork): Make aspce const.
2870 (breakpoint_hit_catch_solib): Likewise.
2871 (breakpoint_hit_catch_exec): Likewise.
2872 (breakpoint_hit_ranged_breakpoint): Likewise.
2873 (breakpoint_hit_watchpoint): Likewise.
2874 (base_breakpoint_breakpoint_hit): Likewise.
2875 (bkpt_breakpoint_hit): Likewise.
2876 (dprintf_breakpoint_hit): Likewise.
2877 (tracepoint_breakpoint_hit): Likewise.
2878 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2879
2880 2017-10-26 Yao Qi <yao.qi@linaro.org>
2881
2882 * breakpoint.c (breakpoint_location_address_match): Change
2883 "struct address_space *" to "const address_space".
2884 (breakpoint_location_address_range_overlap): Likewise.
2885 (breakpoint_here_p): Likewise.
2886 (breakpoint_in_range_p): Likewise.
2887 (moribund_breakpoint_here_p): Likewise.
2888 (bp_location_inserted_here_p): Likewise.
2889 (software_breakpoint_inserted_here_p): Likewise.
2890 (hardware_breakpoint_inserted_here_p): Likewise.
2891 (hardware_watchpoint_inserted_in_range): Likewise.
2892 (bpstat_check_location): Likewise.
2893 (bpstat_stop_status): Likewise.
2894 (breakpoint_address_match): Likewise.
2895 (breakpoint_address_match_range): Likewise.
2896 (breakpoint_location_address_match): Likewise.
2897 (breakpoint_location_address_range_overlap): Likewise.
2898 (insert_single_step_breakpoint): Likewise.
2899 (breakpoint_has_location_inserted_here): Likewise.
2900 (single_step_breakpoint_inserted_here_p): Likewise.
2901 (pc_at_non_inline_function): Likewise.
2902 * breakpoint.h (bpstat_stop_status): Update declaration.
2903 (breakpoint_here_p): Likewise.
2904 (breakpoint_in_range_p): Likewise.
2905 (moribund_breakpoint_here_p): Likewise.
2906 (breakpoint_inserted_here_p): Likewise.
2907 (software_breakpoint_inserted_here_p): Likewise.
2908 (hardware_breakpoint_inserted_here_p): Likewise.
2909 (breakpoint_has_location_inserted_here): Likewise.
2910 (single_step_breakpoint_inserted_here_p): Likewise.
2911 (hardware_watchpoint_inserted_in_range): Likewise.
2912 (breakpoint_address_match): Likewise.
2913 (insert_single_step_breakpoint): Likewise.
2914 (pc_at_non_inline_function): Likewise.
2915 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2916 * record.c (record_check_stopped_by_breakpoint): Likewise.
2917 * record.h (record_check_stopped_by_breakpoint): Likewise.
2918 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2919
2920 2017-10-25 Yao Qi <yao.qi@linaro.org>
2921
2922 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2923 regcache->arch () instead get_regcache_arch.
2924 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2925 Likewise.
2926 (aarch64_fbsd_store_inferior_registers): Likewise.
2927 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2928 (store_gregs_to_thread): Likewise.
2929 (fetch_fpregs_from_thread): Likewise.
2930 (store_fpregs_to_thread): Likewise.
2931 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2932 (aarch64_store_return_value): Likewise.
2933 (aarch64_software_single_step): Likewise.
2934 * aix-thread.c (aix_thread_wait): Likewise.
2935 (supply_reg32): Likewise.
2936 (supply_sprs64): Likewise.
2937 (supply_sprs32): Likewise.
2938 (fill_gprs64): Likewise.
2939 (fill_gprs32): Likewise.
2940 (fill_sprs64): Likewise.
2941 (fill_sprs32): Likewise.
2942 (store_regs_user_thread): Likewise.
2943 (store_regs_kernel_thread): Likewise.
2944 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2945 (alphabsd_store_inferior_registers): Likewise.
2946 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2947 (alpha_store_return_value): Likewise.
2948 (alpha_deal_with_atomic_sequence): Likewise.
2949 (alpha_next_pc): Likewise.
2950 (alpha_software_single_step): Likewise.
2951 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2952 (amd64bsd_store_inferior_registers): Likewise.
2953 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2954 Likewise.
2955 (amd64_linux_store_inferior_registers): Likewise.
2956 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2957 (amd64_collect_native_gregset): Likewise.
2958 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2959 (amd64obsd_collect_uthread): Likewise.
2960 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2961 (amd64_collect_fpregset): Likewise.
2962 (amd64_supply_fxsave): Likewise.
2963 (amd64_supply_xsave): Likewise.
2964 (amd64_collect_fxsave): Likewise.
2965 (amd64_collect_xsave): Likewise.
2966 * arc-tdep.c (arc_write_pc): Likewise.
2967 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2968 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2969 (arm_fbsd_store_inferior_registers): Likewise.
2970 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2971 (store_vfp_regs): Likewise.
2972 (arm_linux_fetch_inferior_registers): Likewise.
2973 (arm_linux_store_inferior_registers): Likewise.
2974 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2975 (arm_linux_sigreturn_next_pc): Likewise.
2976 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2977 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2978 (fetch_register): Likewise.
2979 (store_register): Likewise.
2980 * arm-tdep.c (arm_is_thumb): Likewise.
2981 (displaced_in_arm_mode): Likewise.
2982 (bx_write_pc): Likewise.
2983 (arm_get_next_pcs_addr_bits_remove): Likewise.
2984 (arm_software_single_step): Likewise.
2985 (arm_extract_return_value): Likewise.
2986 (arm_store_return_value): Likewise.
2987 (arm_write_pc): Likewise.
2988 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2989 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2990 (bsd_uthread_store_registers): Likewise.
2991 * core-regset.c (fetch_core_registers): Likewise.
2992 * corelow.c (get_core_registers): Likewise.
2993 * cris-tdep.c (cris_store_return_value): Likewise.
2994 (cris_extract_return_value): Likewise.
2995 (find_step_target): Likewise.
2996 (find_step_target): Likewise.
2997 (cris_software_single_step): Likewise.
2998 * ctf.c (ctf_fetch_registers): Likewise.
2999 * darwin-nat.c (cancel_breakpoint): Likewise.
3000 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3001 * frv-tdep.c (frv_extract_return_value): Likewise.
3002 * ft32-tdep.c (ft32_store_return_value): Likewise.
3003 (ft32_extract_return_value): Likewise.
3004 * go32-nat.c (fetch_register): Likewise.
3005 (go32_fetch_registers): Likewise.
3006 (go32_store_registers): Likewise.
3007 (store_register): Likewise.
3008 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3009 (h8300_store_return_value): Likewise.
3010 * hppa-linux-nat.c (fetch_register): Likewise.
3011 (store_register): Likewise.
3012 (hppa_linux_fetch_inferior_registers): Likewise.
3013 (hppa_linux_store_inferior_registers): Likewise.
3014 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3015 (i386_darwin_store_inferior_registers): Likewise.
3016 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3017 (gnu_store_registers): Likewise.
3018 * i386-linux-nat.c (fetch_register): Likewise.
3019 (store_register): Likewise.
3020 (supply_gregset): Likewise.
3021 (fill_gregset): Likewise.
3022 (i386_linux_fetch_inferior_registers): Likewise.
3023 (i386_linux_store_inferior_registers): Likewise.
3024 (i386_linux_resume): Likewise.
3025 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3026 Likewise.
3027 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3028 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3029 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3030 (i386obsd_collect_uthread): Likewise.
3031 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3032 (i386_supply_gregset): Likewise.
3033 (i386_collect_gregset): Likewise.
3034 (i386_supply_fpregset): Likewise.
3035 (i386_collect_fpregset): Likewise.
3036 (i386_mpx_bd_base): Likewise.
3037 * i386-v4-nat.c (supply_fpregset): Likewise.
3038 (fill_fpregset): Likewise.
3039 * i387-tdep.c (i387_supply_fsave): Likewise.
3040 (i387_collect_fsave): Likewise.
3041 (i387_supply_fxsave): Likewise.
3042 (i387_collect_fxsave): Likewise.
3043 (i387_supply_xsave): Likewise.
3044 (i387_collect_xsave): Likewise.
3045 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3046 (ia64_linux_store_registers): Likewise.
3047 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3048 (ia64_extract_return_value): Likewise.
3049 (ia64_store_return_value): Likewise.
3050 (find_func_descr): Likewise.
3051 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3052 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3053 (inf_ptrace_store_registers): Likewise.
3054 * infrun.c (use_displaced_stepping): Likewise.
3055 (displaced_step_prepare_throw): Likewise.
3056 (resume): Likewise.
3057 (proceed): Likewise.
3058 (do_target_wait): Likewise.
3059 (adjust_pc_after_break): Likewise.
3060 (handle_inferior_event_1): Likewise.
3061 (handle_signal_stop): Likewise.
3062 (save_infcall_suspend_state): Likewise.
3063 (restore_infcall_suspend_state): Likewise.
3064 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3065 * jit.c (jit_frame_prev_register): Likewise.
3066 * linux-nat.c (save_stop_reason): Likewise.
3067 (linux_nat_wait_1): Likewise.
3068 (resume_stopped_resumed_lwps): Likewise.
3069 * linux-record.c (record_linux_sockaddr): Likewise.
3070 (record_linux_msghdr): Likewise.
3071 (record_linux_system_call): Likewise.
3072 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3073 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3074 (lm32_store_return_value): Likewise.
3075 * m32c-tdep.c (m32c_read_flg): Likewise.
3076 (m32c_pseudo_register_read): Likewise.
3077 (m32c_pseudo_register_write): Likewise.
3078 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3079 (m32r_linux_collect_gregset): Likewise.
3080 * m32r-tdep.c (m32r_store_return_value): Likewise.
3081 (m32r_extract_return_value): Likewise.
3082 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3083 (m68kbsd_collect_fpregset): Likewise.
3084 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3085 * m68k-linux-nat.c (fetch_register): Likewise.
3086 (old_fetch_inferior_registers): Likewise.
3087 (old_store_inferior_registers): Likewise.
3088 (store_regs): Likewise.
3089 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3090 (m68k_svr4_store_return_value): Likewise.
3091 * m88k-tdep.c (m88k_store_arguments): Likewise.
3092 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3093 (mi_cmd_data_write_register_values): Likewise.
3094 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3095 (mips_fbsd_store_inferior_registers): Likewise.
3096 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3097 (mips_fbsd_supply_gregs): Likewise.
3098 (mips_fbsd_collect_fpregs): Likewise.
3099 (mips_fbsd_collect_gregs): Likewise.
3100 (mips_fbsd_supply_fpregset): Likewise.
3101 (mips_fbsd_collect_fpregset): Likewise.
3102 (mips_fbsd_supply_gregset): Likewise.
3103 (mips_fbsd_collect_gregset): Likewise.
3104 * mips-linux-nat.c (supply_gregset): Likewise.
3105 (fill_gregset): Likewise.
3106 (supply_fpregset): Likewise.
3107 (fill_fpregset): Likewise.
3108 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3109 (mips_fill_gregset): Likewise.
3110 (mips_supply_fpregset): Likewise.
3111 (mips_fill_fpregset): Likewise.
3112 (mips64_supply_gregset): Likewise.
3113 (micromips_linux_sigframe_validate): Likewise.
3114 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3115 (mipsnbsd_fetch_inferior_registers): Likewise.
3116 (mipsnbsd_store_inferior_registers): Likewise.
3117 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3118 (mipsnbsd_supply_gregset): Likewise.
3119 (mipsnbsd_iterate_over_regset_sections): Likewise.
3120 (mipsnbsd_supply_reg): Likewise.
3121 (mipsnbsd_supply_fpreg): Likewise.
3122 * mips-tdep.c (mips_in_frame_stub): Likewise.
3123 (mips_dummy_id): Likewise.
3124 (is_octeon_bbit_op): Likewise.
3125 (micromips_bc1_pc): Likewise.
3126 (extended_mips16_next_pc): Likewise.
3127 (mips16_next_pc): Likewise.
3128 (deal_with_atomic_sequence): Likewise.
3129 * moxie-tdep.c (moxie_process_readu): Likewise.
3130 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3131 * nto-procfs.c (procfs_store_registers): Likewise.
3132 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3133 (ppcfbsd_store_inferior_registers): Likewise.
3134 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3135 (fetch_altivec_register): Likewise.
3136 (get_spe_registers): Likewise.
3137 (fetch_spe_register): Likewise.
3138 (fetch_altivec_registers): Likewise.
3139 (fetch_all_gp_regs): Likewise.
3140 (fetch_all_fp_regs): Likewise.
3141 (store_vsx_register): Likewise.
3142 (store_altivec_register): Likewise.
3143 (set_spe_registers): Likewise.
3144 (store_spe_register): Likewise.
3145 (store_altivec_registers): Likewise.
3146 (store_all_gp_regs): Likewise.
3147 (store_all_fp_regs): Likewise.
3148 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3149 (ppc_linux_collect_gregset): Likewise.
3150 (ppc_canonicalize_syscall): Likewise.
3151 (ppc_linux_record_signal): Likewise.
3152 (ppu2spu_prev_register): Likewise.
3153 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3154 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3155 (ppcobsd_store_registers): Likewise.
3156 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3157 Likewise.
3158 (ppc_ravenscar_generic_store_registers): Likewise.
3159 * procfs.c (procfs_fetch_registers): Likewise.
3160 (procfs_store_registers): Likewise.
3161 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3162 (ravenscar_store_registers): Likewise.
3163 (ravenscar_prepare_to_store): Likewise.
3164 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3165 * record-full.c (record_full_wait_1): Likewise.
3166 (record_full_registers_change): Likewise.
3167 (record_full_store_registers): Likewise.
3168 (record_full_core_fetch_registers): Likewise.
3169 (record_full_save): Likewise.
3170 (record_full_goto_insn): Likewise.
3171 * regcache.c (regcache_register_size): Likewise.
3172 (get_regcache_arch): Remove.
3173 (regcache_read_pc): Likewise.
3174 * regcache.h (get_regcache_arch): Remove.
3175 * remote-sim.c (gdbsim_fetch_register): Likewise.
3176 (gdbsim_store_register): Likewise.
3177 * remote.c (fetch_register_using_p): Likewise.
3178 (send_g_packet): Likewise.
3179 (remote_prepare_to_store): Likewise.
3180 (store_registers_using_G): Likewise.
3181 * reverse.c (save_bookmark_command): Likewise.
3182 (goto_bookmark_command): Likewise.
3183 * rs6000-aix-tdep.c (branch_dest): Likewise.
3184 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3185 (fetch_register): Likewise.
3186 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3187 (ppc_collect_reg): Likewise.
3188 (ppc_collect_gregset): Likewise.
3189 (ppc_collect_fpregset): Likewise.
3190 (ppc_collect_vsxregset): Likewise.
3191 (ppc_collect_vrregset): Likewise.
3192 (ppc_displaced_step_hw_singlestep): Likewise.
3193 (rs6000_pseudo_register_read): Likewise.
3194 (rs6000_pseudo_register_write): Likewise.
3195 * s390-linux-nat.c (supply_gregset): Likewise.
3196 (fill_gregset): Likewise.
3197 (s390_linux_fetch_inferior_registers): Likewise.
3198 * s390-linux-tdep.c (s390_write_pc): Likewise.
3199 (s390_software_single_step): Likewise.
3200 (s390_all_but_pc_registers_record): Likewise.
3201 (s390_linux_syscall_record): Likewise.
3202 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3203 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3204 (shnbsd_store_inferior_registers): Likewise.
3205 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3206 (sh_extract_return_value_fpu): Likewise.
3207 (sh_store_return_value_nofpu): Likewise.
3208 (sh_corefile_supply_regset): Likewise.
3209 (sh_corefile_collect_regset): Likewise.
3210 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3211 (sh64_store_return_value): Likewise.
3212 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3213 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3214 (sparc_store_inferior_registers): Likewise.
3215 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3216 (sparc_ravenscar_prepare_to_store): Likewise.
3217 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3218 (sparc_analyze_control_transfer): Likewise.
3219 (sparc_step_trap): Likewise.
3220 (sparc_software_single_step): Likewise.
3221 (sparc32_gdbarch_init): Likewise.
3222 (sparc_supply_rwindow): Likewise.
3223 (sparc_collect_rwindow): Likewise.
3224 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3225 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3226 (sparc64nbsd_collect_gregset): Likewise.
3227 (sparc64nbsd_supply_fpregset): Likewise.
3228 (sparc64nbsd_collect_fpregset): Likewise.
3229 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3230 (sparc64_supply_gregset): Likewise.
3231 (sparc64_collect_gregset): Likewise.
3232 (sparc64_supply_fpregset): Likewise.
3233 (sparc64_collect_fpregset): Likewise.
3234 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3235 * spu-tdep.c (spu_unwind_sp): Likewise.
3236 (spu2ppu_prev_register): Likewise.
3237 (spu_memory_remove_breakpoint): Likewise.
3238 * stack.c (return_command): Likewise.
3239 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3240 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3241 * tracefile.c (trace_save_ctf): Likewise.
3242 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3243 (do_windows_store_inferior_registers): Likewise.
3244 (windows_resume): Likewise.
3245 * xtensa-linux-nat.c (fill_gregset): Likewise.
3246 (supply_gregset_reg): Likewise.
3247 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3248 (xtensa_register_read_masked): Likewise.
3249 (xtensa_supply_gregset): Likewise.
3250 (xtensa_extract_return_value): Likewise.
3251 (xtensa_store_return_value): Likewise.
3252
3253 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3254
3255 * doublest.c (floatformat_from_string): New function.
3256 * doublest.h (floatformat_from_string): Add prototype.
3257
3258 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3259 (OP_FLOAT): ... this.
3260 * expression.h: Do not include "doublest.h".
3261 (union exp_element): Replace doubleconst and decfloatconst by
3262 new element floatconst.
3263 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3264 (ada_evaluate_subexp): Likewise.
3265 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3266 OP_DOUBLE and OP_DECFLOAT.
3267 * expprint.c (print_subexp_standard): Likewise.
3268 (dump_subexp_body_standard): Likewise.
3269 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3270
3271 * parse.c: Include "dfp.h".
3272 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3273 (write_exp_elt_floatcst): New function.
3274 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3275 and OP_DECFLOAT.
3276 (operator_check_standard): Likewise.
3277 (parse_float): Do not accept suffix. Take type as input. Return bool.
3278 Return target format buffer instead of host DOUBLEST.
3279 Use floatformat_from_string and decimal_from_string to parse
3280 either binary or decimal floating-point types.
3281 (parse_c_float): Remove.
3282 * parser-defs.h: Do not include "doublest.h".
3283 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3284 (write_exp_elt_floatcst): Add prototype.
3285 (parse_float): Update prototype.
3286 (parse_c_float): Remove.
3287
3288 * c-exp.y: Do not include "dfp.h".
3289 (typed_val_float): Use byte buffer instead of DOUBLEST.
3290 (typed_val_decfloat): Remove.
3291 (DECFLOAT): Remove.
3292 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3293 (parse_number): Update to new parse_float interface.
3294 Parse suffixes and determine type before calling parse_float.
3295 Handle decimal and binary FP types the same way.
3296
3297 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3298 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3299 (parse_number): Update to new parse_float interface.
3300 Parse suffixes and determine type before calling parse_float.
3301
3302 * f-exp.y: Replace dval by typed_val_float.
3303 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3304 (parse_number): Use parse_float instead of atof.
3305
3306 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3307 (parse_go_float): Remove.
3308 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3309 (parse_number): Call parse_float instead of parse_go_float.
3310 Parse suffixes and determine type before calling parse_float.
3311
3312 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3313 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3314 (parse_number): Update to new parse_float interface.
3315 Parse suffixes and determine type before calling parse_float.
3316
3317 * m2-exp.y: Replace dval by byte buffer val.
3318 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3319 (parse_number): Call parse_float instead of atof.
3320
3321 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3322 (lex_number): Call parse_float instead of strtod.
3323 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3324 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3325 Use write_exp_elt_floatcst.
3326 (unit_testing): Remove static variable.
3327 (rust_type): Do not check unit_testing.
3328 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3329
3330 * ada-exp.y (type_float, type_double): Remove.
3331 (typed_val_float): Use byte buffer instead of DOUBLEST.
3332 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3333 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3334
3335 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3336
3337 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3338 * arch/aarch64.h: New file.
3339
3340 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3341
3342 * dfp.h (decimal_from_string): Use const reference for argument.
3343 * dfp.c (decimal_from_string): Likewise.
3344
3345 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3346
3347 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3348 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3349 * mips-tdep.c (mips_print_fp_register): Likewise.
3350
3351 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3352
3353 * common/format.h (enum argclass): Replace decfloat_arg by
3354 dec32float_arg, dec64float_arg, and dec128float_arg.
3355 * common/format.c (parse_format_string): Update to return
3356 new decimal float argument classes.
3357
3358 * printcmd.c (printf_decfloat): Rename to ...
3359 (printf_floating): ... this. Add argclass argument, and use it
3360 instead of parsing the format string again. Add support for
3361 binary floating-point values, using floatformat_to_string.
3362 Convert value to the target format if it doesn't already match.
3363 (ui_printf): Call printf_floating instead of printf_decfloat,
3364 also for double_arg / long_double_arg. Pass argclass.
3365
3366 * dfp.c (decimal_to_string): Add format string argument.
3367 * dfp.h (decimal_to_string): Likewise.
3368
3369 * doublest.c (floatformat_to_string): Add format string argument.
3370 * doublest.h (floatformat_to_string): Likewise.
3371
3372 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3373
3374 * doublest.c (floatformat_precision): New routine.
3375 (floatformat_to_string): Likewise.
3376 * doublest.c (floatformat_to_string): Add prototype.
3377
3378 * printcmd.c (print_scalar_formatted): Only call print_floating
3379 on floating-point types.
3380 * valprint.c: Do not include "floatformat.h".
3381 (generic_val_print_decfloat): Remove.
3382 (generic_val_print): Call generic_val_print_float for both
3383 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3384 (print_floating): Use floatformat_to_string. Handle decimal float.
3385 (print_decimal_floating): Remove, merge into floatformat_to_string.
3386 * value.h (print_decimal_floating): Remove.
3387
3388 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3389
3390 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3391
3392 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3393
3394 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3395
3396 * memattr.h: Don't include vec.h.
3397 (struct mem_attrib): Initialize fields.
3398 <unknown>: New static method.
3399 (struct mem_region): Add constructors, operator<, initialize
3400 fields.
3401 * memattr.c: Include algorithm.
3402 (default_mem_attrib, unknown_mem_attrib): Remove.
3403 (user_mem_region_list): New global.
3404 (target_mem_region_list, mem_region_list): Change type to
3405 std::vector<mem_region>.
3406 (mem_use_target): Now a function.
3407 (target_mem_regions_valid): Change type to bool.
3408 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3409 (require_user_regions): Adjust.
3410 (require_target_regions): Adjust.
3411 (create_mem_region): Adjust.
3412 (lookup_mem_region): Adjust.
3413 (invalidate_target_mem_regions): Adjust.
3414 (mem_clear): Rename to...
3415 (user_mem_clear): ... this, and adjust.
3416 (mem_command): Adjust.
3417 (info_mem_command): Adjust.
3418 (mem_enable, enable_mem_command, mem_disable,
3419 disable_mem_command): Adjust.
3420 (mem_delete): Adjust.
3421 (delete_mem_command): Adjust.
3422 * memory-map.h (parse_memory_map): Return an std::vector.
3423 * memory-map.c (parse_memory_map): Likewise.
3424 (struct memory_map_parsing_data): Add constructor.
3425 <memory_map>: Point to std::vector.
3426 (memory_map_start_memory): Adjust.
3427 (memory_map_end_memory): Adjust.
3428 (memory_map_end_property): Adjust.
3429 (clear_result): Remove.
3430 * remote.c (remote_memory_map): Return an std::vector.
3431 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3432 Remove.
3433 (target_debug_print_mem_region_vector): New.
3434 * target-delegates.c: Regenerate.
3435 * target.h (mem_region_vector): New typedef.
3436 (to_memory_map): Return mem_region_vector.
3437 (target_memory_map): Return an std::vector.
3438 * target.c (target_memory_map): Return an std::vector.
3439 (flash_erase_command): Adjust.
3440
3441 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3442
3443 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3444 Change type to std::string.
3445 (memory_map_start_property): Adjust.
3446 (memory_map_end_property): Adjust.
3447
3448 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3449
3450 * infrun.h: Include common/byte-vector.h.
3451 (struct displaced_step_closure): New struct.
3452 (struct buf_displaced_step_closure): New struct.
3453 * infrun.c (displaced_step_closure::~displaced_step_closure):
3454 Provide default implementation.
3455 (displaced_step_clear): Deallocate step closure with delete.
3456 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3457 (aarch64_displaced_step_closure): ... this, extend
3458 displaced_step_closure.
3459 (aarch64_displaced_step_data) <dsc>: Change type to
3460 aarch64_displaced_step_closure.
3461 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3462 unique_ptr.
3463 (aarch64_displaced_step_fixup): Add cast for displaced step
3464 closure.
3465 * amd64-tdep.c (displaced_step_closure): Rename to ...
3466 (amd64_displaced_step_closure): ... this, extend
3467 displaced_step_closure.
3468 <insn_buf>: Change type to std::vector<gdb_byte>.
3469 <max_len>: Remove.
3470 (fixup_riprel): Change type of DSC parameter, adjust to type
3471 change of insn_buf.
3472 (fixup_displaced_copy): Change type of DSC parameter.
3473 (amd64_displaced_step_copy_insn): Instantiate
3474 amd64_displaced_step_closure.
3475 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3476 to type change of insn_buf.
3477 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3478 parameter DSC.
3479 (arm_linux_copy_svc): Likewise.
3480 (cleanup_kernel_helper_return): Likewise.
3481 (arm_catch_kernel_helper_return): Likewise.
3482 (arm_linux_displaced_step_copy_insn): Instantiate
3483 arm_displaced_step_closure.
3484 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3485 (displaced_read_reg): Change type of parameter DSC.
3486 (branch_write_pc): Likewise.
3487 (load_write_pc): Likewise.
3488 (alu_write_pc): Likewise.
3489 (displaced_write_reg): Likewise.
3490 (arm_copy_unmodified): Likewise.
3491 (thumb_copy_unmodified_32bit): Likewise.
3492 (thumb_copy_unmodified_16bit): Likewise.
3493 (cleanup_preload): Likewise.
3494 (install_preload): Likewise.
3495 (arm_copy_preload): Likewise.
3496 (thumb2_copy_preload): Likewise.
3497 (install_preload_reg): Likewise.
3498 (arm_copy_preload_reg): Likewise.
3499 (cleanup_copro_load_store): Likewise.
3500 (install_copro_load_store): Likewise.
3501 (arm_copy_copro_load_store) Likewise.
3502 (thumb2_copy_copro_load_store): Likewise.
3503 (cleanup_branch): Likewise.
3504 (install_b_bl_blx): Likewise.
3505 (arm_copy_b_bl_blx): Likewise.
3506 (thumb2_copy_b_bl_blx): Likewise.
3507 (thumb_copy_b): Likewise.
3508 (install_bx_blx_reg): Likewise.
3509 (arm_copy_bx_blx_reg): Likewise.
3510 (thumb_copy_bx_blx_reg): Likewise.
3511 (cleanup_alu_imm): Likewise.
3512 (arm_copy_alu_imm): Likewise.
3513 (thumb2_copy_alu_imm): Likewise.
3514 (cleanup_alu_reg): Likewise.
3515 (install_alu_reg): Likewise.
3516 (arm_copy_alu_reg): Likewise.
3517 (thumb_copy_alu_reg): Likewise.
3518 (cleanup_alu_shifted_reg): Likewise.
3519 (install_alu_shifted_reg): Likewise.
3520 (arm_copy_alu_shifted_reg): Likewise.
3521 (cleanup_load): Likewise.
3522 (cleanup_store): Likewise.
3523 (arm_copy_extra_ld_st): Likewise.
3524 (install_load_store): Likewise.
3525 (thumb2_copy_load_literal): Likewise.
3526 (thumb2_copy_load_reg_imm): Likewise.
3527 (arm_copy_ldr_str_ldrb_strb): Likewise.
3528 (cleanup_block_load_all): Likewise.
3529 (cleanup_block_store_pc): Likewise.
3530 (cleanup_block_load_pc): Likewise.
3531 (arm_copy_block_xfer): Likewise.
3532 (thumb2_copy_block_xfer): Likewise.
3533 (cleanup_svc): Likewise.
3534 (install_svc): Likewise.
3535 (arm_copy_svc): Likewise.
3536 (thumb_copy_svc): Likewise.
3537 (arm_copy_undef): Likewise.
3538 (thumb_32bit_copy_undef): Likewise.
3539 (arm_copy_unpred): Likewise.
3540 (arm_decode_misc_memhint_neon): Likewise.
3541 (arm_decode_unconditional): Likewise.
3542 (arm_decode_miscellaneous): Likewise.
3543 (arm_decode_dp_misc): Likewise.
3544 (arm_decode_ld_st_word_ubyte): Likewise.
3545 (arm_decode_media): Likewise.
3546 (arm_decode_b_bl_ldmstm): Likewise.
3547 (arm_decode_ext_reg_ld_st): Likewise.
3548 (thumb2_decode_dp_shift_reg): Likewise.
3549 (thumb2_decode_ext_reg_ld_st): Likewise.
3550 (arm_decode_svc_copro): Likewise.
3551 (thumb2_decode_svc_copro): Likewise.
3552 (install_pc_relative): Likewise.
3553 (thumb_copy_pc_relative_16bit): Likewise.
3554 (thumb_decode_pc_relative_16bit): Likewise.
3555 (thumb_copy_pc_relative_32bit): Likewise.
3556 (thumb_copy_16bit_ldr_literal): Likewise.
3557 (thumb_copy_cbnz_cbz): Likewise.
3558 (thumb2_copy_table_branch): Likewise.
3559 (cleanup_pop_pc_16bit_all): Likewise.
3560 (thumb_copy_pop_pc_16bit): Likewise.
3561 (thumb_process_displaced_16bit_insn): Likewise.
3562 (decode_thumb_32bit_ld_mem_hints): Likewise.
3563 (thumb_process_displaced_32bit_insn): Likewise.
3564 (thumb_process_displaced_insn): Likewise.
3565 (arm_process_displaced_insn): Likewise.
3566 (arm_displaced_init_closure): Likewise.
3567 (arm_displaced_step_fixup): Add cast for closure.
3568 * arm-tdep.h: Include infrun.h.
3569 (displaced_step_closure): Rename to ...
3570 (arm_displaced_step_closure): ... this, extend
3571 displaced_step_closure.
3572 <u::svc::copy_svc_os>: Change type of parameter DSC.
3573 <cleanup>: Likewise.
3574 (arm_process_displaced_insn): Likewise.
3575 (arm_displaced_init_closure): Likewise.
3576 (displaced_read_reg): Likewise.
3577 (displaced_write_reg): Likewise.
3578 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3579 Adjust.
3580 * i386-tdep.h: Include infrun.h.
3581 (i386_displaced_step_closure): New typedef.
3582 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3583 i386_displaced_step_closure.
3584 (i386_displaced_step_fixup): Adjust.
3585 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3586 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3587 and unique_ptr.
3588 (ppc_displaced_step_fixup): Adjust.
3589 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3590 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3591 and unique_ptr.
3592 (s390_displaced_step_fixup): Adjust.
3593
3594 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3595
3596 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3597 Remove declarations.
3598
3599 2017-10-20 Tom Tromey <tom@tromey.com>
3600
3601 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3602 std::vector.
3603 (gdb_bfd_record_inclusion): Update.
3604 (bfdp): Remove typedef.
3605
3606 2017-10-20 Tom Tromey <tom@tromey.com>
3607
3608 * gdb_bfd.c (gdb_bfd_ref): Use new.
3609 (struct gdb_bfd_data): Add constructor, destructor, and member
3610 initializers.
3611 (gdb_bfd_unref): Use delete.
3612
3613 2017-10-20 Tom Tromey <tom@tromey.com>
3614
3615 * exec.c (exec_file_attach): Use new_bfd_ref.
3616 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3617 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3618 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3619 new_bfd_ref.
3620 * gdb_bfd.h (new_bfd_ref): New function.
3621
3622 2017-10-20 Pedro Alves <palves@redhat.com>
3623
3624 * main.c (captured_command_loop): Add attribute noinline.
3625
3626 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * interps.c (struct interp_factory): Add constructor.
3629 (interp_factory_p): Remove typedef.
3630 (DEF_VEC_P(interp_factory_p)): Remove.
3631 (interpreter_factories): Change type to std::vector.
3632 (interp_factory_register): Adjust.
3633 (interp_lookup): Adjust.
3634 (interpreter_completer): Adjust.
3635
3636 2017-10-19 Tom Tromey <tom@tromey.com>
3637
3638 * break-catch-syscall.c (catch_syscall_completer): Use
3639 std::string, gdb::unique_xmalloc_ptr.
3640
3641 2017-10-19 Tom Tromey <tom@tromey.com>
3642
3643 * infcall.c (call_function_by_hand_dummy): Use std::string.
3644
3645 2017-10-19 Tom Tromey <tom@tromey.com>
3646
3647 * mi/mi-main.c (mi_cmd_execute): Update.
3648 * top.h (prepare_execute_command): Return scoped_value_mark.
3649 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3650 Add move constructor.
3651 * top.c (prepare_execute_command): Return scoped_value_mark.
3652 (execute_command): Update.
3653
3654 2017-10-19 Pedro Alves <palves@redhat.com>
3655
3656 * xml-support.c (xml_fetch_content_from_file): Check fread's
3657 return.
3658
3659 2017-10-19 Pedro Alves <palves@redhat.com>
3660
3661 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3662 async.
3663 (handle_error_fd): New function.
3664 (ser_base_async): Add/delete an event loop file handler for
3665 error_fd.
3666
3667 2017-10-19 Pedro Alves <palves@redhat.com>
3668
3669 * xml-support.c (xml_fetch_content_from_file): Don't read in
3670 chunks. Instead use fseek to determine the file's size, and read
3671 it in one go.
3672
3673 2017-11-18 Keith Seitz <keiths@redhat.com>
3674
3675 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3676 types.
3677 Add whitespace to front of type name.
3678
3679 2017-10-18 Keith Seitz <keiths@redhat.com>
3680
3681 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3682 DW_AT_accessibility.
3683
3684 2017-10-18 Yao Qi <yao.qi@linaro.org>
3685
3686 * features/tic6x-c62x-linux.c: Remove.
3687
3688 2017-10-17 Tom Tromey <tom@tromey.com>
3689
3690 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3691 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3692 (do_mixed_source_and_assembly): Likewise.
3693
3694 2017-10-17 Tom Tromey <tom@tromey.com>
3695
3696 * regcache.c (regcache::xfer_part): Remove assertion.
3697
3698 2017-10-17 Pedro Alves <palves@redhat.com>
3699
3700 * xml-support.c (xml_fetch_content_from_file): Call
3701 unique_ptr::release() instead unique_ptr::get() when passing
3702 through xrealloc.
3703
3704 2017-10-17 Yao Qi <yao.qi@linaro.org>
3705
3706 * regcache.c (regcache::xfer_part): Remove parameters read and
3707 write, add parameter is_raw. All callers are updated.
3708
3709 2017-10-16 Keith Seitz <keiths@redhat.com>
3710
3711 * c-typeprint.c (enum access_specifier): Moved here from
3712 c_type_print_base.
3713 (output_access_specifier): New function.
3714 (c_type_print_base): Consider typedefs when assessing
3715 whether access labels are needed.
3716 Use output_access_specifier as needed.
3717 Output access specifier for typedefs, if needed.
3718 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3719 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3720 fields.
3721 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3722 accessor macros.
3723
3724 2017-10-16 Tom Tromey <tom@tromey.com>
3725
3726 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3727 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3728 * target.c (target_fileio_read_stralloc): Update.
3729 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3730 * target.h (target_fileio_read_stralloc): Return
3731 unique_xmalloc_ptr.
3732
3733 2017-10-16 Tom Tromey <tom@tromey.com>
3734
3735 * xml-syscall.c (xml_init_syscalls_info): Update.
3736 * xml-support.c (xinclude_start_include): Update.
3737 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3738 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3739 (xml_fetch_content_from_file): Likewise.
3740 * osdata.c (get_osdata): Update.
3741 * target.h (target_read_stralloc, target_get_osdata): Return
3742 unique_xmalloc_ptr.
3743 * solib-aix.c (solib_aix_get_library_list): Update.
3744 * solib-target.c (solib_target_current_sos): Update.
3745 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3746 * xml-tdesc.c (fetch_available_features_from_target): Update.
3747 (target_fetch_description_xml): Update.
3748 (file_read_description_xml): Update.
3749 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3750 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3751 (remote_pid_to_exec_file): Update.
3752 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3753 (target_get_osdata): Likewise.
3754
3755 2017-10-16 Tom Tromey <tom@tromey.com>
3756
3757 * remote.c (remote_register_number_and_offset): Use std::vector.
3758 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3759 (putpkt_binary): Use gdb::def_vector.
3760 (compare_sections_command): Use gdb::byte_vector.
3761
3762 2017-10-16 Tom Tromey <tom@tromey.com>
3763
3764 * ppc-linux-nat.c (hwdebug_insert_point): Use
3765 gdb::unique_xmalloc_ptr, XDUP.
3766
3767 2017-10-16 Tom Tromey <tom@tromey.com>
3768
3769 * probe.c (parse_probes): Use std::string.
3770 (info_probes_for_ops, enable_probes_command)
3771 (disable_probes_command): Remove cleanups.
3772
3773 2017-10-16 Tom Tromey <tom@tromey.com>
3774
3775 * buildsym.c (block_compar): Remove.
3776 (end_symtab_get_static_block): Use std::vector.
3777
3778 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3779
3780 * memrange.h (struct mem_range): Define operator< and operator==.
3781 (mem_range_s): Remove.
3782 (DEF_VEC_O (mem_range_s)): Remove.
3783 (normalize_mem_ranges): Change parameter type to std::vector.
3784 * memrange.c (compare_mem_ranges): Remove.
3785 (normalize_mem_ranges): Change parameter type to std::vector,
3786 adjust to vector change.
3787 * exec.c (section_table_available_memory): Return vector, remove
3788 parameter.
3789 (section_table_read_available_memory): Adjust to std::vector
3790 change.
3791 * remote.c (remote_read_bytes): Adjust to std::vector
3792 change.
3793 * tracepoint.h (traceframe_available_memory): Change parameter
3794 type to std::vector.
3795 * tracepoint.c (traceframe_available_memory): Change parameter
3796 type to std::vector, adjust.
3797 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3798 std::vector change.
3799 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3800 unittests/memrange-selftests.c.
3801 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3802 * gdb/unittests/memrange-selftests.c: New file.
3803
3804 2017-10-16 Pedro Alves <palves@redhat.com>
3805
3806 * elfread.c (probe_key_free): Rename range-for variable.
3807 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3808 (find_probe_by_pc, collect_probes): Rename range-for variable.
3809
3810 2017-10-16 Yao Qi <yao.qi@linaro.org>
3811
3812 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3813 * features/tic6x-c62x.c: Remove.
3814 * features/tic6x-c64x-linux.c: Remove.
3815 * features/tic6x-c64x.c: Remove.
3816 * features/tic6x-c64xp-linux.c: Remove.
3817 * features/tic6x-c64xp.c: Remove.
3818 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3819 initialize_tdesc_tic6x_*_linux functions.
3820 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3821 initialize_tdesc_tic6x_* functions.
3822
3823 2017-10-16 Yao Qi <yao.qi@linaro.org>
3824
3825 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3826 tic6x-c62x.
3827 * regformats/tic6x-c62x.dat: Remove.
3828 * regformats/tic6x-c64x.dat: Remove.
3829 * regformats/tic6x-c64xp.dat: Remove.
3830
3831 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3832
3833 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3834 (the !HAVE_LIBEXPAT version).
3835
3836 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3837
3838 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3839 const.
3840
3841 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3842
3843 * target.h: Include tracepoint.h.
3844 (enum trace_find_type): Move to tracepoint.h.
3845 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3846 * tracepoint.h: Don't include target.h
3847 (enum trace_find_type): Move from target.h.
3848 (parse_traceframe_info): Return a unique ptr.
3849 * tracepoint.c (current_traceframe_info): Change type to unique
3850 ptr.
3851 (free_traceframe_info): Remove.
3852 (clear_traceframe_info): Don't manually free
3853 current_traceframe_info.
3854 (free_result): Remove.
3855 (parse_traceframe_info): Return a unique ptr.
3856 (get_traceframe_info): Adjust to unique ptr.
3857 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3858 * remote.c (remote_traceframe_info): Return a unique ptr.
3859 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3860 ptr.
3861 * target-debug.h (target_debug_print_traceframe_info_up): New
3862 macro.
3863 * target-delegates.c: Regenerate.
3864
3865 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * memrange.h (struct mem_range): Add constructors.
3868 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3869 std::vector<mem_range>.
3870 * tracepoint.c (free_traceframe_info): Don't manually free
3871 vector.
3872 (traceframe_info_start_memory): Adjust to vector change.
3873 (traceframe_available_memory): Likewise.
3874 * tracefile-tfile.c (build_traceframe_info): Likewise.
3875 * ctf.c (ctf_traceframe_info): Likewise.
3876
3877 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3878
3879 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3880 std::vector<int>.
3881 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3882 (traceframe_info_start_tvar): Adjust to vector change.
3883 (parse_traceframe_info): Allocate with new.
3884 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3885 vector change.
3886 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3887 change.
3888 tfile_traceframe_info): Allocate with new.
3889 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3890 change.
3891
3892 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3893
3894 * tracepoint.c (traceframe_info): Rename to...
3895 (current_traceframe_info): ...this.
3896 (clear_traceframe_info): Adjust.
3897 (get_traceframe_info): Adjust.
3898
3899 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3900
3901 * nat/linux-osdata.c: Include algorithm.
3902 (compare_processes): Remove.
3903 (struct pid_pgid_entry): New struct.
3904 (linux_xfer_osdata_processgroups): Use std::vector instead of
3905 XNEWVEC.
3906
3907 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3908
3909 * objfiles.h: Don't include symfile.h.
3910 (struct partial_symbol): Remove forward-declaration.
3911 (struct objfile) <global_psymbols, static_psymbols>: Change type
3912 to std::vector<partial_symbol *>.
3913 * objfiles.c (objfile::objfile): Don't memset those fields.
3914 (objfile::~objfile): Don't free those fields.
3915 * psympriv.h (struct psymbol_allocation_list): Remove
3916 forward-declaration.
3917 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3918 to std::vector.
3919 (start_psymtab_common): Change parameters to std::vector.
3920 * psymtab.c: Include algorithm.
3921 (require_partial_symbols): Call shrink_to_fit.
3922 (find_pc_sect_psymbol): Adjust to vector change.
3923 (match_partial_symbol): Likewise.
3924 (lookup_partial_symbol): Likewise.
3925 (psym_relocate): Likewise.
3926 (dump_psymtab): Likewise.
3927 (recursively_search_psymtabs): Likewise.
3928 (compare_psymbols): Remove.
3929 (sort_pst_symbols): Adjust to vector change.
3930 (start_psymtab_common): Likewise.
3931 (end_psymtab_common): Likewise.
3932 (psymbol_bcache_full): De-constify return value.
3933 (add_psymbol_to_bcache): Likewise.
3934 (extend_psymbol_list): Remove.
3935 (append_psymbol_to_list): Adjust to vector change.
3936 (add_psymbol_to_list): Likewise.
3937 (init_psymbol_list): Likewise.
3938 (maintenance_info_psymtabs): Likewise.
3939 (maintenance_check_psymtabs): Likewise.
3940 * symfile.h (struct psymbol_allocation_list): Remove.
3941 * symfile.c (reread_symbols): Adjust to vector change.
3942 * dbxread.c (start_psymtab): Change type of parameters.
3943 (dbx_symfile_read): Adjust to vector change.
3944 (read_dbx_symtab): Likewise.
3945 (start_psymtab): Change type of parameters.
3946 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3947 (create_partial_symtab): Likewise.
3948 (add_partial_symbol): Likewise.
3949 (write_one_signatured_type): Likewise.
3950 (recursively_write_psymbols): Likewise.
3951 * mdebugread.c (parse_partial_symbols): Likewise.
3952 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3953 (scan_xcoff_symtab): Adjust to vector change.
3954 (xcoff_initial_scan): Likewise.
3955
3956 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3957
3958 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3959
3960 2017-10-13 Yao Qi <yao.qi@linaro.org>
3961
3962 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3963 Remove s390x-*-expedite, add s390x-expedite.
3964
3965 2017-10-13 Yao Qi <yao.qi@linaro.org>
3966
3967 * features/s390-gs-linux64.c: Regenerated.
3968 * features/s390x-gs-linux64.c: Regenerated.
3969
3970 2017-10-13 Tom Tromey <tom@tromey.com>
3971
3972 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3973 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3974 delete.
3975 * symfile.c (symbol_file_add_with_addrs): Use new.
3976 (symbol_file_add_separate): Update comment.
3977 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3978 * jit.c (jit_object_close_impl): Use new.
3979 (jit_unregister_code): Use delete.
3980 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3981 (~objfile): Rename from free_objfile.
3982 (free_objfile_separate_debug, do_free_objfile_cleanup)
3983 (free_all_objfiles, objfile_purge_solibs): Use delete.
3984 * objfiles.h (struct objfile): Add constructor and destructor.
3985 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3986 (allocate_objfile, free_objfile): Don't declare.
3987 (struct objstats): Add initializers.
3988
3989 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3992 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3993 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3994 * gdbarch.h: Regenerate.
3995 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3996 Adjust comment.
3997 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3998 (i386_displaced_step_fixup): Adjust comment.
3999 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4000
4001 2017-10-12 Tom Tromey <tom@tromey.com>
4002
4003 * prologue-value.h (pv_area::store_would_trash): Return bool.
4004 (pv_area::find_reg): Likewise.
4005 * prologue-value.c (pv_area::store_would_trash): Return bool.
4006 (pv_area::find_reg): Likewise.
4007
4008 2017-10-12 Tom Tromey <tom@tromey.com>
4009
4010 * s390-linux-tdep.c (s390_store, s390_load)
4011 (s390_check_for_saved, s390_analyze_prologue): Update.
4012 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4013 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4014 * prologue-value.h (class pv_area): Move from prologue-value.c.
4015 Change names of members. Add constructor, destructor, member
4016 functions.
4017 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4018 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4019 (pv_area_fetch, pv_area_scan): Don't declare.
4020 * prologue-value.c (struct pv_area::area_entry): Now member of
4021 pv_area.
4022 (struct pv_area): Move to prologue-value.h.
4023 (pv_area::pv_area): Rename from make_pv_area.
4024 (pv_area::~pv_area): Rename from free_pv_area.
4025 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4026 (clear_entries, find_entry, overlaps, store_would_trash, store)
4027 (fetch, find_reg, scan): Now member of pv_area.
4028 Remove "area" argument. Update.
4029 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4030 Update.
4031 * mn10300-tdep.c (push_reg, check_for_saved)
4032 (mn10300_analyze_prologue): Update.
4033 * mep-tdep.c (is_arg_spill, check_for_saved)
4034 (mep_analyze_prologue): Update.
4035 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4036 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4037 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4038 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4039 Update.
4040 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4041 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4042
4043 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4044
4045 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4046 * linux-nat.c (linux_nat_delete_thread): New variable.
4047 (lwp_free): Invoke linux_nat_delete_thread if set.
4048 (linux_nat_set_delete_thread): New function.
4049 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4050 thread delete callback.
4051 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4052 (_initialize_arm_linux_nat): Assign thread delete callback.
4053 * s390-linux-nat.c (s390_delete_thread): New function.
4054 (_initialize_s390_nat): Assign thread delete callback.
4055 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4056 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4057 function.
4058 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4059 declaration.
4060 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4061 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4062
4063 2017-10-09 Tom Tromey <tom@tromey.com>
4064
4065 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4066 std::string.
4067 * tui/tui-layout.c (enum tui_status): Use std::string.
4068
4069 2017-10-11 Tom Tromey <tom@tromey.com>
4070
4071 * gdbthread.h (thread_command): Constify.
4072 * inferior.h (detach_command): Constify.
4073 * top.h (set_history, show_history): Constify.
4074 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4075 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4076 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4077 * printcmd.c (set_command): Constify.
4078 (non_const_set_command): New function.
4079 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4080 * breakpoint.c (enable_command, disable_command, delete_command)
4081 (catch_command, tcatch_command, set_breakpoint_cmd)
4082 (show_breakpoint_cmd): Constify.
4083 * macrocmd.c (macro_command): Constify.
4084 * infcmd.c (unset_command, kill_command, detach_command)
4085 (info_proc_cmd): Constify.
4086 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4087 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4088 (info_auto_load_cmd): Constify.
4089 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4090 (unset_tdesc_cmd): Constify.
4091 * ada-lang.c (set_ada_command, show_ada_command)
4092 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4093 * guile/guile.c (set_guile_command, show_guile_command)
4094 (info_guile_command): Constify.
4095 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4096 Constify.
4097 * skip.c (skip_command): Constify.
4098 * compile/compile.c (_initialize_compile): Constify.
4099 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4100 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4101 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4102 (maint_btrace_pt_show_cmd): Constify.
4103 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4104 Constify.
4105 * python/python.c (user_show_python, user_set_python): Constify.
4106 * mips-tdep.c (set_mips_command, show_mips_command)
4107 (set_mipsfpu_command): Constify.
4108 * record-btrace.c (cmd_record_btrace_start)
4109 (cmd_set_record_btrace, cmd_show_record_btrace)
4110 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4111 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4112 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4113 Constify.
4114 * symfile.c (overlay_command): Constify.
4115 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4116 * cli/cli-logging.c (set_logging_command, show_logging_command):
4117 Constify.
4118 * cli/cli-dump.c (dump_command, append_command)
4119 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4120 (tekhex_dump_command, binary_dump_command)
4121 (binary_append_command): Constify.
4122 * cli/cli-decode.c (struct cmd_list_element): Change type of
4123 "fun".
4124 * cli/cli-cmds.c (info_command, show_command, set_debug)
4125 (show_debug): Constify.
4126 (show_command): Add non-const overload.
4127 * top.c (set_history, show_history): Constify.
4128 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4129 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4130 * target.c (target_command): Constify.
4131 * sparc64-tdep.c (info_adi_command): Constify.
4132 * record-full.c (cmd_record_full_start): Constify.
4133 (set_record_full_command): Constify. Fix typo.
4134 (show_record_full_command): Constify.
4135 * thread.c (thread_command, thread_apply_command): Constify.
4136 * memattr.c (dummy_cmd): Constify.
4137 * value.c (function_command): Constify.
4138 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4139 * probe.c (info_probes_command): Constify.
4140 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4141 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4142 (show_thread_cmd, set_thread_default_cmd)
4143 (show_thread_default_cmd): Constify.
4144 (check_empty): Constify.
4145 * tracepoint.c (tfind_command): Constify.
4146 * cp-support.c (maint_cplus_command): Constify.
4147 * windows-tdep.c (info_w32_command): Constify.
4148 * record.c (cmd_record_start, set_record_command)
4149 (show_record_command, info_record_command, cmd_record_goto):
4150 Constify.
4151 * ravenscar-thread.c (set_ravenscar_command)
4152 (show_ravenscar_command): Constify.
4153 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4154 Constify.
4155 (add_internal_problem_command): Remove casts.
4156 * arc-tdep.c (maintenance_print_arc_command): Constify.
4157 * valprint.c (set_print, show_print, set_print_raw)
4158 (show_print_raw): Constify.
4159 * maint.c (maintenance_command, maintenance_info_command)
4160 (maintenance_print_command, maintenance_set_cmd)
4161 (maintenance_show_cmd, set_per_command_cmd)
4162 (show_per_command_cmd, maintenance_check_command): Constify.
4163 * language.c (set_check, show_check): Constify.
4164 * typeprint.c (show_print_type, set_print_type): Constify.
4165 * go32-nat.c (go32_info_dos_command): Constify.
4166
4167 2017-10-11 Tom Tromey <tom@tromey.com>
4168
4169 * breakpoint.c (prepare_re_set_context): Remove.
4170 (breakpoint_re_set_one): Update. Don't use cleanups.
4171 (breakpoint_re_set): Use scoped_restore, std::string, and
4172 scoped_restore_current_language.
4173
4174 2017-10-11 Tom Tromey <tom@tromey.com>
4175
4176 * breakpoint.c (commands_command_1): Use std::string.
4177 (cleanup_executing_breakpoints): Remove.
4178 (bpstat_do_actions_1): Use scoped_restore.
4179 (bpstat_check_watchpoint): Use std::string.
4180 (decode_static_tracepoint_spec): Likewise.
4181 (break_range_command): Likewise.
4182 (watch_command_1): Likewise.
4183 (compare_breakpoints): Change argument types.
4184 (clear_command): Use std::vector.
4185 (cleanup_executing_breakpoints): Remove.
4186 (update_global_location_list): Use unique_xmalloc_ptr.
4187 (strace_command): Remove unused declaration.
4188
4189 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4190
4191 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4192 * NEWS: Mention new FreeBSD/arm native configuration.
4193 * configure.host: Add arm*-*-freebsd*.
4194 * configure.nat: Likewise.
4195 * arm-fbsd-nat.c: New file.
4196
4197 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4198
4199 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4200 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4201 * NEWS: Mention new FreeBSD/arm target.
4202 * configure.tgt: Add arm*-*-freebsd*.
4203 * arm-fbsd-tdep.c: New file.
4204 * arm-fbsd-tdep.h: New file.
4205
4206 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4207
4208 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4209 `gdbarch_elfcore_write_linux_prpsinfo'.
4210 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4211 method.
4212 (elf_internal_linux_prpsinfo): Remove declaration.
4213 * gdbarch.h: Regenerate.
4214 * gdbarch.c: Regenerate.
4215
4216 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4217
4218 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4219 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4220
4221 2017-10-11 Pedro Alves <palves@redhat.com>
4222
4223 * breakpoint.c (reattach_breakpoints): Delete.
4224 * breakpoint.h (reattach_breakpoints): Delete.
4225
4226 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4227
4228 * symfile.c (registered_sym_fns): Make struct, not typedef.
4229 (DEF_VEC_O (registered_sym_fns)): Remove.
4230 (symtab_fns): Change type to std::vector.
4231 (add_symtab_fns): Adjust.
4232 (find_sym_fns): Adjust.
4233
4234 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4235
4236 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4237 * arc-tdep.h (arc_arch_is_em): New function.
4238 (arc_arch_is_hs): Likewise.
4239
4240 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4241
4242 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4243 parentheses in the declaration.
4244 (macro_lookup_inclusion): Likewise.
4245 (macro_lookup_definition): Likewise.
4246 * p-lang.h (pascal_builtin_types): Likewise.
4247 * tui/tui-data.c (tui_win_list): Likewise.
4248 * tui/tui-data.h (tui_win_list): Likewise.
4249 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4250
4251 2017-10-11 Mark Rages <markrages@gmail.com>
4252
4253 * target-memory.c (block_boundaries): Fix for block address not
4254 aligned on block size.
4255
4256 2017-10-10 Pedro Alves <palves@redhat.com>
4257 Tom Tromey <tom@tromey.com>
4258
4259 * breakpoint.c (struct captured_breakpoint_query_args)
4260 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4261 (print_breakpoint): New.
4262 * breakpoint.h (print_breakpoint): Declare.
4263 * common/common-exceptions.h (enum return_reason): Remove
4264 references to catch_exceptions.
4265 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4266 Delete.
4267 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4268 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4269 * gdb.h: Delete.
4270 * gdbthread.h (thread_select): Declare.
4271 * mi/mi-cmd-break.c: Don't include gdb.h.
4272 (breakpoint_notify): Use print_breakpoint.
4273 * mi/mi-cmd-catch.c: Don't include gdb.h.
4274 * mi/mi-interp.c: Don't include gdb.h.
4275 (mi_print_breakpoint_for_event): New.
4276 (mi_breakpoint_created, mi_breakpoint_modified): Use
4277 mi_print_breakpoint_for_event.
4278 * mi/mi-main.c: Don't include gdb.h.
4279 (mi_cmd_thread_select): Parse the global thread ID here. Use
4280 thread_select instead of gdb_thread_select.
4281 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4282 of using gdb_list_thread_ids.
4283 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4284 FILEIO_ENOSYS here.
4285 (remote_fileio_request): Use TRY/CATCH instead of
4286 catch_exceptions.
4287 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4288 (symbol_file_add_from_memory_wrapper): Delete.
4289 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4290 * thread.c: Don't include gdb.h.
4291 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4292 (thread_alive): Use thread_select.
4293 (do_captured_thread_select): Delete, parts salvaged as ...
4294 (thread_select): ... this new function.
4295 (gdb_thread_select): Delete.
4296
4297 2017-10-10 Pedro Alves <palves@redhat.com>
4298 Tom Tromey <tom@tromey.com>
4299
4300 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4301 and reverse logic.
4302 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4303 No longer macros. Instead ...
4304 (enum wp_check_result): They're now values of this new
4305 enumeration.
4306 (watchpoint_check): Change return type to wp_check_result and
4307 parameter type to bpstat.
4308 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4309 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4310 catch_errors. Reverse logic of watchpoint_check call.
4311 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4312 pointer as parameter.
4313 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4314 * common/common-exceptions.c (throw_exception_sjlj): Update
4315 comments to avoid mentioning catch_errors.
4316 * exceptions.c (catch_errors): Delete.
4317 * exceptions.h: Update comments to avoid mentioning catch_errors.
4318 (catch_errors_ftype, catch_errors): Delete.
4319 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4320 (hook_stop_stub): Delete.
4321 (restore_selected_frame): Change return type to void, and
4322 parameter type to const frame_id &.
4323 (restore_infcall_control_state): Use TRY/CATCH instead of
4324 catch_errors.
4325 * main.c (captured_command_loop): Return void and remove
4326 parameter. Remove references to catch_errors.
4327 (captured_main): Use TRY/CATCH instead of catch_errors.
4328 * objc-lang.c (objc_submethod_helper_data)
4329 (find_objc_msgcall_submethod_helper): Delete.
4330 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4331 catch_errors.
4332 * record-full.c (record_full_message): Return void.
4333 (record_full_message_args, record_full_message_wrapper): Delete.
4334 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4335 instead of catch_errors.
4336 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4337 parameter type to int.
4338 * solib-darwin.c (open_symbol_file_object): Ditto.
4339 * solib-dsbt.c (open_symbol_file_object): Ditto.
4340 * solib-frv.c (open_symbol_file_object): Ditto.
4341 * solib-svr4.c (open_symbol_file_object): Ditto.
4342 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4343 * solib.c (update_solib_list): Use TRY/CATCH instead of
4344 catch_errors.
4345 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4346 Change type.
4347 * symmisc.c (struct print_symbol_args): Remove.
4348 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4349 (print_symbol): Change type.
4350 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4351 and remove parameters.
4352 (catch_errors): New.
4353 (get_windows_debug_event): Adjust.
4354
4355 2017-10-09 Tom Tromey <tom@tromey.com>
4356
4357 * mi/mi-main.c (free_splay_tree): Remove.
4358 (list_available_thread_groups): Use splay_tree_up.
4359 * common/gdb_splay_tree.h: New file.
4360
4361 2017-10-09 Tom Tromey <tom@tromey.com>
4362
4363 * mi/mi-main.c (do_nothing): Remove.
4364 (list_available_thread_groups): Update.
4365
4366 2017-10-09 Pedro Alves <palves@redhat.com>
4367
4368 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4369 reading registers when switching context.
4370
4371 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4372
4373 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4374 (fbsd_convert_siginfo): Likewise.
4375 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4376
4377 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4378
4379 * configure.ac (try_guile_versions): Remove guile-2.2.
4380 * configure: Regenerate.
4381
4382 2017-10-09 Tom Tromey <tom@tromey.com>
4383
4384 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4385 (COMPILE.pre): Use $(CXX).
4386
4387 2017-10-09 Pedro Alves <palves@redhat.com>
4388
4389 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4390 Use bool.
4391 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4392 * cp-support.h (cp_remove_params): Now returns a
4393 gdb::unique_xmalloc_ptr.
4394 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4395 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4396 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4397 returning a gdb::unique_xmalloc_ptr.
4398 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4399 * stack.c (find_frame_funname): Adjust to cp_remove_params
4400 returning a gdb::unique_xmalloc_ptr.
4401
4402 2017-10-08 Tom Tromey <tom@tromey.com>
4403
4404 * dwarf2read.c (dwarf2_get_dwz_file): Use
4405 gdb::unique_xmalloc_ptr.
4406 (find_slot_in_mapped_hash): Likewise.
4407 (dwarf2_physname): Likewise.
4408 (create_dwo_unit_in_dwp_v1): Use std::string.
4409 (create_dwo_unit_in_dwp_v2): Likewise.
4410 (lookup_dwo_cutu): Likewise.
4411 (inherit_abstract_dies): Use std::vector.
4412 (read_array_type): Likewise.
4413 (dwarf_decode_macros): Remove unused declaration.
4414 (unsigned_int_compar): Remove.
4415 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4416 (psymtabs_addrmap_cleanup): Remove.
4417
4418 2017-10-08 Tom Tromey <tom@tromey.com>
4419
4420 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4421 * frame.h (frame_cleanup_after_sniffer): Declare.
4422 (frame_prepare_for_sniffer): Return void.
4423 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4424 type of argument.
4425 (frame_prepare_for_sniffer): Return void.
4426
4427 2017-10-08 Tom Tromey <tom@tromey.com>
4428
4429 * utils.h (make_cleanup_value_free): Remove.
4430 * utils.c (do_value_free, struct cleanup): Remove.
4431 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4432 Use gdb_value_up.
4433 * value.h (struct value_deleter): New.
4434 (gdb_value_up): New typedef.
4435
4436 2017-10-08 Tom Tromey <tom@tromey.com>
4437
4438 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4439 (make_cleanup_free_search_symbols): Remove.
4440 (search_symbols): Return std::vector.
4441 (symbol_search::compare_search_syms): Now member of
4442 symbol_search. Change arguments.
4443 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4444 (symtab_symbol_info, rbreak_command): Update.
4445 * symtab.h (struct symbol_search) <next>: Remove.
4446 Add constructors.
4447 (symbol_search::operator<): New function.
4448 (symbol_search::operator==): New function.
4449 (search_symbols): Remove std::vector.
4450 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4451 (symbol_search::compare_search_syms): Declare.
4452
4453 2017-10-06 Yao Qi <yao.qi@linaro.org>
4454
4455 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4456 arch/aarch64-insn.o.
4457 Remove one rule.
4458 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4459
4460 2017-10-06 Yao Qi <yao.qi@linaro.org>
4461
4462 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4463 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4464 arch/arm-linux.o respectively.
4465 * configure.tgt: Likewise.
4466
4467 2017-10-06 Yao Qi <yao.qi@linaro.org>
4468
4469 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4470 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4471
4472 2017-10-06 Pedro Alves <palves@redhat.com>
4473
4474 * windows-nat.c: Include <algorithm>.
4475
4476 2017-10-06 Yao Qi <yao.qi@linaro.org>
4477
4478 * configure.tgt (i386_tobjs): New variable.
4479 (amd64_tobjs): New variable.
4480 Set $cpu_obs and $os_obs.
4481
4482 2017-10-06 Yao Qi <yao.qi@linaro.org>
4483
4484 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4485 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4486 (clean): Remove object files and dependency files.
4487 (distclean): Remove the directory.
4488 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4489 * configure: Re-generated.
4490 * configure.tgt: Replace amd64.o with arch/amd64.o.
4491
4492 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4493
4494 PR build/22188
4495 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4496 and SETEND.
4497
4498 2017-10-05 Pedro Alves <palves@redhat.com>
4499
4500 * linux-nat.c (linux_child_follow_fork): When following the parent
4501 and detaching the child, consult the parent thread's architecture
4502 instead of the child's.
4503
4504 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4505
4506 * ax.h: Do not include "doublest.h".
4507 (union agent_val): Remove.
4508
4509 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4510
4511 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4512 (decimal_to_string): Return std::string object.
4513 (decimal_from_string): Accept std::string object. Return bool.
4514 (decimal_from_integral, decimal_from_doublest): Remove.
4515 (decimal_from_longest): Add prototype.
4516 (decimal_from_ulongest): Likewise.
4517 (decimal_to_longest): Likewise.
4518 (decimal_from_doublest): Likewise.
4519 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4520 (MAX_DECIMAL_STRING): Move here.
4521 (decimal_to_string): Return std::string object.
4522 (decimal_from_string): Accept std::string object. Return bool.
4523 (decimal_from_integral): Remove, replace by ...
4524 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4525 (decimal_to_longest): New function.
4526 (decimal_from_floating): Remove, replace by ...
4527 (decimal_from_doublest): ... this new function.
4528 (decimal_to_doublest): Update to new decimal_to_string interface.
4529
4530 * value.c (unpack_long): Use decimal_to_longest.
4531 * valops.c (value_cast): Use decimal_from_doublest instead of
4532 decimal_from_floating. Use decimal_from_[u]longest isntead of
4533 decimal_from_integral.
4534 * valarith.c (value_args_as_decimal): Likewise.
4535 * valprint.c (print_decimal_floating): Update to new
4536 decimal_to_string interface.
4537 * printcmd.c (printf_decfloat): Likewise.
4538 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4539
4540 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4541
4542 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4543 * gdbtypes.c: Include "floatformat.h".
4544 * value.c: Likewise.
4545 * m68k-tdep.c: Likewise.
4546
4547 * findvar.c: Do not include "floatformat.h".
4548 * amd64-darwin-tdep.c: Likewise.
4549 * arm-linux-tdep.c: Likewise.
4550 * i386-darwin-tdep.c: Likewise.
4551 * i387-tdep.c: Likewise.
4552 * m68k-linux-tdep.c: Likewise.
4553 * mep-tdep.c: Likewise.
4554 * mips-tdep.c: Likewise.
4555 * nios2-tdep.c: Likewise.
4556 * s390-linux-tdep.c: Likewise.
4557 * sparc-obsd-tdep.c: Likewise.
4558 * sparc-tdep.c: Likewise.
4559 * sparc64-tdep.c: Likewise.
4560 * spu-tdep.c: Likewise.
4561 * tic6x-tdep.c: Likewise.
4562 * tilegx-tdep.c: Likewise.
4563 * vax-tdep.c: Likewise.
4564 * xstormy16-tdep.c: Likewise.
4565 * xtensa-tdep.c: Likewise.
4566
4567 * top.c: Do not include "doublest.h".
4568 * aarch64-tdep.c: Likewise.
4569 * alpha-tdep.c: Likewise.
4570 * arm-linux-tdep.c: Likewise.
4571 * m68k-linux-tdep.c: Likewise.
4572 * tilegx-tdep.c: Likewise.
4573 * xstormy16-tdep.c: Likewise.
4574
4575 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4576
4577 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4578 (mipsn32_fbsd_sigframe): Define.
4579 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4580 for FreeBSD/mipsn32.
4581
4582 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4583
4584 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4585 AT_HWCAP.
4586
4587 2017-10-05 Tristan Gingold <tgingold@free.fr>
4588
4589 * MAINTAINERS (Misc): Update my email address.
4590
4591 2017-10-04 Pedro Alves <palves@redhat.com>
4592
4593 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4594 it instead of target_gdbarch.
4595 (get_remote_state, get_remote_packet_size): Adjust
4596 get_remote_arch_state calls, passing down target_gdbarch
4597 explicitly.
4598 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4599 'gdbarch' and use it instead of target_gdbarch.
4600 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4601 passing down target_gdbarch explicitly.
4602 (struct stop_reply) <arch>: New field.
4603 (remote_parse_stop_reply): Use the stopped thread's architecture,
4604 not the current inferior's. Save the architecture in the
4605 stop_reply.
4606 (process_stop_reply): Use the stop reply's architecture.
4607 (process_g_packet, remote_fetch_registers)
4608 (remote_prepare_to_store, store_registers_using_G)
4609 (remote_store_registers): Adjust get_remote_arch_state calls,
4610 using the regcache's architecture.
4611 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4612 passing down target_gdbarch explicitly.
4613 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4614 beneath instead of calling target_gdbarch.
4615 * target.c (default_thread_architecture): Use the specified
4616 inferior's architecture, instead of the current inferior's
4617 architecture (via target_gdbarch).
4618
4619 2017-10-04 Pedro Alves <palves@redhat.com>
4620
4621 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4622 case.
4623 (regcache_print): Handle !target_has_registers here instead.
4624
4625 2017-10-04 Pedro Alves <palves@redhat.com>
4626
4627 * frame.c (create_test_frame): Delete.
4628 * frame.h (create_test_frame): Delete.
4629 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4630 (class regcache_test): Delete.
4631 (test_target_has_registers, test_target_has_stack)
4632 (test_target_has_memory, test_target_prepare_to_store)
4633 (test_target_store_registers): New functions.
4634 (test_target_ops): New class.
4635 (register_to_value_test): Error out if there's already a
4636 process_stratum (or higher) target pushed. Create a fuller mock
4637 environment, with mock target_ops, inferior, address space, thread
4638 and inferior_ptid.
4639 * progspace.c (struct address_space): Move to ...
4640 * progspace.h (struct address_space): ... here.
4641 * regcache.h (regcache::~regcache, regcache::raw_write)
4642 [GDB_SELF_TEST]: No longer virtual.
4643
4644 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4645
4646 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4647
4648 2017-10-04 Pedro Alves <palves@redhat.com>
4649
4650 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4651 out of 'between TRY and CATCH'.
4652
4653 2017-10-04 Pedro Alves <palves@redhat.com>
4654
4655 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4656 * common/common-exceptions.h (TRY): Open an outermost scope.
4657 Expand intro comment.
4658 (CATCH): Reindent.
4659 (END_CATCH): Close the outermost scope.
4660 * completer.c (complete_line_internal): Add missing END_CATCH.
4661
4662 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4663
4664 * NEWS (Changes since GDB 8.0): Add entry about new
4665 'set-cwd-on-gdbserver' feature.
4666 (New remote packets): Add entry for QSetWorkingDir.
4667 * common/common-inferior.h (set_inferior_cwd): New prototype.
4668 * infcmd.c (set_inferior_cwd): Remove "static".
4669 (show_cwd_command): Expand text to include remote debugging.
4670 * remote.c: Add PACKET_QSetWorkingDir.
4671 (remote_protocol_features) <QSetWorkingDir>: New entry for
4672 PACKET_QSetWorkingDir.
4673 (extended_remote_set_inferior_cwd): New function.
4674 (extended_remote_create_inferior): Call
4675 "extended_remote_set_inferior_cwd".
4676 (_initialize_remote): Call "add_packet_config_cmd" for
4677 QSetWorkingDir.
4678
4679 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4680
4681 * NEWS (New commands): Mention "set/show cwd".
4682 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4683 "cd" command's help text.
4684 * common/common-inferior.h (get_inferior_cwd): New prototype.
4685 * infcmd.c (inferior_cwd_scratch): New global variable.
4686 (set_inferior_cwd): New function.
4687 (get_inferior_cwd): Likewise.
4688 (set_cwd_command): Likewise.
4689 (show_cwd_command): Likewise.
4690 (_initialize_infcmd): Add "set/show cwd" commands.
4691 * inferior.h (class inferior) <cwd>: New field.
4692 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4693 (fork_inferior): Change inferior's cwd before its execution.
4694 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4695 to CreateProcess.
4696
4697 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4698
4699 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4700 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4701 (COMMON_OBS): Add gdb_tilde_expand.o.
4702 * common/gdb_tilde_expand.c: New file.
4703 * common/gdb_tilde_expand.h: Likewise.
4704
4705 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4706
4707 * gdbarch.sh (objfile): Remove duplicate declaration.
4708 * gdbarch.h: Regenerate.
4709
4710 2017-10-03 Tom Tromey <tom@tromey.com>
4711
4712 * utils.c (internal_vproblem): Use string_vprintf.
4713
4714 2017-10-03 Tom Tromey <tom@tromey.com>
4715
4716 * printcmd.c (info_symbol_command): Use std::string.
4717
4718 2017-10-03 Tom Tromey <tom@tromey.com>
4719
4720 * top.c (gdb_safe_append_history): Use std::string.
4721
4722 2017-10-03 Tom Tromey <tom@tromey.com>
4723
4724 * event-top.c (stdin_event_handler): Update.
4725 * main.c (captured_main_1): Update.
4726 * top.h (make_delete_ui_cleanup): Remove.
4727 (struct ui): Add constructor and destructor.
4728 (new_ui, delete_ui): Remove.
4729 * top.c (make_delete_ui_cleanup): Remove.
4730 (new_ui_command): Use std::unique_ptr.
4731 (delete_ui_cleanup): Remove.
4732 (ui::ui): Rename from new_ui. Update.
4733 (free_ui): Remove.
4734 (ui::~ui): Rename from delete_ui. Update.
4735
4736 2017-10-03 Tom Tromey <tom@tromey.com>
4737
4738 * symfile.c (load_progress): Use gdb::byte_vector.
4739
4740 2017-10-03 Tom Tromey <tom@tromey.com>
4741
4742 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4743 declaration.
4744 * printcmd.c (x_command): Remove unused declaration.
4745 * symfile.c (symbol_file_command): Remove unused declaration.
4746
4747 2017-10-03 Tom Tromey <tom@tromey.com>
4748
4749 * utils.c (internal_vproblem): Use std::string.
4750 (defaulted_query): Likewise.
4751
4752 2017-10-03 Tom Tromey <tom@tromey.com>
4753
4754 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4755 * top.c (execute_command_to_string): Update.
4756 * utils.c (make_cleanup_restore_page_info): Remove.
4757 (do_restore_page_info_cleanup): Remove.
4758 (set_batch_flag_and_restore_page_info):
4759 New.
4760 (make_cleanup_restore_page_info): Remove.
4761 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4762 (~set_batch_flag_and_restore_page_info): New
4763 (make_cleanup_restore_uinteger): Remove.
4764 (make_cleanup_restore_integer): Remove.
4765 (struct restore_integer_closure): Remove.
4766 (restore_integer): Remove.
4767 * utils.h (struct set_batch_flag_and_restore_page_info): New
4768 class.
4769 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4770 (make_cleanup_restore_page_info): Remove.
4771 (make_cleanup_restore_uinteger) Remove.
4772 (make_cleanup_restore_integer) Remove.
4773
4774 2017-10-03 Tom Tromey <tom@tromey.com>
4775
4776 * record-full.h (record_full_gdb_operation_disable_set): Return
4777 scoped_restore_tmpl<int>.
4778 * infrun.c (adjust_pc_after_break): Update.
4779 (handle_signal_stop): Update.
4780 * record-full.c (record_full_gdb_operation_disable_set): Return
4781 scoped_restore_tmpl<int>.
4782 (record_full_wait_1, record_full_insert_breakpoint)
4783 (record_full_remove_breakpoint, record_full_save)
4784 (record_full_goto_insn): Update.
4785
4786 2017-10-02 Tom Tromey <tom@tromey.com>
4787
4788 PR rust/22236:
4789 * rust-lang.c (rust_val_print_str): New function.
4790 (val_print_struct): Call it.
4791 (rust_subscript): Preserve name of slice type.
4792
4793 2017-10-02 Tom Tromey <tom@tromey.com>
4794
4795 * rust-lang.c (rust_subscript): Handle slices in
4796 EVAL_AVOID_SIDE_EFFECTS case.
4797
4798 2017-10-02 Tom Tromey <tom@tromey.com>
4799
4800 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4801
4802 2017-10-02 Tom Tromey <tom@tromey.com>
4803
4804 * rust-lang.h (rust_slice_type): Add "extern".
4805
4806 2017-10-02 Tom Tromey <tom@tromey.com>
4807 Pedro Alves <palves@redhat.com>
4808
4809 * ada-lang.h (ada_exc_info::operator<): Make const.
4810 (ada_exc_info::operator==): Make const.
4811 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4812 Make const.
4813
4814 2017-09-29 Tom Tromey <tom@tromey.com>
4815
4816 * target.c (read_whatever_is_readable): Change type of "result".
4817 Update.
4818 (free_memory_read_result_vector): Remove.
4819 (read_memory_robust): Change return type. Update.
4820 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4821 bin2hex, std::string.
4822 * target.h (memory_read_result_s): Remove typedef.
4823 (free_memory_read_result_vector): Remove.
4824 (read_memory_robust): Return std::vector.
4825
4826 2017-09-29 Tom Tromey <tom@tromey.com>
4827
4828 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4829
4830 2017-09-29 Tom Tromey <tom@tromey.com>
4831
4832 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4833 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4834 operator< and operator==.
4835 (ada_exceptions_list): Return a std::vector.
4836 * ada-lang.c (ada_exc_info::operator<): Rename from
4837 compare_ada_exception_info.
4838 (ada_exc_info::operator==): New.
4839 (sort_remove_dups_ada_exceptions_list): Change type of
4840 "exceptions".
4841 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4842 (ada_add_global_exceptions): Likewise.
4843 (ada_exceptions_list_1): Return a std::vector.
4844 (ada_exceptions_list): Likewise.
4845
4846 2017-09-29 Tom Tromey <tom@tromey.com>
4847
4848 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4849 'std::set *'.
4850 (print_one_inferior): Update.
4851 (free_vector_of_ints): Remove.
4852 (list_available_thread_groups): Change "ids" to std::set.
4853 (mi_cmd_list_thread_groups): Update.
4854 (struct collect_cores_data) <core>: Now a std::set.
4855 (collect_cores): Update.
4856 (unique): Remove.
4857 (print_one_inferior): Update.
4858
4859 2017-09-29 Tom Tromey <tom@tromey.com>
4860
4861 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4862 (mi_execute_async_cli_command): Likewise.
4863 (mi_cmd_trace_frame_collected): Use field_fmt.
4864
4865 2017-09-29 Tom Tromey <tom@tromey.com>
4866
4867 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4868 gdb::byte_vector.
4869
4870 2017-09-29 Tom Tromey <tom@tromey.com>
4871
4872 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4873
4874 2017-09-29 Tom Tromey <tom@tromey.com>
4875
4876 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4877
4878 2017-09-29 Tom Tromey <tom@tromey.com>
4879
4880 * varobj.h (varobj_gen_name): Return std::string.
4881 * varobj.c (varobj_gen_name): Return std::string.
4882 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4883 (mi_cmd_var_delete): Don't copy "name".
4884
4885 2017-09-29 Tom Tromey <tom@tromey.com>
4886
4887 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4888 (mi_cmd_break_insert_1): Update.
4889
4890 2017-09-29 Tom Tromey <tom@tromey.com>
4891
4892 * target.h (make_scoped_defer_target_commit_resume): Update.
4893 * target.c (make_scoped_defer_target_commit_resume): Rename from
4894 make_cleanup_defer_target_commit_resume. Return a
4895 scoped_restore.
4896 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4897
4898 2017-09-29 Tom Tromey <tom@tromey.com>
4899
4900 * main.c (captured_main_1): Remove unused declaration.
4901 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4902
4903 2017-09-29 Tom Tromey <tom@tromey.com>
4904
4905 * symtab.c (search_symbols): Remove unused outer cleanup.
4906 (make_source_files_completion_list): Remove unused declaration.
4907
4908 2017-09-29 Tom Tromey <tom@tromey.com>
4909
4910 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4911
4912 2017-09-29 Tom Tromey <tom@tromey.com>
4913
4914 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4915 gdb::byte_vector.
4916
4917 2017-09-29 Tom Tromey <tom@tromey.com>
4918
4919 * complaints.c (vcomplaint): Use std::string.
4920
4921 2017-09-29 Tom Tromey <tom@tromey.com>
4922
4923 * tracepoint.c (trace_variable_command): Use std::string.
4924 (encode_actions_1): Remove unused declarations.
4925 (create_tsv_from_upload): Use std::string.
4926
4927 2017-09-29 Tom Tromey <tom@tromey.com>
4928
4929 * cp-support.c (gdb_demangle): Use std::string.
4930
4931 2017-09-29 Tom Tromey <tom@tromey.com>
4932
4933 * stack.c (parse_frame_specification): Use std::string
4934 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4935
4936 2017-09-29 Tom Tromey <tom@tromey.com>
4937
4938 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4939
4940 2017-09-29 Tom Tromey <tom@tromey.com>
4941
4942 * utils.c (vfprintf_maybe_filtered): Use std::string.
4943 (vfprintf_unfiltered): Likewise.
4944
4945 2017-09-29 Tom Tromey <tom@tromey.com>
4946
4947 * event-top.c (top_level_prompt): Return std::string.
4948 (display_gdb_prompt): Update.
4949
4950 2017-09-29 Tom Tromey <tom@tromey.com>
4951
4952 * unittests/common-utils-selftests.c (format): New function.
4953 (string_vprintf_tests): New function.
4954 (_initialize_common_utils_selftests): Register new tests.
4955 * common/common-utils.c (string_vprintf): New function.
4956 * common/common-utils.h (string_vprintf): Declare.
4957
4958 2017-09-29 Pedro Alves <palves@redhat.com>
4959
4960 * common/rsp-low.c (unpack_varlen_hex): Constify.
4961 * common/rsp-low.h (unpack_varlen_hex): Constify.
4962 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4963 Constify.
4964 * remote.c (remote_set_permissions, read_ptid)
4965 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4966 (remote_static_tracepoint_marker_at)
4967 (remote_static_tracepoint_markers_by_strid)
4968 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4969 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4970 (parse_tracepoint_definition, parse_tsv_definition)
4971 (parse_static_tracepoint_marker_definition): Constify.
4972 * tracepoint.h (parse_static_tracepoint_marker_definition)
4973 (parse_trace_status, parse_tracepoint_status)
4974 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4975
4976 2017-09-29 Pedro Alves <palves@redhat.com>
4977
4978 * remote.c (target_buf, target_buf_size): Delete.
4979 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4980 Use the connection's packet buffer instead.
4981 All callers adjusted.
4982 (_initialize_remote): Remove references to target_buf and
4983 target_buf_size.
4984
4985 2017-09-28 Pedro Alves <palves@redhat.com>
4986
4987 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4988 unittests/common-utils-selftests.c.
4989 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4990 (COMMON_OBS): Remove utils-selftests.o.
4991 * utils-selftests.c: Move to ...
4992 * unittests/common-utils-selftests.c: ... here and rename self
4993 test to "string_printf".
4994
4995 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4996
4997 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4998 having NULL cus or tus.
4999
5000 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5001
5002 * arm-tdep.c: (convert_from_extended): Remove.
5003 (convert_to_extended): Likewise.
5004 (arm_extract_return_value): Use convert_typed_floating.
5005 (arm_store_return_value): Likewise.
5006
5007 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5008 * sh-tdep.c: Do not include "floatformat.h".
5009 (sh_littlebyte_bigword_type): New function.
5010 (sh_register_convert_to_virtual): Use convert_typed_floating.
5011 (sh_register_convert_to_raw): Likewise.
5012 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5013 (sh64_littlebyte_bigword_type): New function.
5014 (sh64_extract_return_value): Use convert_typed_floating.
5015 (sh64_register_convert_to_virtual): Likewise.
5016 (sh64_register_convert_to_raw): Likewise.
5017
5018 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5019
5020 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5021 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5022
5023 * gdbtypes.h (union type_specific): Make field floatformat hold
5024 just a single struct floatformat, not an array.
5025 (floatformat_from_type): Move here.
5026 * gdbtypes.c (floatformat_from_type): Move here. Update to
5027 changed TYPE_FLOATFORMAT definition.
5028 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5029 (recursive_dump_type): Likewise.
5030 (init_float_type): Install correct floatformat for byte order.
5031 (arch_float_type): Likewise.
5032
5033 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5034
5035 * gdbtypes.c (init_type): Change incoming argument from
5036 length-in-bytes to length-in-bits. Assert length is a
5037 multiple of TARGET_CHAR_BITS.
5038 (arch_type, arch_flags_type): Likewise.
5039 (init_integer_type): Update call to init_type.
5040 (init_character_type): Likewise.
5041 (init_boolean_type): Likewise.
5042 (init_float_type): Likewise.
5043 (init_decfloat_type): Likewise.
5044 (init_complex_type): Likewise.
5045 (init_pointer_type): Likewise.
5046 (objfile_type): Likewise.
5047 (arch_integer_type): Update call to arch_type.
5048 (arch_character_type): Likewise.
5049 (arch_boolean_type): Likewise.
5050 (arch_float_type): Likewise.
5051 (arch_decfloat_type): Likewise.
5052 (arch_complex_type): Likewise.
5053 (arch_pointer_type): Likewise.
5054 (gdbtypes_post_init): Likewise.
5055
5056 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5057 (read_base_type): Likewise.
5058 * mdebugread.c (basic_type): Likewise.
5059 * stabsread.c (dbx_init_float_type): Likewise.
5060 (rs6000_builtin_type): Likewise.
5061 (read_range_type): Likewise. Also, fix call to init_integer_type
5062 with erroneous length argument.
5063
5064 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5065 * d-lang.c (build_d_types): Likewise.
5066 * f-lang.c (build_fortran_types): Likewise.
5067 * go-lang.c (build_go_types): Likewise.
5068 * opencl-lang.c (build_opencl_types): Likewise.
5069 * jit.c (finalize_symtab): Likewise.
5070 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5071 (build_std_type_info_type): Likewise.
5072 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5073 update call to arch_flags_type.
5074
5075 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5076 arch_type.
5077 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5078 * windows-tdep.c (windows_get_tlb_type): Likewise.
5079
5080 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5081 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5082 * m32c-tdep.c (make_types): Likewise.
5083 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5084 (rl78_psw_type): Update call to arch_flags_type.
5085 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5086 * rx-tdep.c (rx_psw_type): Likewise.
5087 (rx_fpsw_type): Likewise.
5088 * sparc-tdep.c (sparc_psr_type): Likewise.
5089 (sparc_fsr_type): Likewise.
5090 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5091 (sparc64_ccr_type): Likewise.
5092 (sparc64_fsr_type): Likewise.
5093 (sparc64_fprs_type): Likewise.
5094
5095 2017-09-27 Tom Tromey <tom@tromey.com>
5096
5097 * findcmd.c (find_command): Constify.
5098
5099 2017-09-27 Tom Tromey <tom@tromey.com>
5100
5101 * ada-tasks.c (task_command_1, task_command): Constify.
5102
5103 2017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * symtab.c (maintenance_print_symbol_cache)
5106 (maintenance_flush_symbol_cache)
5107 (maintenance_print_symbol_cache_statistics): Constify.
5108
5109 2017-09-27 Tom Tromey <tom@tromey.com>
5110
5111 * inferior.c (detach_inferior_command, kill_inferior_command)
5112 (inferior_command): Constify.
5113
5114 2017-09-27 Tom Tromey <tom@tromey.com>
5115
5116 * regcache.c (regcache_print, maintenance_print_registers)
5117 (maintenance_print_raw_registers)
5118 (maintenance_print_cooked_registers)
5119 (maintenance_print_register_groups)
5120 (maintenance_print_remote_registers): Constify.
5121
5122 2017-09-27 Tom Tromey <tom@tromey.com>
5123
5124 * printcmd.c (map_display_numbers, undisplay_command)
5125 (enable_disable_display_command, enable_display_command)
5126 (disable_display_command): Constify.
5127
5128 2017-09-27 Tom Tromey <tom@tromey.com>
5129
5130 * breakpoint.h (delete_command): Don't declare.
5131 * breakpoint.c (delete_command, enable_once_command)
5132 (enable_count_command, enable_delete_command, breakpoint_1)
5133 (maintenance_info_breakpoints, stopin_command, stopat_command)
5134 (delete_command, delete_trace_command, save_breakpoints)
5135 (save_breakpoints_command, save_tracepoints_command): Constify.
5136
5137 2017-09-27 Tom Tromey <tom@tromey.com>
5138
5139 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5140 (skip_ws, extract_identifier, macro_define_command)
5141 (macro_undef_command, macro_list_command): Constify.
5142
5143 2017-09-27 Tom Tromey <tom@tromey.com>
5144
5145 * infcmd.c (environment_info, set_environment_command)
5146 (unset_environment_command, path_info, info_proc_cmd_1)
5147 (info_proc_cmd_mappings, info_proc_cmd_stat)
5148 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5149 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5150
5151 2017-09-27 Tom Tromey <tom@tromey.com>
5152
5153 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5154 Constify.
5155
5156 2017-09-27 Tom Tromey <tom@tromey.com>
5157
5158 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5159
5160 2017-09-27 Tom Tromey <tom@tromey.com>
5161
5162 * demangle.c (demangle_command): Constify.
5163
5164 2017-09-27 Tom Tromey <tom@tromey.com>
5165
5166 * progspace.c (maintenance_info_program_spaces_command):
5167 Constify.
5168
5169 2017-09-27 Tom Tromey <tom@tromey.com>
5170
5171 * compile/compile.c (check_raw_argument, compile_file_command)
5172 (compile_code_command, compile_print_command): Constify.
5173
5174 2017-09-27 Tom Tromey <tom@tromey.com>
5175
5176 * reggroups.c (maintenance_print_reggroups): Constify.
5177
5178 2017-09-27 Tom Tromey <tom@tromey.com>
5179
5180 * dwarf2read.c (save_gdb_index_command): Constify.
5181
5182 2017-09-27 Tom Tromey <tom@tromey.com>
5183
5184 * stap-probe.c (info_probes_stap_command): Constify.
5185
5186 2017-09-27 Tom Tromey <tom@tromey.com>
5187
5188 * fork-child.c (unset_exec_wrapper_command): Constify.
5189
5190 2017-09-27 Tom Tromey <tom@tromey.com>
5191
5192 * btrace.c (get_uint, get_context_size, no_chunk)
5193 (maint_btrace_packet_history_cmd)
5194 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5195 (maint_info_btrace_cmd): Constify.
5196
5197 2017-09-27 Tom Tromey <tom@tromey.com>
5198
5199 * reverse.c (delete_bookmark_command): Constify.
5200
5201 2017-09-27 Tom Tromey <tom@tromey.com>
5202
5203 * remote.c (set_memory_packet_size)
5204 (set_memory_write_packet_size, show_memory_write_packet_size)
5205 (set_memory_read_packet_size, show_memory_read_packet_size)
5206 (compare_sections_command, packet_command, remote_put_command)
5207 (remote_get_command, remote_delete_command): Constify.
5208
5209 2017-09-27 Tom Tromey <tom@tromey.com>
5210
5211 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5212 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5213 (set_mipsfpu_auto_command): Constify.
5214
5215 2017-09-27 Tom Tromey <tom@tromey.com>
5216
5217 * cli/cli-cmds.h (cd_command): Constify.
5218 * cli/cli-cmds.c (cd_command): Constify.
5219
5220 2017-09-27 Tom Tromey <tom@tromey.com>
5221
5222 * thread.c (thread_name_command, thread_find_command): Constify.
5223
5224 2017-09-27 Tom Tromey <tom@tromey.com>
5225
5226 * probe.c (enable_probes_command, disable_probes_command):
5227 Constify.
5228
5229 2017-09-27 Tom Tromey <tom@tromey.com>
5230
5231 * symfile.c (symbol_file_command): Constify.
5232 * gdbcore.h (deprecated_file_changed_hook): Constify.
5233 * exec.c (deprecated_file_changed_hook, exec_file_command)
5234 (file_command): Constify.
5235 * defs.h (symbol_file_command): Constify.
5236
5237 2017-09-27 Tom Tromey <tom@tromey.com>
5238
5239 * remote-fileio.c (set_system_call_allowed)
5240 (show_system_call_allowed): Constify.
5241
5242 2017-09-27 Tom Tromey <tom@tromey.com>
5243
5244 * tracepoint.c (delete_trace_variable_command)
5245 (tfind_end_command, tfind_start_command, tfind_pc_command)
5246 (tfind_tracepoint_command, tfind_line_command)
5247 (tfind_range_command, tfind_outside_command): Constify.
5248
5249 2017-09-27 Tom Tromey <tom@tromey.com>
5250
5251 * ax-gdb.c (maint_agent_printf_command, agent_command)
5252 (agent_eval_command): Constify.
5253
5254 2017-09-27 Tom Tromey <tom@tromey.com>
5255
5256 * tracepoint.c (info_scope_command): Constify.
5257 * python/python.c (gdbpy_decode_line): Constify.
5258 * python/py-breakpoint.c (bppy_init): Constify.
5259 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5260 * location.h: (new_linespec_location)
5261 (string_to_event_location_basic, string_to_event_location):
5262 Constify.
5263 * location.c (new_linespec_location)
5264 (string_to_event_location_basic, string_to_event_location):
5265 Constify.
5266 * linespec.h (decode_line_with_current_source)
5267 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5268 * linespec.c (linespec_lex_to_end)
5269 (decode_line_with_current_source)
5270 (decode_line_with_last_displayed): Constify.
5271 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5272 Constify.
5273 * cli/cli-cmds.c (edit_command, list_command): Constify.
5274 * breakpoint.h (until_break_command, watch_command_wrapper)
5275 (awatch_command_wrapper, rwatch_command_wrapper)
5276 (init_ada_exception_breakpoint): Constify.
5277 * breakpoint.c (break_command_1, dprintf_command)
5278 (break_range_command, watch_command_wrapper)
5279 (rwatch_command_wrapper, awatch_command_wrapper)
5280 (until_break_command, init_ada_exception_breakpoint)
5281 (strace_marker_create_sals_from_location, trace_command)
5282 (ftrace_command, strace_command, struct tracepoint): Constify.
5283 * ax-gdb.c (agent_command_1): Constify.
5284 * ada-lang.c (ada_exception_sal): Constify.
5285
5286 2017-09-27 Tom Tromey <tom@tromey.com>
5287
5288 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5289 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5290 (get_context_size, no_chunk, get_insn_history_modifiers)
5291 (cmd_record_insn_history, get_call_history_modifiers)
5292 (cmd_record_call_history): Constify.
5293
5294 2017-09-27 Tom Tromey <tom@tromey.com>
5295
5296 * source.c (show_substitute_path_command)
5297 (unset_substitute_path_command, set_substitute_path_command):
5298 Constify.
5299
5300 2017-09-27 Tom Tromey <tom@tromey.com>
5301
5302 * typeprint.c (maintenance_print_type): Constify.
5303 * maint.c (maintenance_dump_me, maintenance_demangle)
5304 (maintenance_time_display, maintenance_info_sections)
5305 (maintenance_print_statistics, maintenance_deprecate)
5306 (maintenance_undeprecate): Constify.
5307 (maintenance_do_deprecate): Constify. Use std::string.
5308 (maintenance_selftest): Constify.
5309 * gdbtypes.h (maintenance_print_type): Constify.
5310
5311 2017-09-27 Tom Tromey <tom@tromey.com>
5312
5313 * hppa-tdep.c (unwind_command): Constify.
5314
5315 2017-09-27 Tom Tromey <tom@tromey.com>
5316
5317 * target-descriptions.c (unset_tdesc_filename_cmd)
5318 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5319 Constify.
5320
5321 2017-09-27 Tom Tromey <tom@tromey.com>
5322
5323 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5324
5325 2017-09-27 Tom Tromey <tom@tromey.com>
5326
5327 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5328
5329 2017-09-27 Tom Tromey <tom@tromey.com>
5330
5331 * tui/tui-regs.c (tui_reg_command): Constify.
5332
5333 2017-09-27 Tom Tromey <tom@tromey.com>
5334
5335 * skip.c (skip_file_command, skip_function_command)
5336 (skip_enable_command, skip_disable_command, skip_delete_command):
5337 Constify.
5338
5339 2017-09-27 Tom Tromey <tom@tromey.com>
5340
5341 * record-btrace.c (cmd_record_btrace_bts_start)
5342 (cmd_record_btrace_pt_start): Constify.
5343
5344 2017-09-27 Tom Tromey <tom@tromey.com>
5345
5346 * symmisc.c (maintenance_print_symbols)
5347 (maintenance_print_msymbols, maintenance_print_objfiles)
5348 (maintenance_info_symtabs, maintenance_check_symtabs)
5349 (maintenance_expand_symtabs, maintenance_info_line_tables):
5350 Constify.
5351
5352 2017-09-27 Tom Tromey <tom@tromey.com>
5353
5354 * top.c (new_ui_command): Constify.
5355
5356 2017-09-27 Tom Tromey <tom@tromey.com>
5357
5358 * symfile.c (add_symbol_file_command)
5359 (remove_symbol_file_command, list_overlays_command)
5360 (map_overlay_command, unmap_overlay_command)
5361 (overlay_auto_command, overlay_manual_command)
5362 (overlay_off_command, overlay_load_command): Constify.
5363
5364 2017-09-27 Tom Tromey <tom@tromey.com>
5365
5366 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5367 (info_spu_mailbox_command, info_spu_dma_command)
5368 (info_spu_proxydma_command): Constify.
5369
5370 2017-09-27 Tom Tromey <tom@tromey.com>
5371
5372 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5373
5374 2017-09-27 Tom Tromey <tom@tromey.com>
5375
5376 * cli/cli-script.c (user_defined_command): Constify.
5377
5378 2017-09-27 Tom Tromey <tom@tromey.com>
5379
5380 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5381 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5382 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5383 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5384 (dump_binary_value, append_binary_memory, append_binary_value):
5385 Constify.
5386 (struct dump_context) <func>: Constify.
5387 (add_dump_command): Update.
5388
5389 2017-09-27 Tom Tromey <tom@tromey.com>
5390
5391 * cli/cli-cmds.c (show_version, show_configuration)
5392 (source_command, show_user): Constify.
5393
5394 2017-09-27 Tom Tromey <tom@tromey.com>
5395
5396 * target.c (maintenance_print_target_stack): Constify.
5397
5398 2017-09-27 Tom Tromey <tom@tromey.com>
5399
5400 * interps.c (interpreter_exec_cmd): Constify.
5401
5402 2017-09-27 Tom Tromey <tom@tromey.com>
5403
5404 * record-full.c (cmd_record_full_restore): Constify.
5405
5406 2017-09-27 Tom Tromey <tom@tromey.com>
5407
5408 * memattr.c (enable_mem_command, disable_mem_command)
5409 (delete_mem_command): Constify.
5410
5411 2017-09-27 Tom Tromey <tom@tromey.com>
5412
5413 * value.c (show_convenience): Constify.
5414
5415 2017-09-27 Tom Tromey <tom@tromey.com>
5416
5417 * gdbcore.h (core_file_command): Update.
5418 * corefile.c (core_file_command): Constify.
5419
5420 2017-09-27 Tom Tromey <tom@tromey.com>
5421
5422 * user-regs.c (maintenance_print_user_registers): Constify.
5423
5424 2017-09-27 Tom Tromey <tom@tromey.com>
5425
5426 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5427
5428 2017-09-27 Tom Tromey <tom@tromey.com>
5429
5430 * cp-support.c (first_component_command): Constify.
5431
5432 2017-09-27 Tom Tromey <tom@tromey.com>
5433
5434 * psymtab.c (maintenance_print_psymbols)
5435 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5436 Constify.
5437
5438 2017-09-27 Tom Tromey <tom@tromey.com>
5439
5440 * windows-tdep.c (display_tib): Constify.
5441
5442 2017-09-27 Tom Tromey <tom@tromey.com>
5443
5444 * linux-fork.c (delete_checkpoint_command)
5445 (detach_checkpoint_command): Constify.
5446
5447 2017-09-27 Tom Tromey <tom@tromey.com>
5448
5449 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5450
5451 2017-09-27 Tom Tromey <tom@tromey.com>
5452
5453 * arc-tdep.c (dump_arc_instruction_command): Constify.
5454
5455 2017-09-27 Tom Tromey <tom@tromey.com>
5456
5457 * valprint.c (set_radix, show_radix): Constify.
5458
5459 2017-09-27 Tom Tromey <tom@tromey.com>
5460
5461 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5462
5463 2017-09-27 Tom Tromey <tom@tromey.com>
5464
5465 * command.h (not_just_help_class_command): Update.
5466 * cli/cli-decode.h (not_just_help_class_command): Update.
5467 * cli/cli-decode.c (not_just_help_class_command): Constify.
5468
5469 2017-09-27 Tom Tromey <tom@tromey.com>
5470
5471 * gdb_bfd.c (maintenance_info_bfds): Constify.
5472
5473 2017-09-27 Tom Tromey <tom@tromey.com>
5474
5475 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5476 overloads.
5477 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5478 (do_const_cfunc): New function.
5479 (cmd_cfunc_eq): New overload.
5480 (cli_user_command_p): Check do_const_cfunc.
5481 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5482 const_cfunc.
5483 * command.h (add_cmd): Add const overload and no-function
5484 overload.
5485 (set_cmd_cfunc): Add const overload.
5486 (cmd_const_cfunc_ftype): Declare.
5487 (cmd_cfunc_eq): Add const overload.
5488 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5489 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5490 overload.
5491
5492 2017-09-27 Tom Tromey <tom@tromey.com>
5493
5494 * macroexp.c (get_next_token_for_substitution): New function.
5495 (substitute_args): Call it. Check for __VA_OPT__.
5496
5497 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5498 Pedro Alves <palves@redhat.com>
5499
5500 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5501 producer_is_icc_lt_14.
5502 (producer_is_icc_lt_14): New function.
5503 (check_producer): Add code for checking version of ICC.
5504 (producer_is_icc): Move to producer.c.
5505 (read_structure_type): Restrict ICC workaround to ICC<14.
5506 * producer.c: Include selftest.h.
5507 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5508 New functions.
5509 * producer.h (producer_is_icc): New declaration.
5510
5511 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5512
5513 * Makefile.in (SFILES): Add producer.c.
5514 (COMMON_OBS): Add producer.o
5515 * amd64-tdep.c (producer.h): Add new include.
5516 * dwarf2read.c (producer.h): Add new include.
5517 * producer.c: New file.
5518 * producer.h: New file.
5519 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5520 producer.c.
5521 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5522 producer.h.
5523
5524 2017-09-26 Matthias Klose <doko@ubuntu.com>
5525
5526 * configure.ac: Search ncursesw before ncurses.
5527 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5528 * gdb_curses.h: Include <ncursesw/ncurses.h>
5529 * config.in, configure: Regenerate.
5530
5531 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5532
5533 PR gdb/22185
5534 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5535 obsolete.
5536 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5537 Remove i386sol2 support.
5538 * configure.nat <i386sol2>: Remove.
5539 <sol2-64>: Fold into ...
5540 <sol2>: ... this.
5541 Move common settings to default section.
5542 Add sol-thread.o.
5543 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5544 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5545 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5546 <i[34567]86-*-solaris*>: Remove.
5547 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5548
5549 * configure.ac: Remove wctype in libw check.
5550 (_MSE_INT_H): Don't define on Solaris 7-9.
5551 <solaris*>: Remove libthread_db.so.1 check.
5552 * configure: Regenerate.
5553 * config.in: Regenerate.
5554
5555 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5556 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5557 (gdb_ps_size_t): Remove.
5558 Use base types in users.
5559 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5560
5561 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5562
5563 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5564
5565 PR build/22206
5566 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5567 (adi_is_addr_mapped): Likewise.
5568 (PSR_ICC): Don't redefine.
5569 (PSR_IMPL): Likewise.
5570
5571 2017-09-25 Tom Tromey <tom@tromey.com>
5572
5573 * regcache.c (regcache::dump): Use string_printf.
5574
5575 2017-09-25 Tom Tromey <tom@tromey.com>
5576
5577 * regcache.c (class regcache_invalidator): New.
5578 (struct register_to_invalidate): Remove.
5579 (make_cleanup_regcache_invalidate): Remove.
5580 (regcache::raw_write): Use regcache_invalidator.
5581
5582 2017-09-25 Tom Tromey <tom@tromey.com>
5583
5584 * spu-tdep.c (spu2ppu_sniffer): Update.
5585 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5586 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5587 Remove.
5588 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5589 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5590 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5591 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5592 (frame_pop): Update.
5593
5594 2017-09-25 Tom Tromey <tom@tromey.com>
5595
5596 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5597 * regcache.h (regcache_xfree): Don't declare.
5598 * regcache.c (regcache_xfree): Remove.
5599 (do_regcache_xfree): Use delete.
5600 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5601 * linux-fork.c (free_fork): Use delete.
5602 (fork_save_infrun_state): Likewise.
5603 * jit.c (jit_dealloc_cache): Use delete.
5604 * infrun.c (discard_infcall_suspend_state): Use delete.
5605
5606 2017-09-25 Tom Tromey <tom@tromey.com>
5607
5608 * regcache.h (regcache_xmalloc): Don't declare.
5609 (regcache_raw_set_cached_value): Update comment.
5610 * regcache.c (regcache_xmalloc): Remove.
5611 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5612 * jit.c (jit_frame_sniffer): Use new.
5613 * frame.c (frame_save_as_regcache): Use new.
5614
5615 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5616
5617 * NEWS: Advertise support for guarded-storage registers on IBM z.
5618
5619 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5620
5621 * s390-linux-nat.c (have_regset_gs): New static variable.
5622 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5623 control block and guarded-storage broadcast control regsets.
5624 (s390_read_description): Detect whether the target has
5625 guarded-storage support, return appropriate tdesc.
5626 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5627 (features/s390x-gs-linux64.c): Likewise.
5628 (struct gdbarch_tdep) <have_gs>: New field.
5629 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5630 (s390_gsbc_regset): New variables.
5631 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5632 and s390_gsbc_regset, if applicable.
5633 (s390_core_read_description): Check whether core file was from a
5634 target with guarded-storage support; include appropriate regsets.
5635 (s390_gdbarch_init): Add registers for guarded-storage support.
5636 (_initialize_s390_tdep): Initialize new target descriptions that
5637 include registers for guarded-storage support.
5638 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5639 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5640 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5641 (S390_NUM_REGS): Adjust macro definition.
5642 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5643 (tdesc_s390x_gs_linux64): New declarations.
5644
5645 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5646
5647 * features/s390-gs-linux64.xml: New file.
5648 * features/s390-gs.xml: New file.
5649 * features/s390-gsbc.xml: New file.
5650 * features/s390x-gs-linux64.xml: New file.
5651 * features/Makefile (WHICH): Add s390-gs-linux64 and
5652 s390x-gs-linux64.
5653 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5654 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5655 * features/s390-gs-linux64.c: New generated file.
5656 * features/s390x-gs-linux64.c: New file.
5657 * regformats/s390-gs-linux64.dat: New file.
5658 * regformats/s390x-gs-linux64.dat: New file.
5659
5660 2017-09-23 Tom Tromey <tom@tromey.com>
5661
5662 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5663
5664 2017-09-22 Tom Tromey <tom@tromey.com>
5665
5666 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5667 type to scoped_restore_tmpl.
5668 <scoped_input_handler>: Initialize m_quit_handler directly.
5669
5670 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5671
5672 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5673 (cd_command): Likewise. Free "current_directory" before
5674 assigning to it.
5675 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5676 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5677 * top.c (gdb_dirbuf): Remove global declaration.
5678 * top.h (gdb_dirbuf): Likewise.
5679
5680 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5681
5682 * gnulib/aclocal.m4: Regenerate.
5683 * gnulib/config.in: Regenerate.
5684 * gnulib/configure: Regenerate.
5685 * gnulib/import/Makefile.am: Regenerate.
5686 * gnulib/import/Makefile.in: Regenerate.
5687 * gnulib/import/assure.h: New file.
5688 * gnulib/import/at-func.c: Likewise
5689 * gnulib/import/chdir-long.c: New file.
5690 * gnulib/import/chdir-long.h: New file.
5691 * gnulib/import/cloexec.c: New file.
5692 * gnulib/import/cloexec.h: New file.
5693 * gnulib/import/close.c: New file.
5694 * gnulib/import/closedir.c: New file.
5695 * gnulib/import/dirent-private.h: New file.
5696 * gnulib/import/dup-safer.c: New file.
5697 * gnulib/import/dup.c: New file.
5698 * gnulib/import/dup2.c: New file.
5699 * gnulib/import/error.c: New file.
5700 * gnulib/import/error.h: New file.
5701 * gnulib/import/exitfail.c: New file.
5702 * gnulib/import/exitfail.h: New file.
5703 * gnulib/import/fchdir.c: New file.
5704 * gnulib/import/fcntl.c: New file.
5705 * gnulib/import/fcntl.in.h: New file.
5706 * gnulib/import/fd-hook.c: New file.
5707 * gnulib/import/fd-hook.h: New file.
5708 * gnulib/import/fd-safer.c: New file.
5709 * gnulib/import/fdopendir.c: New file.
5710 * gnulib/import/filename.h: New file.
5711 * gnulib/import/filenamecat-lgpl.c: New file.
5712 * gnulib/import/filenamecat.h: New file.
5713 * gnulib/import/fstat.c: New file.
5714 * gnulib/import/fstatat.c: New file.
5715 * gnulib/import/getcwd-lgpl.c: New file.
5716 * gnulib/import/getcwd.c: New file.
5717 * gnulib/import/getdtablesize.c: New file.
5718 * gnulib/import/getlogin_r.c: New file.
5719 * gnulib/import/getprogname.c: New file.
5720 * gnulib/import/getprogname.h: New file.
5721 * gnulib/import/gettext.h: New file.
5722 * gnulib/import/glob-libc.h: New file.
5723 * gnulib/import/glob.c: New file.
5724 * gnulib/import/glob.in.h: New file.
5725 * gnulib/import/intprops.h: New file.
5726 * gnulib/import/m4/chdir-long.m4: New file.
5727 * gnulib/import/m4/close.m4: New file.
5728 * gnulib/import/m4/closedir.m4: New file.
5729 * gnulib/import/m4/d-ino.m4: New file.
5730 * gnulib/import/m4/d-type.m4: New file.
5731 * gnulib/import/m4/dup.m4: New file.
5732 * gnulib/import/m4/dup2.m4: New file.
5733 * gnulib/import/m4/error.m4: New file.
5734 * gnulib/import/m4/fchdir.m4: New file.
5735 * gnulib/import/m4/fcntl.m4: New file.
5736 * gnulib/import/m4/fcntl_h.m4: New file.
5737 * gnulib/import/m4/fdopendir.m4: New file.
5738 * gnulib/import/m4/filenamecat.m4: New file.
5739 * gnulib/import/m4/fstat.m4: New file.
5740 * gnulib/import/m4/fstatat.m4: New file.
5741 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5742 * gnulib/import/m4/getcwd-path-max.m4: New file.
5743 * gnulib/import/m4/getcwd.m4: New file.
5744 * gnulib/import/m4/getdtablesize.m4: New file.
5745 * gnulib/import/m4/getlogin_r.m4: New file.
5746 * gnulib/import/m4/getprogname.m4: New file.
5747 * gnulib/import/m4/glob.m4: New file.
5748 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5749 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5750 * gnulib/import/m4/mempcpy.m4: New file.
5751 * gnulib/import/m4/memrchr.m4: New file.
5752 * gnulib/import/m4/mode_t.m4: New file.
5753 * gnulib/import/m4/msvc-inval.m4: New file.
5754 * gnulib/import/m4/msvc-nothrow.m4: New file.
5755 * gnulib/import/m4/open.m4: New file.
5756 * gnulib/import/m4/openat.m4: New file.
5757 * gnulib/import/m4/opendir.m4: New file.
5758 * gnulib/import/m4/readdir.m4: New file.
5759 * gnulib/import/m4/realloc.m4: New file.
5760 * gnulib/import/m4/rewinddir.m4: New file.
5761 * gnulib/import/m4/save-cwd.m4: New file.
5762 * gnulib/import/m4/strdup.m4: New file.
5763 * gnulib/import/m4/strerror.m4: New file.
5764 * gnulib/import/m4/unistd-safer.m4: New file.
5765 * gnulib/import/mempcpy.c: New file.
5766 * gnulib/import/memrchr.c: New file.
5767 * gnulib/import/msvc-inval.c: New file.
5768 * gnulib/import/msvc-inval.h: New file.
5769 * gnulib/import/msvc-nothrow.c: New file.
5770 * gnulib/import/msvc-nothrow.h: New file.
5771 * gnulib/import/open.c: New file.
5772 * gnulib/import/openat-die.c: New file.
5773 * gnulib/import/openat-priv.h: New file.
5774 * gnulib/import/openat-proc.c: New file.
5775 * gnulib/import/openat.c: New file.
5776 * gnulib/import/openat.h: New file.
5777 * gnulib/import/opendir.c: New file.
5778 * gnulib/import/pipe-safer.c: New file.
5779 * gnulib/import/readdir.c: New file.
5780 * gnulib/import/realloc.c: New file.
5781 * gnulib/import/rewinddir.c: New file.
5782 * gnulib/import/save-cwd.c: New file.
5783 * gnulib/import/save-cwd.h: New file.
5784 * gnulib/import/strdup.c: New file.
5785 * gnulib/import/strerror-override.c: New file.
5786 * gnulib/import/strerror-override.h: New file.
5787 * gnulib/import/strerror.c: New file.
5788 * gnulib/import/unistd--.h: New file.
5789 * gnulib/import/unistd-safer.h: New file.
5790 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5791 "getcwd" and "glob".
5792 * ser-tcp.c: Undefine "close" before redefining it.
5793
5794 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5795
5796 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5797 get rid of res_val.
5798
5799 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5800
5801 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5802 <sol2,sparc>: Likewise.
5803 <sol2-64,i386>: Likewise.
5804
5805 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5806 -Wdeprecated-declarations on *-*-solaris*.
5807 * configure: Regenerate.
5808
5809 * procfs.c: Include "nat/inferior.h".
5810 (procfs_info_proc): Fix typo.
5811
5812 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5813
5814 * remote.c (vector): Include.
5815 (struct private_thread_info): Add field, thread_handle.
5816 (free_private_thread_info): Deallocate storage associated with
5817 thread handle.
5818 (get_private_info_thread): Initialize `thread_handle' field.
5819 (struct thread_item): Add field, thread_handle.
5820 (clear_threads_listing_context): Deallocate storage associated
5821 with thread handle.
5822 (start_thread): Add support for "handle" attribute.
5823 (thread_attributes): Add "handle".
5824 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5825 field.
5826 (remote_update_thread_list): Update thread_handle.
5827 (remote_thread_handle_to_thread_info): New function.
5828 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5829
5830 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5831
5832 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5833 function.
5834 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5835 * python/python-internal.h (thread_object_type): Declare.
5836
5837 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5838
5839 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5840 (target_thread_handle_to_thread_info): Declare.
5841 * target.c (target_thread_handle_to_thread_info): New function.
5842 * target-delegates.c: Regenerate.
5843 * gdbthread.h (find_thread_by_handle): Declare.
5844 * thread.c (find_thread_by_handle): New function.
5845 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5846 function.
5847 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5848
5849 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5850
5851 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5852
5853 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5854
5855 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5856
5857 2017-09-21 Yao Qi <yao.qi@linaro.org>
5858
5859 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5860 to gdb_target_obs.
5861
5862 2017-09-20 Tom Tromey <tom@tromey.com>
5863
5864 * breakpoint.c (struct counted_command_line): Remove.
5865 (breakpoint_commands): Update.
5866 (alloc_counted_command_line, incref_counted_command_line)
5867 (decref_counted_command_line, do_cleanup_counted_command_line)
5868 (make_cleanup_decref_counted_command_line): Remove.
5869 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5870 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5871 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5872 (save_breakpoints): Update.
5873 * breakpoint.h (counted_command_line): Now a typedef to
5874 shared_ptr.
5875 (struct breakpoint) <commands>: Now a counted_command_line.
5876 (struct bpstats) <command>: Likewise.
5877
5878 2017-09-20 Tom Tromey <tom@tromey.com>
5879
5880 * breakpoint.c (struct commands_info, do_map_commands_command):
5881 Remove.
5882 (commands_command_1): Update.
5883 (iterate_over_related_breakpoints): Take a function_view.
5884 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5885 (delete_command): Update.
5886 (map_breakpoint_numbers): Take a function_view.
5887 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5888 (disable_command): Update.
5889 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5890 (enable_command): Update.
5891 (struct disp_data, do_enable_breakpoint_disp)
5892 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5893 (do_map_enable_delete_breakpoint): Remove.
5894 (enable_once_command, enable_count_command, enable_delete_command)
5895 (delete_trace_variable_command): Update.
5896
5897 2017-09-20 Tom Tromey <tom@tromey.com>
5898
5899 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5900 (bpstat_clear): Use delete.
5901 (bpstats): New constructors.
5902 (bpstat_copy, bpstat_stop_status): Use new.
5903 (dprintf_after_condition_true): Update.
5904 * breakpoint.h (bpstats::bpstats): Add constructors.
5905 (bpstats::~bpstats): Add destructor.
5906
5907 2017-09-20 Pedro Alves <palves@redhat.com>
5908
5909 * eval.c (make_params): Delete, refactored as ...
5910 (class fake_method): ... this new type's ctor.
5911 (fake_method::~fake_method): New.
5912 (evaluate_subexp_standard): Use 'fake_method'.
5913
5914 2017-09-20 Tom Tromey <tom@tromey.com>
5915
5916 * windows-nat.c (get_windows_debug_event, windows_wait)
5917 (do_initial_windows_stuff, windows_attach): Update.
5918 * utils.c (vwarning, internal_vproblem): Update.
5919 (ui_unregister_input_event_handler_cleanup)
5920 (prepare_to_handle_input): Remove.
5921 (class scoped_input_handler): New.
5922 (defaulted_query, prompt_for_continue): Update.
5923 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5924 Update.
5925 * top.c (undo_terminal_modifications_before_exit): Update.
5926 * target/target.h (target_terminal_init, target_terminal_inferior)
5927 (target_terminal_ours): Don't declare.
5928 (class target_terminal): New.
5929 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5930 (target_terminal_ours_for_output)
5931 (make_cleanup_restore_target_terminal): Don't declare.
5932 (target_terminal_info): Remove.
5933 * target.c (enum terminal_state, terminal_state): Remove.
5934 (target_terminal::terminal_state): Define.
5935 (target_terminal::init): Rename from target_terminal_init.
5936 (target_terminal::inferior): Rename from
5937 target_terminal_inferior.
5938 (target_terminal::ours): Rename from target_terminal_ours.
5939 (target_terminal::ours_for_output): Rename from
5940 target_terminal_ours_for_output.
5941 (target_terminal::info): New method.
5942 (cleanup_restore_target_terminal)
5943 (make_cleanup_restore_target_terminal): Remove.
5944 * solib.c (handle_solib_event): Update.
5945 * remote.c (remote_serial_quit_handler): Update.
5946 (remote_terminal_inferior, remote_wait_as): Update.
5947 * record-full.c (record_full_wait_1): Update.
5948 * nto-procfs.c (procfs_create_inferior): Update.
5949 * nat/fork-inferior.c (startup_inferior): Update.
5950 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5951 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5952 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5953 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5954 (mi_breakpoint_created, mi_breakpoint_deleted)
5955 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5956 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5957 (mi_user_selected_context_changed, report_initial_inferior):
5958 Update.
5959 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5960 (linux_nat_terminal_inferior): Update.
5961 * infrun.c (follow_fork_inferior)
5962 (handle_vfork_child_exec_or_exit, do_target_resume)
5963 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5964 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5965 Update.
5966 * inflow.c (child_terminal_init, info_terminal_command): Update.
5967 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5968 (attach_command): Update.
5969 * infcall.c (call_thread_fsm_should_stop): Update.
5970 * gnu-nat.c (gnu_attach): Update.
5971 * extension.c (struct active_ext_lang_state)
5972 (restore_active_ext_lang): Update.
5973 * exceptions.c (print_flush): Update.
5974 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5975 (struct quit_handler_cleanup_data, restore_quit_handler)
5976 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5977 Remove.
5978 * cp-support.c (gdb_demangle): Update.
5979 * breakpoint.c (update_inserted_breakpoint_locations)
5980 (insert_breakpoint_locations, handle_jit_event)
5981 (disable_breakpoints_in_unloaded_shlib): Update.
5982 * annotate.c (annotate_breakpoints_invalid)
5983 (annotate_frames_invalid): Update.
5984
5985 2017-09-20 Tom Tromey <tom@tromey.com>
5986
5987 * main.c (catch_command_errors): Rename from
5988 catch_command_errors_const.
5989 (captured_main_1): Update.
5990
5991 2017-09-20 Pedro Alves <palves@redhat.com>
5992
5993 * cli/cli-cmds.c (list_command): Use print_sal_location.
5994 (print_sal_location): New function.
5995 (ambiguous_line_spec): Use print_sal_location.
5996 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5997 * symtab.c (find_function_start_sal): Likewise.
5998 * symtab.h (symtab_and_line::symbol): New field.
5999
6000 2017-09-20 Pedro Alves <palves@redhat.com>
6001
6002 * linespec.c (minsym_found): Handle non-text minsyms.
6003 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6004
6005 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6006
6007 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6008 backslash.
6009
6010 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6011
6012 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6013 vmovups instead vmovaps.
6014 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6015
6016 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6017
6018 * NEWS (Changes since GDB 8.0): Add starti.
6019 * infcmd.c (enum run_break): New.
6020 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6021 case.
6022 (run_command): Use enum run_how.
6023 (start_command): Likewise.
6024 (starti_command): New function.
6025 (RUN_ARGS_HELP): New macro.
6026 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6027 commands. Add starti command.
6028
6029 2017-09-19 Yao Qi <yao.qi@linaro.org>
6030
6031 * Makefile.in (monitor.o): Remove the rule.
6032
6033 2017-09-19 Yao Qi <yao.qi@linaro.org>
6034
6035 * annotate.h (struct annotate_arg_emitter): Use
6036 DISABLE_COPY_AND_ASSIGN.
6037 * common/refcounted-object.h (refcounted_object): Likewise.
6038 * completer.h (struct completion_result): Likewise.
6039 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6040 * filename-seen-cache.h (filename_seen_cache): Likewise.
6041 * gdbcore.h (thread_section_name): Likewise.
6042 * gdb_regex.h (compiled_regex): Likewise.
6043 * gdbthread.h (scoped_restore_current_thread): Likewise.
6044 * inferior.h (scoped_restore_current_inferior): Likewise.
6045 * jit.c (jit_reader): Likewise.
6046 * linespec.h (struct linespec_result): Likewise.
6047 * mi/mi-parse.h (struct mi_parse): Likewise.
6048 * nat/fork-inferior.c (execv_argv): Likewise.
6049 * progspace.h (scoped_restore_current_program_space): Likewise.
6050 * python/python-internal.h (class gdbpy_enter): Likewise.
6051 * regcache.h (regcache): Likewise.
6052 * target-descriptions.c (struct tdesc_reg): Likewise.
6053 (struct tdesc_type): Likewise.
6054 (struct tdesc_feature): Likewise.
6055 * ui-out.h (ui_out_emit_type): Likewise.
6056
6057 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6058
6059 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6060 label abort_expression.
6061
6062 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * common/buffer.c (buffer_xml_printf): Adjust.
6065 * common/xml-utils.c (xml_escape_text): Change return type to
6066 std::string, update code accordingly.
6067 * common/xml-utils.h (xml_escape_text): Change return type to
6068 std::string.
6069 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6070 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6071 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6072 Adjust.
6073
6074 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6075
6076 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6077 (SUBDIR_UNITTESTS_OBS): Add new object file.
6078 * unittests/xml-utils-selftests.c: New file.
6079
6080 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6081
6082 * common/selftest.h (selftest): New struct/interface.
6083 (register_test): Add name parameter, add new overload.
6084 (run_tests): Add filter parameter.
6085 (for_each_selftest_ftype): New typedef.
6086 (for_each_selftest): New declaration.
6087 * common/selftest.c (tests): Change type to
6088 map<string, unique_ptr<selftest>>.
6089 (simple_selftest): New struct.
6090 (register_test): New function.
6091 (register_test): Add name parameter and use it.
6092 (run_tests): Add filter parameter and use it. Add prints.
6093 Adjust to vector -> map change.
6094 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6095 registering selftests.
6096 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6097 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6098 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6099 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6100 * findvar.c (_initialize_findvar): Likewise.
6101 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6102 * maint.c (maintenance_selftest): Update call to run_tests.
6103 (maintenance_info_selftests): New function.
6104 (_initialize_maint_cmds): Register "maintenance info selftests"
6105 command. Update "maintenance selftest" doc.
6106 * regcache.c (_initialize_regcache): Add names when registering
6107 selftests.
6108 * rust-exp.y (_initialize_rust_exp): Likewise.
6109 * selftest-arch.c (gdbarch_selftest): New struct.
6110 (gdbarch_tests): Remove.
6111 (register_test_foreach_arch): Add name parameter. Call
6112 register_test.
6113 (tests_with_arch): Remove, move most content to
6114 gdbarch_selftest::operator().
6115 (_initialize_selftests_foreach_arch): Remove.
6116 * selftest-arch.h (register_test_foreach_arch): Add name
6117 parameter.
6118 (run_tests_with_arch): New declaration.
6119 * utils-selftests.c (_initialize_utils_selftests): Add names
6120 when registering selftests.
6121 * utils.c (_initialize_utils): Likewise.
6122 * unittests/array-view-selftests.c
6123 (_initialize_array_view_selftests): Likewise.
6124 * unittests/environ-selftests.c (_initialize_environ_selftests):
6125 Likewise.
6126 * unittests/function-view-selftests.c
6127 (_initialize_function_view_selftests): Likewise.
6128 * unittests/offset-type-selftests.c
6129 (_initialize_offset_type_selftests): Likewise.
6130 * unittests/optional-selftests.c
6131 (_initialize_optional_selftests): Likewise.
6132 * unittests/scoped_restore-selftests.c
6133 (_initialize_scoped_restore_selftests): Likewise.
6134 * NEWS: Document "maintenance selftest" and "maint info
6135 selftests".
6136
6137 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6138
6139 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6140 scoped_restore.
6141
6142 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6143
6144 * mi/mi-main.c (mi_load_progress): Make uiout variable
6145 a unique_ptr.
6146
6147 2017-09-15 Pedro Alves <palves@redhat.com>
6148
6149 * compile/compile-c-types.c (convert_enum, convert_int)
6150 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6151
6152 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6153
6154 * dwarf2read.c (copy_string): Remove.
6155 (parse_macro_definition): Replace copy_string with savestring.
6156
6157 2017-09-15 Yao Qi <yao.qi@linaro.org>
6158
6159 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6160 gdb_target_obs.
6161 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6162 Likewise.
6163 (i[34567]86-*-linux*): Likewise.
6164
6165 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6166
6167 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6168 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6169 <stack>: Change type to std::vector.
6170 <stack_len, stack_allocated>: Remove.
6171 <grow_stack>: Remove.
6172 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6173 (dwarf_expr_context::~dwarf_expr_context): Remove.
6174 (dwarf_expr_context::grow_stack): Remove.
6175 (dwarf_expr_context::push): Adjust.
6176 (dwarf_expr_context::pop): Adjust.
6177 (dwarf_expr_context::fetch): Adjust.
6178 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6179 (dwarf_expr_context::stack_empty_p): Adjust.
6180 (dwarf_expr_context::execute_stack_op): Adjust.
6181
6182 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6183
6184 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6185 return type to bool.
6186 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6187
6188 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6189
6190 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6191 Change type to bool.
6192 (dwarf_stack_value) <in_stack_memory>: Likewise.
6193 (dwarf_expr_context) <push_address>: Change parameter type to
6194 bool.
6195 <fetch_in_stack_memory>: Change return type to bool.
6196 <push>: Change parameter type to bool.
6197 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6198 to bool.
6199 (dwarf_expr_context::push_address): Likewise.
6200 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6201 to bool.
6202 (dwarf_expr_context::execute_stack_op): Adjust.
6203 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6204
6205 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6206
6207 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6208 (struct dwarf_expr_context) <n_pieces>: Remove.
6209 <pieces>: Change type to std::vector.
6210 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6211 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6212 pieces.
6213 (dwarf_expr_context::add_piece): Adjust.
6214 * dwarf2loc.c (struct piece_closure): Initialize fields.
6215 <n_pieces>: Remove.
6216 <pieces>: Change type to std::vector.
6217 (allocate_piece_closure): Adjust, change parameter to
6218 std::vector rvalue and std::move it to piece_closure.
6219 (rw_pieced_value): Adjust.
6220 (check_pieced_synthetic_pointer): Adjust.
6221 (indirect_synthetic_pointer): Adjust.
6222 (coerce_pieced_ref): Adjust.
6223 (free_pieced_value_closure): Adjust. Use delete to free
6224 piece_closure.
6225 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6226 to allocate_piece_closure.
6227 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6228
6229 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6230
6231 * probe.h (probe_ops_cp): Remove typedef.
6232 (DEF_VEC_P (probe_ops_cp)): Remove.
6233 (all_probe_ops): Change type to std::vector.
6234 * probe.c (info_probes_for_ops): Adjust to vector change.
6235 (probe_linespec_to_ops): Likewise.
6236 (all_probe_ops): Change type to std::vector.
6237 (_initialize_probe): Adjust to vector change.
6238 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6239 * elfread.c (elf_get_probes): Likewise.
6240 * stap-probe.c (_initialize_stap_probe): Likewise.
6241
6242 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6243
6244 * probe.h (struct bound_probe): Define constructors.
6245 * probe.c (bound_probe_s): Remove typedef.
6246 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6247 (collect_probes): Change return type to std::vector, remove
6248 cleanup.
6249 (compare_probes): Return bool, change parameter type. Change
6250 semantic to "less than".
6251 (gen_ui_out_table_header_info): Change parameter to std::vector
6252 and update.
6253 (exists_probe_with_pops): Likewise.
6254 (info_probes_for_ops): Update to std::vector change.
6255 (enable_probes_command): Likewise.
6256 (disable_probes_command): Likewise.
6257
6258 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6259
6260 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6261 vec to std::vector.
6262 * probe.c (parse_probes_in_pspace): Update.
6263 (find_probes_in_objfile): Update.
6264 (find_probe_by_pc): Update.
6265 (collect_probes): Update.
6266 (probe_any_get_probes): Update.
6267 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6268 return type to reference to std::vector.
6269 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6270 std::vector and update.
6271 (dtrace_process_dof): Likewise.
6272 (dtrace_get_probes): Likewise.
6273 * elfread.c (elf_get_probes): Change return type to std::vector,
6274 store an std::vector in bfd_data.
6275 (probe_key_free): Update to std::vector.
6276 * stap-probe.c (handle_stap_probe): Change parameter to
6277 std::vector and update.
6278 (stap_get_probes): Likewise.
6279 * symfile-debug.c (debug_sym_get_probes): Change return type to
6280 std::vector and update.
6281
6282 2017-09-11 Tom Tromey <tom@tromey.com>
6283
6284 * breakpoint.c (program_breakpoint_here_p): Update.
6285 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6286 from make_show_memory_breakpoints_cleanup. Return a
6287 scoped_restore_tmpl<int>.
6288 (restore_show_memory_breakpoints): Remove.
6289 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6290 * mem-break.c (memory_validate_breakpoint): Update.
6291 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6292 (ia64_memory_remove_breakpoint): Update.
6293 (ia64_breakpoint_from_pc): Update.
6294 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6295 from make_show_memory_breakpoints_cleanup.
6296
6297 2017-09-11 Tom Tromey <tom@tromey.com>
6298
6299 * d-namespace.c (d_lookup_symbol): Use std::string.
6300 (find_symbol_in_baseclass): Likewise.
6301
6302 2017-09-11 Tom Tromey <tom@tromey.com>
6303
6304 * ctf.c (ctf_start): Use std::string.
6305
6306 2017-09-11 Tom Tromey <tom@tromey.com>
6307
6308 * ada-lang.c (is_known_support_routine): Update.
6309 (ada_unhandled_exception_name_addr_from_raise): Update.
6310 * guile/scm-frame.c (gdbscm_frame_name): Update.
6311 * python/py-frame.c (frapy_name): Update.
6312 (frapy_function): Update.
6313 * stack.h (find_frame_funname): Update.
6314 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6315 (print_frame): Update.
6316
6317 2017-09-11 Tom Tromey <tom@tromey.com>
6318
6319 * findcmd.c (put_bits): Take a gdb::byte_vector.
6320 (parse_find_args): Return gdb::byte_vector. "args" now const.
6321 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6322 cleanups.
6323 (find_command): Update.
6324
6325 2017-09-11 Tom Tromey <tom@tromey.com>
6326
6327 * cli/cli-script.c (class scoped_restore_hook_in): New.
6328 (clear_hook_in_cleanup): Remove.
6329 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6330 scoped_restore_hook_in.
6331
6332 2017-09-11 Tom Tromey <tom@tromey.com>
6333
6334 * cli/cli-script.c (restore_interp): Remove.
6335 (read_command_lines): Use scoped_restore_interp.
6336 * interps.c (scoped_restore_interp::set_temp): Rename from
6337 interp_set_temp.
6338 * interps.h (class scoped_restore_interp): New.
6339 (interp_set_temp): Remove.
6340
6341 2017-09-11 Tom Tromey <tom@tromey.com>
6342
6343 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6344 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6345 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6346 scoped_restore.
6347 (mi_cmd_break_insert_1): Update.
6348 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6349 scoped_restore.
6350
6351 2017-09-11 Tom Tromey <tom@tromey.com>
6352
6353 * demangle.c (demangle_command): Update.
6354 * breakpoint.c (disable_command): Update.
6355 (enable_command): Update.
6356 (find_location_by_number): Make "number" const. Use
6357 get_number_trailer.
6358 * cli/cli-utils.c (extract_arg): Return std::string.
6359 * probe.c (parse_probe_linespec): Update. Change types.
6360 (collect_probes): Take string arguments.
6361 (parse_probe_linespec): Likewise.
6362 (info_probes_for_ops): Update.
6363 (enable_probes_command): Update.
6364 (disable_probes_command): Update.
6365 * break-catch-sig.c (catch_signal_split_args): Update.
6366 * mi/mi-parse.c (mi_parse): Update.
6367
6368 2017-09-11 Tom Tromey <tom@tromey.com>
6369
6370 * language.h (language_enum): Make argument const.
6371 * language.c (language_enum): Make argument const.
6372
6373 2017-09-11 Tom Tromey <tom@tromey.com>
6374
6375 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6376 as function.
6377 (skip_to_space): Rename from skip_to_space_const.
6378 * common/common-utils.c (skip_to_space): New function.
6379 (skip_to_space): Rename from skip_to_space_const.
6380 * cli/cli-utils.h (get_number): Rename from get_number_const.
6381 (extract_arg): Rename from extract_arg_const.
6382 * cli/cli-utils.c (get_number): Rename from get_number_const.
6383 (extract_arg): Rename from extract_arg_const.
6384 (number_or_range_parser::get_number): Use ::get_number.
6385 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6386 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6387 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6388 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6389 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6390 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6391 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6392 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6393
6394 2017-09-11 Tom Tromey <tom@tromey.com>
6395
6396 * python/python.c (do_start_initialization): Use
6397 py-event-types.def to initialize types.
6398 Define all object type structures.
6399 * python/python-internal.h: Don't declare event initialization
6400 functions.
6401 * python/py-threadevent.c (thread_event_object_type): Don't
6402 define.
6403 * python/py-stopevent.c (stop_event_object_type): Don't define.
6404 * python/py-signalevent.c (signal_event_object_type): Don't
6405 declare or define.
6406 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6407 (clear_objfiles_event_object_type): Don't declare or define.
6408 * python/py-infevents.c (inferior_call_pre_event_object_type)
6409 (inferior_call_post_event_object_type)
6410 (register_changed_event_object_type)
6411 (memory_changed_event_object_type): Don't declare or define.
6412 * python/py-inferior.c (new_thread_event_object_type)
6413 (new_inferior_event_object_type)
6414 (inferior_deleted_event_object_type): Don't declare or define.
6415 * python/py-exitedevent.c (exited_event_object_type): Don't
6416 declare or define.
6417 * python/py-evts.c (gdbpy_initialize_py_events): Use
6418 py-all-events.def.
6419 * python/py-events.h (thread_event_object_type): Don't declare.
6420 (events_object): Use py-all-events.def.
6421 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6422 py-event-types.def.
6423 * python/py-event-types.def: New file.
6424 * python/py-continueevent.c (create_continue_event_object): Don't
6425 declare or define.
6426 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6427 declare or define.
6428 * python/py-all-events.def: New file.
6429
6430 2017-09-11 Tom Tromey <tom@tromey.com>
6431
6432 * python/py-threadevent.c (create_thread_event_object): Return
6433 gdbpy_ref.
6434 * python/py-stopevent.h (create_stop_event_object)
6435 (create_breakpoint_event_object, create_signal_event_object):
6436 Update.
6437 * python/py-stopevent.c (create_stop_event_object): Return
6438 gdbpy_ref.
6439 (emit_stop_event): Update.
6440 * python/py-signalevent.c (create_signal_event_object): Return
6441 gdbpy_ref.
6442 * python/py-infevents.c (create_inferior_call_event_object):
6443 Update.
6444 * python/py-event.h (create_event_object)
6445 (create_thread_event_object): Update.
6446 * python/py-event.c (create_event_object): Return gdbpy_ref.
6447 * python/py-continueevent.c: Return gdbpy_ref.
6448 * python/py-bpevent.c (create_breakpoint_event_object): Return
6449 gdbpy_ref.
6450
6451 2017-09-11 Tom Tromey <tom@tromey.com>
6452
6453 PR python/15622:
6454 * NEWS: Add entry.
6455 * python/python.c (do_start_initialization): Initialize new event
6456 types.
6457 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6458 (gdbpy_initialize_inferior_deleted_event)
6459 (gdbpy_initialize_new_thread_event): Declare.
6460 * python/py-threadevent.c (create_thread_event_object): Add option
6461 "thread" parameter.
6462 * python/py-inferior.c (new_thread_event_object_type)
6463 (new_inferior_event_object_type)
6464 (inferior_deleted_event_object_type): Declare.
6465 (python_new_inferior, python_inferior_deleted): New functions.
6466 (add_thread_object): Emit new_thread event.
6467 (gdbpy_initialize_inferior): Attach new functions to corresponding
6468 observers.
6469 (new_thread, new_inferior, inferior_deleted): Define new event
6470 types.
6471 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6472 registries.
6473 * python/py-events.h (events_object) <new_inferior,
6474 inferior_deleted, new_thread>: New fields.
6475 * python/py-event.h (create_thread_event_breakpoint): Add optional
6476 "thread" parameter.
6477
6478 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6479
6480 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6481 check current_ui instead.
6482 (internal_vproblem): Likewise.
6483
6484 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6485
6486 * thread.c (print_thread_info_1): Remove unnecessary calls to
6487 uiout->is_mi_like_p.
6488
6489 2017-09-09 Tom Tromey <tom@tromey.com>
6490
6491 * namespace.h (add_using_directive): Update.
6492 * namespace.c (add_using_directive): Change type of excludes to
6493 std::vector.
6494 * dwarf2read.c (read_import_statement): Use std::vector.
6495 (read_namespace): Update.
6496 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6497
6498 2017-09-09 Tom Tromey <tom@tromey.com>
6499
6500 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6501
6502 2017-09-09 Tom Tromey <tom@tromey.com>
6503
6504 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6505
6506 2017-09-09 Tom Tromey <tom@tromey.com>
6507
6508 * stack.c (func_command): Use gdb::def_vector.
6509
6510 2017-09-09 Tom Tromey <tom@tromey.com>
6511
6512 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6513 ui_out_emit_list, ui_out_emit_tuple.
6514 (mi_cmd_var_update): Likewise.
6515
6516 2017-09-09 Tom Tromey <tom@tromey.com>
6517
6518 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6519 ui_out_redirect_pop.
6520 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6521 ui_out_redirect_pop.
6522 * utils.c (do_ui_out_redirect_pop)
6523 (make_cleanup_ui_out_redirect_pop): Remove.
6524 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6525 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6526 * ui-out.h (ui_out_redirect_pop): New class.
6527
6528 2017-09-09 Tom Tromey <tom@tromey.com>
6529
6530 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6531 (list_available_thread_groups, mi_cmd_list_thread_groups)
6532 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6533 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6534 Likewise.
6535
6536 2017-09-09 Tom Tromey <tom@tromey.com>
6537
6538 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6539 ui_out_emit_tuple.
6540
6541 2017-09-09 Tom Tromey <tom@tromey.com>
6542
6543 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6544 * stack.c (print_frame): Use ui_out_emit_tuple.
6545 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6546 (info_spu_mailbox_command, info_spu_dma_command)
6547 (info_spu_proxydma_command): Likewise.
6548 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6549 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6550 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6551 ui_out_emit_tuple.
6552 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6553
6554 2017-09-09 Tom Tromey <tom@tromey.com>
6555
6556 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6557 (class ui_out_emit_table): Update comment.
6558 * ui-out.c (do_cleanup_table_end)
6559 (make_cleanup_ui_out_table_begin_end): Remove.
6560 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6561 (info_spu_dma_cmdlist): Likewise.
6562 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6563 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6564 ui_out_emit_table.
6565
6566 2017-09-09 Tom Tromey <tom@tromey.com>
6567
6568 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6569 ui_out_emit_list, gdb::optional.
6570
6571 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6572
6573 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6574 prototype.
6575 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6576 prototype.
6577 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6578 prototype.
6579 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6580 * ada-exp.y: Remove _initialize_ada_exp prototype.
6581 * ada-lang.c: Remove _initialize_ada_language prototype.
6582 * ada-tasks.c: Remove _initialize_tasks prototype.
6583 * addrmap.c: Remove _initialize_addrmap prototype.
6584 * agent.c: Remove _initialize_agent prototype.
6585 * aix-thread.c: Remove _initialize_aix_thread prototype.
6586 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6587 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6588 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6589 prototype.
6590 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6591 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6592 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6593 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6594 prototype.
6595 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6596 prototype.
6597 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6598 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6599 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6600 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6601 prototype.
6602 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6603 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6604 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6605 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6606 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6607 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6608 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6609 prototype.
6610 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6611 prototype.
6612 * annotate.c: Remove _initialize_annotate prototype.
6613 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6614 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6615 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6616 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6617 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6618 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6619 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6620 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6621 prototype.
6622 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6623 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6624 * auto-load.c: Remove _initialize_auto_load prototype.
6625 * auxv.c: Remove _initialize_auxv prototype.
6626 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6627 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6628 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6629 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6630 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6631 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6632 prototype.
6633 * break-catch-throw.c: Remove _initialize_break_catch_throw
6634 prototype.
6635 * breakpoint.c: Remove _initialize_breakpoint prototype.
6636 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6637 * btrace.c: Remove _initialize_btrace prototype.
6638 * charset.c: Remove _initialize_charset prototype.
6639 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6640 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6641 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6642 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6643 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6644 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6645 * coffread.c: Remove _initialize_coffread prototype.
6646 * compile/compile.c: Remove _initialize_compile prototype.
6647 * complaints.c: Remove _initialize_complaints prototype.
6648 * completer.c: Remove _initialize_completer prototype.
6649 * copying.awk: Remove _initialize_copying prototype.
6650 * copying.c: Regenerate.
6651 * core-regset.c: Remove _initialize_core_regset prototype.
6652 * corefile.c: Remove _initialize_core prototype.
6653 * corelow.c: Remove _initialize_corelow prototype.
6654 * cp-abi.c: Remove _initialize_cp_abi prototype.
6655 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6656 * cp-support.c: Remove _initialize_cp_support prototype.
6657 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6658 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6659 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6660 * ctf.c: Remove _initialize_ctf prototype.
6661 * d-lang.c: Remove _initialize_d_language prototype.
6662 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6663 prototype.
6664 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6665 * dbxread.c: Remove _initialize_dbxread prototype.
6666 * dcache.c: Remove _initialize_dcache prototype.
6667 * demangle.c: Remove _initialize_demangler prototype.
6668 * disasm-selftests.c: Remove _initialize_disasm_selftests
6669 prototype.
6670 * disasm.c: Remove _initialize_disasm prototype.
6671 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6672 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6673 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6674 prototype.
6675 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6676 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6677 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6678 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6679 * elfread.c: Remove _initialize_elfread prototype.
6680 * exec.c: Remove _initialize_exec prototype.
6681 * extension.c: Remove _initialize_extension prototype.
6682 * f-lang.c: Remove _initialize_f_language prototype.
6683 * f-valprint.c: Remove _initialize_f_valprint prototype.
6684 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6685 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6686 * filesystem.c: Remove _initialize_filesystem prototype.
6687 * findcmd.c: Remove _initialize_mem_search prototype.
6688 * fork-child.c: Remove _initialize_fork_child prototype.
6689 * frame-base.c: Remove _initialize_frame_base prototype.
6690 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6691 * frame.c: Remove _initialize_frame prototype.
6692 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6693 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6694 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6695 * gcore.c: Remove _initialize_gcore prototype.
6696 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6697 * gdbarch.c: Regenerate.
6698 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6699 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6700 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6701 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6702 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6703 * go-lang.c: Remove _initialize_go_language prototype.
6704 * go32-nat.c: Remove _initialize_go32_nat prototype.
6705 * guile/guile.c: Remove _initialize_guile prototype.
6706 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6707 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6708 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6709 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6710 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6711 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6712 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6713 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6714 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6715 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6716 prototype.
6717 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6718 prototype.
6719 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6720 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6721 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6722 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6723 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6724 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6725 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6726 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6727 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6728 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6729 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6730 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6731 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6732 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6733 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6734 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6735 prototype.
6736 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6737 prototype.
6738 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6739 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6740 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6741 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6742 * infcall.c: Remove _initialize_infcall prototype.
6743 * infcmd.c: Remove _initialize_infcmd prototype.
6744 * inferior.c: Remove _initialize_inferiors prototype.
6745 * inflow.c: Remove _initialize_inflow prototype.
6746 * infrun.c: Remove _initialize_infrun prototype.
6747 * interps.c: Remove _initialize_interpreter prototype.
6748 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6749 * jit.c: Remove _initialize_jit prototype.
6750 * language.c: Remove _initialize_language prototype.
6751 * linux-fork.c: Remove _initialize_linux_fork prototype.
6752 * linux-nat.c: Remove _initialize_linux_nat prototype.
6753 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6754 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6755 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6756 * m2-lang.c: Remove _initialize_m2_language prototype.
6757 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6758 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6759 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6760 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6761 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6762 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6763 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6764 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6765 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6766 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6767 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6768 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6769 * machoread.c: Remove _initialize_machoread prototype.
6770 * macrocmd.c: Remove _initialize_macrocmd prototype.
6771 * macroscope.c: Remove _initialize_macroscope prototype.
6772 * maint.c: Remove _initialize_maint_cmds prototype.
6773 * mdebugread.c: Remove _initialize_mdebugread prototype.
6774 * memattr.c: Remove _initialize_mem prototype.
6775 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6776 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6777 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6778 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6779 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6780 * microblaze-linux-tdep.c: Remove
6781 _initialize_microblaze_linux_tdep prototype.
6782 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6783 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6784 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6785 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6786 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6787 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6788 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6789 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6790 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6791 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6792 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6793 prototype.
6794 * mipsread.c: Remove _initialize_mipsread prototype.
6795 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6796 prototype.
6797 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6798 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6799 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6800 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6801 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6802 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6803 prototype.
6804 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6805 * nto-procfs.c: Remove _initialize_procfs prototype.
6806 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6807 * objc-lang.c: Remove _initialize_objc_language prototype.
6808 * objfiles.c: Remove _initialize_objfiles prototype.
6809 * observer.c: Remove observer_test_first_notification_function,
6810 observer_test_second_notification_function,
6811 observer_test_third_notification_function, and
6812 _initialize_observer prototypes.
6813 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6814 * osabi.c: Remove _initialize_gdb_osabi prototype.
6815 * osdata.c: Remove _initialize_osdata prototype.
6816 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6817 * parse.c: Remove _initialize_parse prototype.
6818 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6819 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6820 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6821 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6822 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6823 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6824 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6825 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6826 * printcmd.c: Remove _initialize_printcmd prototype.
6827 * probe.c: Remove _initialize_probe prototype.
6828 * proc-api.c: Remove _initialize_proc_api prototype.
6829 * proc-events.c: Remove _initialize_proc_events prototype.
6830 * proc-service.c: Remove _initialize_proc_service prototype.
6831 * procfs.c: Remove _initialize_procfs prototype.
6832 * psymtab.c: Remove _initialize_psymtab prototype.
6833 * python/python.c: Remove _initialize_python prototype.
6834 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6835 * record-btrace.c: Remove _initialize_record_btrace prototype.
6836 * record-full.c: Remove _initialize_record_full prototype.
6837 * record.c: Remove _initialize_record prototype.
6838 * regcache.c: Remove _initialize_regcache prototype.
6839 * reggroups.c: Remove _initialize_reggroup prototype.
6840 * remote-notif.c: Remove _initialize_notif prototype.
6841 * remote-sim.c: Remove _initialize_remote_sim prototype.
6842 * remote.c: Remove _initialize_remote prototype.
6843 * reverse.c: Remove _initialize_reverse prototype.
6844 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6845 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6846 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6847 prototype.
6848 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6849 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6850 * rust-exp.y: Remove _initialize_rust_exp prototype.
6851 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6852 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6853 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6854 * score-tdep.c: Remove _initialize_score_tdep prototype.
6855 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6856 prototype.
6857 * ser-go32.c: Remove _initialize_ser_dos prototype.
6858 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6859 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6860 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6861 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6862 * serial.c: Remove _initialize_serial prototype.
6863 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6864 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6865 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6866 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6867 * skip.c: Remove _initialize_step_skip prototype.
6868 * sol-thread.c: Remove _initialize_sol_thread prototype.
6869 * solib-aix.c: Remove _initialize_solib_aix prototype.
6870 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6871 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6872 * solib-frv.c: Remove _initialize_frv_solib prototype.
6873 * solib-spu.c: Remove _initialize_spu_solib prototype.
6874 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6875 * solib-target.c: Remove _initialize_solib_target prototype.
6876 * solib.c: Remove _initialize_solib prototype.
6877 * source.c: Remove _initialize_source prototype.
6878 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6879 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6880 prototype.
6881 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6882 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6883 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6884 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6885 prototype.
6886 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6887 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6888 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6889 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6890 prototype.
6891 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6892 prototype.
6893 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6894 prototype.
6895 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6896 prototype.
6897 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6898 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6899 prototype.
6900 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6901 prototype.
6902 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6903 prototype.
6904 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6905 prototype.
6906 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6907 prototype.
6908 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6909 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6910 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6911 * stabsread.c: Remove _initialize_stabsread prototype.
6912 * stack.c: Remove _initialize_stack prototype.
6913 * stap-probe.c: Remove _initialize_stap_probe prototype.
6914 * std-regs.c: Remove _initialize_frame_reg prototype.
6915 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6916 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6917 * symfile.c: Remove _initialize_symfile prototype.
6918 * symmisc.c: Remove _initialize_symmisc prototype.
6919 * symtab.c: Remove _initialize_symtab prototype.
6920 * target-dcache.c: Remove _initialize_target_dcache prototype.
6921 * target-descriptions.c: Remove _initialize_target_descriptions
6922 prototype.
6923 * thread.c: Remove _initialize_thread prototype.
6924 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6925 prototype.
6926 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6927 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6928 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6929 prototype.
6930 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6931 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6932 * tracefile.c: Remove _initialize_tracefile prototype.
6933 * tracepoint.c: Remove _initialize_tracepoint prototype.
6934 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6935 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6936 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6937 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6938 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6939 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6940 * tui/tui.c: Remove _initialize_tui prototype.
6941 * typeprint.c: Remove _initialize_typeprint prototype.
6942 * user-regs.c: Remove _initialize_user_regs prototype.
6943 * utils.c: Remove _initialize_utils prototype.
6944 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6945 * valarith.c: Remove _initialize_valarith prototype.
6946 * valops.c: Remove _initialize_valops prototype.
6947 * valprint.c: Remove _initialize_valprint prototype.
6948 * value.c: Remove _initialize_values prototype.
6949 * varobj.c: Remove _initialize_varobj prototype.
6950 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6951 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6952 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6953 * windows-nat.c: Remove _initialize_windows_nat,
6954 _initialize_check_for_gdb_ini, and _initialize_loadable
6955 prototypes.
6956 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6957 * xcoffread.c: Remove _initialize_xcoffread prototype.
6958 * xml-support.c: Remove _initialize_xml_support prototype.
6959 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6960 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6961 prototype.
6962 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6963 prototype.
6964 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6965
6966 2017-09-08 Keith Seitz <keiths@redhat.com>
6967
6968 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6969 field.
6970
6971 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6972
6973 * f-valprint.c (f_val_print): Remove check for one byte
6974 sized integers. Remove printing of character type.
6975
6976 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6977 Christoph Weinmann <christoph.t.weinmann@intel.com>
6978 Bernhard Heckel <bernhard.heckel@intel.com>
6979
6980 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6981 to maintain proper indentation when printing pointers/refs.
6982
6983 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6984
6985 GDB 8.0.1 released.
6986
6987 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6988
6989 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6990
6991 2017-09-05 Tom Tromey <tom@tromey.com>
6992
6993 * parse.c (funcall_chain): Now a std::vector.
6994 (start_arglist, end_arglist): Simplify.
6995 (free_funcalls): Remove.
6996 (parse_exp_in_context_1): Remove cleanup.
6997
6998 2017-09-05 Tom Tromey <tom@tromey.com>
6999
7000 * go-exp.y (go_parse): Don't create a cleanup.
7001
7002 2017-09-05 Tom Tromey <tom@tromey.com>
7003
7004 * d-exp.y (PrimaryExpression): Use std::string.
7005 (d_parse): Don't create a cleanup.
7006
7007 2017-09-05 Tom Tromey <tom@tromey.com>
7008
7009 * utils.c (do_clear_parser_state): Remove.
7010 (make_cleanup_clear_parser_state): Remove.
7011 * p-exp.y (pascal_parse): Use scoped_restore.
7012 * m2-exp.y (m2_parse): Use scoped_restore.
7013 * f-exp.y (f_parse): Use scoped_restore.
7014 * d-exp.y (d_parse): Use scoped_restore.
7015 * c-exp.y (c_parse): Use scoped_restore.
7016 * ada-exp.y (ada_parse): Use scoped_restore.
7017 * utils.h (make_cleanup_clear_parser_state): Remove.
7018
7019 2017-09-06 Keith Seitz <keiths@redhat.com>
7020
7021 * dwarf2read.c (dw2_linkage_name_attr): New function.
7022 (dw2_linkage_name): New function.
7023 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7024 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7025 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7026
7027 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7028
7029 * config/djgpp/djconfig.sh: Correct shell portability issue.
7030
7031 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7032
7033 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7034
7035 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7036
7037 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7038 * NEWS: Mention new FreeBSD/mips native configuration.
7039 * configure.host: Add aarch64*-*-freebsd*.
7040 * configure.nat: Likewise.
7041 * aarch64-fbsd-nat.c: New file.
7042
7043 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7044
7045 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7046 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7047 * NEWS: Mention new FreeBSD/aarch64 target.
7048 * configure.tgt: Add aarch64*-*-freebsd*.
7049 * aarch64-fbsd-tdep.c: New file.
7050 * aarch64-fbsd-tdep.h: New file.
7051
7052 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7053
7054 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7055
7056 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7057
7058 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7059 of TLS symbols.
7060
7061 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7062
7063 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7064 call.
7065
7066 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7067
7068 * infrun.c (follow_exec): Call add_thread after
7069 target_find_description.
7070
7071 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7072
7073 * infrun.c (handle_inferior_event_1): When exec'ing, read
7074 stop_pc after follow_exec.
7075
7076 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7077
7078 * remote.c (process_g_packet): Update error message.
7079
7080 2017-09-05 Yao Qi <yao.qi@linaro.org>
7081
7082 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7083 targets.
7084
7085 2017-09-05 Pedro Alves <palves@redhat.com>
7086
7087 * eval.c (eval_call, evaluate_funcall): New functions, factored
7088 out from ...
7089 (evaluate_subexp_standard): ... this.
7090
7091 2017-09-05 Yao Qi <yao.qi@linaro.org>
7092
7093 * amd64-tdep.c (amd64_target_description): Create target
7094 descriptions.
7095 (_initialize_amd64_tdep): Don't call functions
7096 initialize_tdesc_amd64_*. Add self tests.
7097 * arch/amd64.c (amd64_create_target_description): Add parameter
7098 is_linux. Call set_tdesc_osabi if is_linux is true.
7099 * arch/amd64.h (amd64_create_target_description): Update the
7100 declaration.
7101 * arch/i386.c (i386_create_target_description): Add parameter
7102 is_linux. Call set_tdesc_osabi if is_linux is true.
7103 * arch/i386.h (i386_create_target_description): Update
7104 declaration.
7105 * configure.tgt: Add i386.o to gdb_target_obs.
7106 * features/Makefile (XMLTOC): Remove i386/*.xml.
7107 * features/i386/amd64-avx-avx512.c: Remove.
7108 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7109 * features/i386/amd64-avx-mpx.c: Remove.
7110 * features/i386/amd64-avx.c: Remove.
7111 * features/i386/amd64-mpx.c: Remove.
7112 * features/i386/amd64.c: Remove.
7113 * features/i386/i386-avx-avx512.c: Remove.
7114 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7115 * features/i386/i386-avx-mpx.c: Remove.
7116 * features/i386/i386-avx.c: Remove.
7117 * features/i386/i386-mmx.c: Remove.
7118 * features/i386/i386-mpx.c: Remove.
7119 * features/i386/i386.c: Remove.
7120 * i386-tdep.c: Don't include features/i386/i386*.c., include
7121 target-descriptions.h and arch/i386.h.
7122 (i386_target_description): Create target descriptions.
7123 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7124 functions. Do self tests.
7125
7126 2017-09-05 Yao Qi <yao.qi@linaro.org>
7127
7128 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7129 * features/i386/amd64-avx-avx512-linux.c: Removed.
7130 * features/i386/amd64-avx-linux.c: Removed.
7131 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7132 * features/i386/amd64-avx-mpx-linux.c: Removed.
7133 * features/i386/amd64-linux.c: Removed.
7134 * features/i386/amd64-mpx-linux.c: Removed.
7135 * features/i386/x32-avx-avx512-linux.c: Removed.
7136 * features/i386/x32-avx-linux.c: Removed.
7137 * features/i386/x32-linux.c: Removed.
7138
7139 2017-09-05 Yao Qi <yao.qi@linaro.org>
7140
7141 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7142 features/i386/*.c.
7143 (amd64_linux_read_description): Call
7144 amd64_create_target_description.
7145 * arch/amd64.c: New file.
7146 * arch/amd64.h: New file.
7147 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7148 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7149
7150 2017-09-05 Yao Qi <yao.qi@linaro.org>
7151
7152 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7153 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7154 (amd64_linux_read_description): Create target descriptions.
7155 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7156 functions. Add unit tests.
7157 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7158 x32-core.xml.
7159 * features/i386/64bit-avx.c: Generated.
7160 * features/i386/64bit-avx512.c: Generated.
7161 * features/i386/64bit-core.c: Generated.
7162 * features/i386/64bit-linux.c: Generated.
7163 * features/i386/64bit-mpx.c: Generated.
7164 * features/i386/64bit-pkeys.c: Generated.
7165 * features/i386/64bit-segments.c: Generated.
7166 * features/i386/64bit-sse.c: Generated.
7167 * features/i386/x32-core.c: Generated.
7168 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7169 c files for amd64-linux and x32-linux.
7170
7171 2017-09-05 Yao Qi <yao.qi@linaro.org>
7172
7173 * amd64-linux-tdep.c (amd64_linux_read_description): New
7174 function.
7175 (amd64_linux_core_read_description): Call
7176 amd64_linux_read_description.
7177 (amd64_linux_init_abi): Likewise.
7178 (amd64_x32_linux_init_abi): Likewise.
7179 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7180 * x86-linux-nat.c (x86_linux_read_description): Call
7181 amd64_linux_read_description.
7182
7183 2017-09-05 Yao Qi <yao.qi@linaro.org>
7184
7185 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7186 comments.
7187
7188 2017-09-05 Yao Qi <yao.qi@linaro.org>
7189
7190 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7191 * features/i386/i386-avx-avx512-linux.c: Remove.
7192 * features/i386/i386-avx-linux.c: Remove.
7193 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7194 * features/i386/i386-avx-mpx-linux.c: Remove.
7195 * features/i386/i386-linux.c: Remove.
7196 * features/i386/i386-mmx-linux.c: Remove.
7197 * features/i386/i386-mpx-linux.c: Remove.
7198
7199 2017-09-05 Yao Qi <yao.qi@linaro.org>
7200
7201 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7202 (SFILES): Add arch/i386.c.
7203 (HFILES_NO_SRCDIR): Add arch/i386.h.
7204 * arch/i386.c: New file.
7205 * arch/i386.h: New file.
7206 * arch/tdesc.h (allocate_target_description): Declare.
7207 (set_tdesc_architecture): Declare.
7208 (set_tdesc_osabi): Declare.
7209 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7210 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7211 include arch/i386.h.
7212 (i386_linux_read_description): Remove code and call
7213 i386_create_target_description.
7214 (set_tdesc_architecture): New function.
7215 (set_tdesc_osabi): New function.
7216 * target-descriptions.h (allocate_target_description): Remove.
7217
7218 2017-09-05 Yao Qi <yao.qi@linaro.org>
7219
7220 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7221 * target-descriptions.c (tdesc_create_feature): Likewise, and
7222 adjust code.
7223 * features/i386/32bit-avx.c: Re-generated.
7224 * features/i386/32bit-avx512.c: Re-generated.
7225 * features/i386/32bit-core.c: Re-generated.
7226 * features/i386/32bit-linux.c: Re-generated.
7227 * features/i386/32bit-mpx.c: Re-generated.
7228 * features/i386/32bit-pkeys.c: Re-generated.
7229 * features/i386/32bit-sse.c: Re-generated.
7230
7231 2017-09-05 Yao Qi <yao.qi@linaro.org>
7232
7233 * regformats/regdef.h (struct reg): Override operator == and !=.
7234
7235 2017-09-05 Yao Qi <yao.qi@linaro.org>
7236
7237 * arch/tdesc.h: New file.
7238 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7239 * target-descriptions.c: Update comments.
7240 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7241 declarations.
7242 * features/i386/32bit-avx.c: Re-generated.
7243 * features/i386/32bit-avx512.c: Re-generated.
7244 * features/i386/32bit-core.c: Re-generated.
7245 * features/i386/32bit-linux.c: Re-generated.
7246 * features/i386/32bit-mpx.c: Re-generated.
7247 * features/i386/32bit-pkeys.c: Re-generated.
7248 * features/i386/32bit-sse.c: Re-generated.
7249
7250 2017-09-05 Yao Qi <yao.qi@linaro.org>
7251
7252 * regformats/regdat.sh: Update generated code.
7253
7254 2017-09-05 Yao Qi <yao.qi@linaro.org>
7255
7256 * regformats/regdat.sh: Adjust code order.
7257
7258 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7259
7260 * expprint.c (dump_subexp_body_standard): Use constant format
7261 string in fprintf_filtered call.
7262
7263 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7264
7265 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7266 NetBSD/i386.
7267 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7268
7269 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7270
7271 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7272
7273 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7274
7275 * bsd-kvm.o: Define _KMEMUSER.
7276 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7277 * configure: Regenerate.
7278
7279 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7280
7281 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7282 * i386-fbsd-nat.c: Likewise.
7283
7284 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7285
7286 * unittests/array-view-selftests.c: Add include of <array>.
7287
7288 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7289
7290 * spu-tdep.c (flush_ea_cache): Add missing argument to
7291 call_function_by_hand.
7292
7293 2017-09-04 Pedro Alves <palves@redhat.com>
7294
7295 * NEWS (Safer support for debugging with no debug info): New.
7296
7297 2017-09-04 Pedro Alves <palves@redhat.com>
7298
7299 * c-exp.y (function_method, function_method_void): Add current
7300 instance flags to TYPE_INSTANCE.
7301 * dwarf2read.c (check_modifier): New.
7302 (compute_delayed_physnames): Assert that only C++ adds delayed
7303 physnames. Mark fn_fields as const/volatile depending on
7304 physname.
7305 * eval.c (make_params): New type_instance_flags parameter. Use
7306 it as the new type's instance flags.
7307 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7308 flags element and pass it to make_params.
7309 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7310 instance flags element.
7311 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7312 * gdbtypes.h: Include "enum-flags.h".
7313 (type_instance_flags): New enum-flags type.
7314 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7315 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7316 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7317 (follow_type_instance_flags): New function.
7318 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7319 * parser-defs.h (follow_type_instance_flags): Declare.
7320 * valops.c (value_struct_elt_for_reference): const/volatile must
7321 match too.
7322
7323 2017-09-04 Pedro Alves <palves@redhat.com>
7324
7325 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7326 function/method scopes; lookup the nested name as a function local
7327 static variable.
7328
7329 2017-09-04 Pedro Alves <palves@redhat.com>
7330
7331 (%type <voidval>): Add function_method.
7332 * c-exp.y (exp): New production for calls with no arguments.
7333 (function_method, function_method_void_or_typelist): New
7334 productions.
7335 (exp): New production for "method()::static_var".
7336 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7337 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7338 Handle OP_FUNC_STATIC_VAR.
7339 * parse.c (operator_length_standard):
7340 Handle OP_FUNC_STATIC_VAR.
7341
7342 2017-09-04 Pedro Alves <palves@redhat.com>
7343
7344 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7345 handling.
7346 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7347 Ditto.
7348 * parse.c (operator_length_standard, operator_check_standard):
7349 Ditto.
7350 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7351
7352 2017-09-04 Pedro Alves <palves@redhat.com>
7353
7354 * ax-gdb.c: Include "typeprint.h".
7355 (gen_expr_for_cast): New function.
7356 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7357 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7358 type is unknown.
7359 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7360 nodebug_data_symbol.
7361 * eval.c: Include "typeprint.h".
7362 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7363 Error out if symbol has unknown type.
7364 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7365 evaluate_subexp_for_cast.
7366 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7367 OP_VAR_MSYM_VALUE.
7368 (evaluate_subexp_for_cast): New function.
7369 * gdbtypes.c (init_nodebug_var_type): New function.
7370 (objfile_type): Use it to initialize types of variables with no
7371 debug info.
7372 * typeprint.c (error_unknown_type): New.
7373 * typeprint.h (error_unknown_type): New declaration.
7374 * compile/compile-c-types.c (convert_type_basic): Handle
7375 TYPE_CODE_ERROR; warn and fallback to int for variables with
7376 unknown type.
7377
7378 2017-09-04 Pedro Alves <palves@redhat.com>
7379
7380 * eval.c (evaluate_var_value): New function, factored out from ...
7381 (evaluate_subexp_standard): ... here.
7382
7383 2017-09-04 Pedro Alves <palves@redhat.com>
7384
7385 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7386 Remove useless assignments to 'op'.
7387
7388 2017-09-04 Pedro Alves <palves@redhat.com>
7389
7390 * eval.c (eval_skip_value): New function.
7391 (evaluate_subexp_standard): Use it.
7392
7393 2017-09-04 Pedro Alves <palves@redhat.com>
7394
7395 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7396 function name from symbol/minsym and pass it to
7397 error_call_unknown_return_type.
7398
7399 2017-09-04 Pedro Alves <palves@redhat.com>
7400
7401 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7402 * ax-gdb.c (gen_msym_var_ref): New function.
7403 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7404 * eval.c (evaluate_var_msym_value): New function.
7405 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7406 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7407 to call_function_by_hand.
7408 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7409 Handle OP_VAR_MSYM_VALUE.
7410 (union exp_element) <msymbol>: New field.
7411 * minsyms.h (struct type): Forward declare.
7412 (find_minsym_type_and_address): Declare.
7413 * parse.c (write_exp_elt_msym): New function.
7414 (write_exp_msymbol): Delete, refactored as ...
7415 (find_minsym_type_and_address): ... this new function.
7416 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7417 (operator_length_standard, operator_check_standard): Handle
7418 OP_VAR_MSYM_VALUE.
7419 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7420
7421 2017-09-04 Pedro Alves <palves@redhat.com>
7422
7423 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7424 TYPE_GNU_IFUNC specially here. Throw error if return type is
7425 unknown.
7426 * ada-typeprint.c (print_func_type): Handle functions with unknown
7427 return type.
7428 * c-typeprint.c (c_type_print_base): Handle functions and methods
7429 with unknown return type.
7430 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7431 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7432 * compile/compile-c-types.c: Include "objfiles.h".
7433 (convert_func): For functions with unknown return type, warn and
7434 default to int.
7435 * compile/compile-object-run.c (compile_object_run): Adjust call
7436 to call_function_by_hand_dummy.
7437 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7438 call_function_by_hand.
7439 * eval.c (evaluate_subexp_standard): Adjust calls to
7440 call_function_by_hand. Handle functions and methods with unknown
7441 return type. Pass expect_type to call_function_by_hand.
7442 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7443 return type.
7444 * gcore.c (call_target_sbrk): Adjust call to
7445 call_function_by_hand.
7446 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7447 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7448 an integer address type instead of nodebug.
7449 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7450 call_function_by_hand.
7451 * infcall.c (error_call_unknown_return_type): New function.
7452 (call_function_by_hand): New "default_return_type" parameter.
7453 Pass it down.
7454 (call_function_by_hand_dummy): New "default_return_type"
7455 parameter. Use it instead of defaulting to int. If there's no
7456 default and the return type is unknown, throw an error. If
7457 there's a default return type, and the called function has no
7458 debug info, then assume the function is prototyped.
7459 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7460 New "default_return_type" parameter.
7461 (error_call_unknown_return_type): New declaration.
7462 * linux-fork.c (call_lseek): Cast return type of lseek.
7463 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7464 call_function_by_hand.
7465 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7466 calls to call_function_by_hand.
7467 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7468 return type.
7469 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7470 (value_nsstring, print_object_command): Adjust calls to
7471 call_function_by_hand.
7472 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7473 functions with unknown return type.
7474 (pascal_type_print_func_varspec_suffix): New function.
7475 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7476 TYPE_CODE_METHOD>: Use it.
7477 * python/py-value.c (valpy_call): Adjust call to
7478 call_function_by_hand.
7479 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7480 call_function_by_hand.
7481 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7482 call_function_by_hand.
7483 * valops.c (value_allocate_space_in_inferior): Adjust call to
7484 call_function_by_hand.
7485 * typeprint.c (type_print_unknown_return_type): New function.
7486 * typeprint.h (type_print_unknown_return_type): New declaration.
7487
7488 2017-09-04 Pedro Alves <palves@redhat.com>
7489
7490 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7491 types with more than one parameter as prototyped.
7492
7493 2017-09-04 Pedro Alves <palves@redhat.com>
7494
7495 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7496 (disassemble_command): Use gdb_disassembly_flags instead of bare
7497 int.
7498 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7499 (dump_insns, do_mixed_source_and_assembly_deprecated)
7500 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7501 Use gdb_disassembly_flags instead of bare int.
7502 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7503 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7504 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7505 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7506 (enum gdb_disassembly_flag): ... values of this new enumeration.
7507 (gdb_disassembly_flags): Define.
7508 (gdb_disassembly)
7509 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7510 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7511 gdb_disassembly_flags instead of bare int.
7512 * record-btrace.c (btrace_insn_history)
7513 (record_btrace_insn_history, record_btrace_insn_history_range)
7514 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7515 instead of bare int.
7516 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7517 Use gdb_disassembly_flags instead of bare int.
7518 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7519 Define.
7520 * target-delegates.c: Regenerate.
7521 * target.c (target_insn_history, target_insn_history_from)
7522 (target_insn_history_range): Use gdb_disassembly_flags instead of
7523 bare int.
7524 * target.h: Include "disasm.h".
7525 (struct target_ops) <to_insn_history, to_insn_history_from,
7526 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7527 int.
7528 (target_insn_history, target_insn_history_from)
7529 (target_insn_history_range): Use gdb_disassembly_flags instead of
7530 bare int.
7531
7532 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7533
7534 * cli/cli-script.c (build_command_line): For if/while commands,
7535 check whether args is empty.
7536
7537 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7538
7539 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7540 (enum command_control_type): Likewise.
7541 (struct command_line): Likewise.
7542 (free_command_lines): Likewise.
7543 (struct command_lines_deleter): Likewise.
7544 (command_line_up): Likewise.
7545 (read_command_lines): Likewise.
7546 (read_command_lines_1): Likewise.
7547 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7548 (enum command_control_type): Likewise.
7549 (struct command_line): Likewise.
7550 (free_command_lines): Likewise.
7551 (struct command_lines_deleter): Likewise.
7552 (command_line_up): Likewise.
7553 (read_command_lines): Likewise.
7554 (read_command_lines_1): Likewise.
7555 * breakpoint.h: Include cli/cli-script.h.
7556 * extension-priv.h: Likewise.
7557 * gdbcmd.h: Likewise.
7558
7559 2017-09-04 Pedro Alves <palves@redhat.com>
7560
7561 * ada-lang.c (is_known_support_routine): Move sal declaration to
7562 where it is initialized.
7563 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7564 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7565 (clear_command, update_static_tracepoint): Remove init_sal
7566 references. Move declarations closer to initializations.
7567 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7568 initializations.
7569 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7570 references. Move sal declarations closer to initializations.
7571 * frame.c (find_frame_sal): Return a symtab_and_line via function
7572 return instead of output parameter. Remove init_sal references.
7573 * frame.h (find_frame_sal): Return a symtab_and_line via function
7574 return instead of output parameter.
7575 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7576 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7577 instead of memset.
7578 (gdbscm_find_pc_line): Remove init_sal reference.
7579 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7580 references. Move declarations closer to initializations.
7581 * infcmd.c (set_step_frame): Update. Move declarations closer to
7582 initializations.
7583 (finish_backward): Remove init_sal references. Move declarations
7584 closer to initializations.
7585 * infrun.c (process_event_stop_test, handle_step_into_function)
7586 (insert_hp_step_resume_breakpoint_at_frame)
7587 (insert_step_resume_breakpoint_at_caller): Likewise.
7588 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7589 (symbol_to_sal): Likewise.
7590 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7591 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7592 to its initialization.
7593 * reverse.c (save_bookmark_command): Use new/delete. Remove
7594 init_sal references. Move declarations closer to initializations.
7595 * source.c (get_current_source_symtab_and_line): Remove brace
7596 initialization.
7597 (set_current_source_symtab_and_line): Now takes the sal by const
7598 reference. Remove brace initialization.
7599 (line_info): Remove init_sal reference.
7600 * source.h (set_current_source_symtab_and_line): Now takes a
7601 symtab_and_line via const reference.
7602 * stack.c (set_current_sal_from_frame): Adjust.
7603 (print_frame_info): Adjust.
7604 (get_last_displayed_sal): Return the sal via function return
7605 instead of via output parameter. Simplify.
7606 (frame_info): Adjust.
7607 * stack.h (get_last_displayed_sal): Return the sal via function
7608 return instead of via output parameter.
7609 * symtab.c (init_sal): Delete.
7610 (find_pc_sect_line): Remove init_sal references. Move
7611 declarations closer to initializations.
7612 (find_function_start_sal): Remove init_sal references. Move
7613 declarations closer to initializations.
7614 * symtab.h (struct symtab_and_line): In-class initialize all
7615 fields.
7616 * tracepoint.c (set_traceframe_context)
7617 (print_one_static_tracepoint_marker): Remove init_sal references.
7618 Move declarations closer to initializations.
7619 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7620 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7621 declarations closer to initializations.
7622 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7623 init_sal references. Adjust.
7624
7625 2017-09-04 Pedro Alves <palves@redhat.com>
7626
7627 * ax-gdb.c (agent_command_1): Use range-for.
7628 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7629 * breakpoint.c: Include "common/array-view.h".
7630 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7631 parameter from struct symtabs_and_lines to
7632 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7633 (breakpoint_sals_to_pc): Change sals parameter from struct
7634 symtabs_and_lines to std::vector reference.
7635 (check_fast_tracepoint_sals): Change sals parameter from struct
7636 symtabs_and_lines to std::array_view. Use range-for.
7637 (decode_static_tracepoint_spec): Return a std::vector instead of
7638 symtabs_and_lines. Update.
7639 (create_breakpoint): Update.
7640 (break_range_command, until_break_command, clear_command): Update.
7641 (base_breakpoint_decode_location, bkpt_decode_location)
7642 (bkpt_probe_create_sals_from_location)
7643 (bkpt_probe_decode_location, tracepoint_decode_location)
7644 (tracepoint_probe_decode_location)
7645 (strace_marker_create_sals_from_location): Return a std::vector
7646 instead of symtabs_and_lines.
7647 (strace_marker_create_breakpoints_sal): Update.
7648 (strace_marker_decode_location): Return a std::vector instead of
7649 symtabs_and_lines. Update.
7650 (update_breakpoint_locations): Change struct symtabs_and_lines
7651 parameters to gdb::array_view. Adjust.
7652 (location_to_sals): Return a std::vector instead of
7653 symtabs_and_lines. Update.
7654 (breakpoint_re_set_default): Use std::vector instead of struct
7655 symtabs_and_lines.
7656 (decode_location_default): Return a std::vector instead of
7657 symtabs_and_lines. Update.
7658 * breakpoint.h: Include "common/array-view.h".
7659 (struct breakpoint_ops) <decode_location>: Now returns a
7660 std::vector instead of returning a symtabs_and_lines via output
7661 parameter.
7662 (update_breakpoint_locations): Change sals parameters to use
7663 gdb::array_view.
7664 * cli/cli-cmds.c (edit_command, list_command): Update to use
7665 std::vector and gdb::array_view.
7666 (ambiguous_line_spec): Adjust to use gdb::array_view and
7667 range-for.
7668 (compare_symtabs): Rename to ...
7669 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7670 const reference and adjust.
7671 (filter_sals): Rewrite using std::vector and standard algorithms.
7672 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7673 (jump_command): Update to use std::vector.
7674 * linespec.c (struct linespec_state) <canonical_names>: Update
7675 comment.
7676 (add_sal_to_sals_basic): Delete.
7677 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7678 (decode_line_2, create_sals_line_offset)
7679 (convert_address_location_to_sals, convert_linespec_to_sals)
7680 (convert_explicit_location_to_sals, parse_linespec)
7681 (event_location_to_sals, decode_line_full, decode_line_1)
7682 (decode_line_with_current_source)
7683 (decode_line_with_last_displayed, decode_objc)
7684 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7685 (linespec_result::~linespec_result): Adjust to use std::vector
7686 instead of symtabs_and_lines.
7687 * linespec.h (linespec_sals::sals): Now a std::vector.
7688 (struct linespec_result): Use std::vector, bool, and in-class
7689 initialization.
7690 (decode_line_1, decode_line_with_current_source)
7691 (decode_line_with_last_displayed): Return std::vector.
7692 * macrocmd.c (info_macros_command): Use std::vector.
7693 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7694 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7695 std::vector.
7696 * probe.h (parse_probes): Return a std::vector.
7697 * python/python.c (gdbpy_decode_line): Use std::vector and
7698 gdb::array_view.
7699 * source.c (select_source_symtab, line_info): Use std::vector.
7700 * stack.c (func_command): Use std::vector.
7701 * symtab.h (struct symtabs_and_lines): Delete.
7702 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7703
7704 2017-09-04 Pedro Alves <palves@redhat.com>
7705
7706 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7707 unittests/array-view-selftests.c.
7708 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7709 * common/array-view.h: New file.
7710 * unittests/array-view-selftests.c: New file.
7711
7712 2017-09-04 Pedro Alves <palves@redhat.com>
7713
7714 * cli/cli-cmds.c (edit_command): Pass message to
7715 ambiguous_line_spec.
7716 (list_command): Pass message to ambiguous_line_spec. Say
7717 "first"/"last" instead of "start" and "end" to be consistent with
7718 the manual.
7719 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7720 them to print formatted message.
7721
7722 2017-09-04 Pedro Alves <palves@redhat.com>
7723
7724 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7725 ftrace_update_insns by reference instead of pointer.
7726
7727 2017-09-04 Yao Qi <yao.qi@linaro.org>
7728
7729 * i386-go32-tdep.c: Include x86-xstate.h.
7730 (i386_go32_init_abi): Call i386_target_description.
7731 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7732 if xcr0 is X86_XSTATE_X87_MASK.
7733 * i386-tdep.h (tdesc_i386): Remove the declaration.
7734 (tdesc_i386_mmx): Likewise.
7735
7736 2017-09-04 Yao Qi <yao.qi@linaro.org>
7737
7738 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7739 X86_XSTATE_SSE_MASK instead of 0.
7740
7741 2017-09-04 Yao Qi <yao.qi@linaro.org>
7742
7743 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7744 i386_target_description.
7745 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7746 i386_target_description.
7747 * i386-tdep.c (i386_gdbarch_init): Likewise.
7748
7749 2017-09-04 Yao Qi <yao.qi@linaro.org>
7750
7751 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7752 (x86_darwin_init_abi_64): Call amd64_target_description.
7753 * amd64-dicos-tdep.c: Likewise.
7754 * amd64-fbsd-nat.c: Likewise.
7755 * amd64-fbsd-tdep.c: Likewise.
7756 * amd64-nbsd-tdep.c: Likewise.
7757 * amd64-obsd-tdep.c: Likewise.
7758 * amd64-sol2-tdep.c: Likewise.
7759 * amd64-windows-tdep.c: Likewise.
7760 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7761
7762 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7763
7764 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7765 (btrace_function) <insn>: Change type to use std::vector.
7766 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7767 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7768 ftrace_update_insns, ftrace_compute_global_level_offset,
7769 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7770 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7771 change to std::vector.
7772 (ftrace_update_insns): Adjust to change to std::vector, change
7773 type of INSN parameter.
7774 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7775 * record-btrace.c (btrace_call_history_insn_range,
7776 btrace_compute_src_line_range,
7777 record_btrace_frame_prev_register): Adjust to change to
7778 std::vector.
7779 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7780 to change to std::vector.
7781
7782 2017-09-03 Tom Tromey <tom@tromey.com>
7783
7784 * corefile.c (reopen_exec_file): Use std::string.
7785
7786 2017-09-03 Tom Tromey <tom@tromey.com>
7787
7788 * compile/compile.c (compile_register_name_mangled): Return
7789 std::string.
7790 * compile/compile-loc2c.c (pushf_register_address): Update.
7791 (pushf_register): Update.
7792 * compile/compile-c-types.c (convert_array): Update.
7793 * compile/compile-c-symbols.c (generate_vla_size): Update.
7794 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7795 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7796 (convert_one_symbol): Update.
7797 (generate_c_for_for_one_variable): Update.
7798 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7799 std::string.
7800 (generate_register_struct): Update.
7801 * compile/compile-internal.h (c_get_range_decl_name): Return a
7802 std::string.
7803 (compile_register_name_mangled): Return std::string.
7804
7805 2017-09-03 Tom Tromey <tom@tromey.com>
7806
7807 * utils.c (perror_string): Return a std::string.
7808 (throw_perror_with_name, perror_warning_with_name): Update.
7809
7810 2017-09-03 Tom Tromey <tom@tromey.com>
7811
7812 * demangle.c (demangle_command): Use std::string,
7813 unique_xmalloc_ptr.
7814
7815 2017-09-03 Tom Tromey <tom@tromey.com>
7816
7817 * cli/cli-setshow.c (do_set_command): Use std::string.
7818
7819 2017-09-03 Tom Tromey <tom@tromey.com>
7820
7821 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7822
7823 2017-09-03 Tom Tromey <tom@tromey.com>
7824
7825 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7826
7827 2017-09-03 Tom Tromey <tom@tromey.com>
7828
7829 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7830 gdb::unique_xmalloc_ptr.
7831
7832 2017-09-03 Tom Tromey <tom@tromey.com>
7833
7834 * thread.c (print_thread_info_1): Use string_printf.
7835 (thread_apply_command, thread_apply_all_command): Use
7836 std::string.
7837
7838 2017-09-03 Tom Tromey <tom@tromey.com>
7839
7840 * valprint.c (val_print_string): Update.
7841 * gdbcore.h (memory_error_message): Return std::string.
7842 * corefile.c (memory_error_message): Return std::string.
7843 (memory_error): Update.
7844 * breakpoint.c (insert_bp_location): Update.
7845
7846 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7847
7848 * target/waitstatus.h (target_waitstatus_to_string): Change
7849 return type to std::string.
7850 * target/waitstatus.c (target_waitstatus_to_string): Return
7851 std::string.
7852 * target.h (target_waitstatus_to_string): Remove declaration.
7853 * infrun.c (resume, clear_proceed_status_thread,
7854 print_target_wait_results, do_target_wait, save_waitstatus,
7855 stop_all_threads): Adjust.
7856 * record-btrace.c (record_btrace_wait): Adjust.
7857 * target-debug.h
7858 (target_debug_print_struct_target_waitstatus_p): Adjust.
7859
7860 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7861
7862 PR gdb/22046
7863 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7864 detection.
7865
7866 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7867
7868 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7869 for setting/unsetting environment variables on the remote target.
7870 (New remote packets): Add entries for QEnvironmentHexEncoded,
7871 QEnvironmentUnset and QEnvironmentReset.
7872 * common/environ.c (gdb_environ::operator=): Extend method to
7873 handle m_user_set_env_list and m_user_unset_env_list.
7874 (gdb_environ::clear): Likewise.
7875 (match_var_in_string): Change type of first parameter from 'char
7876 *' to 'const char *'.
7877 (gdb_environ::set): Extend method to handle
7878 m_user_set_env_list and m_user_unset_env_list.
7879 (gdb_environ::unset): Likewise.
7880 (gdb_environ::clear_user_set_env): New method.
7881 (gdb_environ::user_set_envp): Likewise.
7882 (gdb_environ::user_unset_envp): Likewise.
7883 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7884 m_user_unset_env_list on move constructor/assignment.
7885 (unset): Add new default parameter 'update_unset_list = true'.
7886 (clear_user_set_env): New method.
7887 (user_set_envp): Likewise.
7888 (user_unset_envp): Likewise.
7889 (m_user_set_env_list): New std::set.
7890 (m_user_unset_env_list): Likewise.
7891 * common/rsp-low.c (hex2str): New function.
7892 (bin2hex): New overload for bin2hex function.
7893 * common/rsp-low.c (hex2str): New prototype.
7894 (str2hex): New overload prototype.
7895 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7896 QEnvironmentUnset and QEnvironmentReset.
7897 (remote_protocol_features): Add QEnvironmentHexEncoded,
7898 QEnvironmentUnset and QEnvironmentReset packets.
7899 (send_environment_packet): New function.
7900 (extended_remote_environment_support): Likewise.
7901 (extended_remote_create_inferior): Call
7902 extended_remote_environment_support.
7903 (_initialize_remote): Add QEnvironmentHexEncoded,
7904 QEnvironmentUnset and QEnvironmentReset packet configs.
7905 * unittests/environ-selftests.c (gdb_selftest_env_var):
7906 New variable.
7907 (test_vector_initialization): New function.
7908 (test_init_from_host_environ): Likewise.
7909 (test_reinit_from_host_environ): Likewise.
7910 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7911 Likewise.
7912 (test_unset_set_empty_vector): Likewise.
7913 (test_vector_clear): Likewise.
7914 (test_std_move): Likewise.
7915 (test_move_constructor):
7916 (test_self_move): Likewise.
7917 (test_set_unset_reset): Likewise.
7918 (run_tests): Rewrite in terms of the functions above.
7919
7920 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7921
7922 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7923 (adi_available): Use a temp variable of type CORE_ADDR as argument
7924 3 when calling target_auxv_search.
7925 (adi_normalize_address): Use masks and xor operators to calculate
7926 normalized address.
7927 (adi_read_versions, adi_write_versions, adi_print_versions)
7928 (do_examine, do_assign): Use paddress.
7929
7930 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7931
7932 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7933 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7934 out of loop and add supply of FIR.
7935 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7936 add collect of FIR.
7937
7938 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7939
7940 PR gdb/21827
7941 * cli/cli-script.c (define_command): Don't convert command name
7942 to lower case.
7943
7944 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7945
7946 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7947 Update all callers accordingly. Remove all code blocks handling
7948 the case where DISPP is not NULL.
7949
7950 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7951
7952 PR symtab/22003
7953 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7954 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7955 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7956
7957 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7958
7959 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7960 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7961 (read_comp_units_from_section): New parameter abbrev_section, use
7962 read_and_check_comp_unit_head, allocate signatured_type if needed.
7963 (create_all_comp_units): Update read_comp_units_from_section caller.
7964
7965 2017-08-23 Pedro Alves <palves@redhat.com>
7966
7967 PR remote/21852
7968 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7969 to null_ptid and switch to thread without reading the registers
7970 after adding the inferior.
7971
7972 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7973
7974 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7975 compile-gcc.
7976 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7977 (compile_to_object): Implement compile_gcc.
7978 (_initialize_compile): Install "set compile-gcc". Initialize
7979 compile_gcc.
7980
7981 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7982
7983 * compile/compile.c (compile_to_object): Conditionally call
7984 set_verbose. Conditionally call compile or compile_v0.
7985
7986 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7987
7988 * sparc64-tdep.h: (adi_normalize_address): New export.
7989 * sparc-nat.h: (open_adi_tag_fd): New export.
7990 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7991 * sparc64-linux-tdep.c:
7992 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7993 (sparc64_linux_handle_segmentation_fault): New function.
7994 (sparc64_linux_init_abi): Register
7995 sparc64_linux_handle_segmentation_fault
7996 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7997 (sparc64_addr_bits_remove): New function.
7998 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7999 (MAX_PROC_NAME_SIZE): New macro.
8000 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8001 (sparc64adilist): New variable.
8002 (adi_proc_list): New variable.
8003 (find_adi_info): New function.
8004 (add_adi_info): New function.
8005 (get_adi_info_proc): New function.
8006 (get_adi_info): New function.
8007 (info_adi_command): New function.
8008 (read_maps_entry): New function.
8009 (adi_available): New function.
8010 (adi_normalize_address): New function.
8011 (adi_align_address): New function.
8012 (adi_convert_byte_count): New function.
8013 (adi_tag_fd): New function.
8014 (adi_is_addr_mapped): New function.
8015 (adi_read_versions): New function.
8016 (adi_write_versions): New function.
8017 (adi_print_versions): New function.
8018 (do_examine): New function.
8019 (do_assign): New function.
8020 (adi_examine_command): New function.
8021 (adi_assign_command): New function.
8022 (_initialize_sparc64_adi_tdep): New function.
8023
8024 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8025
8026 * breakpoint.c (breakpoints_info): Rename to ...
8027 (info_breakpoints_command): ... this.
8028 (watchpoints_info): Rename to ...
8029 (info_watchpoints_command): ... this.
8030 (tracepoints_info): Rename to ...
8031 (info_tracepoints_command): ... this.
8032 (_initialize_breakpoint): Adjust.
8033 * dcache.c (dcache_info): Rename to ...
8034 (info_display_command): ... this.
8035 (_initialize_dcache): Adjust.
8036 * frame.h (args_info): Rename to ...
8037 (info_args_command): ... this.
8038 (locals_info): Rename to ...
8039 (info_locals_command): ... this.
8040 * infcmd.c (nofp_registers_info): Rename to ...
8041 (info_registers_command): ... this.
8042 (float_info): Rename to ...
8043 (info_float_command): ... this.
8044 (program_info): Rename to ...
8045 (info_program_command): ... this.
8046 (all_registers_info): Rename to ...
8047 (info_all_registers_command): ... this.
8048 (vector_info): Rename to ...
8049 (info_vector_command): ... this.
8050 (float_info): Rename to ...
8051 (info_float_command): ... this.
8052 (_initialize_infcmd): Adjust.
8053 * inferior.h (term_info): Rename to ...
8054 (info_terminal_command): ... this.
8055 * inflow.c (term_info): Rename to ...
8056 (info_terminal_command): ... this.
8057 (_initialize_inflow): Adjust.
8058 * infrun.c (signals_info): Rename to ...
8059 (info_signals_command): ... this.
8060 (_initialize_infrun): Adjust.
8061 * objc-lang.c (classes_info): Rename to ...
8062 (info_classes_command): ... this.
8063 (selectors_info): Rename to ...
8064 (info_selectors_command): ... this.
8065 (_initialize_objc_language): Adjust.
8066 * printcmd.c (sym_info): Rename to ...
8067 (info_symbol_command): ... this.
8068 (address_info): Rename to ...
8069 (info_address_command): ... this.
8070 (display_info): Rename to ...
8071 (info_display_command): ... this.
8072 (_initialize_printcmd): Adjust.
8073 * reverse.c (bookmarks_info): Rename to ...
8074 (info_breakpoints_command): ... this.
8075 (_initialize_reverse): Adjust.
8076 * ser-go32.c (dos_info): Rename to ...
8077 (info_serial_command): ... this.
8078 (_initialize_ser_dos): Adjust.
8079 * skip.c (skip_info): Rename to ...
8080 (info_skip_command): ... this.
8081 (_initialize_step_skip): Adjust.
8082 * source.c (line_info): Rename to ...
8083 (info_line_command): ... this.
8084 (source_info): Rename to ...
8085 (info_source_command)
8086 * stack.c (frame_info): Rename to ...
8087 (info_frame_command): ... this.
8088 (locals_info): Rename to ...
8089 (info_locals_command): ... this.
8090 (args_info): Rename to ...
8091 (info_args_command): ... this.
8092 (_initialize_stack): Adjust.
8093 * symtab.c (sources_info): Rename to ...
8094 (info_sources_command): ... this.
8095 (variables_info): Rename to ...
8096 (info_variables_command): ... this.
8097 (functions_info): Rename to ...
8098 (info_functions_command): ... this.
8099 (types_info): Rename to ...
8100 (info_types_command): ... this.
8101 (_initialize_symtab): Adjust.
8102 * target.c (target_info): Rename to ...
8103 (info_target_command): ... this.
8104 (initialize_targets): Adjust.
8105 * tracepoint.c (tvariables_info): Rename to ...
8106 (info_tvariables_command): ... this.
8107 (scope_info): Rename to ...
8108 (info_scope_command): ... this.
8109 (trace_dump_actions): Adjust.
8110 (_initialize_tracepoint): Adjust.
8111
8112 2017-08-22 Tom Tromey <tom@tromey.com>
8113
8114 * breakpoint.h (install_breakpoint): Update.
8115 * breakpoint.c (add_solib_catchpoint): Update.
8116 (install_breakpoint): Change argument to a std::unique_ptr.
8117 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8118 (create_breakpoint_sal, create_breakpoint): Update.
8119 (watch_command_1, catch_exec_command_1)
8120 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8121 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8122 Return the breakpoint.
8123 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8124 (new_single_step_breakpoint): Update.
8125 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8126 std::unique_ptr.
8127 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8128 std::unique_ptr.
8129 * break-catch-sig.c (create_signal_catchpoint): Use
8130 std::unique_ptr.
8131 * ada-lang.c (create_ada_exception_catchpoint): Use
8132 std::unique_ptr.
8133
8134 2017-08-22 Tom Tromey <tom@tromey.com>
8135
8136 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8137
8138 2017-08-22 Tom Tromey <tom@tromey.com>
8139
8140 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8141 (lookup_partial_symbol): Update.
8142
8143 2017-08-22 Tom Tromey <tom@tromey.com>
8144
8145 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8146 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8147 (find_and_open_source, symtab_to_fullname): Update.
8148 * psymtab.c (psymtab_to_fullname): Update.
8149
8150 2017-08-22 Tom Tromey <tom@tromey.com>
8151
8152 * exec.c (exec_file_attach): Update.
8153 * linux-thread-db.c (try_thread_db_load): Update.
8154 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8155 * utils.c (gdb_realpath): Change return type.
8156 (gdb_realpath_keepfile): Update.
8157 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8158 (_initialize_utils): Register the new self test.
8159 * source.c (openp): Update.
8160 (find_and_open_source): Update.
8161 * nto-tdep.c (nto_find_and_open_solib): Update.
8162 * main.c (set_gdb_data_directory): Update.
8163 (captured_main_1): Update.
8164 * dwarf2read.c (dwarf2_get_dwz_file): Update
8165 (dw2_map_symbol_filenames): Update.
8166 * auto-load.c (auto_load_safe_path_vec_update): Update.
8167 (filename_is_in_auto_load_safe_path_vec): Change type of
8168 "filename_realp".
8169 (auto_load_objfile_script): Update.
8170 (file_is_auto_load_safe): Update. Use std::string.
8171 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8172
8173 2017-08-22 Tom Tromey <tom@tromey.com>
8174
8175 * utils.c (gdb_realpath_keepfile): Return a
8176 gdb::unique_xmalloc_ptr.
8177 * exec.c (exec_file_attach): Update.
8178 * utils.h (gdb_realpath_keepfile): Return a
8179 gdb::unique_xmalloc_ptr.
8180
8181 2017-08-22 Tom Tromey <tom@tromey.com>
8182
8183 * compile/compile.c (compile_file_command): Use
8184 gdb::unique_xmalloc_ptr, std::string.
8185 * utils.c (gdb_abspath): Change return type.
8186 * source.c (openp): Update.
8187 * objfiles.c (allocate_objfile): Update.
8188 * main.c (set_gdb_data_directory): Update.
8189 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8190
8191 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8192
8193 * cli-cmds.c (list_commands): List actual code around more than
8194 one location.
8195
8196 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8197
8198 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8199
8200 2017-08-21 Pedro Alves <palves@redhat.com>
8201
8202 PR gdb/19487
8203 * c-exp.y (variable production): Handle function aliases.
8204 * minsyms.c (msymbol_is_text): New function.
8205 * minsyms.h (msymbol_is_text): Declare.
8206 * symtab.c (find_function_alias_target): New function.
8207 * symtab.h (find_function_alias_target): Declare.
8208
8209 2017-08-21 Pedro Alves <palves@redhat.com>
8210
8211 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8212 typedefs.
8213 * typeprint.c (whatis_exp): If handling "whatis", and expression
8214 is OP_TYPE, strip one typedef level. Otherwise don't strip
8215 typedefs here.
8216 * valops.c (value_cast): Save "to" type before resolving
8217 stubs/typedefs. Use that type as resulting value's type.
8218
8219 2017-08-18 Tom Tromey <tom@tromey.com>
8220 Pedro Alves <palves@redhat.com>
8221
8222 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8223 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8224 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8225 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8226 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8227 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8228 (linux_get_siginfo_data): Add "thread" argument. Use
8229 scoped_restore.
8230 * linux-nat.c (linux_child_follow_fork)
8231 (check_stopped_by_watchpoint): Use scoped_restore.
8232 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8233 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8234 (restore_inferior_ptid, save_inferior_ptid): Remove.
8235 * btrace.c (btrace_fetch): Use scoped_restore.
8236 * bsd-uthread.c (bsd_uthread_fetch_registers)
8237 (bsd_uthread_store_registers): Use scoped_restore.
8238 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8239 scoped_restore.
8240 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8241 (aix_thread_xfer_partial): Use scoped_restore.
8242 * inferior.h (save_inferior_ptid): Remove.
8243
8244 2017-08-18 Yao Qi <yao.qi@linaro.org>
8245
8246 PR tdep/21818
8247 * arm-tdep.c (gdb_print_insn_arm): Mark
8248 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8249
8250 2017-08-18 Yao Qi <yao.qi@linaro.org>
8251
8252 * NEWS: Mention GDBserver's new option "--selftest".
8253 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8254 * selftest.c: Move it to common/selftest.c.
8255 * selftest.h: Move it to common/selftest.h.
8256 * selftest-arch.c (reset): New function.
8257 (tests_with_arch): Call reset.
8258
8259 2017-08-18 Yao Qi <yao.qi@linaro.org>
8260
8261 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8262 instead of exception_fprintf and printf_filtered.
8263
8264 2017-08-18 Yao Qi <yao.qi@linaro.org>
8265
8266 * selftest.c (register_self_test): Rename it to
8267 selftests::register_test.
8268 (run_self_tests): selftest::run_tests.
8269 * selftest.h: Update declarations.
8270 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8271 selftests::register_test_foreach_arch.
8272 * selftest-arch.h: Update declaration.
8273 * aarch64-tdep.c: Update.
8274 * arm-tdep.c: Likewise.
8275 * disasm-selftests.c: Likewise.
8276 * dwarf2loc.c: Likewise.
8277 * dwarf2-frame.c: Likewise.
8278 * findvar.c: Likewise.
8279 * gdbarch-selftests.c: Likewise.
8280 * maint.c (maintenance_selftest): Likewise.
8281 * regcache.c: Likewise.
8282 * rust-exp.y: Likewise.
8283 * selftest-arch.c: Likewise.
8284 * unittests/environ-selftests.c: Likewise.
8285 * unittests/function-view-selftests.c: Likewise.
8286 * unittests/offset-type-selftests.c: Likewise.
8287 * unittests/optional-selftests.c: Likewise.
8288 * unittests/scoped_restore-selftests.c: Likewise.
8289 * utils-selftests.c: Likewise.
8290
8291 2017-08-17 Pedro Alves <palves@redhat.com>
8292
8293 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8294 local.
8295
8296 2017-08-17 Pedro Alves <palves@redhat.com>
8297
8298 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8299 field.
8300 (reset_die_in_process): Delete, replaced by ...
8301 (process_die_scope): ... this new class. Make it responsible for
8302 freeing cu->line_header too.
8303 (process_die): Use process_die_scope.
8304 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8305 cu->line_header_die_owner. Don't release the line header if it's
8306 owned by the CU.
8307 (setup_type_unit_groups): Make the CU/DIE own the line header.
8308 Don't release the line header here.
8309
8310 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8311
8312 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8313
8314 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8315
8316 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8317 Single-Key mode
8318
8319 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8320
8321 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8322 mode command list.
8323
8324 2017-08-15 Stafford Horne <shorne@gmail.com>
8325
8326 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8327
8328 2017-08-15 Stafford Horne <shorne@gmail.com>
8329
8330 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8331
8332 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8333
8334 PR gdb/21954
8335 * infcmd.c (unset_environment_command): Use the 'clear' method on
8336 the environment instead of resetting it.
8337
8338 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8339
8340 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8341 platforms.
8342
8343 2017-08-14 Tom Tromey <tom@tromey.com>
8344
8345 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8346 (print_binary_chars): Likewise.
8347 (BITS_IN_BYTES): Remove.
8348
8349 2017-08-14 Tom Tromey <tom@tromey.com>
8350
8351 PR gdb/21675
8352 * valprint.c (LOW_ZERO): Change value to 034.
8353 (print_octal_chars): Add static_asserts for octal constants.
8354 * printcmd.c (print_scalar_formatted): Add 'd' case.
8355
8356 2017-08-11 Tom Tromey <tom@tromey.com>
8357
8358 * symfile.c (add_symbol_file_command): Use std::vector.
8359
8360 2017-08-14 Tom Tromey <tom@tromey.com>
8361
8362 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8363 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8364 std::move.
8365 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8366
8367 2017-08-11 Pedro Alves <palves@redhat.com>
8368
8369 * infrun.c (process_event_stop_test): Adjust
8370 function_name_is_marked_for_skip call.
8371 * skip.c: Include <list>.
8372 (skiplist_entry): Make it a class with private fields, and
8373 getters/setters.
8374 (skiplist_entry_chain): Delete.
8375 (skiplist_entries): New.
8376 (skiplist_entry_count): Delete.
8377 (highest_skiplist_entry_num): New.
8378 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8379 (add_skiplist_entry): Delete.
8380 (skiplist_entry::skiplist_entry): New.
8381 (skiplist_entry::add_entry): New.
8382 (skip_file_command, skip_function): Adjust.
8383 (compile_skip_regexp): Delete.
8384 (skip_command): Don't compile regexp here. Adjust to use
8385 skiplist_entry::add_entry.
8386 (skip_info): Adjust to use range-for and getters.
8387 (skip_enable_command, skip_disable_command): Adjust to use
8388 range-for and setters.
8389 (skip_delete_command): Adjust to use std::list.
8390 (add_skiplist_entry): Delete.
8391 (skip_file_p): Delete, refactored as ...
8392 (skiplist_entry::do_skip_file_p): ... this new method.
8393 (skip_gfile_p): Delete, refactored as ...
8394 (skiplist_entry::do_gskip_file_p): ... this new method.
8395 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8396 (skiplist_entry::skip_function_p): ... this new method.
8397 (function_name_is_marked_for_skip): Now returns bool, and takes
8398 the function sal by const reference. Adjust to use range-for and
8399 skiplist_entry methods.
8400 (_initialize_step_skip): Remove references to
8401 skiplist_entry_chain, skiplist_entry_count.
8402 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8403 takes the function sal by const reference.
8404
8405 2017-08-11 Yao Qi <yao.qi@linaro.org>
8406
8407 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8408 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8409 (dwarf2_frame_cache):
8410 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8411 RETURN_MASK_ALL and set *this_case to NULL.
8412 * frame-unwind.h: Update comments.
8413
8414 2017-08-11 Yao Qi <yao.qi@linaro.org>
8415
8416 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8417 (dwarf2_frame_state_copy_regs): Remove.
8418 (dwarf2_frame_state_free_regs): Remove.
8419 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8420 (dwarf2_restore_rule): Call method .alloc_regs instead of
8421 dwarf2_frame_state_alloc_regs.
8422 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8423 constructor. Call std::move.
8424 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8425 (dwarf2_frame_cache): Likewise.
8426
8427 [GDB_SELF_TEST]: Include selftest.h and
8428 selftest-arch.h.
8429 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8430 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8431 execute_cfa_program_test.
8432
8433 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8434 copy ctor, assignment operator, move assignment.
8435 <alloc_regs>: New method.
8436 <swap>: New method.
8437 (struct dwarf2_frame_state): Delete dtor.
8438 (dwarf2_frame_state_alloc_regs): Remove declaration.
8439 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8440 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8441
8442 2017-08-11 Yao Qi <yao.qi@linaro.org>
8443
8444 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8445 (dwarf2_frame_state::dwarf2_frame_state): New.
8446 (dwarf2_frame_state::~dwarf2_frame_state): New.
8447 (dwarf2_fetch_cfa_info): Update.
8448 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8449 rather than a pointer. Update code.
8450 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8451 dtor.
8452 <data_align, code_align, retaddr_column>: Change them to const.
8453 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8454 to bool.
8455
8456 2017-08-11 Yao Qi <yao.qi@linaro.org>
8457
8458 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8459 <loc.exp>: New field.
8460 * dwarf2-frame.c (execute_cfa_program): Update.
8461 (dwarf2_frame_prev_register): Update.
8462
8463 2017-08-10 Pedro Alves <palves@redhat.com>
8464
8465 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8466
8467 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8468
8469 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8470 (fbsd_pending_children): Use std::list.
8471 (fbsd_remember_child): Likewise.
8472 (fbsd_is_child_pending): Likewise.
8473 (fbsd_pending_vfork_done): Use std::forward_list.
8474 (fbsd_add_vfork_done): Likewise.
8475 (fbsd_is_vfork_done_pending): Likewise.
8476 (fbsd_next_vfork_done): Likewise.
8477
8478 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8479
8480 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8481 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8482 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8483 for `mapfilename'.
8484 (fbsd_xfer_partial): Use gdb::byte_vector.
8485 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8486
8487 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8488
8489 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8490 "filestuff.h".
8491 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8492
8493 2017-08-09 Tom Tromey <tom@tromey.com>
8494
8495 * skip.c (skiplist_entry): New constructor.
8496 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8497 (skiplist_entry::file_is_glob): Now bool.
8498 (skiplist_entry::file, skiplist_entry::function): Now
8499 std::string.
8500 (make_skip_entry): Return a unique_ptr. Use new.
8501 (free_skiplist_entry, free_skiplist_entry_cleanup)
8502 (make_free_skiplist_entry_cleanup): Remove.
8503 (skip_command, skip_disable_command, add_skiplist_entry)
8504 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8505 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8506 (function_name_is_marked_for_skip): Update.
8507 (skip_delete_command): Update. Use delete.
8508
8509 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8510
8511 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8512 (aarch64_linux_core_read_description): New function.
8513 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8514
8515 2017-08-09 Pedro Alves <palves@redhat.com>
8516
8517 * cp-name-parser.y (cp_comp_to_string): Return a
8518 gdb::unique_xmalloc_ptr<char>.
8519 * cp-support.c (replace_typedefs_qualified_name)
8520 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8521 (cp_canonicalize_string_full): Use op= instead of explicit
8522 convertion.
8523 (cp_class_name_from_physname, method_name_from_physname)
8524 (cp_func_name, cp_remove_params): Adjust to use
8525 gdb::unique_xmalloc_ptr<char>.
8526 * cp-support.h (cp_comp_to_string): Return a
8527 gdb::unique_xmalloc_ptr<char>.
8528 * python/py-type.c (typy_lookup_type): Adjust to use
8529 gdb::unique_xmalloc_ptr<char>.
8530
8531 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8532
8533 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8534
8535 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8536 Yao Qi <yao.qi@linaro.org>
8537
8538 * cp-support.c (cp_canonicalize_string_full): Use
8539 gdb::unique_xmalloc_ptr<char>.
8540 (cp_canonicalize_string): Likewise.
8541
8542 2017-08-09 Yao Qi <yao.qi@linaro.org>
8543
8544 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8545 * regformats/i386/amd64-avx-avx512.dat: Remove.
8546 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8547 * regformats/i386/amd64-avx-mpx.dat:Remove.
8548 * regformats/i386/amd64-avx.dat: Remove.
8549 * regformats/i386/amd64-mpx.dat: Remove.
8550 * regformats/i386/i386-avx-avx512.dat: Remove.
8551 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8552 * regformats/i386/i386-avx-mpx.dat: Remove.
8553 * regformats/i386/i386-mmx.dat: Remove.
8554 * regformats/i386/i386-mpx.dat: Remove.
8555
8556 2017-08-09 Yao Qi <yao.qi@linaro.org>
8557
8558 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8559 * amd64-tdep.c: Don't include features/i386/x32*.c.
8560 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8561 functions.
8562 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8563 and i386/x32-avx-avx512.
8564 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8565 and i386/x32.xml.
8566 * features/i386/x32-avx-avx512.c: Removed.
8567 * features/i386/x32-avx-avx512.xml: Removed.
8568 * features/i386/x32-avx.c: Removed.
8569 * features/i386/x32-avx.xml: Removed.
8570 * features/i386/x32.c: Removed.
8571 * features/i386/x32.xml: Removed.
8572 * regformats/i386/x32-avx-avx512.dat: Removed.
8573 * regformats/i386/x32-avx.dat: Removed.
8574 * regformats/i386/x32.dat: Removed.
8575
8576 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8577
8578 PR breakpoints/21886
8579 * mem-break.c (default_memory_insert_breakpoint): Use
8580 `->placed_address' rather than `->reqstd_address' for the
8581 breakpoint location.
8582
8583 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8584
8585 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8586 assertions.
8587
8588 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8589
8590 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8591 a union of `tdep_info', `tdesc_data' and `id'.
8592 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8593 rather than `info.tdep_info'.
8594 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8595 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8596 * i386-tdep.c (i386_gdbarch_init): Likewise.
8597 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8598 * mips-tdep.c (mips_gdbarch_init): Likewise.
8599 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8600 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8601 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8602 `info.tdep_info'.
8603 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8604 `info.tdep_info'.
8605 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8606 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8607 `info.tdep_info'.
8608 * spu-tdep.c (spu_gdbarch_init): Likewise.
8609 * gdbarch.h: Regenerate.
8610
8611 2017-08-07 Leszek Swirski <leszeks@google.com>
8612
8613 PR symtab/20899
8614 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8615
8616 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8617
8618 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8619 (gdbsim_open): Rename gdb_argv args object to argv.
8620
8621 2017-08-05 Tom Tromey <tom@tromey.com>
8622
8623 * compile/compile-object-load.c (compile_object_load): Use
8624 gdb::unique_xmalloc_ptr.
8625 * cli/cli-dump.c (scan_filename): Rename from
8626 scan_filename_with_cleanup. Change return type.
8627 (scan_expression): Rename from scan_expression_with_cleanup.
8628 Change return type.
8629 (dump_memory_to_file, dump_value_to_file, restore_command):
8630 Use gdb::unique_xmalloc_ptr. Update.
8631 * cli/cli-cmds.c (find_and_open_script): Use
8632 gdb::unique_xmalloc_ptr.
8633 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8634 * symmisc.c (maintenance_print_symbols)
8635 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8636 * symfile.c (symfile_bfd_open, generic_load)
8637 (add_symbol_file_command, remove_symbol_file_command): Use
8638 gdb::unique_xmalloc_ptr.
8639 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8640 * psymtab.c (maintenance_print_psymbols): Use
8641 gdb::unique_xmalloc_ptr.
8642 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8643 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8644 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8645 (reload_shared_libraries_1): Likewise.
8646
8647 2017-08-05 Tom Tromey <tom@tromey.com>
8648
8649 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8650 (rust_op_vector, rust_set_vector): New typedefs.
8651 (current_parser): New global.
8652 (work_obstack): Change to pointer type. Update all users.
8653 (rust_ast, pstate): Remove globals.
8654 (struct rust_parser): New.
8655 (%union) <params, field_inits>: Change type.
8656 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8657 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8658 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8659 (convert_params_to_types, convert_params_to_expression): Change
8660 type of "params".
8661 (ast_string): Change type of "fields".
8662 (rust_parse): Make a rust_parser. Remove cleanups.
8663 (rust_lex_tests): Make and install an auto_obstack.
8664
8665 2017-08-04 Yao Qi <yao.qi@linaro.org>
8666
8667 * configure.srv (ipa_x32_linux_regobj): New.
8668 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8669 instead of X86_TDESC_AVX512.
8670 (initialize_low_tracepoint): Call
8671 init_registers_x32_avx_avx512_linux.
8672
8673 2017-08-04 Yao Qi <yao.qi@linaro.org>
8674
8675 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8676
8677 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8678
8679 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8680
8681 2017-08-03 Tom Tromey <tom@tromey.com>
8682
8683 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8684 Remove.
8685 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8686
8687 2017-08-03 Tom Tromey <tom@tromey.com>
8688
8689 * python/py-param.c (compute_enum_values): Use gdb_argv.
8690
8691 2017-08-03 Tom Tromey <tom@tromey.com>
8692
8693 * utils.h (struct gdb_argv_deleter): New.
8694 (gdb_argv): New class.
8695 * utils.c (gdb_argv::reset): New method.
8696 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8697 * tracefile.c (tsave_command): Use gdb_argv.
8698 * top.c (new_ui_command): Use gdb_argv.
8699 * symmisc.c (maintenance_print_symbols)
8700 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8701 * symfile.c (symbol_file_command, generic_load)
8702 (remove_symbol_file_command): Use gdb_argv.
8703 * stack.c (backtrace_command): Use gdb_argv.
8704 * source.c (add_path, show_substitute_path_command)
8705 (unset_substitute_path_command, set_substitute_path_command):
8706 Use gdb_argv.
8707 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8708 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8709 * remote.c (extended_remote_run, remote_put_command)
8710 (remote_get_command, remote_delete_command): Use gdb_argv.
8711 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8712 (gdbsim_open): Use gdb_argv.
8713 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8714 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8715 * procfs.c (procfs_info_proc): Use gdb_argv.
8716 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8717 * infrun.c (handle_command): Use gdb_argv.
8718 * inferior.c (add_inferior_command, clone_inferior_command):
8719 Use gdb_argv.
8720 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8721 * exec.c (exec_file_command): Use gdb_argv.
8722 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8723 * compile/compile.c (build_argc_argv): Use gdb_argv.
8724
8725 2017-08-03 Tom Tromey <tom@tromey.com>
8726
8727 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8728
8729 2017-08-03 Tom Tromey <tom@tromey.com>
8730
8731 * python/python.c (compute_python_string): Return std::string.
8732 (gdbpy_eval_from_control_command): Update.
8733 (do_start_initialization): Use std::string.
8734 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8735 xstrprintf.
8736 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8737 xstrprintf.
8738
8739 2017-08-03 Tom Tromey <tom@tromey.com>
8740
8741 * top.h (do_restore_instream_cleanup): Remove.
8742 * top.c (do_restore_instream_cleanup): Remove.
8743 (read_command_file): Use scoped_restore.
8744 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8745
8746 2017-08-03 Tom Tromey <tom@tromey.com>
8747
8748 * cli/cli-script.c (execute_user_command)
8749 (execute_control_command): Use scoped_restore.
8750
8751 2017-08-03 Tom Tromey <tom@tromey.com>
8752
8753 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8754 (execute_user_command): Remove user_call_depth; use
8755 user_args_stack's size instead.
8756
8757 2017-08-03 Tom Tromey <tom@tromey.com>
8758
8759 * top.h (in_user_command): Remove.
8760 * top.c (in_user_command): Remove.
8761 * cli/cli-script.c (do_restore_user_call_depth)
8762 (execute_user_command): Update.
8763
8764 2017-08-03 Tom Tromey <tom@tromey.com>
8765
8766 * valops.c (search_struct_method): Use gdb::byte_vector.
8767 * valarith.c (value_concat): Use std::vector.
8768 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8769 (simple_search_memory): Likewise.
8770 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8771 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8772 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8773 * elfread.c (elf_rel_plt_read): Use std::string.
8774 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8775 * cli/cli-dump.c (restore_section_callback): Use
8776 gdb::byte_vector.
8777
8778 2017-08-03 Tom Tromey <tom@tromey.com>
8779
8780 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8781
8782 2017-08-03 Tom Tromey <tom@tromey.com>
8783
8784 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8785 (tui_register_format): Use scoped_restore.
8786
8787 2017-08-03 Tom Tromey <tom@tromey.com>
8788
8789 * reverse.c (exec_direction_default): Remove.
8790 (exec_reverse_once): Use scoped_restore.
8791 * remote.c (restore_remote_timeout): Remove.
8792 (remote_flash_erase, remote_flash_write, remote_flash_done)
8793 (readchar, remote_serial_write): Use scoped_restore.
8794 * cli/cli-script.c (struct source_cleanup_lines_args)
8795 (source_cleanup_lines): Remove.
8796 (script_from_file): Use scoped_restore.
8797 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8798 (source_command): Use scoped_restore.
8799
8800 2017-08-03 Tom Tromey <tom@tromey.com>
8801
8802 * utils.h (make_cleanup_free_so): Remove.
8803 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8804 * solist.h (struct so_deleter): New.
8805 (so_list_up): New typedef.
8806 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8807
8808 2017-08-03 Tom Tromey <tom@tromey.com>
8809
8810 * utils.h (make_cleanup_restore_current_language): Remove.
8811 * utils.c (do_restore_current_language)
8812 (make_cleanup_restore_current_language): Remove.
8813 * parse.c (parse_exp_in_context_1)
8814 (parse_expression_with_language): Use
8815 scoped_restore_current_language.
8816 * mi/mi-main.c (mi_cmd_execute): Use
8817 scoped_restore_current_language.
8818 * language.h (scoped_restore_current_language): New class.
8819
8820 2017-08-03 Tom Tromey <tom@tromey.com>
8821
8822 * compile/compile.c (cleanup_unlink_file): Remove.
8823 (compile_to_object): Use gdb::unlinker.
8824 (eval_compile_command): Likewise.
8825
8826 2017-08-03 Tom Tromey <tom@tromey.com>
8827
8828 * utils.h (make_cleanup_fclose): Remove.
8829 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8830
8831 2017-08-03 Tom Tromey <tom@tromey.com>
8832
8833 * top.c (open_terminal_stream): Return gdb_file_up.
8834 (new_ui_command): Update.
8835
8836 2017-08-03 Tom Tromey <tom@tromey.com>
8837
8838 * source.c (print_source_lines_base, forward_search_command)
8839 (reverse_search_command): Use gdb_file_up.
8840
8841 2017-08-03 Tom Tromey <tom@tromey.com>
8842
8843 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8844
8845 2017-08-03 Tom Tromey <tom@tromey.com>
8846
8847 * cli/cli-cmds.c (find_and_open_script): Change return type.
8848 Remove "streamp" and "full_path" parameters.
8849 (source_script_with_search): Update.
8850 * auto-load.c (source_script_file): Update.
8851 * cli/cli-cmds.h (find_and_open_script): Change type.
8852 (open_script): New struct.
8853
8854 2017-08-03 Tom Tromey <tom@tromey.com>
8855
8856 * xml-support.c (xml_fetch_content_from_file): Update.
8857 * ui-file.c (stdio_file::open): Update.
8858 * tracefile-tfile.c (tfile_start): Update.
8859 * remote.c (remote_file_put, remote_file_get): Update.
8860 * nat/linux-procfs.c (linux_proc_get_int)
8861 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8862 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8863 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8864 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8865 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8866 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8867 * linux-nat.c (linux_proc_pending_signals): Update.
8868 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8869 (file_closer): Remove.
8870 * compile/compile.c (compile_to_object): Update.
8871 * common/filestuff.h (struct gdb_file_deleter): New.
8872 (gdb_file_up): New typedef.
8873 (gdb_fopen_cloexec): Change return type.
8874 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8875 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8876 (dump_binary_file, restore_binary_file): Update.
8877 * auto-load.c (auto_load_objfile_script_1): Update.
8878
8879 2017-08-03 Tom Tromey <tom@tromey.com>
8880
8881 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8882 (info_static_tracepoint_markers_command): Likewise.
8883 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8884 * skip.c (skip_info): Use ui_out_emit_table.
8885 * progspace.c (print_program_space): Use ui_out_emit_table.
8886 * osdata.c (info_osdata): Use ui_out_emit_table.
8887 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8888 ui_out_emit_table.
8889 * linux-thread-db.c (info_auto_load_libthread_db): Use
8890 ui_out_emit_table.
8891 * inferior.c (print_inferior): Use ui_out_emit_table.
8892 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8893 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8894 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8895 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8896 * ui-out.h (class ui_out_emit_table): New.
8897
8898 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8899
8900 * mips-tdep.c (mips_fpu_type_str): New function.
8901 (mips_dump_tdep): Call it.
8902
8903 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8904
8905 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8906 `->mips_fpu_type'.
8907
8908 2017-07-31 Xavier Roirand <roirand@adacore.com>
8909
8910 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8911
8912 2017-07-27 Xavier Roirand <roirand@adacore.com>
8913
8914 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8915
8916 2017-07-26 Yao Qi <yao.qi@linaro.org>
8917
8918 * cli/cli-cmds.c (maintenancechecklist): New variable.
8919 * gdbcmd.h (maintenancechecklist): Declare it.
8920 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8921 Call i386_linux_read_description with different masks.
8922 * maint.c (maintenance_check_command): New function.
8923 (_initialize_maint_cmds): Call add_prefix_cmd.
8924 * target-descriptions.c (tdesc_reg): override operator != and ==.
8925 (tdesc_type): Likewise.
8926 (tdesc_feature): Likewise.
8927 (target_desc): Likewise.
8928 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8929 (maintenance_check_xml_descriptions): New function.
8930 (_initialize_target_descriptions) Add command "xml-descriptions".
8931 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8932
8933 2017-07-26 Yao Qi <yao.qi@linaro.org>
8934
8935 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8936 Include features/i386/32bit-*.c.
8937 (i386_linux_read_description): Generate target description if it
8938 doesn't exist.
8939 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8940 functions.
8941 * features/i386/32bit-linux.c: Re-generated.
8942 * features/i386/32bit-sse.c: Likewise.
8943 * target-descriptions.c (print_c_feature::visit): Print code to
8944 set register number if needed.
8945 (print_c_feature) <m_next_regnum>: New field.
8946
8947 2017-07-26 Yao Qi <yao.qi@linaro.org>
8948
8949 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8950 (FEATURE_XMLFILES): New.
8951 (FEATURE_CFILES): New.
8952 New rules.
8953 (clean-cfiles): Remove generated c files.
8954 * features/i386/32bit-avx.c: Generated.
8955 * features/i386/32bit-avx512.c: Generated.
8956 * features/i386/32bit-core.c: Generated.
8957 * features/i386/32bit-linux.c: Generated.
8958 * features/i386/32bit-mpx.c: Generated.
8959 * features/i386/32bit-pkeys.c: Generated.
8960 * features/i386/32bit-sse.c: Generated.
8961 * target-descriptions.c: Include algorithm.
8962 (tdesc_element_visitor): Add method visit_end.
8963 (print_c_tdesc): Implement visit_end.
8964 (print_c_tdesc:: m_filename_after_features): Move it to
8965 protected.
8966 (print_c_feature): New class.
8967 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8968 name starts with "i386/32bit-".
8969
8970 2017-07-26 Yao Qi <yao.qi@linaro.org>
8971
8972 * target-descriptions.c (tdesc_element_visitor): New class.
8973 (tdesc_element): New class.
8974 (tdesc_reg): Inherit from tdesc_element.
8975 (tdesc_reg::accept): New function.
8976 (tdesc_type): Inherit from tdesc_element.
8977 (tdesc_type::accept): New function.
8978 (tdesc_feature): Inherit from tdesc_element.
8979 (tdesc_feature::accept): New function.
8980 (target_desc): Inherit from tdesc_element.
8981 (target_desc::target_desc): New.
8982 (target_desc::~target_desc): New.
8983 (target_desc::accept): New.
8984 (allocate_target_description): Use new.
8985 (free_target_description): Use delete.
8986 (print_c_tdesc): New class.
8987 (maint_print_c_tdesc_cmd): Adjust.
8988
8989 * features/aarch64.c: Re-generated.
8990 * features/arc-arcompact.c: Re-generated.
8991 * features/arc-v2.c: Re-generated.
8992 * features/arm/arm-with-iwmmxt.c: Re-generated.
8993 * features/arm/arm-with-m.c: Re-generated.
8994 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8995 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8996 * features/arm/arm-with-neon.c: Re-generated.
8997 * features/arm/arm-with-vfpv2.c: Re-generated.
8998 * features/arm/arm-with-vfpv3.c: Re-generated.
8999 * features/i386/amd64-avx-avx512.c: Re-generated.
9000 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9001 * features/i386/amd64-avx.c: Re-generated.
9002 * features/i386/amd64-avx-linux.c: Re-generated.
9003 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9004 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9005 * features/i386/amd64-avx-mpx.c: Re-generated.
9006 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9007 * features/i386/amd64.c: Re-generated.
9008 * features/i386/amd64-linux.c: Re-generated.
9009 * features/i386/amd64-mpx.c: Re-generated.
9010 * features/i386/amd64-mpx-linux.c: Re-generated.
9011 * features/i386/i386-avx-avx512.c: Re-generated.
9012 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9013 * features/i386/i386-avx.c: Re-generated.
9014 * features/i386/i386-avx-linux.c: Re-generated.
9015 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9016 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9017 * features/i386/i386-avx-mpx.c: Re-generated.
9018 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9019 * features/i386/i386.c: Re-generated.
9020 * features/i386/i386-linux.c: Re-generated.
9021 * features/i386/i386-mmx.c: Re-generated.
9022 * features/i386/i386-mmx-linux.c: Re-generated.
9023 * features/i386/i386-mpx.c: Re-generated.
9024 * features/i386/i386-mpx-linux.c: Re-generated.
9025 * features/i386/x32-avx-avx512.c: Re-generated.
9026 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9027 * features/i386/x32-avx.c: Re-generated.
9028 * features/i386/x32-avx-linux.c: Re-generated.
9029 * features/i386/x32.c: Re-generated.
9030 * features/i386/x32-linux.c: Re-generated.
9031 * features/microblaze.c: Re-generated.
9032 * features/microblaze-with-stack-protect.c: Re-generated.
9033 * features/mips64-dsp-linux.c: Re-generated.
9034 * features/mips64-linux.c: Re-generated.
9035 * features/mips-dsp-linux.c: Re-generated.
9036 * features/mips-linux.c: Re-generated.
9037 * features/nds32.c: Re-generated.
9038 * features/nios2.c: Re-generated.
9039 * features/nios2-linux.c: Re-generated.
9040 * features/rs6000/powerpc-32.c: Re-generated.
9041 * features/rs6000/powerpc-32l.c: Re-generated.
9042 * features/rs6000/powerpc-403.c: Re-generated.
9043 * features/rs6000/powerpc-403gc.c : Re-generated.
9044 * features/rs6000/powerpc-405.c: Re-generated.
9045 * features/rs6000/powerpc-505.c: Re-generated.
9046 * features/rs6000/powerpc-601.c: Re-generated.
9047 * features/rs6000/powerpc-602.c: Re-generated.
9048 * features/rs6000/powerpc-603.c: Re-generated.
9049 * features/rs6000/powerpc-604.c: Re-generated.
9050 * features/rs6000/powerpc-64.c: Re-generated.
9051 * features/rs6000/powerpc-64l.c: Re-generated.
9052 * features/rs6000/powerpc-7400.c: Re-generated.
9053 * features/rs6000/powerpc-750.c: Re-generated.
9054 * features/rs6000/powerpc-860.c: Re-generated.
9055 * features/rs6000/powerpc-altivec32.c: Re-generated.
9056 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9057 * features/rs6000/powerpc-altivec64.c: Re-generated.
9058 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9059 * features/rs6000/powerpc-cell32l.c: Re-generated.
9060 * features/rs6000/powerpc-cell64l.c: Re-generated.
9061 * features/rs6000/powerpc-e500.c: Re-generated.
9062 * features/rs6000/powerpc-e500l.c: Re-generated.
9063 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9064 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9065 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9066 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9067 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9068 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9069 * features/rs6000/powerpc-vsx32.c: Re-generated.
9070 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9071 * features/rs6000/powerpc-vsx64.c: Re-generated.
9072 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9073 * features/rs6000/rs6000.c: Re-generated.
9074 * features/s390-linux32.c: Re-generated.
9075 * features/s390-linux32v1.c: Re-generated.
9076 * features/s390-linux32v2.c: Re-generated.
9077 * features/s390-linux64.c: Re-generated.
9078 * features/s390-linux64v1.c: Re-generated.
9079 * features/s390-linux64v2.c: Re-generated.
9080 * features/s390-te-linux64.c: Re-generated.
9081 * features/s390-tevx-linux64.c: Re-generated.
9082 * features/s390-vx-linux64.c: Re-generated.
9083 * features/s390x-linux64.c: Re-generated.
9084 * features/s390x-linux64v1.c: Re-generated.
9085 * features/s390x-linux64v2.c: Re-generated.
9086 * features/s390x-te-linux64.c: Re-generated.
9087 * features/s390x-tevx-linux64.c: Re-generated.
9088 * features/s390x-vx-linux64.c: Re-generated.
9089 * features/sparc/sparc32-solaris.c: Re-generated.
9090 * features/sparc/sparc64-solaris.c: Re-generated.
9091 * features/tic6x-c62x.c: Re-generated.
9092 * features/tic6x-c62x-linux.c: Re-generated.
9093 * features/tic6x-c64x.c: Re-generated.
9094 * features/tic6x-c64x-linux.c: Re-generated.
9095 * features/tic6x-c64xp.c: Re-generated.
9096 * features/tic6x-c64xp-linux.c: Re-generated.
9097
9098 2017-07-26 Yao Qi <yao.qi@linaro.org>
9099
9100 * i386-linux-tdep.c (i386_linux_read_description): New function.
9101 (i386_linux_core_read_description): Call
9102 i386_linux_read_description.
9103 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9104 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9105 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9106 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9107 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9108 * x86-linux-nat.c (x86_linux_read_description): Call
9109 i386_linux_read_description.
9110
9111 2017-07-26 Yao Qi <yao.qi@linaro.org>
9112
9113 * NEWS: Mention it.
9114 * features/Makefile (%.c: %.xml): Pass the xml file name to
9115 command "maint print c-tdesc".
9116 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9117 name from 'arg'.
9118
9119 2017-07-26 Yao Qi <yao.qi@linaro.org>
9120
9121 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9122 in-class initialization.
9123 (tdesc_create_feature): Call new instead of XCNEW.
9124 (free_target_description): Ue delete.
9125
9126 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9127
9128 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9129
9130 2017-07-25 Yao Qi <yao.qi@linaro.org>
9131
9132 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9133 constant.
9134 (amd64_x32_init_abi): Likewise.
9135 * amd64-tdep.h (amd64_init_abi): Update declaration.
9136 (amd64_x32_init_abi): Likewise.
9137
9138 2017-07-25 Yao Qi <yao.qi@linaro.org>
9139
9140 PR tdep/21717
9141 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9142 condition for FPSCR.
9143 (arm_linux_store_inferior_registers): Likewise.
9144
9145 2017-07-22 Tom Tromey <tom@tromey.com>
9146
9147 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9148 <syscalls_counts>: Now a std::vector.
9149 (get_catch_syscall_inferior_data): Use "new".
9150 (catch_syscall_inferior_data_cleanup): Use "delete".
9151 (insert_catch_syscall, remove_catch_syscall)
9152 (clear_syscall_counts): Update.
9153
9154 2017-07-22 Tom Tromey <tom@tromey.com>
9155
9156 * break-catch-syscall.c (syscall_catchpoint)
9157 <syscalls_to_be_caught>: Now a std::vector<int>
9158 (~syscall_catchpoint): Remove.
9159 (insert_catch_syscall, remove_catch_syscall)
9160 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9161 (print_mention_catch_syscall, print_recreate_catch_syscall):
9162 Update.
9163 (create_syscall_event_catchpoint): Change type of "filter"
9164 parameter.
9165 (catch_syscall_split_args): Return a std::vector.
9166 (catch_syscall_command_1, catching_syscall_number_1): Update.
9167
9168 2017-07-22 Tom Tromey <tom@tromey.com>
9169
9170 * break-catch-throw.c (struct exception_catchpoint)
9171 <exception_rx>: Now a std::string.
9172 (~exception_catchpoint): Remove.
9173 (print_one_detail_exception_catchpoint): Update.
9174 (handle_gnu_v3_exceptions): Change type of except_rx.
9175 (extract_exception_regexp): Return a std::string.
9176 (catch_exception_command_1): Update.
9177
9178 2017-07-22 Tom Tromey <tom@tromey.com>
9179
9180 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9181 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9182 std::vector.
9183 <catch_all>: Now a bool.
9184 (~signal_catchpoint): Remove.
9185 (signal_catchpoint_insert_location)
9186 (signal_catchpoint_remove_location)
9187 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9188 (signal_catchpoint_print_mention)
9189 (signal_catchpoint_print_recreate)
9190 (signal_catchpoint_explains_signal): Update.
9191 (create_signal_catchpoint): Change type of "filter" and
9192 "catch_all".
9193 (catch_signal_split_args): Return a std::vector. Change type of
9194 "catch_all".
9195 (catch_signal_command): Update.
9196
9197 2017-07-20 Pedro Alves <palves@redhat.com>
9198
9199 * ada-lang.c (ada_language_defn): Make extern.
9200 (_initialize_ada_language): Remove add_language call.
9201 * c-lang.c (c_language_defn, cplus_language_defn)
9202 (asm_language_defn, minimal_language_defn): Make extern.
9203 (_initialize_c_language): Delete.
9204 * completer.c (compare_cstrings): Delete, moved to utils.h.
9205 * d-lang.c (d_language_defn): Make extern.
9206 (_initialize_d_language): Remove add_language calls.
9207 * defs.h (enum language): Add comment.
9208 * f-lang.c (f_language_defn): Make extern.
9209 (_initialize_f_language): Remove add_language call.
9210 * go-lang.c (go_language_defn): Make extern.
9211 (_initialize_go_language): Remove add_language call.
9212 * language.c: Include <algorithm>.
9213 (languages): Redefine as const array.
9214 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9215 (set_language_command): Handle "local". Use for-range loop.
9216 (set_language): Remove loop.
9217 (language_enum): Rewrite.
9218 (language_def, language_str): Remove loops.
9219 (add_language): Delete.
9220 (add_set_language_command): New, based on add_languages.
9221 (skip_language_trampoline): Adjust.
9222 (local_language_defn): Delete.
9223 (language_gdbarch_post_init): Adjust.
9224 (_initialize_language): Remove add_language calls. Call
9225 add_set_language_command.
9226 * language.h (add_language): Delete.
9227 (auto_language_defn)
9228 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9229 (asm_language_defn, c_language_defn, cplus_language_defn)
9230 (d_language_defn, f_language_defn, go_language_defn)
9231 (m2_language_defn, objc_language_defn, opencl_language_defn)
9232 (pascal_language_defn, rust_language_defn): Declare.
9233 * m2-lang.c (m2_language_defn): Make extern.
9234 (_initialize_m2_language): Remove add_language call.
9235 * objc-lang.c (objc_language_defn): Make extern.
9236 (_initialize_objc_language): Remove add_language call.
9237 * opencl-lang.c (opencl_language_defn): Make extern.
9238 (_initialize_opencl_language): Remove add_language call.
9239 * p-lang.c (pascal_language_defn): Make extern.
9240 (_initialize_pascal_language): Delete.
9241 * rust-lang.c (rust_language_defn): Make extern.
9242 (_initialize_rust_language): Delete.
9243 * utils.h (compare_cstrings): New static inline function.
9244
9245 2017-07-20 Pedro Alves <palves@redhat.com>
9246
9247 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9248 (get_var_value): Constify parameters.
9249 (get_int_var_value): Change prototype.
9250 (to_fixed_range_type): Adjust.
9251 * ada-lang.h (get_int_var_value): Change prototype.
9252
9253 2017-07-20 Pedro Alves <palves@redhat.com>
9254
9255 * dwarf2read.c (dw2_lookup_symbol): Use
9256 SYMBOL_MATCHES_SEARCH_NAME.
9257 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9258
9259 2017-07-20 Pedro Alves <palves@redhat.com>
9260
9261 * block.c (block_iter_name_step, block_iter_name_first)
9262 (block_iter_name_next): Delete.
9263 (block_lookup_symbol_primary): Adjust to use
9264 dict_iter_match_first/dict_iter_match_next.
9265 * block.h (block_iter_name_first, block_iter_name_next): Delete
9266 declarations.
9267 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9268 dict_iter_match_first/dict_iter_match_next.
9269
9270 2017-07-20 Pedro Alves <palves@redhat.com>
9271
9272 * cp-support.c (cp_find_first_component_aux): Add missing case for
9273 end of string.
9274
9275 2017-07-18 David Blaikie <dblaikie@gmail.com>
9276
9277 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9278 of dwo_cu's dwo_file.
9279
9280 2017-07-18 Yao Qi <yao.qi@linaro.org>
9281
9282 * remote.c (store_registers_using_G): Remove one line comment.
9283
9284 2017-07-18 Yao Qi <yao.qi@linaro.org>
9285
9286 * regcache.c (regcache_cpy): Simplify it.
9287 (regcache::cpy_no_passthrough): Remove it.
9288 * regcache.h (cpy_no_passthrough): Remove it.
9289 (regcache_dup, regcache_cpy): Update comments.
9290
9291 2017-07-18 Pedro Alves <palves@redhat.com>
9292
9293 * remote-sim.c (sim_command_completer): Adjust to work with a
9294 completion_tracker instead of a VEC.
9295
9296 2017-07-17 Pedro Alves <palves@redhat.com>
9297
9298 * completer.c (complete_source_filenames): New function.
9299 (complete_address_and_linespec_locations): New function.
9300 (location_completer): Use complete_address_and_linespec_locations.
9301 (completion_tracker::build_completion_result): Honor the tracker's
9302 request to suppress append.
9303 * completer.h (completion_tracker::suppress_append_ws)
9304 (completion_tracker::set_suppress_append_ws): New methods.
9305 (completion_tracker::m_suppress_append_ws): New field.
9306 (complete_source_filenames): New declaration.
9307 * linespec.c (linespec_complete_what): New.
9308 (struct ls_parser) <complete_what, completion_word,
9309 completion_quote_char, completion_quote_end, completion_tracker>:
9310 New fields.
9311 (string_find_incomplete_keyword_at_end): New.
9312 (linespec_lexer_lex_string): Record quote char. If in completion
9313 mode, don't throw.
9314 (linespec_lexer_consume_token): Advance the completion word point.
9315 (linespec_lexer_peek_token): Save/restore completion info.
9316 (save_stream_and_consume_token): New.
9317 (set_completion_after_number): New.
9318 (linespec_parse_basic): Set what to complete next depending on
9319 token. Handle function and label completions specially.
9320 (parse_linespec): Disable objc shortcut in completion mode. Set
9321 what to complete next depending on token type. Skip keyword if in
9322 completion mode.
9323 (complete_linespec_component, linespec_complete): New.
9324 * linespec.h (linespec_complete): Declare.
9325
9326 2017-07-17 Pedro Alves <palves@redhat.com>
9327
9328 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9329 Handle 'operator<' / 'operator<<'.
9330
9331 2017-07-17 Pedro Alves <palves@redhat.com>
9332
9333 * completer.c (collect_explicit_location_matches): Handle
9334 MATCH_LABEL.
9335 (convert_explicit_location_to_linespec): New, factored out from
9336 ...
9337 (convert_explicit_location_to_sals): ... this.
9338 (complete_label): New.
9339 (linespec_complete_label, find_label_symbols_in_block): New.
9340 (find_label_symbols): Add completion_mode parameter and adjust to
9341 call find_label_symbols_in_block.
9342 * linespec.h (linespec_complete_label): Declare.
9343
9344 2017-07-17 Pedro Alves <palves@redhat.com>
9345
9346 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9347 complete_symbol_mode parameter.
9348 * cli/cli-cmds.c (complete_command): Get the completion result out
9349 of the handle_brkchars tracker if used a custom word point.
9350 * completer.c: Include "linespec.h".
9351 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9352 (advance_to_expression_complete_word_point): New.
9353 (completion_tracker::completes_to_completion_word): New.
9354 (complete_files_symbols): Pass down
9355 complete_symbol_mode::EXPRESSION.
9356 (explicit_options, probe_options): New.
9357 (collect_explicit_location_matches): Complete on the
9358 explictit_loc->foo instead of word. Use
9359 linespec_complete_function. Handle MATCH_LINE. Handle offering
9360 keyword and options completions.
9361 (backup_text_ptr): Delete.
9362 (skip_keyword): New.
9363 (complete_explicit_location): Remove 'word' parameter. Add
9364 language, quoted_arg_start and quoted_arg_end parameters.
9365 Rewrite, parsing left to right.
9366 (location_completer): Rewrite.
9367 (location_completer_handle_brkchars): New function.
9368 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9369 (enum complete_line_internal_reason): Adjust comments.
9370 (completion_tracker::discard_completions): New.
9371 (completer_handle_brkchars_func_for_completer): Handle
9372 location_completer.
9373 (gdb_custom_word_point_brkchars)
9374 (gdb_org_rl_basic_quote_characters): New.
9375 (gdb_completion_word_break_characters_throw)
9376 (completion_find_completion_word): Handle trackers that use a
9377 custom word point.
9378 (completion_tracker::advance_custom_word_point_by): New.
9379 (completion_tracker::build_completion_result): Don't rely on
9380 readline appending the quote char.
9381 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9382 use a custom word point.
9383 (gdb_rl_attempted_completion_function): Restore
9384 rl_basic_quote_characters.
9385 * completer.h (class completion_tracker): Extend intro comment.
9386 (completion_tracker::set_quote_char)
9387 (completion_tracker::quote_char)
9388 (completion_tracker::set_use_custom_word_point)
9389 (completion_tracker::use_custom_word_point)
9390 (completion_tracker::custom_word_point)
9391 (completion_tracker::set_custom_word_point)
9392 (completion_tracker::advance_custom_word_point_by)
9393 (completion_tracker::completes_to_completion_word)
9394 (completion_tracker::discard_completions): New methods.
9395 (completion_tracker::m_quote_char)
9396 (completion_tracker::m_use_custom_word_point)
9397 (completion_tracker::m_custom_word_point): New fields.
9398 (advance_to_expression_complete_word_point): Declare.
9399 * f-lang.c (f_collect_symbol_completion_matches): Add
9400 complete_symbol_mode parameter.
9401 * language.h (struct language_defn)
9402 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9403 parameter.
9404 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9405 (linespec_complete_function): New function.
9406 (linespec_lexer_lex_keyword): Adjust.
9407 * linespec.h (linespec_keywords, linespec_complete_function): New
9408 declarations.
9409 * location.c (find_end_quote): New function.
9410 (explicit_location_lex_one): Add explicit_completion_info
9411 parameter. Save quoting info. Don't throw if being called for
9412 completion. Don't handle Ada operators here.
9413 (is_cp_operator, skip_op_false_positives, first_of)
9414 (explicit_location_lex_one_function): New function.
9415 (string_to_explicit_location): Replace 'dont_throw' parameter with
9416 an explicit_completion_info pointer parameter. Handle it. Don't
9417 use explicit_location_lex_one to lex function names. Use
9418 explicit_location_lex_one_function instead.
9419 * location.h (struct explicit_completion_info): New.
9420 (string_to_explicit_location): Replace 'dont_throw' parameter with
9421 an explicit_completion_info pointer parameter.
9422 * symtab.c (default_collect_symbol_completion_matches_break_on):
9423 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9424 (default_collect_symbol_completion_matches)
9425 (collect_symbol_completion_matches): Add complete_symbol_mode
9426 parameter.
9427 (collect_symbol_completion_matches_type): Pass down
9428 complete_symbol_mode::EXPRESSION.
9429 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9430 parameter. Handle LINESPEC mode.
9431 * symtab.h (complete_symbol_mode): New.
9432 (default_collect_symbol_completion_matches_break_on)
9433 (default_collect_symbol_completion_matches)
9434 (collect_symbol_completion_matches)
9435 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9436 parameter.
9437
9438 2017-07-17 Pedro Alves <palves@redhat.com>
9439
9440 * utils.c (enum class strncmp_iw_mode): New.
9441 (strcmp_iw): Rename to ...
9442 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9443 parameters. Handle them.
9444 (strncmp_iw): New.
9445 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9446 * utils.h (strncmp_iw): Declare.
9447 (strcmp_iw): Move describing comments here.
9448
9449 2017-07-17 Pedro Alves <palves@redhat.com>
9450
9451 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9452 CP_OPERATOR_STR.
9453 * c-typeprint.c (is_type_conversion_operator): Use
9454 CP_OPERATOR_STR.
9455 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9456 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9457 CP_OPERATOR_LEN.
9458 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9459 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9460 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9461 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9462 CP_OPERATOR_STR.
9463 * location.c: Include "cp-support.h".
9464 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9465 CP_OPERATOR_STR.
9466 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9467 CP_OPERATOR_LEN.
9468
9469 2017-07-17 Pedro Alves <palves@redhat.com>
9470
9471 * cli/cli-cmds.c (complete_command): Use a completion tracker
9472 along with completion_find_completion_word for handle_brkchars
9473 phase.
9474 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9475 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9476 (struct gdb_rl_completion_word_info): New.
9477 (gdb_rl_find_completion_word): New.
9478 (completion_find_completion_word): New.
9479 * completer.h (completion_find_completion_word): Declare.
9480
9481 2017-07-17 Pedro Alves <palves@redhat.com>
9482
9483 * ada-lang.c (symbol_completion_match): Adjust comments.
9484 (symbol_completion_add): Replace vector parameter with
9485 completion_tracker parameter. Use it.
9486 (ada_make_symbol_completion_list): Rename to...
9487 (ada_collect_symbol_completion_matches): ... this. Add
9488 completion_tracker parameter and use it.
9489 (ada_language_defn): Adjust.
9490 * break-catch-syscall.c (catch_syscall_completer): Adjust
9491 prototype and work with completion_tracker instead of VEC.
9492 * breakpoint.c (condition_completer): Adjust prototype and work
9493 with completion_tracker instead of VEC.
9494 * c-lang.c (c_language_defn, cplus_language_defn)
9495 (asm_language_defn, minimal_language_defn): Adjust to renames.
9496 * cli/cli-cmds.c (complete_command): Rework using
9497 completion_tracker. Catch exceptions when completing.
9498 * cli/cli-decode.c (integer_unlimited_completer)
9499 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9500 with completion_tracker instead of VEC.
9501 * command.h (struct completion_tracker): Forward declare.
9502 (completer_ftype, completer_handle_brkchars_ftype): Change
9503 types.
9504 (complete_on_cmdlist, complete_on_enum): Adjust.
9505 * completer.c: Include <algorithm>.
9506 (struct gdb_completer_state): New.
9507 (current_completion): New global.
9508 (readline_line_completion_function): Delete.
9509 (noop_completer, filename_completer)
9510 (filename_completer_handle_brkchars, complete_files_symbols)
9511 (linespec_location_completer): Adjust to work with a
9512 completion_tracker instead of a VEC.
9513 (string_or_empty): New.
9514 (collect_explicit_location_matches): Adjust to work with a
9515 completion_tracker instead of a VEC.
9516 (explicit_location_completer): Rename to ...
9517 (complete_explicit_location): ... this and adjust to work with a
9518 completion_tracker instead of a VEC.
9519 (location_completer): Adjust to work with a completion_tracker
9520 instead of a VEC.
9521 (add_struct_fields): Adjust to work with a completion_list instead
9522 of VEC.
9523 (expression_completer): Rename to ...
9524 (complete_expression): ... this and adjust to work with a
9525 completion_tracker instead of a VEC. Use complete_files_symbols.
9526 (expression_completer): Reimplement on top of complete_expression.
9527 (symbol_completer): Adjust to work with a completion_tracker
9528 instead of a VEC.
9529 (enum complete_line_internal_reason): Add describing comments.
9530 (complete_line_internal_normal_command): Adjust to work with a
9531 completion_tracker instead of a VEC.
9532 (complete_line_internal): Rename to ...
9533 (complete_line_internal_1): ... this and adjust to work with a
9534 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9535 handle_brkchars phase.
9536 (new_completion_tracker): Delete.
9537 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9538 complete_line_internal_1.
9539 (free_completion_tracker): Delete.
9540 (INITIAL_COMPLETION_HTAB_SIZE): New.
9541 (completion_tracker::completion_tracker)
9542 (completion_tracker::~completion_tracker): New.
9543 (maybe_add_completion): Delete.
9544 (completion_tracker::maybe_add_completion)
9545 (completion_tracker::add_completion)
9546 (completion_tracker::add_completions): New.
9547 (throw_max_completions_reached_error): Delete.
9548 (complete_line): Adjust to work with a completion_tracker instead
9549 of a VEC. Don't create a completion_tracker_t or check for max
9550 completions here.
9551 (command_completer, command_completer_handle_brkchars)
9552 (signal_completer, reg_or_group_completer_1)
9553 (reg_or_group_completer, default_completer_handle_brkchars):
9554 Adjust to work with a completion_tracker.
9555 (gdb_completion_word_break_characters_throw): New.
9556 (gdb_completion_word_break_characters): Reimplement.
9557 (line_completion_function): Delete.
9558 (completion_tracker::recompute_lowest_common_denominator)
9559 (expand_preserving_ws)
9560 (completion_tracker::build_completion_result)
9561 (completion_result::completion_result)
9562 (completion_result::completion_result)
9563 (completion_result::~completion_result)
9564 (completion_result::completion_result)
9565 (completion_result::release_match_list, compare_cstrings)
9566 (completion_result::sort_match_list)
9567 (completion_result::reset_match_list)
9568 (gdb_rl_attempted_completion_function_throw)
9569 (gdb_rl_attempted_completion_function): New.
9570 * completer.h (completion_list, struct completion_result)
9571 (class completion_tracker): New.
9572 (complete_line): Add completion_tracker parameter.
9573 (readline_line_completion_function): Delete.
9574 (gdb_rl_attempted_completion_function): New.
9575 (noop_completer, filename_completer, expression_completer)
9576 (location_completer, symbol_completer, command_completer)
9577 (signal_completer, reg_or_group_completer): Update prototypes.
9578 (completion_tracker_t, new_completion_tracker)
9579 (make_cleanup_free_completion_tracker): Delete.
9580 (enum maybe_add_completion_enum): Delete.
9581 (maybe_add_completion): Delete.
9582 (throw_max_completions_reached_error): Delete.
9583 * corefile.c (complete_set_gnutarget): Adjust to work with a
9584 completion_tracker instead of a VEC.
9585 * cp-abi.c (cp_abi_completer): Adjust to work with a
9586 completion_tracker instead of a VEC.
9587 * d-lang.c (d_language_defn): Adjust.
9588 * disasm.c (disassembler_options_completer): Adjust to work with a
9589 completion_tracker instead of a VEC.
9590 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9591 (f_collect_symbol_completion_matches): ... this. Adjust to work
9592 with a completion_tracker instead of a VEC.
9593 (f_language_defn): Adjust.
9594 * go-lang.c (go_language_defn): Adjust.
9595 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9596 Adjust to work with a completion_tracker instead of a VEC.
9597 * infrun.c (handle_completer): Likewise.
9598 * interps.c (interpreter_completer): Likewise.
9599 * interps.h (interpreter_completer): Likewise.
9600 * language.c (unknown_language_defn, auto_language_defn)
9601 (local_language_defn): Adjust.
9602 * language.h (language_defn::la_make_symbol_completion_list):
9603 Rename to ...
9604 (language_defn::la_collect_symbol_completion_matches): ... this
9605 and adjust to work with a completion_tracker instead of a VEC.
9606 * m2-lang.c (m2_language_defn): Adjust.
9607 * objc-lang.c (objc_language_defn): Adjust.
9608 * opencl-lang.c (opencl_language_defn): Adjust.
9609 * p-lang.c (pascal_language_defn): Adjust.
9610 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9611 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9612 with a completion_tracker.
9613 * rust-lang.c (rust_language_defn): Adjust.
9614 * symtab.c (free_completion_list, do_free_completion_list)
9615 (return_val, completion_tracker): Delete.
9616 (completion_list_add_name, completion_list_add_symbol)
9617 (completion_list_add_msymbol, completion_list_objc_symbol)
9618 (completion_list_add_fields, add_symtab_completions): Add
9619 completion_tracker parameter and use it.
9620 (default_make_symbol_completion_list_break_on_1): Rename to...
9621 (default_collect_symbol_completion_matches_break_on): ... this.
9622 Add completion_tracker parameter and use it instead of allocating
9623 a completion tracker here.
9624 (default_make_symbol_completion_list_break_on): Delete old
9625 implementation.
9626 (default_make_symbol_completion_list): Delete.
9627 (default_collect_symbol_completion_matches): New.
9628 (make_symbol_completion_list): Delete.
9629 (collect_symbol_completion_matches): New.
9630 (make_symbol_completion_type): Rename to ...
9631 (collect_symbol_completion_matches_type): ... this. Add
9632 completion_tracker parameter and use it instead of VEC.
9633 (make_file_symbol_completion_list_1): Rename to...
9634 (collect_file_symbol_completion_matches): ... this. Add
9635 completion_tracker parameter and use it instead of VEC.
9636 (make_file_symbol_completion_list): Delete.
9637 (add_filename_to_list): Use completion_list instead of a VEC.
9638 (add_partial_filename_data::list): Now a completion_list.
9639 (make_source_files_completion_list): Work with a completion_list
9640 instead of a VEC.
9641 * symtab.h: Include "completer.h".
9642 (default_make_symbol_completion_list_break_on)
9643 (default_make_symbol_completion_list, make_symbol_completion_list)
9644 (make_symbol_completion_type, make_file_symbol_completion_list)
9645 (make_source_files_completion_list): Delete.
9646 (default_collect_symbol_completion_matches_break_on)
9647 (default_collect_symbol_completion_matches)
9648 (collect_symbol_completion_matches)
9649 (collect_symbol_completion_matches_type)
9650 (collect_file_symbol_completion_matches)
9651 (make_source_files_completion_list): New.
9652 * top.c (init_main): Don't install a rl_completion_entry_function
9653 hook. Install a rl_attempted_completion_function hook instead.
9654 * tui/tui-layout.c (layout_completer): Adjust to work with a
9655 completion_tracker.
9656 * tui/tui-regs.c (tui_reggroup_completer):
9657 * tui/tui-win.c (window_name_completer, focus_completer)
9658 (winheight_completer): Adjust to work with a completion_tracker.
9659 * value.c: Include "completer.h".
9660 (complete_internalvar): Adjust to work with a completion_tracker.
9661 * value.h (complete_internalvar): Likewise.
9662
9663 2017-07-17 Pedro Alves <palves@redhat.com>
9664
9665 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9666 renames.
9667 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9668 comments to completer_ftype's declaration.
9669 <completer_handle_brkchars>: Change type to
9670 completer_handle_brkchars_ftype.
9671 * command.h (completer_ftype): Add describing comment and give
9672 names to parameters.
9673 (completer_ftype_void): Rename to ...
9674 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9675 (set_cmd_completer_handle_brkchars): Adjust.
9676 * completer.c (filename_completer_handle_brkchars): New function.
9677 (complete_line_internal_normal_command): New function, factored
9678 out from ...
9679 (complete_line_internal): ... here.
9680 (command_completer_handle_brkchars)
9681 (default_completer_handle_brkchars)
9682 (completer_handle_brkchars_func_for_completer): New functions.
9683 * completer.h (set_gdb_completion_word_break_characters): Delete
9684 declaration.
9685 (completer_handle_brkchars_func_for_completer): New declaration.
9686 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9687 completer_handle_brkchars_func_for_completer.
9688
9689 2017-07-17 Pedro Alves <palves@redhat.com>
9690
9691 * completer.c (symbol_completer): New function, based on
9692 make_symbol_completion_list_fn.
9693 * completer.h (symbol_completer): New declaration.
9694 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9695 * python/py-cmd.c (completers): Adjust.
9696 * symtab.c (make_symbol_completion_list_fn): Delete.
9697 * symtab.h (make_symbol_completion_list_fn): Delete.
9698 * cli/cli-decode.c (add_cmd): Adjust.
9699
9700 2017-07-17 Pedro Alves <palves@redhat.com>
9701
9702 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9703 * dwarf2read.c: Include "filename-seen-cache.h".
9704 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9705 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9706 * filename-seen-cache.c: New file.
9707 * filename-seen-cache.h: New file.
9708 * symtab.c: Include "filename-seen-cache.h".
9709 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9710 (create_filename_seen_cache, clear_filename_seen_cache)
9711 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9712 to filename-seen-cache.h/filename-seen-cache.c.
9713 (output_source_filename, sources_info)
9714 (maybe_add_partial_symtab_filename)
9715 (make_source_files_completion_list): Adjust to use
9716 filename_seen_cache.
9717
9718 2017-07-17 Pedro Alves <palves@redhat.com>
9719
9720 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9721 fields.
9722 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9723 dwarf2_debug_sections*)): New.
9724 (dwarf2_per_objfile::dwarf2_per_objfile(const
9725 dwarf2_per_objfile&)): Declare as deleted.
9726 (dwarf2_per_objfile::operator=): Declare as deleted.
9727 (dwarf2_per_objfile::dwarf2_per_objfile)
9728 (dwarf2_per_objfile::~dwarf2_per_objfile)
9729 (dwarf2_per_objfile::free_cached_comp_units): New.
9730 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9731 ctor. Call dwarf2_per_objfile's ctor manually.
9732 (dwarf2_locate_sections): Deleted/refactored as ...
9733 (dwarf2_per_objfile::locate_sections): ... this new method.
9734 (free_cached_comp_units): Defer to
9735 dwarf2_per_objfile::free_cached_comp_units.
9736 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9737
9738 2017-07-14 Tom Tromey <tom@tromey.com>
9739
9740 PR rust/21764:
9741 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9742 parameter.
9743 <UNOP_SIZEOF>: Split into separate case.
9744 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9745
9746 2017-07-14 Tom Tromey <tom@tromey.com>
9747
9748 PR rust/21763:
9749 * symtab.c (symbol_matches_domain): Add language_rust to special
9750 case.
9751 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9752 treat LOC_TYPEDEF symbols as variables.
9753
9754 2017-07-14 Pedro Alves <palves@redhat.com>
9755
9756 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9757 symtabs matching all symtabs with SRCFILE as file name instead of
9758 only considering the first hit, with lookup_symtab.
9759
9760 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9761
9762 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9763 operator_name parameters.
9764 (gen_expr): Update function call.
9765
9766 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9767
9768 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9769 parameter.
9770 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9771 Likewise.
9772 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9773 parameter, use agent_expr::gdbarch instead, update function
9774 calls.
9775 (locexpr_tracepoint_var_ref): Likewise.
9776 (loclist_tracepoint_var_ref): Likewise.
9777 * ax-gdb.c (gen_trace_static_fields): Likewise.
9778 (gen_traced_pop): Likewise.
9779 (gen_frame_args_address): Likewise.
9780 (gen_frame_locals_address): Likewise.
9781 (gen_var_ref): Likewise.
9782 (gen_struct_ref_recursive): Likewise.
9783 (gen_static_field): Likewise.
9784 (gen_maybe_namespace_elt): Likewise.
9785 (gen_expr): Likewise.
9786 (gen_trace_for_var): Likewise.
9787 (gen_trace_for_expr): Likewise.
9788 (gen_trace_for_return_address): Likewise.
9789
9790 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9791
9792 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9793 parameter.
9794 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9795
9796 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9797
9798 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9799 from ax, update calls.
9800 (gen_usual_arithmetic): Likewise.
9801 (gen_integral_promotions): Likewise.
9802 (gen_bitfield_ref): Likewise.
9803 (gen_primitive_field): Likewise.
9804 (gen_struct_ref_recursive): Likewise.
9805 (gen_struct_ref): Likewise.
9806 (gen_maybe_namespace_elt): Likewise.
9807 (gen_struct_elt_for_reference): Likewise.
9808 (gen_namespace_elt): Likewise.
9809 (gen_aggregate_elt_ref): Likewise.
9810 (gen_expr): Get gdbarch from ax, update calls.
9811 (gen_expr_binop_rest): Likewise.
9812
9813 2017-07-13 Pedro Alves <palves@redhat.com>
9814
9815 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9816 as default tdesc.
9817 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9818 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9819 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9820 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9821 tdep.
9822 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9823 Get final tdesc from the tdep.
9824 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9825 default tdesc.
9826 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9827 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9828 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9829 Use it as default tdesc.
9830 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9831 down to amd_init_abi. No longer handle fallback tdesc here.
9832 * amd64-tdep.h (tdesc_x32): Declare.
9833 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9834 parameter.
9835 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9836 as default tdesc.
9837
9838 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9839
9840 * s390-linux-tdep.c (s390_process_record): Add support for
9841 instructions new in arch12.
9842
9843 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9844
9845 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9846 PT_GETFSBASE and PT_GETGSBASE.
9847 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9848 PT_SETGSBASE.
9849
9850 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9851
9852 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9853 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9854 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9855 those rules.
9856 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9857 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9858 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9859 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9860 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9861 * features/i386/amd64.xml: Add 64bit-segments.xml.
9862 * features/i386/amd64-avx-avx512.c: Regenerated.
9863 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9864 * features/i386/amd64-avx-mpx.c: Regenerated.
9865 * features/i386/amd64-avx.c: Regenerated.
9866 * features/i386/amd64-mpx.c: Regenerated.
9867 * features/i386/amd64.c: Regenerated.
9868 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9869 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9870 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9871 * regformats/i386/amd64-avx.dat: Regenerated.
9872 * regformats/i386/amd64-mpx.dat: Regenerated.
9873 * regformats/i386/amd64.dat: Regenerated.
9874
9875 2017-07-10 Yao Qi <yao.qi@linaro.org>
9876
9877 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9878 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9879
9880 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9881
9882 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9883 unsetenv.
9884 * gnulib/aclocal.m4: Regenerate.
9885 * gnulib/config.in: Regenerate.
9886 * gnulib/configure: Regenerate.
9887 * gnulib/import/Makefile.am: Regenerate.
9888 * gnulib/import/Makefile.in: Regenerate.
9889 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9890 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9891 * gnulib/import/m4/environ.m4: New file.
9892 * gnulib/import/m4/setenv.m4: New file.
9893 * gnulib/import/setenv.c: New file.
9894 * gnulib/import/unsetenv.c: New file.
9895
9896 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9897
9898 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9899 address when op is DW_OP_addr.
9900
9901 2017-07-09 Tom Tromey <tom@tromey.com>
9902
9903 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9904 check and apply to outer type.
9905
9906 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9907
9908 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9909 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9910 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9911 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9912
9913 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9914
9915 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9916
9917 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9918
9919 * corelow.c (get_core_siginfo): Remove.
9920 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9921 instead of get_core_siginfo.
9922 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9923 * gdbarch.h: Re-generate.
9924 * gdbarch.c: Re-generate.
9925 * linux-tdep.c (linux_core_xfer_siginfo): New.
9926 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9927
9928 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9929
9930 * corelow.c (thread_section_name): Move to ...
9931 * gdbcore.h (thread_section_name): ... here.
9932
9933 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9934
9935 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9936 (struct siginfo32): New.
9937 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9938 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9939 via ptrace(PT_LWPINFO).
9940
9941 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9942
9943 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9944 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9945 (fbsd_get_siginfo_type): New.
9946 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9947 (_initialize_fbsd_tdep): New.
9948
9949 2017-07-06 David Blaikie <dblaikie@gmail.com>
9950
9951 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9952 a singular dwo_unit*) to support multiple CUs in the same way that
9953 multiple TUs are supported.
9954 (create_cus_hash_table): Replace create_dwo_cu with a function for
9955 parsing multiple CUs from a DWO file.
9956 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9957 create_dwo_cu.
9958 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9959 htab_find, rather than comparing the signature to a singleton CU in
9960 the dwo_file.
9961
9962 2017-07-06 Pedro Alves <palves@redhat.com>
9963
9964 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9965
9966 2017-07-04 Pedro Alves <palves@redhat.com>
9967
9968 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9969 * gdbtypes.h (TYPE_STATIC): Delete.
9970 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9971 is_synchronized, is_native>: Delete.
9972 <dummy>: Bump.
9973 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9974 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9975 (TYPE_FN_FIELD_ABSTRACT): Delete.
9976
9977 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9978
9979 * buffer.h (buffer_finish): Fix spelling mistakes.
9980
9981 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9982
9983 * .dir-locals.el: Automatically switch to C-style comments in
9984 versions of Emacs that support the feature.
9985
9986 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9987 Pedro Alves <palves@redhat.com>
9988
9989 PR cli/21688
9990 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9991 (process_next_line): New variable 'inline_cmd'.
9992 Adjust 'if' clauses for "python", "compile" and "guile" to use
9993 'command_name_equals' and check for '!inline_cmd'.
9994
9995 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9996
9997 PR cli/21688
9998 * cli/cli-script.c (command_name_equals_not_inline): New function.
9999 (process_next_line): Adjust 'if' clauses for "python", "compile"
10000 and "guile" to use command_name_equals_not_inline.
10001
10002 2017-06-29 Pedro Alves <palves@redhat.com>
10003
10004 * completer.c (expression_completer): Call
10005 linespec_location_completer instead of location_completer.
10006
10007 2017-06-29 Pedro Alves <palves@redhat.com>
10008
10009 * completer.c (expression_completer): Remove code that recomputes
10010 'text' from 'word'.
10011
10012 2017-06-29 Yao Qi <yao.qi@linaro.org>
10013
10014 * regformats/regdat.sh: Generate code with
10015 "ifndef IN_PROCESS_AGENT".
10016
10017 2017-06-28 Pedro Alves <palves@redhat.com>
10018
10019 * command.h: Include "common/scoped_restore.h".
10020
10021 2017-06-28 Yao Qi <yao.qi@linaro.org>
10022
10023 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10024 instead of obstack_grow.
10025
10026 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10027
10028 PR gdb/21337
10029 * symfile.c (reread_symbols): Call objfiles_changed just before
10030 read_symbols.
10031
10032 2017-06-27 Pedro Alves <palves@redhat.com>
10033
10034 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10035 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10036 (completion_list_add_symbol, completion_list_add_msymbol):
10037 ... these new functions.
10038 (add_symtab_completions)
10039 (default_make_symbol_completion_list_break_on_1): Adjust.
10040
10041 2017-06-27 Pedro Alves <palves@redhat.com>
10042
10043 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10044 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10045 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10046 dtor.
10047 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10048 'storage_obstack' field an auto_obstack. In-class initialize all
10049 non-bitfield fields. Make minsyms_read bool.
10050 * symfile.c (read_symbols): Adjust.
10051
10052 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10053
10054 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10055 (gdbsim_store_register): Likewise.
10056
10057 2017-06-27 Pedro Alves <palves@redhat.com>
10058
10059 * c-exp.y (name_obstack): Now an auto_obstack.
10060 (yylex): Use auto_obstack::clear.
10061 (c_parse): Use auto_obstack::clear instead of reinitializing and
10062 freeing the obstack.
10063 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10064 * d-exp.y (name_obstack): Now an auto_obstack.
10065 (yylex): Use auto_obstack::clear.
10066 (d_parse): Use auto_obstack::clear instead of reinitializing and
10067 freeing the obstack.
10068 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10069 auto_obstack.
10070 * dwarf2read.c (create_addrmap_from_index)
10071 (dwarf2_build_psymtabs_hard)
10072 (update_enumeration_type_from_children): Likewise.
10073 * gdb_obstack.h (auto_obstack): New type.
10074 * go-exp.y (name_obstack): Now an auto_obstack.
10075 (build_packaged_name): Use auto_obstack::clear.
10076 (go_parse): Use auto_obstack::clear instead of reinitializing and
10077 freeing the obstack.
10078 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10079 auto_obstack.
10080 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10081 * rust-exp.y (work_obstack): Now an auto_obstack.
10082 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10083 reinitializing and freeing the obstack.
10084 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10085 (host_char_to_target): Use auto_obstack.
10086 * utils.h (make_cleanup_obstack_free): Delete declaration.
10087 * valprint.c (generic_emit_char, generic_printstr): Use
10088 auto_obstack.
10089
10090 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10091
10092 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10093 thread.
10094 (darwin_init_thread_list): Don't update dummy thread.
10095 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10096
10097 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10098
10099 * record-full.c (netorder16): Remove.
10100
10101 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10102
10103 * common/diagnostics.h: Define macros for GCC.
10104 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10105 * common/vec.h: Include diagnostics.h.
10106 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10107 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10108 warning.
10109
10110 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10111
10112 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10113 New macro.
10114 * ada-lex.l: Ignore deprecated register warnings.
10115
10116 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10117
10118 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10119 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10120
10121 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10122
10123 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10124 its own line.
10125
10126 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10127
10128 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10129
10130 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10131
10132 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10133 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10134 (xtensa_register_read_masked): Likewise.
10135
10136 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10137
10138 * common/environ.c (gdb_environ::unset): Update comment.
10139
10140 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10141
10142 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10143 registers.
10144
10145 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10146
10147 * record-full.c (record_full_exec_insn): Use byte_vector.
10148
10149 2017-06-22 Yao Qi <yao.qi@linaro.org>
10150
10151 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10152 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10153
10154 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10155
10156 * remote.c (cached_reg): Move from here...
10157 * regcache.h (cached_reg): ...to here.
10158 * python/py-unwind.c (struct reg_info): Remove.
10159 (cached_frame_info): Use cached_reg_t.
10160 (pyuw_prev_register): Likewise.
10161 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10162 (pyuw_dealloc_cache): Free all registers.
10163
10164 2017-06-22 Pedro Alves <palves@redhat.com>
10165 Simon Marchi <simon.marchi@ericsson.com>
10166
10167 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10168 warning.
10169 * common/diagnostics.h: New file.
10170
10171 2017-06-22 Pedro Alves <palves@redhat.com>
10172
10173 * common/agent.h: Add include guards.
10174
10175 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10176
10177 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10178 talk about addressable units instead of bytes.
10179
10180 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10181
10182 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10183 of '::const_iterator'.
10184
10185 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10186
10187 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10188 'unittests/environ-selftests.c'.
10189 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10190 * charset.c (find_charset_names): Declare object 'iconv_env'.
10191 Update code to use 'iconv_env' object. Remove call to
10192 'free_environ'.
10193 * common/environ.c: Include <utility>.
10194 (make_environ): Delete function.
10195 (free_environ): Delete function.
10196 (gdb_environ::clear): New function.
10197 (gdb_environ::operator=): New function.
10198 (gdb_environ::get): Likewise.
10199 (environ_vector): Delete function.
10200 (set_in_environ): Delete function.
10201 (gdb_environ::set): New function.
10202 (unset_in_environ): Delete function.
10203 (gdb_environ::unset): New function.
10204 (gdb_environ::envp): Likewise.
10205 * common/environ.h: Include <vector>.
10206 (struct gdb_environ): Delete; transform into...
10207 (class gdb_environ): ... this class.
10208 (free_environ): Delete prototype.
10209 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10210 environ_vector): Likewise.
10211 * infcmd.c (run_command_1): Update code to call
10212 'envp' from 'gdb_environ' class.
10213 (environment_info): Update code to call methods from 'gdb_environ'
10214 class.
10215 (unset_environment_command): Likewise.
10216 (path_info): Likewise.
10217 (path_command): Likewise.
10218 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10219 (inferior::inferior): Initialize 'environment' using the host's
10220 information.
10221 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10222 Include "environ.h".
10223 (class inferior) <environment>: Change type from 'struct
10224 gdb_environ' to 'gdb_environ'.
10225 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10226 methods from 'gdb_environ' class.
10227 * solib.c (solib_find_1): Likewise
10228 * unittests/environ-selftests.c: New file.
10229
10230 2017-06-20 Yao Qi <yao.qi@linaro.org>
10231
10232 * features/i386/i386-linux.xml: Exchange the order of including
10233 32bit-linux.xml and 32bit-sse.xml.
10234 * features/i386/i386-linux.c: Regenerated.
10235
10236 2017-06-20 Yao Qi <yao.qi@linaro.org>
10237
10238 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10239 Delete copy ctor and assignment operator.
10240 (tdesc_type): Likewise.
10241 (tdesc_feature): Likewise.
10242 (tdesc_free_reg): Remove.
10243 (tdesc_create_reg): Use new.
10244 (tdesc_free_type): Remove.
10245 (tdesc_create_vector): Use new.
10246 (tdesc_create_union): Likewise.
10247 (tdesc_create_flags): Likewise.
10248 (tdesc_create_enum): Likewise.
10249 (tdesc_free_feature): Delete.
10250 (free_target_description): Use delete.
10251
10252 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10253
10254 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10255 registers.
10256
10257 2017-06-19 Pedro Alves <palves@redhat.com>
10258
10259 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10260 after gdb::unlinker.
10261
10262 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10263
10264 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10265 gdb_environ to access an environment variable.
10266
10267 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10268
10269 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10270 gdb_byte*.
10271
10272 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10273
10274 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10275
10276 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10277
10278 * configure: Re-generate.
10279 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10280
10281 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10282
10283 * configure: Re-generate.
10284 * warning.m4: Pass -Werror to compiler when checking for
10285 supported warning flags.
10286
10287 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10288
10289 * Makefile.in (COMPILE.pre): Add "-x c++".
10290
10291 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10292 Pedro Alves <palves@redhat.com>
10293 Yao Qi <yao.qi@linaro.org>
10294
10295 * defs.h (RequireLongest): New.
10296 (extract_integer): Declare function template.
10297 (extract_signed_integer): Remove the declaration, but define it
10298 static inline.
10299 (extract_unsigned_integer): Likewise.
10300 (store_integer): Declare function template.
10301 (store_signed_integer): Remove the declaration, but define it
10302 static inline.
10303 (store_unsigned_integer): Likewise.
10304 * findvar.c (extract_integer): New function template.
10305 (extract_signed_integer): Remove.
10306 (extract_unsigned_integer): Remove.
10307 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10308 instantiations.
10309 (store_integer): New function template.
10310 (store_signed_integer): Remove.
10311 (store_unsigned_integer): Remove.
10312 (store_integer): Explicit instantiations.
10313 * regcache.c (regcache_raw_read_signed): Update.
10314 (regcache::raw_read): New function.
10315 (regcache::raw_read_signed): Remove.
10316 (regcache::raw_read_unsigned): Remove.
10317 (regcache_raw_read_unsigned): Update.
10318 (regcache_raw_write_unsigned): Update.
10319 (regcache::raw_write_signed): Remove.
10320 (regcache::raw_write): New function.
10321 (regcache_cooked_read_signed): Update.
10322 (regcache::raw_write_unsigned): Remove.
10323 (regcache::cooked_read_signed): Remove.
10324 (regcache_cooked_read_unsigned): Update.
10325 (regcache::cooked_read_unsigned): Remove.
10326 (regcache_cooked_write_signed): Update.
10327 (regcache_cooked_write_unsigned): Update.
10328 * regcache.h (regcache) <raw_read_signed>: Remove.
10329 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10330 <raw_read, raw_write>: New.
10331 <cooked_read_signed, cooked_write_signed>: Remove.
10332 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10333 <cooked_read, cooked_write>: New.
10334 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10335 (sh64_pseudo_register_write): Update.
10336
10337 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10338
10339 * arc-tdep.c (arc_disassembler_options): New variable.
10340 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10341 of default_print_insn.
10342 (arc_delayed_print_insn): Set info->section when needed,
10343 use default_print_insn to retrieve a disassembler.
10344
10345 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10346
10347 PR gdb/21574
10348 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10349 to mention $SHELL and startup-with-shell.
10350
10351 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10352
10353 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10354
10355 2017-06-14 Yao Qi <yao.qi@linaro.org>
10356
10357 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10358 default_print_insn instead of print_insn_aarch64.
10359 * arm-tdep.c (gdb_print_insn_arm): Call
10360 default_print_insn instead of print_insn_big_arm
10361 and print_insn_little_arm.
10362 * i386-tdep.c (i386_print_insn): Call default_print_insn
10363 instead of print_insn_i386.
10364 * ia64-tdep.c (ia64_print_insn): Call
10365 default_print_insn instead of print_insn_ia64.
10366 * mips-tdep.c (gdb_print_insn_mips): Call
10367 default_print_insn instead of print_insn_big_mips
10368 and print_insn_little_mips.
10369 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10370 instead of print_insn_spu.
10371
10372 2017-06-14 Pedro Alves <palves@redhat.com>
10373
10374 * ada-lang.c: Include "common/byte-vector.h".
10375 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10376 * charset.c (wchar_iterator::iterate): Resize the vector instead
10377 of reserving it.
10378 * common/byte-vector.h: Include "common/def-vector.h".
10379 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10380 * cli/cli-dump.c: Include "common/byte-vector.h".
10381 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10382 * common/byte-vector.h: New file.
10383 * common/def-vector.h: New file.
10384 * common/default-init-alloc.h: New file.
10385 * dwarf2loc.c: Include "common/byte-vector.h".
10386 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10387 instead of reserving it.
10388 * dwarf2read.c: Include "common/byte-vector.h".
10389 (data_buf::m_vec): Now a gdb::byte_vector.
10390 * gdb_regex.c: Include "common/def-vector.h".
10391 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10392 * mi/mi-main.c: Include "common/byte-vector.h".
10393 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10394 * printcmd.c: Include "common/byte-vector.h".
10395 (print_scalar_formatted): Use gdb::byte_vector.
10396 * valprint.c: Include "common/byte-vector.h".
10397 (maybe_negate_by_bytes, print_decimal_chars): Use
10398 gdb::byte_vector.
10399
10400 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10401
10402 * darwin-nat.c: Include "nat/fork-inferior.h".
10403
10404 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10405
10406 * configure.nat: Factor out Darwin bits that are not
10407 architecture-specific. Add fork-inferior.o.
10408
10409 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10410
10411 * configure.nat: Factor out AIX bits that are not
10412 architecture-specific. Add fork-inferior.o.
10413
10414 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10415
10416 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10417 (read_pieced_value, write_pieced_value): ...here. Reduce to
10418 wrappers that just call rw_pieced_value.
10419
10420 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10421
10422 * dwarf2loc.c (write_pieced_value): When writing the data for a
10423 memory piece, use write_memory_with_notification instead of
10424 write_memory.
10425
10426 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10427
10428 * valops.c (read_value_memory): Change embedded_offset to
10429 represent a bit offset instead of a byte offset.
10430 * value.h (read_value_memory): Adjust comment.
10431
10432 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10433
10434 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10435 dest_offset_bits and source_offset_bits.
10436 (write_pieced_value): Likewise.
10437
10438 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10439
10440 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10441 given by DW_OP_bit_piece.
10442 (write_pieced_value): Likewise.
10443
10444 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10445
10446 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10447 some other preparations to the places where sufficient information
10448 is available.
10449 (write_pieced_value): Likewise.
10450
10451 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10452
10453 * dwarf2loc.c (bits_to_bytes): New function.
10454 (read_pieced_value): Fix offset calculations for register pieces
10455 on big-endian targets.
10456 (write_pieced_value): Likewise.
10457
10458 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10459
10460 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10461 (write_pieced_value): Likewise.
10462
10463 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10464
10465 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10466 transfer the source value's least significant bits, instead of its
10467 lowest-addressed ones. Rename type_len to max_offset.
10468 (read_pieced_value): Mirror above changes to write_pieced_value as
10469 applicable.
10470
10471 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10472
10473 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10474 truncate full bytes from dest_offset_bits before using it as an
10475 offset into the buffer.
10476
10477 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10478
10479 * dwarf2loc.c (write_pieced_value): Include transfer size in
10480 byte-wise check.
10481
10482 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10483
10484 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10485 calculation of this_size.
10486
10487 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10488
10489 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10490 when targeting a bit-field.
10491 (write_pieced_value): Likewise.
10492
10493 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10494
10495 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10496 (allocate_piece_closure): Drop addr_size parameter.
10497 (dwarf2_evaluate_loc_desc_full): Adjust call to
10498 allocate_piece_closure.
10499
10500 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10501
10502 PR gdb/21226
10503 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10504 the LSB end, independent of endianness.
10505
10506 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10507
10508 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10509 size capping.
10510
10511 2017-06-13 Yao Qi <yao.qi@linaro.org>
10512
10513 * mips-linux-nat.c: Move include features/mips*-linux.c to
10514 mips-linux-tdep.c.
10515 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10516 to mips-linux-tdep.c.
10517 * mips-linux-tdep.c: Include features/mips*-linux.c
10518 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10519 functions.
10520 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10521 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10522 (tdesc_mips64_dsp_linux): Declare.
10523
10524 2017-06-12 Tom Tromey <tom@tromey.com>
10525
10526 * valprint.h (val_print_type_code_int): Remove.
10527 * valprint.c (generic_val_print_int): Always call
10528 val_print_scalar_formatted.
10529 (val_print_type_code_int): Remove.
10530 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10531 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10532 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10533 * ada-valprint.c (ada_val_print_num): Use
10534 val_print_scalar_formatted.
10535
10536 2017-06-12 Tom Tromey <tom@tromey.com>
10537
10538 * printcmd.c (print_scalar_formatted): Unify the two switches.
10539 Don't convert scalars to LONGEST.
10540
10541 2017-06-12 Tom Tromey <tom@tromey.com>
10542
10543 PR exp/16225:
10544 * valprint.h (print_decimal_chars): Update.
10545 * valprint.c (maybe_negate_by_bytes): New function.
10546 (print_decimal_chars): Add "is_signed" argument.
10547 * printcmd.c (print_scalar_formatted): Update.
10548
10549 2017-06-12 Tom Tromey <tom@tromey.com>
10550
10551 PR exp/16225:
10552 * valprint.h (print_binary_chars, print_hex_chars): Update.
10553 * valprint.c (val_print_type_code_int): Update.
10554 (print_binary_chars): Add "zero_pad" argument.
10555 (emit_octal_digit): New function.
10556 (print_octal_chars): Don't zero-pad.
10557 (print_decimal_chars): Likewise.
10558 (print_hex_chars): Add "zero_pad" argument.
10559 * sh64-tdep.c (sh64_do_fp_register): Update.
10560 * regcache.c (regcache::dump): Update.
10561 * printcmd.c (print_scalar_formatted): Update.
10562 * infcmd.c (default_print_one_register_info): Update.
10563
10564 2017-06-12 Pedro Alves <palves@redhat.com>
10565 Alan Hayward <alan.hayward@arm.com>
10566
10567 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10568 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10569 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10570 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10571 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10572
10573 2017-06-12 Pedro Alves <palves@redhat.com>
10574
10575 * dwarf2read.c (mapped_symtab::data): Now a vector of
10576 symtab_index_entry instead of vector of
10577 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10578 whether an element's name is NULL instead of checking whether the
10579 element itself is NULL.
10580 (find_slot): Change return type. Adjust.
10581 (hash_expand, , add_index_entry, uniquify_cu_indices)
10582 (write_hash_table): Adjust.
10583
10584 2017-06-12 Pedro Alves <palves@redhat.com>
10585
10586 * dwarf2read.c (recursively_count_psymbols): New function.
10587 (write_psymtabs_to_index): Call it to compute number of psyms and
10588 pass estimate size of psyms_seen to unordered_set's ctor.
10589
10590 2017-06-12 Pedro Alves <palves@redhat.com>
10591
10592 * dwarf2read.c (write_hash_table): Check if key already exists
10593 before emplacing.
10594
10595 2017-06-12 Pedro Alves <palves@redhat.com>
10596
10597 * dwarf2read.c (data_buf::append_space): Rename to...
10598 (data_buf::grow): ... this, and make private. Adjust all callers.
10599 (data_buf::append_uint): New method.
10600 (add_address_entry, write_one_signatured_type)
10601 (write_psymtabs_to_index): Use it.
10602
10603 2017-06-12 Pedro Alves <palves@redhat.com>
10604
10605 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10606 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10607 (data_buf::file_write): Call ::fwrite directly.
10608
10609 2017-06-12 Pedro Alves <palves@redhat.com>
10610
10611 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10612 std::vector::erase.
10613
10614 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10615
10616 Code cleanup: C++ify .gdb_index producer.
10617 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10618 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10619 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10620 (create_strtab, add_string): Remove.
10621 (file_write, data_buf): New.
10622 (struct symtab_index_entry): Use std::vector for cu_indices.
10623 (struct mapped_symtab): Use std::vector for data.
10624 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10625 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10626 Remove.
10627 (find_slot): Change return type. Update it to the new data structures.
10628 (hash_expand, add_index_entry): Update it to the new data structures.
10629 (offset_type_compare): Remove.
10630 (uniquify_cu_indices): Update it to the new data structures.
10631 (c_str_view, c_str_view_hasher, vector_hasher): New.
10632 (add_indices_to_cpool): Remove.
10633 (write_hash_table): Update it to the new data structures.
10634 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10635 (eq_psymtab_cu_index): Remove.
10636 (psym_index_map): New typedef.
10637 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10638 reference and std::unordered_map for cu_index_htab.
10639 (add_address_entry, add_address_entry_worker, write_address_map)
10640 (write_psymbols): Update it to the new data structures.
10641 (write_obstack): Remove.
10642 (struct signatured_type_index_data): Change types_list to a data_buf
10643 reference and psyms_seen to a std::unordered_set reference.
10644 (write_one_signatured_type, recursively_write_psymbols)
10645 (write_psymtabs_to_index): Update it to the new data structures.
10646
10647 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10648
10649 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10650 separate-debug-file commands.
10651 * symfile.h (separate_debug_file_debug): New global.
10652 * symfile.c (separate_debug_file_debug): New global.
10653 (separate_debug_file_exists, find_separate_debug_file): Add
10654 debug output.
10655 (_initialize_symfile): Add "set debug separate-debug-file"
10656 command.
10657 * build-id.c (build_id_to_debug_bfd,
10658 find_separate_debug_file_by_buildid): Add debug output.
10659
10660 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10661
10662 * gdbarch.sh (displaced_step_free_closure): Remove.
10663 * gdbarch.h, gdbarch.c: Re-generate.
10664 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10665 displaced_step_free_closure.
10666 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10667 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10668 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10669 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10670 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10671 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10672 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10673 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10674 * infrun.c (displaced_step_clear): Call xfree instead of
10675 gdbarch_displaced_step_free_closure.
10676
10677 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10678
10679 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10680 NULL".
10681
10682 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10683
10684 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10685 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10686 (mn10300_push_dummy_call): Likewise.
10687
10688 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10689
10690 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10691
10692 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10693
10694 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10695
10696 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10697
10698 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10699 able to start inferiors using a shell.
10700 (New remote packets): Announce new packet "QStartupWithShell".
10701 * remote.c: Add PACKET_QStartupWithShell.
10702 (extended_remote_create_inferior): Handle new
10703 PACKET_QStartupWithShell.
10704 (remote_protocol_features) <QStartupWithShell>: New entry for
10705 PACKET_QStartupWithShell.
10706 (_initialize_remote): Call "add_packet_config_cmd" for
10707 QStartupShell.
10708
10709 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10710 Pedro Alves <palves@redhat.com>
10711
10712 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10713 and "nat/fork-inferior.h".
10714 * common/common-inferior.h: New file, with contents from
10715 "gdb/inferior.h".
10716 * commom/common-utils.c: Include "common-utils.h".
10717 (stringify_argv): New function.
10718 * common/common-utils.h (stringify_argv): New prototype.
10719 * configure.nat: Add "fork-inferior.o" as a dependency for
10720 "*linux*", "fbsd*" and "nbsd*" hosts.
10721 * corefile.c (get_exec_file): Update comment.
10722 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10723 instead of "startup_inferior".
10724 (darwin_create_inferior): Call "add_thread_silent" after
10725 "fork_inferior".
10726 * fork-child.c: Cleanup unnecessary includes.
10727 (SHELL_FILE): Move to "common/common-fork-child.c".
10728 (environ): Likewise.
10729 (exec_wrapper): Initialize.
10730 (get_exec_wrapper): New function.
10731 (breakup_args): Move to "common/common-fork-child.c"; rename to
10732 "breakup_args_for_exec".
10733 (escape_bang_in_quoted_argument): Move to
10734 "common/common-fork-child.c".
10735 (saved_ui): New variable.
10736 (prefork_hook): New function.
10737 (postfork_hook): Likewise.
10738 (postfork_child_hook): Likewise.
10739 (gdb_startup_inferior): Likewise.
10740 (fork_inferior): Move to "common/common-fork-child.c". Update
10741 function to support gdbserver.
10742 (startup_inferior): Likewise.
10743 * gdbcore.h (get_exec_file): Remove declaration.
10744 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10745 instead of "startup_inferior". Call "add_thread_silent" after
10746 "fork_inferior".
10747 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10748 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10749 instead of "startup_inferior". Call "add_thread_silent" after
10750 "fork_inferior".
10751 * inferior.h: Include "common-inferior.h".
10752 (trace_start_error): Move to "common/common-utils.h".
10753 (trace_start_error_with_name): Likewise.
10754 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10755 (startup_inferior): Likewise.
10756 (gdb_startup_inferior): New prototype.
10757 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10758 * nat/fork-inferior.h: New file.
10759 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10760 instead of "startup_inferior". Call "add_thread_silent" after
10761 "fork_inferior".
10762 * target.h (target_terminal_init): Move prototype to
10763 "target/target.h".
10764 (target_terminal_inferior): Likewise.
10765 (target_terminal_ours): Likewise.
10766 * target/target.h (target_terminal_init): New prototype, moved
10767 from "target.h".
10768 (target_terminal_inferior): Likewise.
10769 (target_terminal_ours): Likewise.
10770 * utils.c (gdb_flush_out_err): New function.
10771
10772 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10773
10774 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10775 * common/common-gdbthread.h: New file, with parts from
10776 "gdb/gdbthread.h".
10777 * gdbthread.h: Include "common-gdbthread.h".
10778 (switch_to_thread): Moved to "common/common-gdbthread.h".
10779
10780 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10781
10782 * Makefile.in (SFILES): Add "common/job-control.c".
10783 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10784 (COMMON_OBS): Add "job-control.o".
10785 * common/job-control.c: New file, with contents from
10786 "gdb/inflow.c".
10787 * common/job-control.h: New file, with contents from "terminal.h".
10788 * fork-child.c: Include "job-control.h".
10789 * inflow.c: Include "job-control.h".
10790 (gdb_setpgid): Move to "common/common-inflow.c".
10791 (_initialize_inflow): Move setting of "job_control" to
10792 "handle_job_control".
10793 * terminal.h (job_control): Moved to "common/common-terminal.h".
10794 (gdb_setpgid): Likewise.
10795 * top.c: Include "job_control.h".
10796 * utils.c: Likewise.
10797 (job_control): Moved to "job-control.c".
10798
10799 2017-06-07 Pedro Alves <palves@redhat.com>
10800
10801 * Makefile.in (SFILES): Add gdb_regex.c.
10802 (COMMON_OBS): Add gdb_regex.o.
10803 * ada-lang.c (ada_add_standard_exceptions)
10804 (ada_add_exceptions_from_frame, name_matches_regex)
10805 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10806 parameter type to compiled_regex. Adjust.
10807 (ada_exceptions_list): Use compiled_regex.
10808 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10809 std::unique_ptr<compiled_regex>.
10810 (exception_catchpoint::~exception_catchpoint): Remove regfree
10811 call.
10812 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10813 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10814 * breakpoint.c (solib_catchpoint::compiled): Now a
10815 std::unique_ptr<compiled_regex>.
10816 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10817 (check_status_catch_solib): Adjust to use compiled_regex.
10818 (add_solib_catchpoint): Adjust to use compiled_regex.
10819 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10820 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10821 compiled_regex reference. Adjust to use it.
10822 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10823 declaration. Include "gdb_regex.h".
10824 (apropos_cmd): Change regex parameter to compiled_regex reference.
10825 * gdb_regex.c: New file.
10826 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10827 declarations.
10828 (class compiled_regex): New.
10829 * linux-tdep.c: Include "common/gdb_optional.h".
10830 (struct mapping_regexes): New, factored out from
10831 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10832 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10833 gdb::optional and remove cleanups. Adjust to compiled_regex.
10834 * probe.c: Include "common/gdb_optional.h".
10835 (collect_probes): Use compiled_regex and gdb::optional and remove
10836 cleanups.
10837 * skip.c: Include "common/gdb_optional.h".
10838 (skiplist_entry::compiled_function_regexp): Now a
10839 gdb::optional<compiled_regex>.
10840 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10841 (free_skiplist_entry): Remove regfree call.
10842 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10843 compiled_regex and gdb::optional.
10844 * symtab.c: Include "common/gdb_optional.h".
10845 (search_symbols): Use compiled_regex and gdb::optional.
10846 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10847 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10848 to gdb_regex.c.
10849
10850 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10851
10852 * regcache.c (regcache::save): Avoid buffer use.
10853 (regcache::dump): Likewise.
10854
10855 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10856
10857 * sh-tdep.c (sh_pseudo_register_read): Remove
10858 MAX_REGISTER_SIZE.
10859 (sh_pseudo_register_write): Likewise.
10860 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10861 (sh64_pseudo_register_write): Likewise
10862
10863 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10864
10865 * aarch64-tdep.c (aarch64_store_return_value): Use
10866 V_REGISTER_SIZE.
10867 (aarch64_pseudo_read_value): Likewise.
10868 (aarch64_pseudo_write): Likewise.
10869
10870 2017-06-06 Yao Qi <yao.qi@linaro.org>
10871
10872 * regformats/regdef.h (set_register_cache): Remove the
10873 declaration.
10874
10875 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10876
10877 * frame.c (frame_unwind_register_signed): Use
10878 frame_unwind_register_value.
10879
10880 2017-06-06 Pedro Alves <palves@redhat.com>
10881
10882 PR breakpoints/21553
10883 * breakpoint.c (create_breakpoints_sal_default)
10884 (init_breakpoint_sal, create_breakpoint_sal): Use
10885 gdb::unique_xmalloc_ptr for string parameters.
10886 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10887 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10888 (base_breakpoint_create_breakpoints_sal)
10889 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10890 (strace_marker_create_breakpoints_sal)
10891 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10892 string parameters.
10893 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10894 gdb::unique_xmalloc_ptr for string parameters.
10895 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10896 parameters.
10897
10898 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10899
10900 * alpha-tdep.c (alpha_register_to_value): Use
10901 get_frame_register_value.
10902 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10903
10904 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10905
10906 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10907 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10908 (ia64_value_to_register): Likewise.
10909 (ia64_extract_return_value): Likewise.
10910 (ia64_store_return_value): Likewise.
10911 (ia64_push_dummy_call): Likewise.
10912
10913 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10914
10915 GDB 8.0 released.
10916
10917 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10918
10919 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10920
10921 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10922
10923 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10924 parameter.
10925 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10926
10927 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10928
10929 * event-loop.c (poll_timers): Unallocate timer using delete
10930 instead of xfree.
10931
10932 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10933
10934 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10935 (struct breakpoint) <~breakpoint>: New.
10936 (struct watchpoint): Inherit from breakpoint.
10937 <~watchpoint>: New.
10938 <base>: Remove.
10939 (struct tracepoint): Inherit from breakpoint.
10940 <base>: Remove.
10941 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10942 (struct longjmp_breakpoint): Inherit from breakpoint.
10943 <~longjmp_breakpoint>: New.
10944 <base>: Remove.
10945 (new_breakpoint_from_type): Remove casts.
10946 (watchpoint_in_thread_scope): Remove reference to base field.
10947 (watchpoint_del_at_next_stop): Likewise.
10948 (update_watchpoint): Likewise.
10949 (watchpoint_check): Likewise.
10950 (bpstat_check_watchpoint): Likewise.
10951 (set_longjmp_breakpoint): Likewise.
10952 (struct fork_catchpoint): Inherit from breakpoint.
10953 <base>: Remove.
10954 (struct solib_catchpoint): Inherit from breakpoint.
10955 <~solib_catchpoint>: New.
10956 <base>: Remove.
10957 (dtor_catch_solib): Change to ...
10958 (solib_catchpoint::~solib_catchpoint): ... this.
10959 (breakpoint_hit_catch_solib): Remove reference to base field.
10960 (add_solib_catchpoint): Likewise.
10961 (create_fork_vfork_event_catchpoint): Likewise.
10962 (struct exec_catchpoint): Inherit from breakpoint.
10963 <~exec_catchpoint>: New.
10964 <base>: Remove.
10965 (dtor_catch_exec): Change to ...
10966 (exec_catchpoint::~exec_catchpoint): ... this.
10967 (dtor_watchpoint): Change to ...
10968 (watchpoint::~watchpoint): ... this.
10969 (watch_command_1): Remove reference to base field.
10970 (catch_exec_command_1): Likewise.
10971 (base_breakpoint_dtor): Change to ...
10972 (breakpoint::~breakpoint): ... this.
10973 (base_breakpoint_ops): Remove dtor field value.
10974 (longjmp_bkpt_dtor): Change to ...
10975 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10976 (strace_marker_create_breakpoints_sal): Remove reference to base
10977 field.
10978 (delete_breakpoint): Don't manually call breakpoint destructor.
10979 (create_tracepoint_from_upload): Remove reference to base field.
10980 (trace_pass_set_count): Likewise.
10981 (initialize_breakpoint_ops): Don't initialize
10982 momentary_breakpoint_ops, don't set dtors.
10983 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10984 <~ada_catchpoint>: New.
10985 <base>: Remove.
10986 (create_excep_cond_exprs): Remove reference to base field.
10987 (dtor_exception): Change to ...
10988 (ada_catchpoint::~ada_catchpoint): ... this.
10989 (dtor_catch_exception): Remove.
10990 (dtor_catch_exception_unhandled): Remove.
10991 (dtor_catch_assert): Remove.
10992 (create_ada_exception_catchpoint): Remove reference to base
10993 field.
10994 (initialize_ada_catchpoint_ops): Don't set dtors.
10995 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10996 breakpoint.
10997 <~signal_catchpoint>: New.
10998 <base>: Remove.
10999 (signal_catchpoint_dtor): Change to ...
11000 (signal_catchpoint::~signal_catchpoint): ... this.
11001 (create_signal_catchpoint): Remove reference to base field.
11002 (initialize_signal_catchpoint_ops): Don't set dtor.
11003 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11004 from breakpoint.
11005 <~syscall_catchpoint>: New.
11006 <base>: Remove.
11007 (dtor_catch_syscall): Change to ...
11008 (syscall_catchpoint::~syscall_catchpoint): ... this.
11009 (create_syscall_event_catchpoint): Remove reference to base
11010 field.
11011 (initialize_syscall_catchpoint_ops): Don't set dtor.
11012 * break-catch-throw.c (struct exception_catchpoint): Inherit
11013 from breakpoint.
11014 <~exception_catchpoint>: New.
11015 <base>: Remove.
11016 (dtor_exception_catchpoint): Change to ...
11017 (exception_catchpoint::~exception_catchpoint): ... this.
11018 (handle_gnu_v3_exceptions): Remove reference to base field.
11019 (initialize_throw_catchpoint_ops): Don't set dtor.
11020 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11021 field.
11022 * remote.c (remote_get_tracepoint_status): Likewise.
11023 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11024 * tracefile.c (tracefile_fetch_registers): Likewise.
11025 * tracepoint.c (actions_command): Likewise.
11026 (validate_actionline): Likewise.
11027 (tfind_1): Likewise.
11028 (get_traceframe_location): Likewise.
11029 (find_matching_tracepoint_location): Likewise.
11030 (parse_tracepoint_status): Likewise.
11031 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11032
11033 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11034
11035 * breakpoint.c (struct longjmp_breakpoint): New struct.
11036 (is_tracepoint_type): Change return type to bool.
11037 (is_longjmp_type): New function.
11038 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11039 (set_raw_breakpoint_without_location): Use
11040 new_breakpoint_from_type.
11041 (set_raw_breakpoint): Likewise.
11042
11043 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11044
11045 * breakpoint.c (new_breakpoint_from_type): New function.
11046 (create_breakpoint_sal): Use new_breakpoint_from_type and
11047 unique_ptr.
11048 (create_breakpoint): Likewise.
11049
11050 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11051
11052 * memattr.c (mem_info_command): Rename to ...
11053 (info_mem_command): ... this.
11054 (mem_enable_command): Rename to ...
11055 (enable_mem_command): ... this.
11056 (mem_disable_command): Rename to ...
11057 (disable_mem_command): ... this.
11058 (mem_delete_command): Rename to ...
11059 (delete_mem_command): ... this.
11060 (_initialize_mem): Adjust function names.
11061
11062 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11063
11064 * btrace.c (handle_pt_insn_events): New.
11065 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11066 STATUS. Split into this and ...
11067 (handle_pt_insn_event_flags): ... this.
11068
11069 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11070
11071 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11072 and struct pt_insn.resynced.
11073 * configure: Regenerated.
11074 * config.in: Regenerated.
11075
11076 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11077
11078 * btrace.c (ftrace_find_call_by_number): New function.
11079 (ftrace_new_function): Store objects, not pointers.
11080 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11081 ftrace_new_gap, ftrace_update_function,
11082 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11083 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11084 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11085 btrace_ends_with_single_insn, btrace_call_get): Account for
11086 btrace_thread_info::functions now storing objects.
11087 * btrace.h (struct btrace_thread_info): Add constructor.
11088 (struct btrace_thread_info) <functions>: Make std::vector.
11089 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11090 Initialize with default values.
11091 * record-btrace.c (record_btrace_frame_sniffer): Account for
11092 btrace_thread_info::functions now storing objects.
11093
11094 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11095
11096 * btrace.c: Remove typedef bfun_s.
11097 (ftrace_new_gap): Directly add gaps to the list of gaps.
11098 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11099 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11100 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11101 instead of gdb VEC.
11102
11103 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11104
11105 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11106 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11107 with btrace_thread_info::next_segment and
11108 btrace_thread_info::prev_segment.
11109 * btrace.h: Remove struct btrace_func_link.
11110 (struct btrace_function): Replace pair of function segment pointers
11111 with pair of indices.
11112 * python/py-record-btrace.c (btpy_call_prev_sibling,
11113 btpy_call_next_sibling): Replace references to
11114 btrace_thread_info::segment with btrace_thread_info::next_segment and
11115 btrace_thread_info::prev_segment.
11116 * record-btrace.c (record_btrace_frame_this_id): Use
11117 btrace_find_call_by_number.
11118
11119 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11120
11121 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11122 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11123 btrace_insn_next, btrace_insn_prev): Remove references to
11124 btrace_thread_info::flow.
11125 * btrace.h (struct btrace_function): Remove FLOW.
11126
11127 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11128
11129 * btrace.c (ftrace_find_call_by_number): New function.
11130 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11131 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11132 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11133 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11134 index.
11135 * btrace.h (struct btrace_function): Turn UP into an index.
11136 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11137 as an index.
11138 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11139 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11140 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11141
11142 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11143
11144 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11145 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11146 ftrace_update_function, ftrace_compute_global_level_offset,
11147 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11148 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11149 btrace_insn_end, btrace_is_empty): Remove references to
11150 btrace_thread_info::begin and btrace_thread_info::end.
11151 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11152 (struct btrace_thread_info) <functions>: Adjust comment.
11153 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11154 btrace_thread_info::begin.
11155
11156 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11157
11158 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11159 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11160 ftrace_update_function): Remove arguments that implicitly were always
11161 BTINFO->END.
11162 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11163 Don't pass BTINFO->END.
11164
11165 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11166
11167 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11168 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11169 btrace_find_insn_by_number): Replace function segment pointer with
11170 index.
11171 (btrace_insn_cmp): Simplify.
11172 * btrace.h: (struct btrace_insn_iterator) Rename index to
11173 insn_index. Replace function segment pointer with index into function
11174 segment vector.
11175 * record-btrace.c (record_btrace_call_history): Replace function
11176 segment pointer use with index.
11177 (record_btrace_frame_sniffer): Retrieve function call segment through
11178 vector.
11179 (record_btrace_set_replay): Remove defunc't safety check.
11180
11181 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11182
11183 * btrace.c (btrace_ends_with_single_insn): New function.
11184 (btrace_call_get, btrace_call_number, btrace_call_begin,
11185 btrace_call_end, btrace_call_next, btrace_call_prev,
11186 btrace_find_call_by_number): Use index into call segment vector
11187 instead of pointer.
11188 (btrace_call_cmp): Simplify.
11189 * btrace.h (struct btrace_call_iterator): Replace function call segment
11190 pointer with index into vector.
11191 * record-btrace.c (record_btrace_call_history): Use index instead of
11192 pointer.
11193
11194 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11195
11196 * btrace.c (btrace_insn_begin, btrace_insn_end,
11197 btrace_find_insn_by_number): Add btinfo to iterator.
11198 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11199
11200 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11201
11202 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11203 and save pointers directly.
11204 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11205 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11206 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11207 changed signature of functions.
11208 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11209 (btrace_fetch): Remove code that adds btrace_function pointers to
11210 vector of btrace_functions.
11211 (btrace_clear): Simplify freeing vector of btrace_functions.
11212
11213 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11214
11215 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11216 Replace VEC_* with std::vector functions.
11217 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11218 (struct btrace_thread_info)<functions>: Change type to std::vector.
11219
11220 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11221
11222 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11223 "Removed targets and native configurations" up. Merge duplicate
11224 "New commands" sub-sections. Add "New options" sub-sections.
11225
11226 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11227
11228 * defs.h (copy_integer_to_size): New declaration.
11229 * findvar.c (copy_integer_to_size): New function.
11230 (do_cint_test): New selftest function.
11231 (copy_integer_to_size_test): Likewise.
11232 (_initialize_findvar): Likewise.
11233 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11234 (mips_fbsd_collect_reg): Use raw_collect_integer.
11235 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11236 (mips64_fill_gregset): Use raw_collect_integer
11237 (mips64_fill_fpregset): Use raw_supply_integer.
11238 * regcache.c (regcache::raw_supply_integer): New function.
11239 (regcache::raw_collect_integer): Likewise.
11240 * regcache.h: (regcache::raw_supply_integer): New declaration.
11241 (regcache::raw_collect_integer): Likewise.
11242
11243 2017-05-24 Yao Qi <yao.qi@linaro.org>
11244
11245 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11246 (COMMON_OBS): Add gdbarch-selftests.o.
11247 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11248 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11249 * gdbarch-selftests.c: New file.
11250 * regcache.h (regcache) <~regcache>: Mark it virtual if
11251 GDB_SELF_TEST.
11252 <raw_write>: Likewise.
11253
11254 2017-05-24 Yao Qi <yao.qi@linaro.org>
11255
11256 * regcache.c (current_regcache): Change it to
11257 regcache::current_regcache.
11258 (regcache_observer_target_changed): Update.
11259 (regcache_thread_ptid_changed): Make it a regcache static
11260 method.
11261 (regcache_thread_ptid_changed): Update.
11262 (class regcache_access): New.
11263 (current_regcache_test): Update.
11264 (_initialize_regcache): Update.
11265 * regcache.h: Include forward_list.
11266 (regcache): Declare regcache_thread_ptid_changed and declare
11267 registers_changed_ptid as friend.
11268
11269 2017-05-24 Yao Qi <yao.qi@linaro.org>
11270
11271 * i387-tdep.c (i387_register_to_value): Use register_size
11272 instead of TYPE_LENGTH.
11273 * m68k-tdep.c (m68k_register_to_value): Likewise.
11274
11275 2017-05-24 Yao Qi <yao.qi@linaro.org>
11276
11277 * i387-tdep.c (i387_convert_register_p): Return false if type
11278 code isn't TYPE_CODE_FLT.
11279
11280 2017-05-24 Yao Qi <yao.qi@linaro.org>
11281
11282 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11283 length is 4.
11284 (alpha_register_to_value): Remove type length check.
11285 (alpha_value_to_register): Likewise.
11286
11287 2017-05-24 Yao Qi <yao.qi@linaro.org>
11288
11289 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11290 TYPE_CODE_FLT.
11291
11292 2017-05-24 Yao Qi <yao.qi@linaro.org>
11293
11294 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11295 TYPE_CODE_FLT or not.
11296
11297 2017-05-24 Yao Qi <yao.qi@linaro.org>
11298
11299 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11300 * avr-tdep.c (avr_gdbarch_init): Likewise.
11301 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11302 * cris-tdep.c (cris_gdbarch_init): Likewise.
11303 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11304 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11305 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11306 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11307 * mep-tdep.c (mep_gdbarch_init): Likewise.
11308 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11309 * mips-tdep.c (mips_gdbarch_init): Likewise.
11310 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11311 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11312 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11313 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11314 * v850-tdep.c (v850_gdbarch_init): Likewise.
11315
11316 2017-05-24 Yao Qi <yao.qi@linaro.org>
11317
11318 * selftest-arch.c (tests_with_arch): Call registers_changed
11319 and reinit_frame_cache.
11320 * selftest.c (run_self_tests): Likewise.
11321
11322 2017-05-24 Yao Qi <yao.qi@linaro.org>
11323
11324 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11325 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11326
11327 2017-05-24 Yao Qi <yao.qi@linaro.org>
11328
11329 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11330 set_gdbarch_print_insn.
11331
11332 2017-05-24 Yao Qi <yao.qi@linaro.org>
11333
11334 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11335 set_gdbarch_print_insn.
11336
11337 2017-05-24 Yao Qi <yao.qi@linaro.org>
11338
11339 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11340 set_gdbarch_print_insn.
11341 * arc-tdep.c (arc_gdbarch_init): Likewise.
11342 * arch-utils.c: include dis-asm.h.
11343 (default_print_insn): New function.
11344 * arch-utils.h (default_print_insn): Declare.
11345 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11346 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11347 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11348 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11349 * frv-tdep.c (frv_gdbarch_init): Likewise.
11350 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11351 * gdbarch.sh (print_insn): Use default_print_insn.
11352 * gdbarch.c: Regenerated.
11353 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11354 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11355 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11356 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11357 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11358 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11359 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11360 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11361 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11362 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11363 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11364 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11365 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11366 * mt-tdep.c (mt_gdbarch_init): Likewise.
11367 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11368 * nios2-tdep.c (nios2_print_insn): Remove.
11369 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11370 * rx-tdep.c (rx_gdbarch_init): Likewise.
11371 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11372 * score-tdep.c (score_print_insn): Remove.
11373 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11374 * sh-tdep.c (sh_gdbarch_init): Likewise.
11375 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11376 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11377 * tic6x-tdep.c (tic6x_print_insn): Remove.
11378 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11379 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11380 * v850-tdep.c (v850_gdbarch_init): Likewise.
11381 * vax-tdep.c (vax_gdbarch_init): Likewise.
11382 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11383 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11384
11385 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11386
11387 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11388 (MIPS_FP0_REGNUM): Remove.
11389 (MIPS_FSR_REGNUM): Remove.
11390 (mips_fbsd_supply_fpregs): Use mips_regnum.
11391 (mips_fbsd_supply_gregs): Likewise.
11392 (mips_fbsd_collect_fpregs): Likewise.
11393 (mips_fbsd_collect_gregs): Likewise.
11394
11395 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11396
11397 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11398 (getpfpregs_supplies): New function.
11399 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11400 getfpregs_supplies.
11401 (mips_fbsd_store_inferior_registers): Likewise.
11402
11403 2017-05-22 Pedro Alves <palves@redhat.com>
11404
11405 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11406 maintainer.
11407
11408 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11409
11410 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11411 (store_register): Likewise.
11412 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11413 (get_decimal_float_return_value): Likewise.
11414 (do_ppc_sysv_return_value): Likewise.
11415 (ppc64_sysv_abi_push_integer): Likewise.
11416 (ppc64_sysv_abi_push_freg): Likewise.
11417 (ppc64_sysv_abi_return_value_base): Likewise.
11418 (ppc64_sysv_abi_return_value): Likewise.
11419 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11420 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11421 * rs6000-nat.c: Likewise.
11422 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11423 (rs6000_value_to_register): Likewise.
11424 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11425
11426 2017-05-21 Tom Tromey <tom@tromey.com>
11427
11428 PR rust/21466:
11429 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11430 arrays as "[T]", not "[T; ]".
11431
11432 2017-05-19 Tom Tromey <tom@tromey.com>
11433
11434 PR rust/21484:
11435 * rust-lang.c (exp_descriptor_rust): New function.
11436 (rust_language_defn): Use it.
11437 * p-lang.c (pascal_language_defn): Update.
11438 * opencl-lang.c (opencl_language_defn): Update.
11439 * objc-lang.c (objc_language_defn): Update.
11440 * m2-lang.c (m2_language_defn): Update.
11441 * language.h (struct language_defn)
11442 <la_watch_location_expression>: New member.
11443 * language.c (unknown_language_defn, auto_language_defn)
11444 (local_language_defn): Update.
11445 * go-lang.c (go_language_defn): Update.
11446 * f-lang.c (f_language_defn): Update.
11447 * d-lang.c (d_language_defn): Update.
11448 * c-lang.h (c_watch_location_expression): Declare.
11449 * c-lang.c (c_watch_location_expression): New function.
11450 (c_language_defn, cplus_language_defn, asm_language_defn)
11451 (minimal_language_defn): Use it.
11452 * breakpoint.c (watch_command_1): Call
11453 la_watch_location_expression.
11454 * ada-lang.c (ada_language_defn): Update.
11455
11456 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11457
11458 PR tui/21482
11459 * gdb_curses.h (NOMACROS): Define.
11460 (NCURSES_NOMACROS): Define.
11461
11462 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11463
11464 PR tui/21482
11465 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11466 arg to char *.
11467 * tui/tui-wingeneral.c (box_win): Likewise.
11468 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11469 (tui_show_source_line): Likewise.
11470 (tui_show_exec_info_content): Likewise.
11471
11472 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11473
11474 * sparc-tdep.c (sparc_structure_return_p)
11475 (sparc_arg_on_registers_p): New functions.
11476 (sparc32_store_arguments): Use them.
11477 * sparc64-tdep.c (sparc64_16_byte_align_p)
11478 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11479 Handle TYPE_CODE_ARRAY.
11480
11481 2017-05-17 Yao Qi <yao.qi@linaro.org>
11482
11483 * cli/cli-decode.c (add_alias_cmd): New function.
11484 * command.h (add_alias_cmd): Declare.
11485 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11486 instead call add_alias_cmd.
11487
11488 2017-05-17 Pedro Alves <palves@redhat.com>
11489
11490 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11491 (nat_makefile_frag): ... this. All references updated.
11492 * configure.ac: Likewise.
11493 * configure.nat: Likewise. Enhance comments.
11494 * configure: Regenerate.
11495
11496 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11497
11498 * procfs.c (procfs_create_inferior): Change prototype to match
11499 definition.
11500
11501 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11502
11503 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11504 C++ compiler warning.
11505
11506 2017-05-12 Tom Tromey <tom@tromey.com>
11507
11508 PR rust/21483:
11509 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11510 recurse, just call value_struct_elt directly.
11511
11512 2017-05-12 Tom Tromey <tom@tromey.com>
11513
11514 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11515 OP_RUST_ARRAY>: Fix.
11516
11517 2017-05-12 Tom Tromey <tom@tromey.com>
11518
11519 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11520
11521 2017-05-09 Yao Qi <yao.qi@linaro.org>
11522
11523 * regcache.c: Include <forward_list>.
11524 (struct regcache_list): Remove.
11525 (current_regcache): Update.
11526 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11527 (regcache_thread_ptid_changed): Likewise.
11528 (registers_changed_ptid): Likewise.
11529 (current_regcache_size): Likewise.
11530
11531 2017-05-09 Yao Qi <yao.qi@linaro.org>
11532
11533 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11534 (current_regcache_size): New function.
11535 (current_regcache_test): New function.
11536 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11537
11538 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11539
11540 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11541 (print_gp_register_row): Use get_frame_register_value.
11542
11543 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11544
11545 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11546 (mips_supply_fpregset): Likewise.
11547 (mips64_supply_gregset): Likewise.
11548
11549 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11550
11551 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11552 regcache->raw_supply_zeroed.
11553
11554 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11555
11556 * configure.nat: Rearrange 'case' statements to match
11557 host before cpu.
11558
11559 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11560
11561 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11562 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11563 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11564 "@nat_extra_makefile_frag@".
11565 (Makefile): Remove dependency on "@frags@".
11566 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11567 (data-directory/Makefile): Likewise.
11568 * config/aarch64/linux.mh: Deleted; moved contents to
11569 "gdb/configure.nat".
11570 * config/alpha/alpha-linux.mh: Likewise.
11571 * config/alpha/nbsd.mh: Likewise.
11572 * config/arm/linux.mh: Likewise.
11573 * config/arm/nbsdelf.mh: Likewise.
11574 * config/i386/cygwin.mh: Likewise.
11575 * config/i386/cygwin64.mh: Likewise.
11576 * config/i386/darwin.mh: Likewise.
11577 * config/i386/fbsd.mh: Likewise.
11578 * config/i386/fbsd64.mh: Likewise.
11579 * config/i386/go32.mh: Likewise.
11580 * config/i386/i386gnu.mh: Likewise.
11581 * config/i386/i386sol2.mh: Likewise.
11582 * config/i386/linux.mh: Likewise.
11583 * config/i386/linux64.mh: Likewise.
11584 * config/i386/mingw.mh: Likewise.
11585 * config/i386/mingw64.mh: Likewise.
11586 * config/i386/nbsd64.mh: Likewise.
11587 * config/i386/nbsdelf.mh: Likewise.
11588 * config/i386/nto.mh: Likewise.
11589 * config/i386/obsd.mh: Likewise.
11590 * config/i386/obsd64.mh: Likewise.
11591 * config/i386/sol2-64.mh: Likewise.
11592 * config/ia64/linux.mh: Likewise.
11593 * config/m32r/linux.mh: Likewise.
11594 * config/m68k/linux.mh: Likewise.
11595 * config/m68k/nbsdelf.mh: Likewise.
11596 * config/m68k/obsd.mh: Likewise.
11597 * config/m88k/obsd.mh: Likewise.
11598 * config/mips/fbsd.mh: Likewise.
11599 * config/mips/linux.mh: Likewise.
11600 * config/mips/nbsd.mh: Likewise.
11601 * config/mips/obsd64.mh: Likewise.
11602 * config/pa/linux.mh: Likewise.
11603 * config/pa/nbsd.mh: Likewise.
11604 * config/pa/obsd.mh: Likewise.
11605 * config/powerpc/aix.mh: Likewise.
11606 * config/powerpc/fbsd.mh: Likewise.
11607 * config/powerpc/linux.mh: Likewise.
11608 * config/powerpc/nbsd.mh: Likewise.
11609 * config/powerpc/obsd.mh: Likewise.
11610 * config/powerpc/ppc64-linux.mh: Likewise.
11611 * config/powerpc/spu-linux.mh: Likewise.
11612 * config/s390/linux.mh: Likewise.
11613 * config/sh/nbsd.mh: Likewise.
11614 * config/sparc/fbsd.mh: Likewise.
11615 * config/sparc/linux.mh: Likewise.
11616 * config/sparc/linux64.mh: Likewise.
11617 * config/sparc/nbsd64.mh: Likewise.
11618 * config/sparc/nbsdelf.mh: Likewise.
11619 * config/sparc/obsd64.mh: Likewise.
11620 * config/sparc/sol2.mh: Likewise.
11621 * config/tilegx/linux.mh: Likewise.
11622 * config/vax/nbsdelf.mh: Likewise.
11623 * config/vax/obsd.mh: Likewise.
11624 * config/xtensa/linux.mh: Likewise.
11625 * config/i386/i386gnu.mn: New file, with excerpts from
11626 "config/i386/i386gnu.mh".
11627 * configure: Regenerate.
11628 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11629 *.mh files under "gdb/config".
11630 * configure.nat: New file, with contents from the
11631 "gdb/config/*/*.mh" files.
11632
11633 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11634
11635 * btrace.c (btrace_clear): Free insn vector.
11636
11637 2017-05-05 Pedro Alves <palves@redhat.com>
11638
11639 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11640 * configure: Regenerate.
11641
11642 2017-05-04 Pedro Alves <palves@redhat.com>
11643
11644 * Makefile.in (SFILES): Add progspace-and-thread.c.
11645 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11646 (COMMON_OBS): Add progspace-and-thread.o.
11647 * breakpoint.c: Include "progspace-and-thread.h".
11648 (update_inserted_breakpoint_locations)
11649 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11650 Use scoped_restore_current_pspace_and_thread.
11651 (create_std_terminate_master_breakpoint): Use
11652 scoped_restore_current_program_space.
11653 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11654 (print_breakpoint_location): Use
11655 scoped_restore_current_program_space.
11656 (bp_loc_is_permanent): Use
11657 scoped_restore_current_pspace_and_thread.
11658 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11659 (download_tracepoint_locations): Use
11660 scoped_restore_current_pspace_and_thread.
11661 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11662 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11663 (enum step_over_calls_kind): Moved from inferior.h.
11664 (class scoped_restore_current_thread): New class.
11665 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11666 declaration.
11667 (scoped_restore_current_thread): New class.
11668 * infcmd.c: Include "common/gdb_optional.h".
11669 (continue_1, proceed_after_attach): Use
11670 scoped_restore_current_thread.
11671 (notice_new_inferior): Use scoped_restore_current_thread.
11672 * inferior.c: Include "progspace-and-thread.h".
11673 (restore_inferior, save_current_inferior): Delete.
11674 (add_inferior_command, clone_inferior_command): Use
11675 scoped_restore_current_pspace_and_thread.
11676 * inferior.h (scoped_restore_current_inferior): New class.
11677 * infrun.c: Include "progspace-and-thread.h" and
11678 "common/gdb_optional.h".
11679 (follow_fork_inferior): Use
11680 scoped_restore_current_pspace_and_thread.
11681 (scoped_restore_exited_inferior): New class.
11682 (handle_vfork_child_exec_or_exit): Use
11683 scoped_restore_exited_inferior,
11684 scoped_restore_current_pspace_and_thread,
11685 scoped_restore_current_thread and scoped_restore.
11686 (fetch_inferior_event): Use scoped_restore_current_thread.
11687 * linespec.c (decode_line_full, decode_line_1): Use
11688 scoped_restore_current_program_space.
11689 * mi/mi-main.c: Include "progspace-and-thread.h".
11690 (exec_continue): Use scoped_restore_current_thread.
11691 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11692 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11693 * proc-service.c (ps_pglobal_lookup): Use
11694 scoped_restore_current_program_space.
11695 * progspace-and-thread.c: New file.
11696 * progspace-and-thread.h: New file.
11697 * progspace.c (release_program_space, clone_program_space): Use
11698 scoped_restore_current_program_space.
11699 (restore_program_space, save_current_program_space)
11700 (save_current_space_and_thread): Delete.
11701 (switch_to_program_space_and_thread): Moved to
11702 progspace-and-thread.c.
11703 * progspace.h (save_current_program_space)
11704 (save_current_space_and_thread): Delete declarations.
11705 (scoped_restore_current_program_space): New class.
11706 * remote.c (remote_btrace_maybe_reopen): Use
11707 scoped_restore_current_thread.
11708 * symtab.c: Include "progspace-and-thread.h".
11709 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11710 * thread.c (print_thread_info_1): Use
11711 scoped_restore_current_thread.
11712 (struct current_thread_cleanup): Delete.
11713 (do_restore_current_thread_cleanup)
11714 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11715 (scoped_restore_current_thread::~scoped_restore_current_thread):
11716 ... this new dtor.
11717 (make_cleanup_restore_current_thread): Rename/convert to ...
11718 (scoped_restore_current_thread::scoped_restore_current_thread):
11719 ... this new ctor.
11720 (thread_apply_all_command): Use scoped_restore_current_thread.
11721 (thread_apply_command): Use scoped_restore_current_thread.
11722 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11723 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11724
11725 2017-05-04 Pedro Alves <palves@redhat.com>
11726
11727 * thread.c (make_cleanup_restore_current_thread): Move
11728 find_thread_ptid call before the is_stopped call. Assert that the
11729 thread is found. Replace is_stopped call by checking the thread's
11730 state directly. Remove unnecessary NULL-thread check.
11731
11732 2017-05-04 Pedro Alves <palves@redhat.com>
11733
11734 * corelow.c (thread_section_name): New class.
11735 (get_core_register_section, get_core_siginfo): Use it.
11736
11737 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11738
11739 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11740 (get_core_register_section): Remove xfree of NULL pointer.
11741
11742 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11743
11744 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11745 * regcache.c (regcache::raw_supply_zeroed): New function.
11746 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11747
11748 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11749
11750 * gdbarch.sh: Remove commented out definition of
11751 TARGET_CHAR_BIT.
11752 * gdbarch.h: Re-generate.
11753
11754 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11755
11756 * configure: Regenerate.
11757
11758 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11759
11760 * solib-target.c (solib_target_relocate_section_addresses):
11761 Remove num_section_bases, num_bases, segment_bases variables.
11762
11763 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11764
11765 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11766
11767 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11768
11769 * solib-target.c: Include <vector>
11770 (struct lm_info_target) <~lm_info_target>: Remove.
11771 <segment_bases, section_bases>: Change type to
11772 std::vector<CORE_ADDR>.
11773 (library_list_start_segment, library_list_start_section,
11774 library_list_end_library,
11775 solib_target_relocate_section_addresses): Adjust.
11776
11777 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11778
11779 * gdbarch.sh (software_single_step): Change return type to
11780 std::vector<CORE_ADDR>.
11781 * gdbarch.c, gdbarch.h: Re-generate.
11782 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11783 Adjust.
11784 (arm_deal_with_atomic_sequence_raw): Adjust.
11785 (thumb_get_next_pcs_raw): Adjust.
11786 (arm_get_next_pcs_raw): Adjust.
11787 (arm_get_next_pcs): Adjust.
11788 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11789 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11790 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11791 (alpha_software_single_step): Adjust.
11792 * alpha-tdep.h (alpha_software_single_step): Adjust.
11793 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11794 * arm-tdep.c (arm_software_single_step): Adjust.
11795 (arm_breakpoint_kind_from_current_state): Adjust.
11796 * arm-tdep.h (arm_software_single_step): Adjust.
11797 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11798 * cris-tdep.c (cris_software_single_step): Adjust.
11799 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11800 (micromips_deal_with_atomic_sequence): Adjust.
11801 (deal_with_atomic_sequence): Adjust.
11802 (mips_software_single_step): Adjust.
11803 * mips-tdep.h (mips_software_single_step): Adjust.
11804 * moxie-tdep.c (moxie_software_single_step): Adjust.
11805 * nios2-tdep.c (nios2_software_single_step): Adjust.
11806 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11807 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11808 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11809 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11810 * sparc-tdep.c (sparc_software_single_step): Adjust.
11811 * spu-tdep.c (spu_software_single_step): Adjust.
11812 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11813
11814 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11815
11816 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11817 * gdbarch.h: Re-generate.
11818
11819 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11820
11821 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11822 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11823 * python/py-instruction.c, python/py-instruction.h: New file.
11824 * python/py-record.c: Add py-instruction.h include.
11825 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11826 gdb.RecordInstruction.
11827 * python/python-internal.h: Add gdbpy_initialize_instruction
11828 declaration.
11829 * python/python.c (do_start_initialization): Add
11830 gdbpy_initialize_instruction.
11831
11832 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11833
11834 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11835 Remove.
11836 (btrace_func_from_recpy_func): New function.
11837 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11838 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11839 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11840 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11841 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11842 Also, use new helper functions.
11843 (btpy_list_item): Use new helper functions.
11844 (recpy_bt_function_call_history): Use new type name.
11845 (btpy_call_getset): Remove.
11846 (gdbpy_initialize_btrace): Remove code to initialize
11847 gdb.BtraceFunctionCall.
11848 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11849 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11850 recpy_bt_func_prev, recpy_bt_func_next): New export.
11851 * python/py-record.c (recpy_func_type): New static object.
11852 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11853 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11854 recpy_func_next): New function.
11855 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11856 (recpy_func_getset): New static object.
11857 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11858 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11859
11860 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11861
11862 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11863 (btpy_object, btpy_insn_type, btpy_new): Remove.
11864 (btpy_list_object): Use gdb.RecordInstruction type instead of
11865 gdb.BtraceInstruction type.
11866 (btrace_insn_from_recpy_insn): New function.
11867 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11868 btpy_new.
11869 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11870 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11871 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11872 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11873 instead of btpy_object.
11874 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11875 btpy_insn_data, btpy_insn_decode): Rename to ...
11876 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11877 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11878 recpy_bt_insn_decode): This. Also, use new helper functions.
11879 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11880 recpy_insn_type.
11881 (btpy_insn_getset): Remove.
11882 (gdbpy_initialize_btrace): Remove code to initialize
11883 gdb.BtraceInstruction. Use recpy_element_object.
11884 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11885 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11886 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11887 * python/py-record.c (recpy_insn_type): New static object.
11888 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11889 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11890 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11891 New function.
11892 (recpy_insn_getset): New static object.
11893 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11894 * python/py-record.h (recpy_element_object): New typedef.
11895 (recpy_insn_type, recpy_insn_new): New export.
11896
11897 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11898
11899 * py-record-btrace.c (btpy_insn_new): Removed.
11900 (btpy_insn_or_gap_new): New function.
11901 (btpy_insn_error): Removed.
11902 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11903 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11904 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11905 btpy_insn_or_gap_new instead of btpy_insn_new.
11906 (btpy_insn_getset): Remove btpy_insn_error.
11907 * py-record.c (recpy_gap_type): New static object.
11908 (recpy_gap_object): New typedef.
11909 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11910 recpy_gap_reason_string): New function.
11911 (recpy_gap_getset): New static object.
11912 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11913 * py-record.h (recpy_gap_new): New export.
11914
11915 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11916
11917 * python/py-record.c (recpy_ptid): Remove.
11918 (recpy_record_getset): Remove recpy_ptid.
11919
11920 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11921
11922 * btrace.c (btrace_fetch): Set inferior_ptid.
11923 * python/py-record-btrace.c: Add "py-record.h" include.
11924 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11925 recpy_bt_end, recpy_bt_instruction_history,
11926 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11927 in gdb.Record object instead of current ptid.
11928 * python/py-record.c: Include new "py-record.h" file.
11929 (recpy_record_object): Moved to py-record.h.
11930 * python/py-record.h: New file.
11931
11932 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11933
11934 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11935 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11936 indentation.
11937
11938 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11939
11940 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11941 the past maintainers section.
11942
11943 2017-04-28 Yao Qi <yao.qi@linaro.org>
11944
11945 * infcmd.c (get_return_value): Use regcache ctor, and remove
11946 cleanup.
11947
11948 2017-04-28 Yao Qi <yao.qi@linaro.org>
11949 Pedro Alves <palves@redhat.com>
11950
11951 * regcache.c (regcache::regcache): New tag dispatch ctor.
11952 (do_cooked_read): Moved above.
11953 (regcache_dup): Use the tag dispatch ctor..
11954 * regcache.h (regcache): Declare ctor, delete copy ctor and
11955 assignment operator, remove friend regcache_dup.
11956
11957 2017-04-28 Yao Qi <yao.qi@linaro.org>
11958
11959 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11960 call method save instead of regcache_cpy.
11961 * regcache.h (struct regcache): Make regcache_dup a friend.
11962
11963 2017-04-28 Yao Qi <yao.qi@linaro.org>
11964
11965 * regcache.c (struct regcache): Move to regcache.h
11966 (regcache::arch): New method.
11967 (regcache_get_ptid): Update.
11968 (get_regcache_arch): Call arch method.
11969 (get_regcache_aspace): Call method aspace.
11970 (register_buffer): Change it to method.
11971 (regcache_save): Change it to regcache::save.
11972 (regcache_restore): Likewise.
11973 (regcache_cpy_no_passthrough): Remove the declaration.
11974 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11975 (regcache_cpy_no_passthrough): Change it to method
11976 cpy_no_passthrough.
11977 (regcache_register_status): Change it to method
11978 get_register_status.
11979 (regcache_invalidate): Change it to method invalidate.
11980 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11981 (regcache_raw_update): Change it to method raw_update.
11982 (regcache_raw_read): Likewise.
11983 (regcache_raw_read_signed): Likewise.
11984 (regcache_raw_read_unsigned): Likewise.
11985 (regcache_raw_write_signed): Likewise.
11986 (regcache_raw_write_unsigned): Likewise.
11987 (regcache_cooked_read): Likewise.
11988 (regcache_cooked_read_value): Likewise.
11989 (regcache_cooked_read_signed): Likewise.
11990 (regcache_cooked_read_unsigned): Likewise.
11991 (regcache_cooked_write_signed): Likewise.
11992 (regcache_cooked_write_unsigned): Likewise.
11993 (regcache_raw_set_cached_value): Likewise.
11994 (regcache_raw_write): Likewise.
11995 (regcache_cooked_write): Likewise.
11996 (regcache_xfer_part): Likewise.
11997 (regcache_raw_read_part): Likewise.
11998 (regcache_raw_write_part): Likewise.
11999 (regcache_cooked_read_part): Likewise.
12000 (regcache_cooked_write_part): Likewise.
12001 (regcache_raw_supply): Likewise.
12002 (regcache_raw_collect): Likewise.
12003 (regcache_transfer_regset): Likewise.
12004 (regcache_supply_regset): Likewise.
12005 (regcache_collect_regset): Likewise.
12006 (regcache_debug_print_register): Likewise.
12007 (enum regcache_dump_what): Move it to regcache.h.
12008 (regcache_dump): Change it to method dump.
12009 * regcache.h (enum regcache_dump_what): New.
12010 (class regcache): New.
12011 * target.c (target_fetch_registers): Call method
12012 debug_print_register.
12013 (target_store_registers): Likewise.
12014
12015 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12016
12017 * windows-nat.c (struct lm_info_windows): Initialize field.
12018 (windows_make_so): Allocate lm_info_windows with new.
12019 (windows_free_so): Free lm_info_windows with delete.
12020
12021 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12022
12023 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12024 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12025 cleanup.
12026 (darwin_free_so): Free lm_info_darwin with delete.
12027
12028 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12029
12030 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12031 <l_addr_p>: Change type to bool.
12032 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12033 (svr4_free_so): Free lm_info_svr4 with delete.
12034 (svr4_copy_library_list): Replace memcpy with call to copy
12035 constructor.
12036 (library_list_start_library, svr4_default_sos): Allocate
12037 lm_info_svr4 with new.
12038
12039 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12040
12041 * solib-target.c (struct lm_info_target): Add destructor,
12042 initialize fields.
12043 <name>: Change type to std::string.
12044 (library_list_start_library): Allocate lm_info_target with new.
12045 (solib_target_free_library_list): Free lm_info_target with
12046 delete.
12047 (solib_target_current_sos): Adapt to std::string.
12048 (solib_target_free_so): Free lm_info_target with delete.
12049
12050 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12051
12052 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12053 fields.
12054 (frv_current_sos): Allocate lm_info_frv with new.
12055 (frv_relocate_main_executable): Free lm_info_frv with delete,
12056 allocate with new.
12057 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12058
12059 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12060
12061 * solib-frv.c (struct lm_info_frv): Fix indentation.
12062
12063 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12064
12065 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12066 map field.
12067 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12068 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12069 and allocate with new.
12070 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12071
12072 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12073
12074 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12075 <filename, member_name>: Change type to std::string.
12076 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12077 (library_list_start_library): Allocate lm_info_aix with new.
12078 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12079 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12080 with copy constructor.
12081
12082 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12083
12084 * solist.h (struct lm_info): Remove.
12085 (struct lm_info_base): New class.
12086 (struct so_list) <lm_info>: Change type to lm_info_base *.
12087 * nto-tdep.c (struct lm_info): Remove.
12088 (lm_addr): Adjust.
12089 * solib-aix.c (struct lm_info): Rename to ...
12090 (struct lm_info_aix): ... this. Extend lm_info_base.
12091 (lm_info_p): Rename to ...
12092 (lm_info_aix_p): ... this, and adjust.
12093 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12094 solib_aix_parse_libraries, library_list_start_library,
12095 solib_aix_free_library_list, solib_aix_parse_libraries,
12096 solib_aix_get_library_list,
12097 solib_aix_relocate_section_addresses, solib_aix_free_so,
12098 solib_aix_get_section_offsets,
12099 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12100 Adjust.
12101 (struct solib_aix_inferior_data) <library_list>: Adjust.
12102 * solib-darwin.c (struct lm_info): Rename to ...
12103 (struct lm_info_darwin): ... this. Extend lm_info_base.
12104 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12105 * solib-dsbt.c (struct lm_info): Rename to ...
12106 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12107 (struct dsbt_info) <main_executable_lm_info): Adjust.
12108 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12109 dsbt_relocate_section_addresses): Adjust.
12110 * solib-frv.c (struct lm_info): Rename to ...
12111 (struct lm_info_frv): ... this. Extend lm_info_base.
12112 (main_executable_lm_info): Adjust.
12113 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12114 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12115 find_canonical_descriptor_in_load_object,
12116 frv_fdpic_find_canonical_descriptor): Adjust.
12117 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12118 to lm_info_svr4.
12119 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12120 svr4_clear_so, svr4_copy_library_list,
12121 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12122 svr4_current_sos, svr4_fetch_objfile_link_map,
12123 solist_update_incremental): Adjust.
12124 * solib-svr4.h (struct lm_info_svr4): Move here from
12125 solib-svr4.c.
12126 * solib-target.c (struct lm_info): Rename to ...
12127 (struct lm_info_target): ... this. Extend lm_info_base.
12128 (lm_info_p): Rename to ...
12129 (lm_info_target_p): ... this.
12130 (solib_target_parse_libraries, library_list_start_segment,
12131 library_list_start_section, library_list_start_library,
12132 library_list_end_library, solib_target_free_library_list,
12133 solib_target_current_sos, solib_target_free_so,
12134 solib_target_relocate_section_addresses): Adjust.
12135 * windows-nat.c (struct lm_info): Rename to ...
12136 (struct lm_info_windows): ... this. Extend lm_info_base.
12137 (windows_make_so, handle_load_dll, handle_unload_dll,
12138 windows_xfer_shared_libraries): Adjust.
12139
12140 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12141
12142 * solib-darwin.c (struct darwin_so_list): Remove.
12143 (darwin_current_sos): Allocate an so_list object instead of a
12144 darwin_so_list, separately allocate an lm_info object.
12145 (darwin_free_so): Free lm_info.
12146
12147 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12148
12149 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12150 with fprintf_filtered.
12151
12152 2017-04-28 Yao Qi <yao.qi@linaro.org>
12153
12154 * regcache.c (regcache::regcache): New function.
12155 (regcache::~regcache): New function.
12156 (regcache_xmalloc_1): Remove.
12157 (regcache_xmalloc): Call new regcache.
12158 (regcache_xfree): Call delete regcache.
12159 (get_thread_arch_aspace_regcache): Call new regcache.
12160
12161 2017-04-28 Yao Qi <yao.qi@linaro.org>
12162
12163 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12164 lwp instead of ptid_get_lwp.
12165
12166 2017-04-28 Yao Qi <yao.qi@linaro.org>
12167
12168 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12169 lwp_info instead of getting from inferior_ptid.
12170
12171 2017-04-27 Keith Seitz <keiths@redhat.com>
12172
12173 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12174 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12175 (CV_CONVERSION_BADNESS): Define.
12176 (rank_one_type): Remove overly restrictive rvalue reference
12177 rank checks.
12178 Add cv-qualifier checks and subranks for type equality.
12179 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12180 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12181 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12182
12183 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12184
12185 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12186 count when creating the object.
12187
12188 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12189 Ulrich Weigand <uweigand@de.ibm.com>
12190
12191 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12192 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12193 is used in AIX.
12194 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12195 (process_xcoff_symbol): Likewise.
12196 (scan_xcoff_symtab): Likewise.
12197
12198 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12199
12200 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12201 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12202 (ia64_access_reg): Use get_frame_register_unsigned.
12203 (ia64_access_rse_reg): Likewise.
12204 (ia64_libunwind_frame_prev_register): Likewise.
12205
12206 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12207
12208 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12209 * gdbarch.c: Regenerated.
12210 * gdbarch.h: Regenerated.
12211 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12212 visibility external.
12213 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12214 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12215 (enum cfa_how_kind): Move to ...
12216 (struct dwarf2_frame_state_reg_info): Likewise.
12217 (struct dwarf2_frame_state): Likewise.
12218 * dwarf2-frame.h: ... here.
12219 (dwarf2_frame_state_alloc_regs): New declaration.
12220 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12221 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12222
12223 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12224
12225 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12226 regcache_raw_read_unsigned.
12227 (xtensa_pseudo_register_write): Likewise.
12228
12229 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12230
12231 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12232 (nds32_pseudo_register_write): Likewise.
12233
12234 2017-04-25 Yao Qi <yao.qi@linaro.org>
12235
12236 * regcache.c (struct regcache) <readonly_p>: Change its type
12237 to bool.
12238 (regcache_xmalloc_1): Update parameter type and callers update.
12239
12240 2017-04-25 Yao Qi <yao.qi@linaro.org>
12241
12242 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12243 set_gdbarch_wchar_bit.
12244 * arm-tdep.c (arm_gdbarch_init): Likewise.
12245
12246 2017-04-25 Pedro Alves <palves@redhat.com>
12247
12248 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12249 (BothAreRelocatable, memcopy, memmove): Don't define.
12250 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12251 macros.
12252
12253 2017-04-25 Pedro Alves <palves@redhat.com>
12254
12255 * common/common-defs.h: Include "common/poison.h".
12256 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12257 and adjust.
12258 * common/poison.h: New file.
12259 * common/traits.h: Include <type_traits>.
12260 (Not, Or, Requires): New, moved from common/function-view.h.
12261
12262 2017-04-25 Pedro Alves <palves@redhat.com>
12263
12264 * breakpoint.h (struct breakpoint): In-class initialize all
12265 fields. Make boolean fields "bool".
12266 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12267 memset call and initializations no longer necessary.
12268
12269 2017-04-25 Pedro Alves <palves@redhat.com>
12270
12271 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12272 reference.
12273 (pt_btrace_insn): New function.
12274 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12275
12276 2017-04-25 Pedro Alves <palves@redhat.com>
12277
12278 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12279 "base" field and inherit from "bp_location" instead. Add
12280 non-default ctor.
12281 (allocate_location_exception): Use new non-default ctor.
12282 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12283 (init_bp_location): Convert to ...
12284 (bp_location::bp_location): ... this new ctor, and remove memset
12285 call.
12286 (base_breakpoint_allocate_location): Use the new non-default ctor.
12287 * breakpoint.h (bp_location): Now a class. Declare default and
12288 non-default ctors. In-class initialize all members.
12289 (init_bp_location): Remove declaration.
12290
12291 2017-04-25 Pedro Alves <palves@redhat.com>
12292
12293 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12294 assignment operator.
12295
12296 2017-04-24 Yao Qi <yao.qi@linaro.org>
12297
12298 * doublest.c (convert_doublest_to_floatformat): Call
12299 floatformat_totalsize_bytes.
12300
12301 2017-04-22 Tom Tromey <tom@tromey.com>
12302
12303 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12304 ui_out_emit_list.
12305 * stack.c (print_frame): Use ui_out_emit_list.
12306 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12307 ui_out_emit_list.
12308 * mi/mi-main.c (print_one_inferior)
12309 (mi_cmd_data_list_register_names)
12310 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12311 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12312 ui_out_emit_list.
12313 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12314 (mi_output_solib_attribs): Use ui_out_emit_list,
12315 ui_out_emit_tuple.
12316 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12317 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12318 (mi_cmd_stack_list_args, list_args_or_locals): Use
12319 ui_out_emit_list.
12320 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12321 * breakpoint.c (print_solib_event, output_thread_groups): Use
12322 ui_out_emit_list.
12323
12324 2017-04-22 Tom Tromey <tom@tromey.com>
12325
12326 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12327 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12328 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12329
12330 2017-04-22 Tom Tromey <tom@tromey.com>
12331
12332 * tracepoint.c (tvariables_info_1)
12333 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12334
12335 2017-04-22 Tom Tromey <tom@tromey.com>
12336
12337 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12338 annotate_arg_emitter.
12339 * breakpoint.c (print_mention_watchpoint)
12340 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12341 * annotate.h (struct annotate_arg_emitter): New.
12342
12343 2017-04-22 Tom Tromey <tom@tromey.com>
12344
12345 * record-btrace.c (record_btrace_insn_history)
12346 (record_btrace_insn_history_range, record_btrace_call_history)
12347 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12348 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12349 ui_out_emit_tuple.
12350 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12351 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12352 * skip.c (skip_info): Use ui_out_emit_tuple.
12353 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12354 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12355 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12356 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12357 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12358 ui_out_emit_tuple.
12359 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12360 (output_register, mi_cmd_data_read_memory)
12361 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12362 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12363 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12364 Use ui_out_emit_tuple.
12365 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12366 ui_out_emit_tuple.
12367 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12368 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12369 * linux-thread-db.c (info_auto_load_libthread_db): Use
12370 ui_out_emit_tuple.
12371 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12372 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12373 * disasm.c (do_mixed_source_and_assembly_deprecated)
12374 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12375 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12376 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12377 * breakpoint.c (print_one_breakpoint_location)
12378 (print_one_breakpoint): Use ui_out_emit_tuple.
12379 * auto-load.c (print_script, info_auto_load_cmd): Use
12380 ui_out_emit_tuple.
12381 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12382
12383 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12384
12385 * thread.c (print_thread_info_1): Remove dead code.
12386
12387 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12388
12389 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12390 GDB_SELF_TEST.
12391 * arm-tdep.c (selftests::arm_record_test): Likewise.
12392
12393 2017-04-21 Yao Qi <yao.qi@linaro.org>
12394
12395 * regcache.c (regcache_restore): Remove argument 2. Replace
12396 argument 3 with regcache. Get register status from
12397 src->register_status and get register contents from
12398 register_buffer (src, regnum).
12399 (regcache_cpy): Update.
12400
12401 2017-04-19 Pedro Alves <palves@redhat.com>
12402
12403 * gdbthread.h (thread): Add missing closing parenthesis in
12404 comment.
12405
12406 2017-04-19 Pedro Alves <palves@redhat.com>
12407
12408 * common/refcounted-object.h: New file.
12409 * gdbthread.h: Include "common/refcounted-object.h".
12410 (thread_info): Inherit from refcounted_object and add comments.
12411 (thread_info::incref, thread_info::decref)
12412 (thread_info::m_refcount): Delete.
12413 (thread_info::deletable): Use the refcounted_object::refcount()
12414 method.
12415 * inferior.c (current_inferior_): Add comment.
12416 (set_current_inferior): Increment/decrement refcounts.
12417 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12418 not-deletable instead of comparing with the current inferior.
12419 (initialize_inferiors): Increment the initial inferior's refcount.
12420 * inferior.h (struct inferior): Forward declare.
12421 Include "common/refcounted-object.h".
12422 (current_inferior, set_current_inferior): Move declaration to
12423 before struct inferior's definition, and fix comment.
12424 (inferior): Inherit from refcounted_object. Add comments.
12425 * thread.c (switch_to_thread_no_regs): Reference the thread's
12426 inferior pointer directly instead of doing a ptid lookup.
12427 (switch_to_no_thread): New function.
12428 (switch_to_thread(thread_info *)): New function, factored out
12429 from ...
12430 (switch_to_thread(ptid_t)): ... this.
12431 (restore_current_thread): Delete.
12432 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12433 fields, and add 'inf' field.
12434 (do_restore_current_thread_cleanup): Check whether old->inf is
12435 alive instead of looking up an inferior by ptid. Use
12436 switch_to_thread and switch_to_no_thread.
12437 (restore_current_thread_cleanup_dtor): Use old->inf directly
12438 instead of lookup up an inferior by id. Decref the inferior.
12439 Don't restore 'removable'.
12440 (make_cleanup_restore_current_thread): Same the inferior pointer
12441 in old, instead of the inferior number. Incref the inferior.
12442 Don't save/clear 'removable'.
12443
12444 2017-04-19 Pedro Alves <palves@redhat.com>
12445
12446 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12447 unittests/scoped_restore-selftests.c.
12448 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12449 * common/scoped_restore.h (scoped_restore_base): Make "class".
12450 (scoped_restore_base::release): New public method.
12451 (scoped_restore_base::scoped_restore_base): New protected ctor.
12452 (scoped_restore_base::m_saved_var): New protected field.
12453 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12454 scoped_restore_base base class instead of m_saved_var directly.
12455 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12456 (scoped_restore_tmpl::scoped_restore_tmpl(const
12457 scoped_restore_tmpl<T>&)): Likewise.
12458 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12459 method.
12460 (scoped_restore_tmpl::saved_var): New method.
12461 (scoped_restore_tmpl::m_saved_var): Delete.
12462 * inferior.h (inferior::detaching): Now a bool.
12463 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12464 cleanup.
12465 * unittests/scoped_restore-selftests.c: New file.
12466
12467 2017-04-19 Pedro Alves <palves@redhat.com>
12468
12469 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12470 Re-sort in alphabetic order.
12471
12472 2017-04-18 Pedro Alves <palves@redhat.com>
12473
12474 * xml-support.c (obstack_xml_printf): Delete.
12475 * xml-support.h (obstack_xml_printf): Delete.
12476
12477 2017-04-18 Pedro Alves <palves@redhat.com>
12478
12479 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12480 vdebug, verror, body_text, start_element, end_element, name,
12481 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12482 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12483 is_xinclude>: Make private and add m_ prefix.
12484 (gdb_xml_parser::body_text): New method, based on ...
12485 (gdb_xml_body_text): ... this. Adjust.
12486 (gdb_xml_parser::vdebug): New method, based on ...
12487 (gdb_xml_debug): ... this. Adjust.
12488 (gdb_xml_parser::verror): New method, based on ...
12489 (gdb_xml_error): ... this. Adjust.
12490 (gdb_xml_parser::start_element): New method, based on ...
12491 (gdb_xml_start_element): ... this. Adjust.
12492 (gdb_xml_start_element_wrapper): Defer to
12493 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12494 (gdb_xml_parser::end_element): New method, based on ...
12495 (gdb_xml_end_element_wrapper): ... this. Adjust.
12496 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12497 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12498 (gdb_xml_parser::use_dtd): New method, based on ...
12499 (gdb_xml_use_dtd): ... this. Adjust.
12500 (gdb_xml_parser::parse): New method, based on ...
12501 (gdb_xml_parse): ... this. Adjust.
12502 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12503 (xinclude_start_include): Adjust to call the parser's name method.
12504 (xml_xinclude_default, xml_xinclude_start_doctype)
12505 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12506 method.
12507 (xml_process_xincludes): Adjust to call parser methods.
12508 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12509 declarations.
12510
12511 2017-04-18 Pedro Alves <palves@redhat.com>
12512
12513 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12514 gdb::optional<std::string>.
12515 * xml-support.c: Include <string>.
12516 (scope_level::scope_level(scope_level &&))
12517 (scope_level::~scope_level): Delete.
12518 (scope_level::body): Now a std::string.
12519 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12520 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12521 parameter.
12522 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12523 (xinclude_parsing_data::output): Now a std::string reference.
12524 (xinclude_start_include): Adjust.
12525 (xml_xinclude_default): Adjust.
12526 (xml_process_xincludes): Add 'output' parameter, and return bool.
12527 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12528 and return bool.
12529 * xml-tdesc.c: Include <unordered_map> and <string>.
12530 (tdesc_xml_cache): Delete.
12531 (tdesc_xml_cache_s): Delete.
12532 (xml_cache): Now an std::unordered_map.
12533 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12534 (target_fetch_description_xml): Change return type to
12535 gdb::optional<std::string>, and adjust.
12536 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12537 (target_fetch_description_xml): Change return type to
12538 gdb::optional<std::string>.
12539
12540 2017-04-18 Pedro Alves <palves@redhat.com>
12541
12542 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12543 unittests/optional-selftests.c.
12544 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12545 * unittests/optional-selftests.c: New file.
12546 * unittests/optional/assignment/1.cc: New file.
12547 * unittests/optional/assignment/2.cc: New file.
12548 * unittests/optional/assignment/3.cc: New file.
12549 * unittests/optional/assignment/4.cc: New file.
12550 * unittests/optional/assignment/5.cc: New file.
12551 * unittests/optional/assignment/6.cc: New file.
12552 * unittests/optional/assignment/7.cc: New file.
12553 * unittests/optional/cons/copy.cc: New file.
12554 * unittests/optional/cons/default.cc: New file.
12555 * unittests/optional/cons/move.cc: New file.
12556 * unittests/optional/cons/value.cc: New file.
12557 * unittests/optional/in_place.cc: New file.
12558 * unittests/optional/observers/1.cc: New file.
12559 * unittests/optional/observers/2.cc: New file.
12560
12561 2017-04-18 Pedro Alves <palves@redhat.com>
12562
12563 * common/gdb_optional.h: Include common/traits.h.
12564 (in_place_t): New type.
12565 (in_place): New constexpr variable.
12566 (optional::optional): Remove member initialization of
12567 m_instantiated.
12568 (optional::optional(in_place_t...)): New constructor.
12569 (optional::~optional): Use reset.
12570 (optional::optional(const optional&)): New.
12571 (optional::optional(const optional&&)): New.
12572 (optional::optional(T &)): New.
12573 (optional::optional(T &&)): New.
12574 (operator::operator=(const optional &)): New.
12575 (operator::operator=(optional &&)): New.
12576 (operator::operator= (const T &))
12577 (operator::operator= (T &&))
12578 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12579 (operator::reset): New.
12580 (operator::m_instantiated):: Add in-class initializer.
12581 * common/traits.h: Include <type_traits>.
12582 (struct And): New types.
12583
12584 2017-04-18 Pedro Alves <palves@redhat.com>
12585
12586 * xml-support.c: Include <vector>.
12587 (scope_level::scope_level(const gdb_xml_element *))
12588 (scope_level::scope_level(scope_level&&)): New.
12589 (scope_level::~scope_level): New.
12590 (scope_level_s): Delete.
12591 (gdb_xml_parser::scopes): Now a std::vector.
12592 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12593 Use std::vector.
12594 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12595 scope cleanup code.
12596 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12597 of the scopes member. Use std::vector::emplace_back.
12598
12599 2017-04-18 Pedro Alves <palves@redhat.com>
12600
12601 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12602 a bool.
12603 (gdb_xml_end_element): Change type of first parameter.
12604 (gdb_xml_cleanup): Rename to ...
12605 (gdb_xml_parser::~gdb_xml_parser): ... this.
12606 (gdb_xml_create_parser_and_cleanup): Delete with ...
12607 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12608 to this new ctor.
12609 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12610 using gdb_xml_create_parser_and_cleanup.
12611 (xinclude_parsing_data): Add ctor/dtor.
12612 (xml_xinclude_cleanup): Delete.
12613 (xml_process_xincludes): Create a local xinclude_parsing_data
12614 instead of heap-allocating one. Create a local gdb_xml_parser
12615 instead of heap-allocating one with
12616 gdb_xml_create_parser_and_cleanup.
12617
12618 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12619
12620 PR threads/20743
12621 * fbsd-nat.c (resume_one_thread_cb): Remove.
12622 (resume_all_threads_cb): Remove.
12623 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12624 iterate_over_threads.
12625
12626 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12627
12628 * NEWS: Create a new section for the next release branch.
12629 Rename the section of the current branch, now that it has
12630 been cut.
12631
12632 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12633
12634 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12635 * version.in: Bump version to 8.0.50.DATE-git.
12636
12637 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12638
12639 PR gdb/21385
12640 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12641 independently of the host, and fix build breakage on Cygwin.
12642
12643 2017-04-13 Pedro Alves <palves@redhat.com>
12644
12645 * inferior.c (free_inferior): Convert to ...
12646 (inferior::~inferior): ... this dtor.
12647 (inferior::inferior): New ctor, factored out from ...
12648 (add_inferior_silent): ... here. Allocate the inferior with a new
12649 expression.
12650 (delete_inferior): Call delete instead of free_inferior.
12651 * inferior.h (gdb_environ, continuation): Forward declare.
12652 (inferior): Now a class. Add in-class initialization to all
12653 members. Make boolean fields bool, except 'detaching'.
12654 (inferior::inferior): New explicit ctor.
12655 (inferior::~inferior): New.
12656
12657 2017-04-13 Pedro Alves <palves@redhat.com>
12658
12659 * inferior.c (init_inferior_list): Delete.
12660 * inferior.h (init_inferior_list): Delete.
12661
12662 2017-04-13 Pedro Alves <palves@redhat.com>
12663
12664 PR threads/13217
12665 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12666 (top level): Call it twice, with different thread sets.
12667
12668 2017-04-13 Pedro Alves <palves@redhat.com>
12669
12670 * thread.c: Include <algorithm>.
12671 (thread_array_cleanup): Delete.
12672 (scoped_inc_dec_ref): New class.
12673 (live_threads_count): New function.
12674 (set_thread_refcount): Delete.
12675 (tp_array_compar_ascending): Now a bool.
12676 (tp_array_compar): Convert to a std::sort comparison function.
12677 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12678 and live_threads_count.
12679
12680 2017-04-13 Pedro Alves <palves@redhat.com>
12681
12682 * infrun.c (follow_fork_inferior): Also switch the current
12683 inferior.
12684
12685 2017-04-13 Pedro Alves <palves@redhat.com>
12686
12687 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12688 before calling create_internal_breakpoint.
12689
12690 2017-04-13 Pedro Alves <palves@redhat.com>
12691
12692 * fork-child.c (execv_argv): New class.
12693 (breakup_args): Refactored as ...
12694 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12695 Copy arguments to storage and replace separators with NULL
12696 terminators in place.
12697 (escape_bang_in_quoted_argument): Adjust to return bool.
12698 (execv_argv::execv_argv): New ctor.
12699 (execv_argv::init_for_shell): New method, factored out from
12700 fork_inferior. Don't strdup strings into the vector.
12701 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12702 Remove free_vector_argv call.
12703
12704 2017-04-13 Yao Qi <yao.qi@linaro.org>
12705
12706 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12707 tdep->rx_psw_type.
12708
12709 2017-04-13 Yao Qi <yao.qi@linaro.org>
12710
12711 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12712 * rx-tdep.c (rx_gdbarch_init): Likewise.
12713
12714 2017-04-13 Pedro Alves <palves@redhat.com>
12715
12716 * breakpoint.h (struct breakpoint): Reindent.
12717
12718 2017-04-13 Pedro Alves <palves@redhat.com>
12719
12720 * breakpoint.c (bp_location): Rename to ...
12721 (bp_locations): ... this. All references updated.
12722 (bp_location_count): Rename to ...
12723 (bp_locations_count): ... this. All references updated.
12724 (bp_location_placed_address_before_address_max): Rename to ...
12725 (bp_locations_placed_address_before_address_max): ... this. All
12726 references updated.
12727 (bp_location_shadow_len_after_address_max): Rename to ...
12728 (bp_locations_shadow_len_after_address_max): ... this. All
12729 references updated.
12730 (bp_location_compare_addrs): Rename to ...
12731 (bp_locations_compare_addrs): ... this. All references updated.
12732 (bp_location_compare):Rename to ...
12733 (bp_locations_compare): ... this. All references updated.
12734 (bp_location_target_extensions_update): Rename to ...
12735 (bp_locations_target_extensions_update): ... this. All references
12736 updated.
12737
12738 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12739
12740 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12741 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12742 'sgtty.h'.
12743 * common/gdb_termios.h: New file, with parts of "terminal.h".
12744 * inflow.c: Include "gdb_termios.h".
12745 * ser-unix.c: Include "gdb_termios.h".
12746 * terminal.h: Move terminal-related defines to
12747 "common/gdb_termios.h".
12748
12749 2017-04-12 Tom Tromey <tom@tromey.com>
12750
12751 * probe.c (parse_probes): Update.
12752 * location.h (delete_event_location): Don't declare.
12753 (event_location_deleter::operator()): Update.
12754 * location.c (event_location_deleter::operator()): Rename from
12755 delete_event_location.
12756 * linespec.h (linespec_result) <location>: Change type to
12757 event_location_up.
12758 * linespec.c (canonicalize_linespec, event_location_to_sals)
12759 (decode_objc): Update.
12760 (linespec_result): Don't call delete_event_location.
12761 * breakpoint.c (create_breakpoints_sal)
12762 (bkpt_probe_create_sals_from_location)
12763 (strace_marker_create_sals_from_location): Update.
12764
12765 2017-04-12 Tom Tromey <tom@tromey.com>
12766
12767 * linespec.h (struct linespec_result): Add constructor and
12768 destructor.
12769 (init_linespec_result, destroy_linespec_result)
12770 (make_cleanup_destroy_linespec_result): Don't declare.
12771 * linespec.c (init_linespec_result): Remove.
12772 (linespec_result::~linespec_result): Rename from
12773 destroy_linespec_result. Update.
12774 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12775 Remove.
12776 * breakpoint.c (create_breakpoint, break_range_command)
12777 (decode_location_default): Update.
12778 * ax-gdb.c (agent_command_1): Update.
12779
12780 2017-04-12 Tom Tromey <tom@tromey.com>
12781
12782 * remote.c (remote_download_tracepoint): Update.
12783 * python/py-breakpoint.c (bppy_get_location): Update.
12784 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12785 (gdbscm_breakpoint_location): Update.
12786 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12787 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12788 Change type to event_location_up.
12789 * breakpoint.c (create_overlay_event_breakpoint)
12790 (create_longjmp_master_breakpoint)
12791 (create_std_terminate_master_breakpoint)
12792 (create_exception_master_breakpoint)
12793 (breakpoint_event_location_empty_p, print_breakpoint_location)
12794 (print_one_breakpoint_location, create_thread_event_breakpoint)
12795 (init_breakpoint_sal, create_breakpoint)
12796 (print_recreate_ranged_breakpoint, break_range_command)
12797 (init_ada_exception_breakpoint, say_where): Update.
12798 (base_breakpoint_dtor): Don't call delete_event_location.
12799 (bkpt_print_recreate, tracepoint_print_recreate)
12800 (dprintf_print_recreate, update_static_tracepoint)
12801 (breakpoint_re_set_default): Update.
12802
12803 2017-04-12 Tom Tromey <tom@tromey.com>
12804
12805 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12806 type of "to_do". Update.
12807 (compute_stack_depth): Use std::vector.
12808
12809 2017-04-12 Tom Tromey <tom@tromey.com>
12810
12811 * printcmd.c (find_instruction_backward): Use std::vector.
12812
12813 2017-04-12 Tom Tromey <tom@tromey.com>
12814
12815 * symfile.c (objfilep): Remove typedef.
12816 (reread_symbols): Use a std::vector.
12817
12818 2017-04-12 Tom Tromey <tom@tromey.com>
12819
12820 * mi/mi-main.c (exec_direction_forward): Remove.
12821 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12822 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12823 scoped_restore.
12824 * guile/guile.c (guile_repl_command, guile_command)
12825 (gdbscm_execute_gdb_command): Use scoped_restore.
12826 * go-exp.y (go_parse): Use scoped_restore.
12827 * d-exp.y (d_parse): Use scoped_restore.
12828 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12829 * c-exp.y (c_parse): Use scoped_restore.
12830
12831 2017-04-12 Tom Tromey <tom@tromey.com>
12832
12833 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12834 (mi_parse): Update return type.
12835 (mi_parse_free): Remove.
12836 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12837 (mi_parse::~mi_parse): Rename from mi_parse_free.
12838 (mi_parse_cleanup): Remove.
12839 (mi_parse): Return a unique_ptr. Use new.
12840 * mi/mi-main.c (mi_execute_command): Update.
12841
12842 2017-04-12 Tom Tromey <tom@tromey.com>
12843
12844 * location.c (explicit_location_lex_one): Return a
12845 unique_xmalloc_ptr.
12846 (string_to_explicit_location): Update. Remove cleanups.
12847
12848 2017-04-12 Tom Tromey <tom@tromey.com>
12849
12850 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12851 (compare_value_and_voffset): Change type. Update.
12852 (compute_vtable_size): Change type of "offset_vec".
12853 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12854 (gnuv3_get_typeid): Remove extraneous declaration.
12855
12856 2017-04-12 Tom Tromey <tom@tromey.com>
12857
12858 * charset.h (wchar_iterator): Fix comment.
12859
12860 2017-04-12 Tom Tromey <tom@tromey.com>
12861
12862 * charset.c (iconv_wrapper): New class.
12863 (cleanup_iconv): Remove.
12864 (convert_between_encodings): Use it.
12865
12866 2017-04-12 Tom Tromey <tom@tromey.com>
12867
12868 * symfile.h (increment_reading_symtab): Update type.
12869 * symfile.c (decrement_reading_symtab): Remove.
12870 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12871 * psymtab.c (psymtab_to_symtab): Update.
12872 * dwarf2read.c (dw2_instantiate_symtab): Update.
12873
12874 2017-04-12 Tom Tromey <tom@tromey.com>
12875
12876 * jit.c (struct jit_reader): Declare separately. Add constructor
12877 and destructor. Change type of "handle".
12878 (loaded_jit_reader): Define separately.
12879 (jit_reader_load): Update. New "new".
12880 (jit_reader_unload_command): Use "delete".
12881 * gdb-dlfcn.h (struct dlclose_deleter): New.
12882 (gdb_dlhandle_up): New typedef.
12883 (gdb_dlopen, gdb_dlsym): Update types.
12884 (gdb_dlclose): Remove.
12885 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12886 (gdb_dlsym): Change type of "handle".
12887 (make_cleanup_dlclose): Remove.
12888 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12889 * compile/compile-c-support.c (load_libcc): Update.
12890
12891 2017-04-12 Tom Tromey <tom@tromey.com>
12892
12893 * symtab.h (find_pcs_for_symtab_line): Change return type.
12894 * symtab.c (find_pcs_for_symtab_line): Change return type.
12895 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12896 type of "vec". Update.
12897 (ltpy_get_pcs_for_line): Update.
12898 * linespec.c (decode_digits_ordinary): Update.
12899
12900 2017-04-12 Tom Tromey <tom@tromey.com>
12901
12902 * tracepoint.c (actions_command): Update.
12903 * python/python.c (python_command, python_interactive_command):
12904 Update.
12905 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12906 * guile/guile.c (guile_command): Update.
12907 * defs.h (read_command_lines, read_command_lines_1): Return
12908 command_line_up.
12909 (command_lines_deleter): New struct.
12910 (command_line_up): New typedef.
12911 * compile/compile.c (compile_code_command)
12912 (compile_print_command): Update.
12913 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12914 command_line_up.
12915 (make_cleanup_free_command_lines): Remove.
12916 * cli/cli-script.c (get_command_line, read_command_lines_1)
12917 (copy_command_lines): Return command_line_up.
12918 (while_command, if_command, read_command_lines, define_command)
12919 (document_command): Update.
12920 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12921 Remove.
12922 * breakpoint.h (breakpoint_set_commands): Change type of
12923 "commands".
12924 * breakpoint.c (breakpoint_set_commands): Change type of
12925 "commands". Update.
12926 (do_map_commands_command, update_dprintf_command_list)
12927 (create_tracepoint_from_upload): Update.
12928
12929 2017-04-12 Tom Tromey <tom@tromey.com>
12930
12931 * tracepoint.c (scope_info): Update.
12932 * spu-tdep.c (spu_catch_start): Update.
12933 * python/python.c (gdbpy_decode_line): Update.
12934 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12935 * python/py-breakpoint.c (bppy_init): Update.
12936 * probe.c (parse_probes): Update.
12937 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12938 * location.h (event_location_deleter): New struct.
12939 (event_location_up): New typedef.
12940 (new_linespec_location, new_address_location, new_probe_location)
12941 (new_explicit_location, copy_event_location)
12942 (string_to_event_location, string_to_event_location_basic)
12943 (string_to_explicit_location): Update return type.
12944 (make_cleanup_delete_event_location): Remove.
12945 * location.c (new_linespec_location, new_address_location)
12946 (new_probe_location, new_explicit_location, copy_event_location):
12947 Return event_location_up.
12948 (delete_event_location_cleanup)
12949 (make_cleanup_delete_event_location): Remove.
12950 (string_to_explicit_location, string_to_event_location_basic)
12951 (string_to_event_location): Return event_location_up.
12952 * linespec.c (canonicalize_linespec, event_location_to_sals)
12953 (decode_line_with_current_source)
12954 (decode_line_with_last_displayed, decode_objc): Update.
12955 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12956 * completer.c (location_completer): Update.
12957 * cli/cli-cmds.c (edit_command, list_command): Update.
12958 * breakpoint.c (create_overlay_event_breakpoint)
12959 (create_longjmp_master_breakpoint)
12960 (create_std_terminate_master_breakpoint)
12961 (create_exception_master_breakpoint)
12962 (create_thread_event_breakpoint): Update.
12963 (init_breakpoint_sal): Update. Remove some dead code.
12964 (create_breakpoint_sal): Change type of "location". Update.
12965 (create_breakpoints_sal, create_breakpoint, break_command_1)
12966 (dprintf_command, break_range_command, until_break_command)
12967 (init_ada_exception_breakpoint)
12968 (strace_marker_create_sals_from_location)
12969 (update_static_tracepoint, trace_command, ftrace_command)
12970 (strace_command, create_tracepoint_from_upload): Update.
12971 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12972 * ax-gdb.c (agent_command_1): Update.
12973
12974 2017-04-12 Pedro Alves <palves@redhat.com>
12975
12976 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12977 * configure.tgt: Handle i[34567]86-*-go32* and
12978 i[34567]86-*-msdosdjgpp*.
12979 * i386-tdep.c (i386_svr4_reg_to_regnum):
12980 Make extern.
12981 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12982 i386-go32-tdep.c.
12983 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12984 * i386-go32-tdep.c: New file.
12985 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12986 declarations.
12987
12988 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12989
12990 * aix-thread.c (pd_status2str): Change return type to const char *.
12991
12992 2017-04-12 Pedro Alves <palves@redhat.com>
12993
12994 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12995 calls to set_gdbarch_gnu_triplet_regexp.
12996
12997 2017-04-12 Pedro Alves <palves@redhat.com>
12998
12999 PR gdb/21323
13000 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13001 New enum value.
13002 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13003 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13004 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13005 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13006 * gdbarch.h, gdbarch.c: Regenerate.
13007 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13008 gdbarch_wchar_bit and gdbarch_wchar_signed.
13009 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13010 * arm-tdep.c (arm_gdbarch_init): Likewise.
13011 * avr-tdep.c (avr_gdbarch_init): Likewise.
13012 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13013 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13014 * i386-tdep.c (i386_go32_init_abi): Likewise.
13015 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13016 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13017 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13018 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13019 * sh-tdep.c (sh_gdbarch_init): Likewise.
13020 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13021 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13022 * windows-tdep.c (windows_init_abi): Likewise.
13023 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13024
13025 2017-04-12 Pedro Alves <palves@redhat.com>
13026
13027 PR c++/21323
13028 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13029 cplus_primitive_type_char32_t>: New enum values.
13030 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13031 and cplus_primitive_type_char32_t.
13032 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13033 32, use the archtecture's built-in type for char16_t and char32_t,
13034 respectively. Otherwise, fallback to init_integer_type as before,
13035 but make the type unsigned, and issue a complaint.
13036 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13037
13038 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13039
13040 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13041 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13042
13043 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13044
13045 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13046 'const char *'.
13047
13048 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13049
13050 * common/common-utils.c (free_vector_argv): New function.
13051 * common/common-utils.h: Include <vector>.
13052 (free_vector_argv): New prototype.
13053 * darwin-nat.c (darwin_create_inferior): Rewrite function
13054 prototype in order to constify "exec_file" and accept a
13055 "std::string" for "allargs".
13056 * fork-child.c: Include <vector>.
13057 (breakup_args): Rewrite function, using C++.
13058 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13059 and accept "std::string" for "allargs". Update the code to
13060 calculate "argv" based on "allargs". Update calls to "exec_fun"
13061 and "execvp".
13062 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13063 order to constify "exec_file" and accept a "std::string" for
13064 "allargs".
13065 * go32-nat.c (go32_create_inferior): Likewise.
13066 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13067 * infcmd.c (run_command_1): Constify "exec_file". Use
13068 "std::string" for inferior arguments.
13069 * inferior.h (fork_inferior): Update prototype.
13070 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13071 prototype in order to constify "exec_file" and accept a
13072 "std::string" for "allargs".
13073 * nto-procfs.c (procfs_create_inferior): Likewise.
13074 * procfs.c (procfs_create_inferior): Likewise.
13075 * remote-sim.c (gdbsim_create_inferior): Likewise.
13076 * remote.c (extended_remote_run): Update code to accept
13077 "std::string" as argument.
13078 (extended_remote_create_inferior): Rewrite function prototype in
13079 order to constify "exec_file" and accept a "std::string" for
13080 "allargs".
13081 * rs6000-nat.c (super_create_inferior): Likewise.
13082 (rs6000_create_inferior): Likewise.
13083 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13084 * windows-nat.c (windows_create_inferior): Likewise.
13085
13086 2017-04-11 Pedro Alves <palves@redhat.com>
13087
13088 * thread.c: Fix whitespace throughout.
13089
13090 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13091
13092 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13093
13094 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13095
13096 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13097
13098 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13099
13100 PR gdb/21364
13101 * osdata.c (info_osdata): Check if 'type' is an empty string
13102 instead of NULL.
13103
13104 2017-04-10 Pedro Alves <palves@redhat.com>
13105
13106 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13107 (ptid_to_global_thread_id, in_thread_list)
13108 (do_captured_list_thread_ids, set_resumed, set_running)
13109 (set_executing, set_stop_requested, finish_thread_state)
13110 (validate_registers_access, can_access_registers_ptid)
13111 (print_thread_info_1, switch_to_thread)
13112 (do_restore_current_thread_cleanup)
13113 (make_cleanup_restore_current_thread, thread_command)
13114 (thread_name_command): Use operator== instead of ptid_equal.
13115
13116 2017-04-10 Pedro Alves <palves@redhat.com>
13117
13118 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13119 (current_thread_cleanup_chain): Delete.
13120 (restore_current_thread_cleanup_dtor)
13121 (make_cleanup_restore_current_thread): Remove references to
13122 current_thread_cleanup_chain.
13123
13124 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13125
13126 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13127 REG_UNKNOWN.
13128
13129 2017-04-10 Yao Qi <yao.qi@linaro.org>
13130
13131 PR gdb/19942
13132 * gdbthread.h (thread_info::deletable): New method.
13133 (thread_info::incref): New method.
13134 (thread_info::decref): New method.
13135 (thread_info::refcount): Move it to private.
13136 * infrun.c (save_stop_context): Call inc_refcount.
13137 (release_stop_context_cleanup): Likewise.
13138 * thread.c (set_thread_exited): New function.
13139 (init_thread_list): Delete "tp" only it is deletable, otherwise
13140 call set_thread_exited.
13141 (delete_thread_1): Call set_thread_exited.
13142 (current_thread_cleanup) <inferior_pid>: Remove.
13143 <thread>: New field.
13144 (restore_current_thread_ptid_changed): Removed.
13145 (do_restore_current_thread_cleanup): Adjust.
13146 (restore_current_thread_cleanup_dtor): Don't call
13147 find_thread_ptid.
13148 (set_thread_refcount): Use dec_refcount.
13149 (make_cleanup_restore_current_thread): Adjust.
13150 (thread_apply_all_command): Call inc_refcount.
13151 (_initialize_thread): Don't call
13152 observer_attach_thread_ptid_changed.
13153
13154 2017-04-10 Yao Qi <yao.qi@linaro.org>
13155
13156 * thread.c (delete_thread_1): Hoist code on marking thread as
13157 exited.
13158
13159 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13160
13161 * windows-nat.c (windows_detach): Initialize ptid with
13162 minus_one_ptid.
13163
13164 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13165
13166 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13167
13168 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13169
13170 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13171 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13172 (bfin_pseudo_register_write): Likewise
13173
13174 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13175
13176 * common/ptid.h (struct ptid): Change to...
13177 (class ptid_t): ... this.
13178 <ptid_t>: New constructors.
13179 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13180 matches>: New methods.
13181 <make_null, make_minus_one>: New static methods.
13182 <pid>: Rename to...
13183 <m_pid>: ...this.
13184 <lwp>: Rename to...
13185 <m_lwp>: ...this.
13186 <tid>: Rename to...
13187 <m_tid>: ...this.
13188 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13189 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13190 as references, move comment to class ptid_t.
13191 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13192 ptid_t static methods.
13193 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13194 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13195 Take ptid arguments as references, implement using ptid_t methods.
13196 * unittests/ptid-selftests.c: New file.
13197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13198 unittests/ptid-selftests.c.
13199 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13200
13201 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13202
13203 * python/python.c (python_run_simple_file): Cast mode literal to
13204 non-const char pointer as expected by PyFile_FromString.
13205
13206 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13207
13208 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13209 minus_one_ptid and null_ptid.
13210
13211 2017-04-05 Pedro Alves <palves@redhat.com>
13212
13213 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13214 * configure: Regenerate.
13215
13216 2017-04-05 Pedro Alves <palves@redhat.com>
13217
13218 * ada-exp.y (yyerror): Constify.
13219 * ada-lang.c (bound_name, get_selections)
13220 (ada_variant_discrim_type)
13221 (ada_variant_discrim_name, ada_value_struct_elt)
13222 (ada_lookup_struct_elt_type, is_unchecked_variant)
13223 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13224 (catch_ada_exception_command_split)
13225 (catch_ada_assert_command_split, catch_assert_command)
13226 (ada_op_name): Constify.
13227 * ada-lang.h (ada_yyerror, get_selections)
13228 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13229 * arc-tdep.c (arc_print_frame_cache): Constify.
13230 * arm-tdep.c (arm_skip_stub): Constify.
13231 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13232 (gen_aggregate_elt_ref): Constify.
13233 * bcache.c (print_bcache_statistics): Constify.
13234 * bcache.h (print_bcache_statistics): Constify.
13235 * break-catch-throw.c (catch_exception_command_1):
13236 * breakpoint.c (struct ep_type_description::description):
13237 Constify.
13238 (add_solib_catchpoint): Constify.
13239 (catch_fork_command_1): Add cast.
13240 (add_catch_command): Constify.
13241 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13242 Constify.
13243 * bsd-uthread.c (bsd_uthread_state): Constify.
13244 * buildsym.c (patch_subfile_names): Constify.
13245 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13246 Constify.
13247 * c-exp.y (yyerror): Constify.
13248 (token::oper): Constify.
13249 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13250 * c-varobj.c (cplus_describe_child): Constify.
13251 * charset.c (find_charset_names): Add cast.
13252 (find_charset_names): Constify array and add const_cast.
13253 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13254 (edit_command): Constify.
13255 * cli/cli-decode.c (lookup_cmd): Constify.
13256 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13257 Constify.
13258 (struct dump_context): Constify.
13259 (add_dump_command, restore_command): Constify.
13260 * cli/cli-script.c (get_command_line): Constify.
13261 * cli/cli-script.h (get_command_line): Constify.
13262 * cli/cli-utils.c (check_for_argument): Constify.
13263 * cli/cli-utils.h (check_for_argument): Constify.
13264 * coff-pe-read.c (struct read_pe_section_data): Constify.
13265 * command.h (lookup_cmd): Constify.
13266 * common/print-utils.c (decimal2str): Constify.
13267 * completer.c (gdb_print_filename): Constify.
13268 * corefile.c (set_gnutarget): Constify.
13269 * cp-name-parser.y (yyerror): Constify.
13270 * cp-valprint.c (cp_print_class_member): Constify.
13271 * cris-tdep.c (cris_register_name, crisv32_register_name):
13272 Constify.
13273 * d-exp.y (yyerror): Constify.
13274 (struct token::oper): Constify.
13275 * d-lang.h (d_yyerror): Constify.
13276 * dbxread.c (struct header_file_location::name): Constify.
13277 (add_old_header_file, add_new_header_file, last_function_name)
13278 (dbx_next_symbol_text, add_bincl_to_list)
13279 (find_corresponding_bincl_psymtab, set_namestring)
13280 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13281 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13282 * defs.h (command_line_input, print_address_symbolic)
13283 (deprecated_readline_begin_hook): Constify.
13284 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13285 Constify.
13286 * event-top.c (handle_line_of_input): Constify and add cast.
13287 * exceptions.c (catch_errors): Constify.
13288 * exceptions.h (catch_errors): Constify.
13289 * expprint.c (print_subexp_standard, op_string, op_name)
13290 (op_name_standard, dump_raw_expression, dump_raw_expression):
13291 * expression.h (op_name, op_string, dump_raw_expression):
13292 Constify.
13293 * f-exp.y (yyerror): Constify.
13294 (struct token::oper): Constify.
13295 (struct f77_boolean_val::name): Constify.
13296 * f-lang.c (f_word_break_characters): Constify.
13297 * f-lang.h (f_yyerror): Constify.
13298 * fork-child.c (fork_inferior): Add cast.
13299 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13300 (new_variant): Constify.
13301 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13302 * gdbarch.c: Regenerate.
13303 * gdbcore.h (set_gnutarget): Constify.
13304 * go-exp.y (yyerror): Constify.
13305 (token::oper): Constify.
13306 * go-lang.h (go_yyerror): Constify.
13307 * go32-nat.c (go32_sysinfo): Constify.
13308 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13309 * guile/scm-cmd.c (cmdscm_function): Constify.
13310 * guile/scm-param.c (pascm_param_value): Constify.
13311 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13312 (h8300sx_register_name): Constify.
13313 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13314 Constify.
13315 * ia64-tdep.c (ia64_register_names): Constify.
13316 * infcmd.c (construct_inferior_arguments): Constify.
13317 (path_command, attach_post_wait): Constify.
13318 * language.c (show_range_command, show_case_command)
13319 (unk_lang_error): Constify.
13320 * language.h (language_defn::la_error)
13321 (language_defn::la_name_of_this): Constify.
13322 * linespec.c (decode_line_2): Constify.
13323 * linux-thread-db.c (thread_db_err_str): Constify.
13324 * lm32-tdep.c (lm32_register_name): Constify.
13325 * m2-exp.y (yyerror): Constify.
13326 * m2-lang.h (m2_yyerror): Constify.
13327 * m32r-tdep.c (m32r_register_names): Constify and make static.
13328 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13329 * m88k-tdep.c (m88k_register_name): Constify.
13330 * macroexp.c (appendmem): Constify.
13331 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13332 (upgrade_type, parse_external, parse_partial_symbols)
13333 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13334 (new_symbol): Constify.
13335 * memattr.c (mem_info_command): Constify.
13336 * mep-tdep.c (register_name_from_keyword): Constify.
13337 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13338 Constify.
13339 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13340 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13341 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13342 cast.
13343 (mi_execute_async_cli_command): Constify.
13344 * mips-tdep.c (mips_register_name): Constify.
13345 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13346 (am33_register_name, am33_2_register_name)
13347 * moxie-tdep.c (moxie_register_names): Constify.
13348 * nat/linux-osdata.c (osdata_type): Constify fields.
13349 * nto-tdep.c (nto_parse_redirection): Constify.
13350 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13351 (lookup_child_selector): Constify.
13352 (objc_methcall::name): Constify.
13353 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13354 (lookup_struct_typedef): Constify.
13355 * objfiles.c (pc_in_section): Constify.
13356 * objfiles.h (pc_in_section): Constify.
13357 * p-exp.y (struct token::oper): Constify.
13358 (yyerror): Constify.
13359 * p-lang.h (pascal_yyerror): Constify.
13360 * parser-defs.h (op_name_standard): Constify.
13361 (op_print::string): Constify.
13362 (exp_descriptor::op_name): Constify.
13363 * printcmd.c (print_address_symbolic): Constify.
13364 * psymtab.c (print_partial_symbols): Constify.
13365 * python/py-breakpoint.c (stop_func): Constify.
13366 (bppy_get_expression): Constify.
13367 * python/py-cmd.c (cmdpy_completer::name): Constify.
13368 (cmdpy_function): Constify.
13369 * python/py-event.c (evpy_add_attribute)
13370 (gdbpy_initialize_event_generic): Constify.
13371 * python/py-event.h (evpy_add_attribute)
13372 (gdbpy_initialize_event_generic): Constify.
13373 * python/py-evts.c (add_new_registry): Constify.
13374 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13375 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13376 * python/py-inferior.c (get_buffer): Add cast.
13377 * python/py-param.c (parm_constant::name): Constify.
13378 * python/py-unwind.c (fprint_frame_id): Constify.
13379 * python/python.c (gdbpy_parameter_value): Constify.
13380 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13381 * remote.c (memory_packet_config::name): Constify.
13382 (show_packet_config_cmd, remote_write_bytes)
13383 (remote_buffer_add_string):
13384 * reverse.c (exec_reverse_once): Constify.
13385 * rs6000-tdep.c (variant::name, variant::description): Constify.
13386 * rust-exp.y (rustyyerror): Constify.
13387 * rust-lang.c (rust_op_name): Constify.
13388 * rust-lang.h (rustyyerror): Constify.
13389 * serial.h (serial_ops::name): Constify.
13390 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13391 (sh_sh3e_register_name, sh_sh2e_register_name)
13392 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13393 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13394 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13395 (sh_sh4al_dsp_register_name): Constify.
13396 * sh64-tdep.c (sh64_register_name): Constify.
13397 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13398 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13399 * stabsread.c (patch_block_stabs, read_type_number)
13400 (ref_map::stabs, ref_add, process_reference)
13401 (symbol_reference_defined, define_symbol, define_symbol)
13402 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13403 (read_one_struct_field, read_struct_fields, read_baseclasses)
13404 (read_tilde_fields, read_struct_type, read_array_type)
13405 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13406 (read_huge_number, read_range_type, read_args, common_block_start)
13407 (find_name_end): Constify.
13408 * stabsread.h (common_block_start, define_symbol)
13409 (process_one_symbol, symbol_reference_defined, ref_add):
13410 * symfile.c (get_section_index, add_symbol_file_command):
13411 * symfile.h (get_section_index): Constify.
13412 * target-descriptions.c (tdesc_type::name): Constify.
13413 (tdesc_free_type): Add cast.
13414 * target.c (find_default_run_target):
13415 (add_deprecated_target_alias, find_default_run_target)
13416 (target_announce_detach): Constify.
13417 (do_option): Constify.
13418 * target.h (add_deprecated_target_alias): Constify.
13419 * thread.c (print_thread_info_1): Constify.
13420 * top.c (deprecated_readline_begin_hook, command_line_input):
13421 Constify.
13422 (init_main): Add casts.
13423 * top.h (handle_line_of_input): Constify.
13424 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13425 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13426 (tfind_command): Rename to ...
13427 (tfind_command_1): ... this and constify.
13428 (tfind_command): New function.
13429 (tfind_end_command, tfind_start_command): Adjust.
13430 (encode_source_string): Constify.
13431 * tracepoint.h (encode_source_string): Constify.
13432 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13433 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13434 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13435 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13436 * tui/tui-win.c (parse_scrolling_args): Constify.
13437 * tui/tui-windata.c (tui_erase_data_content): Constify.
13438 * tui/tui-windata.h (tui_erase_data_content): Constify.
13439 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13440 * tui/tui.c (tui_enable): Add cast.
13441 * utils.c (defaulted_query): Constify.
13442 (init_page_info): Add cast.
13443 (puts_debug, subset_compare): Constify.
13444 * utils.h (subset_compare): Constify.
13445 * varobj.c (varobj_format_string): Constify.
13446 * varobj.h (varobj_format_string): Constify.
13447 * vax-tdep.c (vax_register_name): Constify.
13448 * windows-nat.c (windows_detach): Constify.
13449 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13450 * xml-support.c (gdb_xml_end_element): Constify.
13451 * xml-tdesc.c (tdesc_start_reg): Constify.
13452 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13453 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13454 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13455
13456 2017-04-05 Pedro Alves <palves@redhat.com>
13457
13458 * proc-api.c (struct trans): Constify.
13459 (procfs_note): Constify.
13460 * proc-events.c (struct trans, syscall_table):
13461 * proc-flags.c (struct trans): Constify.
13462 * proc-utils.h (procfs_note): Constify.
13463 * proc-why.c (struct trans): Constify.
13464 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13465 (procfs_detach): Constify.
13466 * sol-thread.c (struct string_map): Constify.
13467 (td_err_string, td_state_string): Constify.
13468
13469 2017-04-05 Pedro Alves <palves@redhat.com>
13470
13471 * proc-api.c (procfs_filename): Don't initialize
13472 procfs_filename.
13473 (prepare_to_trace): Assume procfs_filename is non-NULL.
13474 (_initialize_proc_api): Give procfs_filename a default value here.
13475
13476 2017-04-05 Pedro Alves <palves@redhat.com>
13477
13478 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13479 'cond_string' parameter.
13480 (extract_exception_regexp): Constify 'string' parameter.
13481 (catch_exception_command_1): Constify.
13482 * breakpoint.c (init_catchpoint)
13483 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13484 parameter.
13485 (ep_parse_optional_if_clause, catch_fork_command_1)
13486 (catch_exec_command_1): Constify.
13487 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13488 parameter.
13489 (ep_parse_optional_if_clause): Constify.
13490 * cli/cli-utils.c (remove_trailing_whitespace)
13491 (check_for_argument): Constify.
13492 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13493 non-const overload.
13494 (check_for_argument): Likewise.
13495
13496 2017-04-05 Pedro Alves <palves@redhat.com>
13497
13498 * event-top.c (command_line_handler): Add cast to execute_command
13499 call.
13500 * record-btrace.c (cmd_record_btrace_bts_start)
13501 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13502 (cmd_record_btrace_start): Add cast to execute_command call.
13503 * record-full.c (record_full_goto_insn):
13504 * record.c (record_start, record_stop): Add cast to
13505 execute_command_to_string calls.
13506 (cmd_record_start): Add cast to execute_command calls.
13507
13508 2017-04-05 Pedro Alves <palves@redhat.com>
13509
13510 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13511 static inline function.
13512 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13513 array and use gdb_PyArg_ParseTupleAndKeywords.
13514 * python/py-cmd.c (cmdpy_init): Likewise.
13515 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13516 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13517 (infpy_search_memory): Likewise.
13518 * python/py-objfile.c (objfpy_add_separate_debug_file)
13519 (gdbpy_lookup_objfile): Likewise.
13520 * python/py-symbol.c (gdbpy_lookup_symbol)
13521 (gdbpy_lookup_global_symbol): Likewise.
13522 * python/py-type.c (gdbpy_lookup_type): Likewise.
13523 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13524 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13525 Likewise.
13526
13527 2017-04-05 Pedro Alves <palves@redhat.com>
13528
13529 * python/python-internal.h (gdb_PyGetSetDef): New type.
13530 * python/py-block.c (block_object_getset)
13531 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13532 * python/py-event.c (event_object_getset)
13533 (finish_breakpoint_object_getset): Likewise.
13534 * python/py-inferior.c (inferior_object_getset): Likewise.
13535 * python/py-infthread.c (thread_object_getset): Likewise.
13536 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13537 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13538 * python/py-objfile.c (objfile_getset): Likewise.
13539 * python/py-progspace.c (pspace_getset): Likewise.
13540 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13541 Likewise.
13542 * python/py-record.c (recpy_record_getset): Likewise.
13543 * python/py-symbol.c (symbol_object_getset): Likewise.
13544 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13545 Likewise.
13546 * python/py-type.c (type_object_getset, field_object_getset):
13547 Likewise.
13548 * python/py-value.c (value_object_getset): Likewise.
13549
13550 2017-04-05 Pedro Alves <palves@redhat.com>
13551
13552 * python/python-internal.h (gdb_PyObject_CallMethod)
13553 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13554 New functions.
13555 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13556 (PySys_GetObject, PySys_SetPath): New macros.
13557
13558 2017-04-05 Pedro Alves <palves@redhat.com>
13559
13560 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13561 info_osdata_command.
13562 * osdata.c (info_osdata_command): Rename to ...
13563 (info_osdata): ... this. Constify 'type' parameter, and remove
13564 the 'from_tty' parameter. Accept NULL TYPE.
13565 (info_osdata_command): New function.
13566 * osdata.h (info_osdata_command): Remove declaration.
13567 (info_osdata): New declaration.
13568
13569 2017-04-05 Pedro Alves <palves@redhat.com>
13570
13571 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13572 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13573 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13574 parameter.
13575 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13576 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13577 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13578 parameter.
13579 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13580 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13581 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13582 (mi_cmd_file_list_exec_source_files)
13583 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13584 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13585 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13586 parameter.
13587 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13588 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13589 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13590 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13591 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13592 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13593 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13594 'command' parameter.
13595 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13596 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13597 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13598 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13599 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13600 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13601 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13602 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13603 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13604 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13605 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13606 parameter.
13607 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13608 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13609 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13610 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13611 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13612 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13613 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13614 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13615 (mi_cmd_data_list_changed_registers)
13616 (mi_cmd_data_write_register_values)
13617 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13618 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13619 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13620 (mi_cmd_list_features, mi_cmd_list_target_features)
13621 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13622 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13623 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13624 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13625 (mi_cmd_trace_frame_collected): Constify 'command'
13626 parameter.
13627 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13628 'command' parameter.
13629
13630 2017-04-05 Pedro Alves <palves@redhat.com>
13631
13632 * ada-lang.c (ada_completer_word_break_characters): Now a const
13633 array.
13634 (ada_get_gdb_completer_word_break_characters): Constify.
13635 * completer.c (gdb_completer_command_word_break_characters)
13636 (gdb_completer_file_name_break_characters)
13637 (gdb_completer_quote_characters): Now const arrays.
13638 (get_gdb_completer_quote_characters): Constify.
13639 (set_rl_completer_word_break_characters): New function.
13640 (set_gdb_completion_word_break_characters)
13641 (complete_line_internal): Use it.
13642 * completer.h (get_gdb_completer_quote_characters): Constify.
13643 (set_rl_completer_word_break_characters): Declare.
13644 * f-lang.c (f_word_break_characters): Constify.
13645 * language.c (default_word_break_characters): Constify.
13646 * language.h (language_defn::la_word_break_characters): Constify.
13647 (default_word_break_characters): Constify.
13648 * top.c (init_main): Use set_rl_completer_word_break_characters.
13649
13650 2017-04-05 Pedro Alves <palves@redhat.com>
13651
13652 * aix-thread.c (aix_thread_pid_to_str)
13653 (aix_thread_extra_thread_info): Constify.
13654 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13655 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13656 (bsd_uthread_pid_to_str): Constify.
13657 * corelow.c (core_pid_to_str): Constify.
13658 * darwin-nat.c (darwin_pid_to_str): Constify.
13659 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13660 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13661 Constify.
13662 * gnu-nat.c (gnu_pid_to_str): Constify.
13663 * go32-nat.c (go32_pid_to_str): Constify.
13664 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13665 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13666 * inferior.c (inferior_pid_to_str): Constify.
13667 * linux-nat.c (linux_nat_pid_to_str): Constify.
13668 * linux-tdep.c (linux_core_pid_to_str): Constify.
13669 * linux-thread-db.c (thread_db_pid_to_str)
13670 (thread_db_extra_thread_info): Constify.
13671 * nto-tdep.c (nto_extra_thread_info): Constify.
13672 * nto-tdep.h (nto_extra_thread_info): Constify.
13673 * obsd-nat.c (obsd_pid_to_str): Constify.
13674 * procfs.c (procfs_pid_to_str): Constify.
13675 * ravenscar-thread.c (ravenscar_extra_thread_info)
13676 (ravenscar_pid_to_str): Constify.
13677 * remote-sim.c (gdbsim_pid_to_str): Constify.
13678 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13679 Constify.
13680 * sol-thread.c (solaris_pid_to_str): Constify.
13681 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13682 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13683 * target.c (default_pid_to_str, target_pid_to_str)
13684 (normal_pid_to_str, default_pid_to_str): Constify.
13685 * target.h (target_ops::to_pid_to_str)
13686 (target_ops::to_extra_thread_info): Constify.
13687 (target_pid_to_str, normal_pid_to_str): Constify.
13688 * windows-nat.c (windows_pid_to_str): Constify.
13689 * gdbarch.sh (core_pid_to_str): Constify.
13690 * target-delegates.c: Regenerate.
13691 * gdbarch.h, gdbarch.c: Regenerate.
13692
13693 2017-04-05 Pedro Alves <palves@redhat.com>
13694
13695 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13696 the memory of the temporary warning_pre_print override.
13697 * utils.c (warning_pre_print): Constify.
13698 * utils.h (warning_pre_print): Constify.
13699
13700 2017-04-05 Pedro Alves <palves@redhat.com>
13701
13702 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13703 (shell_command): New function.
13704 (make_command): Use std::string.
13705 (init_cli_cmds): Register shell_command instead of shell_escape.
13706
13707 2017-04-05 Pedro Alves <palves@redhat.com>
13708
13709 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13710 * tracepoint.c (default_collect): Don't initialize.
13711
13712 2017-04-05 Pedro Alves <palves@redhat.com>
13713
13714 * macroexp.c (macro_buffer::shared): Now a bool.
13715 (init_buffer): Update.
13716 (init_shared_buffer): Constify 'addr' parameter.
13717 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13718 casts.
13719
13720 2017-04-05 Pedro Alves <palves@redhat.com>
13721
13722 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13723 * disasm.c (set_disassembler_options): Constify local.
13724 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13725
13726 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13727
13728 PR gdb/21352
13729 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13730 option.
13731
13732 2017-04-05 Yao Qi <yao.qi@linaro.org>
13733
13734 * frame.c (frame_unwind_register_unsigned): Call
13735 frame_unwind_register_value.
13736
13737 2017-04-05 Yao Qi <yao.qi@linaro.org>
13738
13739 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13740 Use gdb_test_multiple, and don't match anchor.
13741
13742 2017-04-05 Pedro Alves <palves@redhat.com>
13743
13744 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13745 (Write After Approval): Remove Simon Marchi.
13746
13747 2017-04-05 Pedro Alves <palves@redhat.com>
13748
13749 * common/gdb_optional.h (optional::optional): Make constexpr and
13750 initialize m_dummy.
13751
13752 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13753
13754 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13755 (amd64fbsd_jmp_buf_reg_offset): Remove.
13756 (amd64fbsd_supply_uthread): Remove function.
13757 (amd64fbsd_collect_uthread): Remove function.
13758 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13759 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13760 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13761 (fbsd-nat.c): Update comment.
13762 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13763 (i386fbsd_jmp_buf_reg_offset): Remove.
13764 (i386fbsd_supply_uthread): Remove function.
13765 (i386fbsd_collect_uthread): Remove function.
13766 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13767
13768 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13769
13770 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13771 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13772 * NEWS: Mention that support for FreeBSD/alpha was removed.
13773 * alpha-fbsd-tdep.c: Delete file.
13774 * config/alpha/fbsd.mh: Delete file.
13775 * configure.host: Delete alpha*-*-freebsd* and
13776 alpha*-*-kfreebsd*-gnu.
13777 * configure.tgt: Delete alpha*-*-freebsd* and
13778 alpha*-*-kfreebsd*-gnu.
13779
13780 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13781
13782 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13783 amd64bsd_store_inferior_registers): Use ptid from regcache.
13784
13785 2017-04-04 Pedro Alves <palves@redhat.com>
13786
13787 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13788 data fields, make them private and add "m_" prefixes.
13789 (lnp_state_machine::lnp_state_machine): New ctor.
13790 (record_line, check_line_address, handle_set_discriminator)
13791 (handle_set_address, handle_advance_pc, handle_special_opcode)
13792 (handle_advance_line, handle_set_file, handle_negate_stmt)
13793 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13794 (end_sequence, advance_line): New methods.
13795 (m_gdbarch, m_record_lines_p): New fields.
13796 (lnp_reader_state): Delete.
13797 (dwarf_record_line): Rename to ...
13798 (lnp_state_machine::record_line): ... adjust.
13799 (init_lnp_state_machine): Delete.
13800 (lnp_state_machine::lnp_state_machine): New.
13801 (check_line_address): Rename to ...
13802 (lnp_state_machine::check_line_address): This.
13803 (dwarf_decode_lines_1): Remove reference to "reader_state".
13804 Adjust lnp_state_machine having a non-default ctor. Use bool.
13805 State machine internal state manipulation moved to
13806 lnp_state_machine methods.
13807
13808 2017-04-04 Pedro Alves <palves@redhat.com>
13809
13810 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13811 unittests/offset-type-selftests.c.
13812 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13813 * common/offset-type.h: New file.
13814 * common/preprocessor.h: New file.
13815 * common/traits.h: New file.
13816 * common/valid-expr.h: New file.
13817 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13818 sect_offset and cu_offset strong typedefs throughout.
13819 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13820 typedefs throughout.
13821 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13822 sect_offset and cu_offset strong typedefs throughout.
13823 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13824 typedefs throughout.
13825 * gdbtypes.h: Include "common/offset-type.h".
13826 (cu_offset): Now an offset type (strong typedef) instead of a
13827 struct.
13828 (sect_offset): Likewise.
13829 (union call_site_parameter_u): Rename "param_offset" field to
13830 "param_cu_off".
13831 * unittests/offset-type-selftests.c: New file.
13832
13833 2017-04-04 Pedro Alves <palves@redhat.com>
13834
13835 * common/underlying.h: New file.
13836 * dwarf2read.c: Include "common/gdb_optional.h" and
13837 "common/underlying.h".
13838 (dir_index, file_name_index): New types.
13839 (file_entry): Use them.
13840 (file_entry::include): Use to_underlying.
13841 (line_header::add_file_name): Use dir_index.
13842 (read_formatted_entries): Use gdb::optional. Read form before
13843 writting to file_entry.
13844 (dwarf_decode_line_header): Use dir_index.
13845 (lnp_state_machine::current_file): Use to_underlying.
13846 (lnp_state_machine::file): Change type to file_name_index.
13847 (dwarf_record_line): Use to_underlying.
13848 (init_lnp_state_machine): Use file_name_index.
13849 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13850
13851 2017-04-04 Pedro Alves <palves@redhat.com>
13852
13853 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13854 operator bool, has_value and get methods.
13855
13856 2017-04-04 Pedro Alves <palves@redhat.com>
13857
13858 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13859 fields.
13860 (line_header): Initialize all data fields. Change type of
13861 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13862 Change type of include_dirs to std::vector<const char *>. Remove
13863 num_include_dirs, include_dirs_size. Change type of file_names to
13864 std::vector<file_entry>. Remove num_file_names, file_names_size.
13865 (line_header::line_header): New.
13866 (line_header::add_include_dir, line_header::add_file_name): New
13867 methods.
13868 (line_header::include_dir_at): Remove NULL check.
13869 (line_header::file_name_at): Add const overload.
13870 (line_header_up): New unique_ptr typedef.
13871 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13872 std::vector. Remove free_line_header call.
13873 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13874 free_line_header call.
13875 (free_cu_line_header): Delete.
13876 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13877 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13878 Adjust to use std::vector.
13879 (free_line_header): Delete.
13880 (free_line_header_voidp): Use delete.
13881 (add_include_dir): Replace with ...
13882 (line_header::add_include_dir): ... this method. Use std::vector.
13883 (add_file_name): Replace with ...
13884 (line_header::add_file_name): ... this method. Use std::vector.
13885 (add_include_dir_stub): Delete.
13886 (read_formatted_entries): Remove memset.
13887 (dwarf_decode_line_header): Return a line_header_up instead of a
13888 raw pointer. Remove cleanup handling. Pass lambdas to
13889 read_formatted_entries. Adjust to use line_header methods.
13890 (dwarf_decode_lines_1): Adjust to use line_header methods.
13891 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13892 use std::vector.
13893
13894 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13895
13896 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13897 instead of struct ptid.
13898
13899 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13900
13901 * frame.c (get_frame_register_bytes): Unwind using value.
13902 (put_frame_register_bytes): Likewise.
13903
13904 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13905
13906 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13907 aggregate-like.
13908
13909 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13910
13911 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13912
13913 2017-03-29 Yao Qi <yao.qi@linaro.org>
13914
13915 * gdbthread.h (struct thread_info): Declare constructor and
13916 destructor. Add some in-class member initializers.
13917 * thread.c (free_thread): Remove.
13918 (init_thread_list): Call delete instead of free_thread.
13919 (new_thread): Call thread_info constructor.
13920 (thread_info::thread_info): New function.
13921 (thread_info::~thread_info): New function.
13922 (delete_thread_1): Call delete instead of free_thread.
13923 (make_cleanup_restore_current_thread): Move tp and frame to
13924 inner block.
13925
13926 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13927
13928 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13929 (arc_skip_prologue): Likewise.
13930 (arc_make_frame_cache): Likewise.
13931 (arc_pv_get_operand): New function.
13932 (arc_is_in_prologue): Likewise.
13933 (arc_analyze_prologue): Likewise.
13934 (arc_print_frame_cache): Likewise.
13935 (MAX_PROLOGUE_LENGTH): New constant.
13936
13937 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13938
13939 * configure.tgt: Add arc-insn.o.
13940 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13941 (dump_arc_instruction_command): New function.
13942 (arc_fprintf_disasm): Likewise.
13943 (arc_disassemble_info): Likewise.
13944 (arc_insn_get_operand_value): Likewise.
13945 (arc_insn_get_operand_value_signed): Likewise.
13946 (arc_insn_get_memory_base_reg): Likewise.
13947 (arc_insn_get_memory_offset): Likewise.
13948 (arc_insn_get_branch_target): Likewise.
13949 (arc_insn_dump): Likewise.
13950 (arc_insn_get_linear_next_pc): Likewise.
13951 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13952 (arc_disassemble_info): Likewise.
13953 (arc_insn_get_branch_target): Likewise.
13954 (arc_insn_get_linear_next_pc): Likewise.
13955 * NEWS: Mention new "maint print arc arc-instruction".
13956
13957 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13958
13959 * arc-tdep (maintenance_print_arc_list): New variable.
13960 (maintenance_print_arc_command): New function.
13961
13962 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13963
13964 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13965 Add "limm" and "reserved".
13966 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13967 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13968 * arc-tdep.h (arc_regnum): Likewise.
13969
13970 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13971
13972 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13973 for THREADPTR register.
13974 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13975 register.
13976 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13977 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13978 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13979
13980 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13981
13982 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13983 registers above gdbarch_num_regs (gdbarch) as privileged in
13984 call0 ABI.
13985
13986 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13987
13988 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13989 for a single specified register or for all registers in
13990 a0_base..a0_base + C0_NREGS range.
13991 (supply_gregset_reg): Call regcache_raw_supply for a single
13992 specified register or for all registers in a0_base..a0_base +
13993 C0_NREGS range.
13994
13995 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13996
13997 * arch/xtensa.h (C0_NREGS): Add definition.
13998 * xtensa-tdep.c (C0_NREGS): Remove definition.
13999
14000 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14001
14002 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14003 Drop xtensa_default_isa initialization.
14004 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14005
14006 2017-03-27 Pedro Alves <palves@redhat.com>
14007
14008 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14009 (file_entry::include_dir): New method.
14010 (line_header::include_dir_at, line_header::file_name_at): New
14011 methods.
14012 (setup_type_unit_groups, setup_type_unit_groups)
14013 (psymtab_include_file_name): Simplify using the new methods.
14014 (lnp_state_machine) <the_line_header>: New field.
14015 <file>: Add comment.
14016 (lnp_state_machine::current_file): New method.
14017 (dwarf_record_line): Simplify using the new methods.
14018 (init_lnp_state_machine): Initialize the "the_line_header" field.
14019 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14020 Simplify using the new methods.
14021
14022 2017-03-27 Pedro Alves <palves@redhat.com>
14023
14024 * cp-name-parser.y (make_empty): Delete.
14025 (demangler_special, nested_name, ptr_operator, array_indicator)
14026 (direct_declarator, declarator_1): Use fill_comp instead of
14027 make_empty.
14028
14029 2017-03-27 Pedro Alves <palves@redhat.com>
14030
14031 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14032 to ATTRIBUTE_PRINTF.
14033 * solib-target.c (library_list_start_list): Print "string" not
14034 "version".
14035 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14036 gdb_xml_error call.
14037
14038 2017-03-27 Pedro Alves <palves@redhat.com>
14039
14040 * dwarf2read.c (struct file_and_directory): New.
14041 (dwarf2_get_dwz_file): Adjust to use std::string.
14042 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14043 (find_file_and_directory): Adjust to return a file_and_directory
14044 object.
14045 (read_file_scope): Adjust to use file_and_directory. Remove
14046 make_cleanup/do_cleanups calls.
14047 (open_and_init_dwp_file): Adjust to use std::string. Remove
14048 make_cleanup/do_cleanups calls.
14049 * python/python.c (do_start_initialization): Adjust to ldirname
14050 returning a std::string.
14051 * utils.c (ldirname): Now returns a std::string.
14052 * utils.h (ldirname): Change return type to std::string.
14053 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14054 returning a std::string.
14055 * xml-tdesc.c (file_read_description_xml): Likewise.
14056
14057 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14058
14059 * regcache.c (regcache_debug_print_register): New function.
14060 * regcache.h (regcache_debug_print_register): New declaration.
14061 * target.c (debug_print_register): Remove.
14062 (target_fetch_registers): Call regcache_debug_print_register.
14063 (target_store_registers): Likewise.
14064
14065 2017-03-24 Pádraig Brady <pbrady@fb.com>
14066
14067 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14068 reference beyond the 'lh->include_dirs' array before accessing to
14069 it.
14070 (psymtab_include_file_name): Likewise.
14071 (dwarf_decode_lines_1): Likewise.
14072 (dwarf_decode_lines): Likewise.
14073 (file_file_name): Likewise.
14074
14075 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14076
14077 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14078 inferior_ptid.
14079 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14080 ps_lsetfpregs): Likewise.
14081 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14082 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14083 ps_lsetfpregs): Likewise.
14084 * target.c (target_fetch_registers, target_store_registers):
14085 Remove asserts.
14086
14087 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14088
14089 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14090
14091 2017-03-23 Yao Qi <yao.qi@linaro.org>
14092
14093 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14094 (_initialize_aarch64_tdep): Register it.
14095 (aarch64_record_load_store): Handle PRFM instruction.
14096 (aarch64_process_record_test): New function.
14097
14098 2017-03-23 Yao Qi <yao.qi@linaro.org>
14099
14100 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14101 indentation.
14102
14103 2017-03-23 Yao Qi <yao.qi@linaro.org>
14104
14105 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14106
14107 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14108
14109 python/python.c (do_start_initialization): Fix memory leak.
14110
14111 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14112
14113 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14114 using get_ptrace_pid.
14115 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14116 inferior_ptid.
14117 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14118 inferior_ptid instead of pid.
14119
14120 2017-03-22 Yao Qi <yao.qi@linaro.org>
14121
14122 * aarch64-tdep.c: Wrap locally used classes in anonymous
14123 namespace.
14124 * arm-tdep.c: Likewise.
14125 * linespec.c: Likewise.
14126 * ui-out.c: Likewise.
14127
14128 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14129
14130 PR gdb/19637
14131 * python/lib/gdb/printer/bound_registers.py: Import sys.
14132
14133 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14134
14135 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14136 windows_thread_info parameter and use it instead of
14137 current_thread.
14138 (windows_fetch_inferior_registers): Don't set current_thread,
14139 pass the thread to do_windows_fetch_inferior_registers. Use
14140 ptid from regcache instead of inferior_ptid.
14141 (do_windows_store_inferior_registers): Add windows_thread_info
14142 parameter and use it instead of current_thread.
14143 (windows_store_inferior_registers): Don't set current_thread,
14144 pass the thread to do_windows_store_inferior_registers. Use
14145 ptid from regcache instead of inferior_ptid.
14146
14147 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14148
14149 * ser-mingw.c (ser_windows_raw): Remove reference to
14150 struct serial::current_timeout.
14151
14152 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14153
14154 PR tdep/20928
14155 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14156 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14157 (sparc64_fsr_type): Fix %fsr decoding.
14158
14159 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14160
14161 * python/py-record-btrace.c (btpy_insn_data): Change return type
14162 for Python 2.
14163
14164 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14165
14166 * spu-linux-nat.c (spu_fetch_inferior_registers,
14167 spu_store_inferior_registers): Use ptid from regcache, set and
14168 restore inferior_ptid.
14169 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14170 Likewise.
14171
14172 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14173
14174 * i386-linux-nat.c (fetch_register, store_register,
14175 i386_linux_fetch_inferior_registers,
14176 i386_linux_store_inferior_registers): Use ptid from regcache.
14177 * ia64-linux-nat.c (ia64_linux_fetch_register,
14178 ia64_linux_store_register): Likewise.
14179 * inf-ptrace.c (inf_ptrace_fetch_register,
14180 inf_ptrace_store_register): Likewise.
14181 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14182 m32r_linux_store_inferior_registers): Likewise.
14183 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14184 m68kbsd_store_inferior_registers): Likewise.
14185 * m68k-linux-nat.c (fetch_register, store_register,
14186 m68k_linux_fetch_inferior_registers,
14187 m68k_linux_store_inferior_registers): Likewise.
14188 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14189 m88kbsd_store_inferior_registers): Likewise.
14190 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14191 mips_fbsd_store_inferior_registers): Likewise.
14192 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14193 mips64_linux_regsets_store_registers): Likewise.
14194 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14195 mipsnbsd_store_inferior_registers): Likewise.
14196 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14197 mips64obsd_store_inferior_registers): Likewise.
14198 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14199 Likewise.
14200 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14201 ppcfbsd_store_inferior_registers): Likewise.
14202 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14203 ppc_linux_store_inferior_registers): Likewise.
14204 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14205 ppcnbsd_store_inferior_registers): Likewise.
14206 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14207 ppcobsd_store_registers): Likewise.
14208 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14209 Likewise.
14210 * ravenscar-thread.c (ravenscar_fetch_registers,
14211 ravenscar_store_registers, ravenscar_prepare_to_store):
14212 Likewise.
14213 * record-btrace.c (record_btrace_fetch_registers,
14214 record_btrace_store_registers, record_btrace_prepare_to_store):
14215 Likewise.
14216 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14217 Lookup inferior using ptid from regcache, instead of
14218 current_inferior.
14219 * remote.c (remote_fetch_registers, remote_store_registers): Use
14220 ptid from regcache.
14221 * rs6000-nat.c (fetch_register, store_register): Likewise.
14222 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14223 s390_linux_store_inferior_registers): Likewise.
14224 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14225 shnbsd_store_inferior_registers): Likewise.
14226 * sol-thread.c (sol_thread_fetch_registers,
14227 sol_thread_store_registers): Likewise.
14228 * sparc-nat.c (sparc_fetch_inferior_registers,
14229 sparc_store_inferior_registers): Likewise.
14230 * tilegx-linux-nat.c (fetch_inferior_registers,
14231 store_inferior_registers): Likewise.
14232 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14233 vaxbsd_store_inferior_registers): Likewise.
14234 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14235 store_xtregs): Likewise.
14236
14237 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14238
14239 PR gdb/14441
14240 * NEWS: Mention support for rvalue references in GDB and python.
14241 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14242 supports both lvalue and rvalue references.
14243
14244 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14245
14246 PR gdb/14441
14247 * gdbtypes.c (rank_one_type): Implement overloading
14248 resolution rules regarding rvalue references.
14249
14250 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14251
14252 PR gdb/14441
14253 * aarch64-tdep.c (aarch64_type_align)
14254 (aarch64_extract_return_value, aarch64_store_return_value): Change
14255 lvalue reference type checks to general reference type checks.
14256 * amd64-tdep.c (amd64_classify): Likewise.
14257 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14258 Likewise.
14259 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14260 (arm_store_return_value): Likewise.
14261 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14262 * c-typeprint.c (c_print_type): Likewise.
14263 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14264 (cplus_number_of_children, cplus_describe_child): Likewise.
14265 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14266 * completer.c (expression_completer): Likewise.
14267 * cp-support.c (make_symbol_overload_list_adl_namespace):
14268 Likewise.
14269 * darwin-nat-info.c (info_mach_region_command): Likewise.
14270 * dwarf2loc.c (entry_data_value_coerce_ref)
14271 (value_of_dwarf_reg_entry): Likewise.
14272 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14273 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14274 Likewise.
14275 * findvar.c (extract_typed_address, store_typed_address):
14276 Likewise.
14277 * gdbtypes.c (rank_one_type): Likewise.
14278 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14279 * infcall.c (value_arg_coerce): Likewise.
14280 * language.c (pointer_type): Likewise.
14281 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14282 Likewise.
14283 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14284 * mn10300-tdep.c (mn10300_type_align): Likewise.
14285 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14286 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14287 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14288 Likewise.
14289 * printcmd.c (print_formatted, x_command): Likewise.
14290 * python/py-type.c (typy_get_composite, typy_template_argument):
14291 Likewise.
14292 * python/py-value.c (valpy_referenced_value)
14293 (valpy_get_dynamic_type, value_has_field): Likewise.
14294 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14295 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14296 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14297 * spu-tdep.c (spu_scalar_value_p): Likewise.
14298 * symtab.c (lookup_symbol_aux): Likewise.
14299 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14300 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14301 Likewise.
14302 * valops.c (value_cast_pointers, value_cast)
14303 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14304 (value_struct_elt, value_struct_elt_bitpos)
14305 (value_find_oload_method_list, find_overload_match)
14306 (value_rtti_indirect_type): Likewise.
14307 * valprint.c (val_print_scalar_type_p, generic_val_print):
14308 Likewise.
14309 * value.c (value_actual_type, value_as_address, unpack_long)
14310 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14311 (coerce_ref): Likewise.
14312 * varobj.c (varobj_get_value_type): Likewise.
14313
14314 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14315
14316 PR gdb/14441
14317 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14318 table of constants.
14319 * python/lib/gdb/command/explore.py: Support exploring values
14320 of rvalue reference types.
14321 * python/lib/gdb/types.py: Implement get_basic_type() for
14322 rvalue reference types.
14323 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14324 constant.
14325 * python/py-value.c (valpy_getitem): Add an rvalue reference
14326 check.
14327 (valpy_reference_value): Add new parameter "refcode".
14328 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14329 New wrappers for valpy_reference_value().
14330 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14331 (gdbpy_invoke_xmethod): Likewise.
14332
14333 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14334
14335 PR gdb/14441
14336 * dwarf2read.c (process_die, read_type_die_1): Handle the
14337 DW_TAG_rvalue_reference_type DIE.
14338 (read_tag_reference_type): Add new parameter "refcode".
14339
14340 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14341
14342 PR gdb/14441
14343 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14344 (c_type_print_modifier, c_type_print_varspec_suffix)
14345 (c_type_print_base): Support printing rvalue reference types.
14346 * c-valprint.c (c_val_print, c_value_print): Support printing
14347 rvalue reference values.
14348
14349 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14350
14351 PR gdb/14441
14352 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14353 typename.
14354 * cp-support.c (replace_typedefs): Handle
14355 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14356 * python/py-type.c (typy_lookup_type): Likewise.
14357
14358 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14359
14360 PR gdb/14441
14361 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14362 * parse.c (insert_type): Change assert statement.
14363 (follow_types): Handle rvalue reference types.
14364 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14365 constant.
14366
14367 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14368
14369 PR gdb/14441
14370 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14371 value_ref() interface.
14372 * c-valprint.c (c_value_print): Likewise.
14373 * infcall.c (value_arg_coerce): Likewise.
14374 * python/py-value.c (valpy_reference_value): Likewise.
14375 * valops.c (value_cast, value_reinterpret_cast)
14376 (value_dynamic_cast, typecmp): Likewise.
14377 (value_ref): Parameterize by kind of return value reference type.
14378 * value.h (value_ref): Add new parameter "refcode".
14379
14380 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14381
14382 PR gdb/14441
14383 * dwarf2read.c (read_tag_reference_type): Use
14384 lookup_lvalue_reference_type() instead of lookup_reference_type().
14385 * eval.c (evaluate_subexp_standard): Likewise.
14386 * f-exp.y: Likewise.
14387 * gdbtypes.c (make_reference_type, lookup_reference_type):
14388 Generalize with rvalue reference types.
14389 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14390 convenience wrappers for lookup_reference_type().
14391 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14392 reference kind parameter.
14393 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14394 wrappers for lookup_reference_type().
14395 * guile/scm-type.c (gdbscm_type_reference): Use
14396 lookup_lvalue_reference_type() instead of lookup_reference_type().
14397 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14398 * parse.c (follow_types): Likewise.
14399 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14400 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14401 Likewise.
14402 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14403 (gdbpy_invoke_xmethod): Likewise.
14404 * stabsread.c: Provide extra argument to make_reference_type()
14405 call.
14406 * valops.c (value_ref, value_rtti_indirect_type): Use
14407 lookup_lvalue_reference_type() instead of lookup_reference_type().
14408
14409 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14410
14411 PR gdb/14441
14412 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14413 (TYPE_IS_REFERENCE): New macro.
14414 (struct type): Add rvalue_reference_type field.
14415 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14416
14417 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14418
14419 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14420 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14421 New function definition.
14422 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14423 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14424 New function declaration.
14425 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14426 * mi/mi-interp.h: New file.
14427 * solib.c (info_sharedlibrary_command): Replace for loop with
14428 ALL_SO_LIBS macro
14429 * solib.h (update_solib_list): New function declaration.
14430 (so_list_head): Move macro.
14431 * solist.h (ALL_SO_LIBS): New macro.
14432
14433 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14434
14435 * infcmd.c (post_create_inferior): Remove unused argument in
14436 call to solib_add.
14437 * remote.c (remote_start_remote): Likewise.
14438 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14439 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14440 (enable_break): Likewise.
14441 * solib.c (update_solib_list): Remove unused target argument
14442 and its documentation.
14443 (solib_add): Remove unused target argument. Remove unused
14444 argument in call to update_solib_list.
14445 (info_sharedlibrary_command): Remove unused argument in call
14446 to update_solib_list.
14447 (sharedlibrary_command): Remove unused argument in call to
14448 solib_add.
14449 (handle_solib_event): Likewise.
14450 (reload_shared_libraries): Likewise.
14451 * solib.h (solib_add): Remove unused target argument.
14452
14453 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14454
14455 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14456 (s390_displaced_step_fixup): Cover relative branches with the
14457 default fixup handling. This fixes lack of support for some
14458 relative branch instructions.
14459
14460 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14461
14462 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14463 ptid from regcache.
14464
14465 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14466
14467 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14468 i386_darwin_store_inferior_registers): Use ptid from regcache.
14469
14470 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14471
14472 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14473 i386bsd_store_inferior_registers): Use ptid from regcache.
14474
14475 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14476
14477 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14478 hppaobsd_store_registers): Use ptid from regcache.
14479
14480 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14481
14482 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14483 hppanbsd_store_registers): Use ptid from regcache.
14484
14485 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14486
14487 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14488 from regcache. Use get_ptrace_pid.
14489
14490 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14491
14492 * corelow.c (get_core_register_section): Use ptid from regcache,
14493 update doc.
14494
14495 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14496
14497 * bsd-uthread.c (bsd_uthread_fetch_registers,
14498 bsd_uthread_store_registers): Use ptid from regcache, set and
14499 restore inferior_ptid.
14500
14501 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14502
14503 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14504 fetch_fp_regs, store_register, store_regs, store_fp_register,
14505 store_fp_regs): Use ptid from regcache.
14506
14507 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14508
14509 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14510 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14511 store_vfp_regs): Use ptid from regcache.
14512
14513 2017-03-17 Pedro Alves <palves@redhat.com>
14514
14515 PR remote/21188
14516 * ser-base.c (ser_base_wait_for): Add comment.
14517 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14518 version.
14519 * ser-unix.c (hardwire_raw): Remove reference to
14520 scb->current_timeout.
14521 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14522 (hardwire_ops): Install ser_base_readchar instead of
14523 hardwire_readchar.
14524 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14525 Remove fields.
14526
14527 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14528
14529 PR gdb/19637
14530 * python/lib/gdb/printer/bound_registers.py: Add support for
14531 Python 3.
14532
14533 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14534
14535 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14536 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14537 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14538 byte_offset to subobj_byte_offset. Fix the handling of
14539 DWARF_VALUE_STACK on big-endian targets when coming via an
14540 implicit pointer.
14541 (dwarf2_evaluate_loc_desc): Adjust call to
14542 dwarf2_evaluate_loc_desc_full.
14543 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14544 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14545
14546 2017-03-16 Yao Qi <yao.qi@linaro.org>
14547
14548 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14549 and REVSH instructions.
14550
14551 2017-03-16 Yao Qi <yao.qi@linaro.org>
14552
14553 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14554 (arm_record_test): Declare.
14555 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14556 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14557 align with the manual.
14558 (thumb_record_misc): Adjust the code order to align with the
14559 manual.
14560 (thumb2_record_decode_insn_handler): Fix instruction matching.
14561 (instruction_reader_thumb): New class.
14562 (arm_record_test): New function.
14563
14564 2017-03-16 Yao Qi <yao.qi@linaro.org>
14565
14566 * arm-tdep.c (abstract_memory_reader): New class.
14567 (instruction_reader): New class.
14568 (extract_arm_insn): Add argument 'reader'. Callers updated.
14569 (decode_insn): Likewise.
14570
14571 2017-03-16 Doug Evans <dje@google.com>
14572
14573 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14574 member. Change type of TYPE member to SCM. All uses updated.
14575 (lsscm_make_lazy_string_smob): Add assert.
14576 (lsscm_make_lazy_string): Flag bad length values.
14577 (lsscm_elt_type): New function.
14578 (gdbscm_lazy_string_to_value): Rewrite to use
14579 lsscm_safe_lazy_string_to_value.
14580 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14581 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14582 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14583 in incoming type.
14584 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14585 * guile/scm-type.c (tyscm_scm_to_type): New function.
14586
14587 2017-03-15 Doug Evans <dje@google.com>
14588
14589 PR python/17728, python/18439, python/18779
14590 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14591 member. Change type of TYPE member to PyObject *. All uses updated.
14592 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14593 (gdbpy_create_lazy_string_object): Flag bad length values.
14594 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14595 Handle typedefs in incoming type.
14596 (stpy_lazy_string_elt_type): New function.
14597 (gdbpy_extract_lazy_string): Call it.
14598 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14599 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14600 typedefs in incoming type.
14601
14602 2017-03-16 Doug Evans <dje@google.com>
14603
14604 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14605 * guile/scm-type.c (tyscm_scm_to_type): New function.
14606
14607 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14608
14609 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14610 "ULONGEST" for "skip".
14611
14612 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14613
14614 PR gdb/21220
14615 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14616 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14617 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14618 over ptrace peek/poke until end of buffer or error.
14619
14620 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14621
14622 * parse.c (length_of_subexp): Make static.
14623 * parser-defs.h (length_of_subexp): Remove.
14624
14625 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14626
14627 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14628 as well.
14629
14630 2017-03-14 Pedro Alves <palves@redhat.com>
14631
14632 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14633 (main): Use std::unique_ptr. Remove calls to
14634 cp_demangled_name_parse_free.
14635
14636 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14637
14638 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14639 alphabsd_store_inferior_registers): Use regcache->ptid instead
14640 of inferior_ptid.
14641
14642 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14643
14644 * aix-thread.c (aix_thread_fetch_registers,
14645 aix_thread_store_registers): Use regcache->ptid instead of
14646 inferior_ptid.
14647
14648 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14649
14650 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14651 store_gregs_to_thread, fetch_fpregs_from_thread,
14652 store_fpregs_to_thread): Use regcache->ptid instead of
14653 inferior_ptid.
14654
14655 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14656
14657 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14658 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14659 instead of inferior_ptid.
14660
14661 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14662
14663 * target.c (target_fetch_registers, target_store_registers): Add
14664 assert.
14665
14666 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14667
14668 * regcache.h (regcache_get_ptid): New function.
14669 * regcache.c (regcache_get_ptid): New function.
14670
14671 2017-03-13 Mark Wielaard <mark@klomp.org>
14672
14673 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14674
14675 2017-03-10 Keith Seitz <keiths@redhat.com>
14676
14677 PR c++/8218
14678 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14679
14680 2017-03-08 Pedro Alves <palves@redhat.com>
14681
14682 PR gdb/18360
14683 * infrun.c (start_step_over, do_target_resume, resume)
14684 (restart_threads): Assert we're not resuming a thread that is
14685 meant to be stopped.
14686 (infrun_thread_stop_requested_callback): Delete.
14687 (infrun_thread_stop_requested): If the thread is internally
14688 stopped, queue a pending stop event and clear the thread's
14689 inline-frame state.
14690 (handle_stop_requested): New function.
14691 (handle_syscall_event, handle_inferior_event_1): Use
14692 handle_stop_requested.
14693 (handle_stop_requested): New function.
14694 (handle_signal_stop): Set the thread's stop_signal here instead of
14695 at caller.
14696 (finish_step_over): Clear step over info unconditionally.
14697 (handle_signal_stop): If the user had interrupted the event
14698 thread, consider the stop a random signal.
14699 (handle_signal_stop) <signal arrived while stepping over
14700 breakpoint>: Don't restart threads here.
14701 (stop_waiting): Don't clear step-over info here.
14702
14703 2017-03-08 Pedro Alves <palves@redhat.com>
14704
14705 PR 21206
14706 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14707 goes to argument 2, not 1.
14708
14709 2017-03-08 Pedro Alves <palves@redhat.com>
14710
14711 PR cli/21218
14712 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14713 display_gdb_prompt.
14714 (command_line_input): Add comment.
14715
14716 2017-03-08 Pedro Alves <palves@redhat.com>
14717
14718 PR tui/21216
14719 * tui/tui-file.c (tui_file::write): New.
14720 * tui/tui-file.h (tui_file): Override "write".
14721 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14722 factored out from ...
14723 (tui_puts): ... here.
14724 (tui_putc): Use them.
14725 (tui_write): New function.
14726 * tui/tui-io.h (tui_write): Declare.
14727
14728 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14729
14730 * Makefile.in (SFILES): Replace "environ.c" with
14731 "common/environ.c".
14732 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14733 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14734 to...
14735 * common/environ.c: ... here.
14736 * environ.h: Moved to...
14737 * common/environ.h: ... here.
14738
14739 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14740
14741 * gdbarch.sh (pstring_ptr): New static function.
14742 (gdbarch_disassembler_options): Use it.
14743 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14744 not valid_disassembler_option->name.
14745 * gdbarch.c: Regenerate.
14746
14747 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14748
14749 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14750
14751 2017-03-07 Pedro Alves <palves@redhat.com>
14752
14753 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14754
14755 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14756
14757 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14758 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14759 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14760 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14761
14762 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14763
14764 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14765
14766 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14767
14768 * remote.c (remote_add_target_side_commands): Use range-based
14769 for loop.
14770
14771 2017-03-03 Yao Qi <yao.qi@linaro.org>
14772
14773 PR gdb/21165
14774 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14775 value is lazy.
14776 * valprint.c (common_val_print): Likewise.
14777
14778 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14779
14780 * NEWS: Mention new set/show disassembler-options commands.
14781 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14782 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14783 (prospective_options): New static variable.
14784 (gdb_disassembler::gdb_disassembler): Initialize
14785 m_di.disassembler_options.
14786 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14787 (get_disassembler_options): New function.
14788 (set_disassembler_options): Likewise.
14789 (set_disassembler_options_sfunc): Likewise.
14790 (show_disassembler_options_sfunc): Likewise.
14791 (disassembler_options_completer): Likewise.
14792 (_initialize_disasm): Likewise.
14793 * disasm.h (get_disassembler_options): New prototype.
14794 (set_disassembler_options): Likewise.
14795 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14796 (gdbarch_verify_disassembler_options): Likewise.
14797 * gdbarch.c: Regenerate.
14798 * gdbarch.h: Likewise.
14799 * arm-tdep.c (num_disassembly_options): Delete.
14800 (set_disassembly_style): Likewise.
14801 (arm_disassembler_options): New static variable.
14802 (set_disassembly_style_sfunc): Convert short style name into long
14803 option name. Call set_disassembler_options.
14804 (show_disassembly_style_sfunc): New function.
14805 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14806 set_gdbarch_verify_disassembler_options.
14807 (_initialize_arm_tdep): Delete regnames variable and update callers.
14808 (arm_disassembler_options): Initialize.
14809 (disasm_options): New variable.
14810 (num_disassembly_options): Rename from this...
14811 (num_disassembly_styles): ...to this. Compute by scanning through
14812 disasm_options.
14813 (valid_disassembly_styles): Initialize using disasm_options.
14814 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14815 set_arm_regname_option.
14816 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14817 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14818 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14819 set_gdbarch_verify_disassembler_options.
14820 * s390-tdep.c (s390_disassembler_options): New static variable.
14821 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14822 set_gdbarch_verify_disassembler_options.
14823
14824 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14825
14826 * remote.c (remote_add_target_side_condition): Remove "struct"
14827 keyword from range-based for loop.
14828
14829 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14830
14831 * remote.c (remote_add_target_side_condition): Use range-based
14832 for loop. Update comment.
14833
14834 2017-02-27 Yao Qi <yao.qi@linaro.org>
14835
14836 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14837
14838 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14839
14840 * regcache.c (regcache_raw_update): New function.
14841 (regcache_raw_read): Move code to regcache_raw_update.
14842 * regcache.h (regcache_raw_update): New declaration.
14843 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14844
14845 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14846
14847 * dwarf2read.c (create_debug_type_hash_table): Initialize
14848 header.signature and header.type_offset_in_tu.
14849
14850 2017-02-24 Pedro Alves <palves@redhat.com>
14851
14852 * symtab.c (make_file_symbol_completion_list_1): Use
14853 add_symtab_completions.
14854
14855 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14856
14857 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14858
14859 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14860
14861 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14862 I386_MAX_REGISTER_SIZE.
14863 (i386_pseudo_register_write): Likewise.
14864 (i386_process_record): Likewise.
14865 * i387-tdep.c (i387_supply_xsave): Likewise.
14866 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14867 (store_register): Likewise.
14868
14869 2017-02-23 Pedro Alves <palves@redhat.com>
14870
14871 * ada-lang.c: Include "common/function-view.h".
14872 (ada_iterate_over_symbols): Adjust to use function_view as
14873 callback type.
14874 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14875 (ada_make_symbol_completion_list): Use a lambda.
14876 (ada_exc_search_name_matches): Delete.
14877 (name_matches_regex): New.
14878 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14879 * compile/compile-c-support.c: Include "common/function-view.h".
14880 (print_one_macro): Change prototype to accept a ui_file pointer.
14881 (write_macro_definitions): Use a lambda.
14882 * dwarf2read.c: Include "common/function-view.h".
14883 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14884 (dw2_expand_symtabs_matching): Adjust to use function_view as
14885 callback type.
14886 * language.h: Include "common/function-view.h".
14887 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14888 function_view as callback type.
14889 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14890 * linespec.c: Include "common/function-view.h".
14891 (collect_info::add_symbol): New method.
14892 (struct symbol_and_data_callback, iterate_inline_only, struct
14893 symbol_matcher_data, iterate_name_matcher): Delete.
14894 (iterate_over_all_matching_symtabs): Adjust to use function_view
14895 as callback type and lambdas.
14896 (iterate_over_file_blocks): Adjust to use function_view as
14897 callback type.
14898 (decode_compound_collector): Now a class with private fields.
14899 (decode_compound_collector::release_symbols): New method.
14900 (collect_one_symbol): Rename to...
14901 (decode_compound_collector::operator()): ... this and adjust.
14902 (lookup_prefix_sym): decode_compound_collector construction bits
14903 move to decode_compound_collector ctor. Pass the
14904 decode_compound_collector object directly as callback. Remove
14905 cleanups and use decode_compound_collector::release_symbols
14906 instead.
14907 (symtab_collector): Now a class with private fields.
14908 (symtab_collector::release_symtabs): New method.
14909 (add_symtabs_to_list): Rename to...
14910 (symtab_collector::operator()): ... this and adjust.
14911 (collect_symtabs_from_filename): symtab_collector construction
14912 bits move to symtab_collector ctor. Pass the symtab_collector
14913 object directly as callback. Remove cleanups and use
14914 symtab_collector::release_symtabs instead.
14915 (collect_symbols): Delete.
14916 (add_matching_symbols_to_info): Use lambdas.
14917 * macrocmd.c (print_macro_callback): Delete.
14918 (info_macro_command): Use a lambda.
14919 (info_macros_command): Pass print_macro_definition as callable
14920 directly.
14921 (print_one_macro): Remove 'ignore' parameter.
14922 (macro_list_command): Adjust.
14923 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14924 (macro_for_each_data::user_data): Delete field.
14925 (foreach_macro): Adjust to call the function_view.
14926 (macro_for_each): Adjust to use function_view as callback type.
14927 (foreach_macro_in_scope): Adjust to call the function_view.
14928 (macro_for_each_in_scope): Adjust to use function_view as callback
14929 type.
14930 * macrotab.h: Include "common/function-view.h".
14931 (macro_callback_fn): Declare a prototype instead of a pointer.
14932 Remove "user_data" parameter.
14933 (macro_for_each, macro_for_each_in_scope): Adjust to use
14934 function_view as callback type.
14935 * psymtab.c (partial_map_expand_apply)
14936 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14937 Adjust to use function_view as callback type and to return bool.
14938 (psym_expand_symtabs_matching): Adjust to use function_view as
14939 callback types.
14940 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14941 to use function_view as callback type and to return bool.
14942 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14943 callback types.
14944 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14945 as callback types.
14946 * symfile.h: Include "common/function-view.h".
14947 (expand_symtabs_file_matcher_ftype)
14948 (expand_symtabs_symbol_matcher_ftype)
14949 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14950 return bool.
14951 (quick_symbol_functions::map_symtabs_matching_filename)
14952 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14953 function_view as callback type and return bool.
14954 (expand_symtabs_matching): Adjust to use function_view as callback
14955 type.
14956 (maintenance_expand_name_matcher)
14957 (maintenance_expand_file_matcher): Delete.
14958 (maintenance_expand_symtabs): Use lambdas.
14959 * symtab.c (iterate_over_some_symtabs): Adjust to use
14960 function_view as callback types and return bool.
14961 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14962 of a cleanup.
14963 (lookup_symtab_callback): Delete.
14964 (lookup_symtab): Use a lambda.
14965 (iterate_over_symbols): Adjust to use function_view as callback
14966 type.
14967 (struct search_symbols_data, search_symbols_file_matches)
14968 (search_symbols_name_matches): Delete.
14969 (search_symbols): Use a pair of lambdas.
14970 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14971 (symtab_expansion_callback): Delete.
14972 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14973 * symtab.h: Include "common/function-view.h".
14974 (iterate_over_some_symtabs): Adjust to use function_view as
14975 callback type and return bool.
14976 (iterate_over_symtabs): Adjust to use function_view as callback
14977 type.
14978 (symbol_found_callback_ftype): Remove 'data' parameter and return
14979 bool.
14980 (iterate_over_symbols): Adjust to use function_view as callback
14981 type.
14982
14983 2017-02-23 Pedro Alves <palves@redhat.com>
14984
14985 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14986 (%.o) <unittests/%.c>: New pattern.
14987 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14988 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14989 * common/function-view.h: New file.
14990 * unittests/function-view-selftests.c: New file.
14991 * configure: Regenerate.
14992
14993 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14994
14995 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14996 inferior_ptid.
14997 * go32-nat.c (go32_thread_alive): Likewise.
14998
14999 2017-02-23 Yao Qi <yao.qi@linaro.org>
15000
15001 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15002 delete.
15003
15004 2017-02-23 Yao Qi <yao.qi@linaro.org>
15005
15006 * varobj.c (varobj_clear_saved_item): Use delete instead of
15007 xfree.
15008 (update_dynamic_varobj_children): Likewise.
15009
15010 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15011
15012 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15013
15014 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15015
15016 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15017 m_enum_value to 0 in default constructor.
15018
15019 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15020
15021 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15022 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15023 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15024 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15025 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15026 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15027 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15028 IS_STORE_CONDITIONAL_INSN.
15029
15030 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15031
15032 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15033
15034 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15035
15036 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15037
15038 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15039
15040 * dwarf2read.c (skip_one_die, read_attribute_value)
15041 (dwarf2_const_value_attr, dump_die_shallow)
15042 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15043 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15044
15045 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15046
15047 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15048 (dwarf_parse_macro_header): Accept DWARF version 5.
15049 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15050
15051 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15052
15053 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15054 DW_AT_GNU_*.
15055 * common/common-exceptions.h (enum errors): Likewise.
15056 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15057 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15058 (dwarf_expr_context::execute_stack_op): Likewise.
15059 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15060 Likewise.
15061 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15062 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15063 (show_entry_values_debug, call_site_to_target_addr)
15064 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15065 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15066 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15067 (value_of_dwarf_block_entry, indirect_pieced_value)
15068 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15069 (disassemble_dwarf_expression): Likewise.
15070 * dwarf2read.c (process_die, inherit_abstract_dies)
15071 (read_call_site_scope): Likewise.
15072 * gdbtypes.h (struct func_type, struct call_site_parameter)
15073 (struct call_site): Likewise.
15074 * stack.c (read_frame_arg): Likewise.
15075 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15076
15077 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15078
15079 * defs.h (read_unsigned_leb128): New declaration.
15080 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15081 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15082 (dwarf2_find_location_expression): Call also
15083 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15084 * dwarf2loc.h (dwarf2_version): New declaration.
15085 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15086 rnglists.
15087 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15088 .debug_rnglists.
15089 (struct dwop_section_names): Add loclists_dwo.
15090 (dwop_section_names): Add .debug_loclists.dwo.
15091 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15092 (struct dwarf2_per_cu_data): Add dwarf_version.
15093 (struct dwo_sections): Add loclists.
15094 (struct attr_abbrev): Add implicit_const.
15095 (read_indirect_line_string): New declaration.
15096 (read_unsigned_leb128): Delete declaration.
15097 (rcuh_kind): New definition.
15098 (read_and_check_comp_unit_head): Change parameter
15099 is_debug_types_section to section_kind.
15100 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15101 (read_comp_unit_head): Change parameter abfd to section, add parameter
15102 section_kind. Handle DWARF-5.
15103 (error_check_comp_unit_head): Accept also DWARF version 5.
15104 (read_and_check_comp_unit_head): Change parameter
15105 is_debug_types_section to section_kind.
15106 (read_and_check_type_unit_head): Delete function.
15107 (read_abbrev_offset): Handle DWARF-5.
15108 (create_debug_type_hash_table): Add parameter section_kind. Process
15109 only DW_UT_type. Use signature and type_offset_in_tu from struct
15110 comp_unit_head.
15111 (create_debug_types_hash_table): Update create_debug_type_hash_table
15112 caller.
15113 (create_all_type_units): Call create_debug_type_hash_table.
15114 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15115 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15116 caller.
15117 (skip_one_die): Handle DW_FORM_implicit_const.
15118 (dwarf2_rnglists_process): New function.
15119 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15120 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15121 (read_attribute_value): Handle DW_FORM_implicit_const,
15122 DW_FORM_line_strp.
15123 (read_attribute): Handle DW_FORM_implicit_const.
15124 (read_indirect_string_at_offset_from): New function from
15125 read_indirect_string_at_offset.
15126 (read_indirect_string_at_offset): Call
15127 read_indirect_string_at_offset_from.
15128 (read_indirect_line_string_at_offset): New function.
15129 (read_indirect_string): New function comment.
15130 (read_indirect_line_string): New function.
15131 (read_unsigned_leb128): Make it global.
15132 (dwarf2_string_attr): Handle DWARF-5.
15133 (add_include_dir_stub, read_formatted_entries): New functions.
15134 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15135 Handle DWARF-5.
15136 (per_cu_header_read_in): Update read_comp_unit_head caller.
15137 (dwarf2_version): New function.
15138 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15139 rnglists.
15140 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15141 fields.
15142
15143 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15144
15145 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15146
15147 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15148
15149 * dwarf2read.c (dwarf2_ranges_process): New function from
15150 dwarf2_ranges_read.
15151 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15152 dwarf2_ranges_process.
15153
15154 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15155
15156 * dwarf2read.c (create_debug_type_hash_table): New function from
15157 create_debug_types_hash_table.
15158 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15159 (create_all_type_units, open_and_init_dwo_file): Update
15160 create_debug_types_hash_table callers.
15161
15162 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15163
15164 PR gdb/16188
15165 * fork-child.c (trace_start_error): Fix thinko. va_end should
15166 refer to 'ap', not 'args'.
15167
15168 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15169 Pedro Alves <palves@redhat.com>
15170
15171 PR gdb/16188
15172 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15173 calls succeeded.
15174 * fork-child.c (trace_start_error): New function.
15175 (trace_start_error_with_name): Likewise.
15176 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15177 * inf-ptrace.c (inf_ptrace_me): Likewise.
15178 * inferior.h (trace_start_error): New prototype.
15179 (trace_start_error_with_name): Likewise.
15180
15181 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15182
15183 PR gdb/21164
15184 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15185 NULL before using it.
15186 * symmisc.c (maintenance_print_symbols): Likewise.
15187 (maintenance_print_msymbols): Likewise.
15188
15189 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15190
15191 * NEWS: Add record Python bindings entry.
15192
15193 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15194
15195 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15196 py-record-full.o.
15197 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15198 * python/py-record-btrace.c, python/py-record-btrace.h,
15199 python/py-record-full.c, python/py-record-full.h: New file.
15200 * python/py-record.c: Add include for py-record-btrace.h and
15201 py-record-full.h.
15202 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15203 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15204 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15205 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15206 New definition.
15207 (gdbpy_initialize_btrace): New export.
15208 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15209
15210 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15211
15212 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15213 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15214 * python/py-record.c: New file.
15215 * python/python-internal.h (gdbpy_start_recording,
15216 gdbpy_current_recording, gdpy_stop_recording,
15217 gdbpy_initialize_record): New export.
15218 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15219 (python_GdbMethods): Add gdbpy_start_recording,
15220 gdbpy_current_recording and gdbpy_stop_recording.
15221
15222 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15223
15224 * record-btrace.c (record_btrace_record_method): New function.
15225 (init_record_btrace_ops): Initialize to_record_method.
15226 * record-full.c (record_full_record_method): New function.
15227 (init_record_full_ops, init_record_full_core_ops): Add
15228 record_full_record_method.
15229 * record.h (enum record_method): New enum.
15230 * target-debug.h (target_debug_print_enum_record_method: New define.
15231 * target-delegates.c: Regenerate.
15232 * target.c (target_record_method): New function.
15233 * target.h: Include record.h.
15234 (struct target_ops) <to_record_method>: New field.
15235 (target_record_method): New export.
15236
15237 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15238
15239 * record.h (record_start, record_stop): New export.
15240 * record.c (record_start, record_stop): New function.
15241
15242 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15243
15244 * btrace.c (btrace_fetch): Copy function call segments pointer
15245 into a vector.
15246 (btrace_clear): Clear the vector.
15247 (btrace_find_insn_by_number): Use binary search to find the correct
15248 function call segment.
15249 * btrace.h (brace_fun_p): New typedef.
15250 (struct btrace_thread_info) <functions>: New field.
15251
15252 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15253
15254 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15255 * btrace.c (btrace_decode_error): ... here. New function.
15256 * btrace.h (btrace_decode_error): New export.
15257
15258 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15259
15260 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15261 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15262 btrace_find_insn_by_number): Remove special case for gaps.
15263 * btrace.h (btrace_insn_get_error): New export.
15264 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15265 * record-btrace.c (btrace_insn_history): Print number for gaps.
15266 (record_btrace_info, record_btrace_goto): Handle gaps.
15267
15268 2017-02-14 Tom Tromey <tom@tromey.com>
15269
15270 PR python/13598:
15271 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15272 event.
15273 * python/py-evts.c (gdbpy_initialize_py_events): Add
15274 before_prompt registry.
15275 * python/py-events.h (events_object) <before_prompt>: New field.
15276
15277 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15278
15279 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15280
15281 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15282
15283 * symfile (_initialize_symfile): Add usage text to the load command's
15284 help text.
15285
15286 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15287
15288 * utils.c (defaulted_query): Don't query on secondary UIs.
15289
15290 2017-02-10 Tom Tromey <tom@tromey.com>
15291
15292 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15293
15294 2017-02-10 Tom Tromey <tom@tromey.com>
15295
15296 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15297 "cleanup" local.
15298 * python/py-type.c (typy_legacy_template_argument): Remove
15299 unnecessary "cleanup" local.
15300
15301 2017-02-10 Tom Tromey <tom@tromey.com>
15302
15303 * python/python.c (do_start_initialization): New function, from
15304 _initialize_python.
15305 (_initialize_python): Call do_start_initialization.
15306 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15307 goto.
15308
15309 2017-02-10 Tom Tromey <tom@tromey.com>
15310
15311 * python/py-prettyprint.c (pretty_print_one_value): Use
15312 gdbpy_ref.
15313
15314 2017-02-10 Tom Tromey <tom@tromey.com>
15315
15316 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15317 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15318 gdbpy_ref.
15319 * python/py-type.c (field_new): Use gdbpy_ref.
15320 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15321 gdbpy_ref.
15322 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15323 (py_free_pspace): Likewise.
15324 (pspace_to_pspace_object): Likewise.
15325 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15326 (py_free_objfile): Likewise.
15327 (objfile_to_objfile_object): Likewise.
15328 * python/py-inferior.c (delete_thread_object): Use
15329 gdbpy_ref.
15330 (infpy_read_memory): Likewise.
15331 (py_free_inferior): Likewise.
15332 * python/py-evtregistry.c (create_eventregistry_object): Use
15333 gdbpy_ref.
15334 * python/py-event.c (create_event_object): Use gdbpy_ref.
15335
15336 2017-02-10 Tom Tromey <tom@tromey.com>
15337
15338 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15339 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15340 used.
15341 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15342 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15343 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15344 python/py-framefilter.c, python/py-function.c,
15345 python/py-inferior.c, python/py-infevents.c,
15346 python/py-linetable.c, python/py-newobjfileevent.c,
15347 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15348 python/py-signalevent.c, python/py-stopevent.c,
15349 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15350 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15351 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15352 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15353
15354 2017-02-10 Tom Tromey <tom@tromey.com>
15355
15356 * ui-out.h (ui_out_emit_type): New class.
15357 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15358 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15359 and ui_out_emit_tuple.
15360 (enumerate_locals): Likewise.
15361 (py_mi_print_variables, py_print_locals, py_print_args): Use
15362 ui_out_emit_list.
15363 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15364 ui_out_emit_list.
15365 * common/gdb_optional.h: New file.
15366
15367 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15368
15369 * MAINTAINERS (Write After Approval): Update my e-mail address.
15370
15371 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15372
15373 PR gdb/21122
15374 * breakpoint.c (_initialize_breakpoint): Update the help description
15375 of the 'commands' command to indicate that it takes a list argument.
15376
15377 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15378
15379 * interps.c (current_interp_set_logging): Remove "return".
15380
15381 2017-02-09 Gary Benson <gbenson@redhat.com>
15382
15383 * symtab.c (add_symtab_completions): Prevent NULL pointer
15384 dereference.
15385
15386 2017-02-08 Pedro Alves <palves@redhat.com>
15387
15388 * interps.c (interp::interp): Remove reference to quiet_p.
15389 (interp_set): Make static. Remove dead "Switching to" output
15390 code.
15391 (interp_quiet_p, interp_set_quiet): Delete.
15392 (interpreter_exec_cmd): Don't set the interpreter quiet.
15393 * interps.h (interp_quiet_p): Make static.
15394 (class interp) <quiet_p>: Remove field
15395
15396 2017-02-08 Jerome Guitton <guitton@adacore.com>
15397
15398 * cli/cli-decode.c (find_command_name_length): Make it extern.
15399 * cli/cli-decode.h (find_command_name_length): Declare.
15400 * cli/cli-script.c (command_name_equals, line_first_arg):
15401 New functions.
15402 (process_next_line): Use cli-decode to parse command names.
15403 (build_command_line): Make args a constant pointer.
15404
15405 2017-02-08 Jerome Guitton <guitton@adacore.com>
15406
15407 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15408 Remove case-insensitive search.
15409
15410 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15411
15412 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15413 at the end of the line. Avoids an ARI warning.
15414
15415 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15416
15417 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15418 rdseed instructions.
15419 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15420
15421 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15422
15423 PR tdep/20936
15424 Provide and use sparc32 and sparc64 target description XML files.
15425 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15426 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15427 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15428 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15429 * features/sparc/sparc32-solaris.xml: New file.
15430 * features/sparc/sparc64-solaris.xml: New file.
15431 * features/sparc/sparc32-solaris.c: Generated.
15432 * features/sparc/sparc64-solaris.c: Generated.
15433 * sparc-tdep.h: Account for differences in target descriptions.
15434 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15435 (sparc32_register_type): Use target provided registers.
15436 (validate_tdesc_registers): New function.
15437 (sparc32_gdbarch_init): Use tdesc_has_registers.
15438 Set pseudoregister functions.
15439 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15440 (sparc64_register_type): Use target provided registers.
15441 (sparc64_init_abi): Set pseudoregister functions.
15442
15443 2017-02-03 Tom Tromey <tom@tromey.com>
15444
15445 PR rust/21097:
15446 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15447 with a single member.
15448
15449 2017-02-03 Pedro Alves <palves@redhat.com>
15450
15451 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15452 (cli_interp_base::~cli_interp_base): New.
15453 (cli_interp): New struct.
15454 (as_cli_interp): Cast the interp itself to cli_interp.
15455 (cli_interpreter_pre_command_loop): Rename to ...
15456 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15457 parameter.
15458 (cli_interpreter_init): Rename to ...
15459 (cli_interp::init): ... this. Remove 'self' parameter. Use
15460 boolean. Make extern.
15461 (cli_interpreter_resume): Rename to ...
15462 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15463 extern.
15464 (cli_interpreter_suspend): Rename to ...
15465 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15466 extern.
15467 (cli_interpreter_exec): Rename to ...
15468 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15469 extern.
15470 (cli_interpreter_supports_command_editing): Rename to ...
15471 (cli_interp_base::supports_command_editing): ... this. Remove
15472 'interp' parameter. Make extern.
15473 (cli_ui_out): Rename to ...
15474 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15475 Make extern.
15476 (cli_set_logging): Rename to ...
15477 (cli_interp_base::set_logging): ... this. Remove 'interp'
15478 parameter. Make extern.
15479 (cli_interp_procs): Delete.
15480 (cli_interp_factory): Adjust to use "new".
15481 * cli/cli-interp.h: Include "interps.h".
15482 (struct cli_interp_base): New struct.
15483 * interps.c (struct interp): Delete. Fields moved to interps.h.
15484 (interp_new): Delete.
15485 (interp::interp, interp::~interp): New.
15486 (interp_set): Use bool, and return void. Assume the interpreter
15487 has suspend, init and resume methods, and that the all return
15488 void.
15489 (set_top_level_interpreter): interp_set returns void.
15490 (interp_ui_out): Adapt.
15491 (current_interp_set_logging): Adapt.
15492 (interp_data): Delete.
15493 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15494 (interp_exec): Adapt.
15495 (top_level_interpreter_data): Delete.
15496 * interps.h (interp_init_ftype, interp_resume_ftype)
15497 (interp_suspend_ftype, interp_exec_ftype)
15498 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15499 (class interp): New.
15500 (interp_new): Delete.
15501 (interp_set): Now returns void. Use bool.
15502 (interp_data, top_level_interpreter_data): Delete.
15503 * mi/mi-common.h: Include interps.h.
15504 (class mi_interp): Inherit from interp. Define a ctor. Declare
15505 init, resume, suspect, exec, interp_ui_out, set_logging and
15506 pre_command_loop methods.
15507 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15508 (mi_interpreter_init): Rename to ...
15509 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15510 bool, return void and make extern. Adjust.
15511 (mi_interpreter_resume): ... Rename to ...
15512 (mi_interp::resume): ... this. Remove the 'data' parameter,
15513 return void and make extern. Adjust.
15514 (mi_interpreter_suspend): ... Rename to ...
15515 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15516 return void and make extern. Adjust.
15517 (mi_interpreter_exec): ... Rename to ...
15518 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15519 extern. Adjust.
15520 (mi_interpreter_pre_command_loop): ... Rename to ...
15521 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15522 parameter and make extern.
15523 (mi_on_normal_stop_1): Adjust.
15524 (mi_ui_out): Rename to ...
15525 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15526 parameter and make extern. Adjust.
15527 (mi_set_logging): Rename to ...
15528 (mi_interp::set_logging): ... this. Remove the 'interp'
15529 parameter and make extern. Adjust.
15530 (mi_interp_procs): Delete.
15531 (mi_interp_factory): Adjust to use 'new'.
15532 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15533 (mi_print_exception, mi_execute_command, mi_load_progress):
15534 Adjust.
15535 * tui/tui-interp.c (tui_interp): New class.
15536 (as_tui_interp): Return a tui_interp pointer.
15537 (tui_on_normal_stop, tui_on_signal_received)
15538 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15539 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15540 to use interp::interp_ui_out.
15541 (tui_init): Rename to ...
15542 (tui_interp::init): ... this. Remove the 'self' parameter, use
15543 bool, return void and make extern. Adjust.
15544 (tui_resume): Rename to ...
15545 (tui_interp::resume): ... this. Remove the 'data' parameter,
15546 return void and make extern. Adjust.
15547 (tui_suspend): Rename to ...
15548 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15549 return void and make extern. Adjust.
15550 (tui_ui_out): Rename to ...
15551 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15552 parameter, and make extern. Adjust.
15553 (tui_exec): Rename to ...
15554 (tui_interp::exec): ... this. Remove the 'data' parameter and
15555 make extern.
15556 (tui_interp_procs): Delete.
15557 (tui_interp_factory): Use "new".
15558
15559 2017-02-02 Tom Tromey <tom@tromey.com>
15560
15561 * rust-exp.y (ends_raw_string, space_then_number)
15562 (rust_identifier_start_p): Return bool.
15563 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15564 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15565 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15566 (rust_chartype_p): Return bool.
15567 (val_print_struct, rust_print_struct_def, rust_print_type):
15568 Update.
15569 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15570 Return bool.
15571
15572 2017-02-02 Tom Tromey <tom@tromey.com>
15573
15574 * rust-lang.c: Reindent.
15575
15576 2017-02-02 Tom Tromey <tom@tromey.com>
15577
15578 * rust-lang.h (rust_crate_for_block): Update.
15579 * rust-lang.c (rust_crate_for_block): Return std::string.
15580 (rust_get_disr_info): Use std:;string, not
15581 gdb::unique_xmalloc_ptr.
15582 * rust-exp.y (crate_name): Update.
15583
15584 2017-02-02 Pedro Alves <palves@redhat.com>
15585
15586 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15587 field out of gdb_disassembler_test and make it static.
15588
15589 2017-02-02 Pedro Alves <palves@redhat.com>
15590
15591 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15592 mi1_interp and mi_interp fields.
15593
15594 2017-02-02 Pedro Alves <palves@redhat.com>
15595
15596 * cli/cli-interp.c (struct saved_output_files, saved_output):
15597 Moved from cli/cli-logging.c.
15598 (cli_set_logging): New function.
15599 (cli_interp_procs): Install cli_set_logging.
15600 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15601 Declare.
15602 * cli/cli-logging.c (struct saved_output_files, saved_output):
15603 Moved to cli/cli-interp.c.
15604 (pop_output_files): Don't save outputs here.
15605 (make_logging_output): New function.
15606 (handle_redirections): Don't build tee nor save previous outputs
15607 here.
15608 * interps.c (current_interp_set_logging): Change prototype.
15609 Assume there's always a set_logging_proc method installed.
15610 * interps.h (interp_set_logging_ftype): Change prototype.
15611 (current_interp_set_logging): Change prototype and adjust comment.
15612 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15613 use make_logging_output.
15614 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15615 2017-02-02 Pedro Alves <palves@redhat.com>
15616
15617 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15618 from ...
15619 (set_logging_overwrite): ... here.
15620 (logging_no_redirect_file): Delete.
15621 (set_logging_redirect): Don't handle redirection on the fly.
15622 Instead warn that "logging off" / "logging on" is necessary.
15623 (pop_output_files): Delete references to logging_no_redirect_file.
15624 (show_logging_command): Always speak in terms of what will happen
15625 once logging is reenabled.
15626
15627 2017-02-02 Pedro Alves <palves@redhat.com>
15628
15629 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15630
15631 2017-02-02 Pedro Alves <palves@redhat.com>
15632
15633 * disasm.c (gdb_pretty_print_insn): Rename to ...
15634 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15635 Remove gdbarch parameter. Adapt to clear the object's buffers
15636 instead of allocating new buffers, and to print using the object's
15637 gdb_disassembler instead of calling gdb_print_insn.
15638 (dump_insns): Use gdb_pretty_print_disassembler.
15639 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15640 (gdb_pretty_print_disassembler): New class.
15641 * record-btrace.c (btrace_insn_history): Use
15642 gdb_pretty_print_disassembler.
15643
15644 2017-02-02 Pedro Alves <palves@redhat.com>
15645
15646 * ada-lang.c (type_as_string): Use string_file.
15647 * ada-valprint.c (ada_print_floating): Use string_file.
15648 * ada-varobj.c (ada_varobj_scalar_image)
15649 (ada_varobj_get_value_image): Use string_file.
15650 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15651 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15652 * breakpoint.c (update_inserted_breakpoint_locations)
15653 (insert_breakpoint_locations, reattach_breakpoints)
15654 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15655 (print_it_watchpoint): Use string_file.
15656 (save_breakpoints): Use stdio_file.
15657 * c-exp.y (oper): Use string_file.
15658 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15659 tee_file.
15660 (pop_output_files): Use delete.
15661 (handle_redirections): Use stdio_file and tee_file.
15662 * cli/cli-setshow.c (do_show_command): Use string_file.
15663 * compile/compile-c-support.c (c_compute_program): Use
15664 string_file.
15665 * compile/compile-c-symbols.c (generate_vla_size): Take a
15666 'string_file &' instead of a 'ui_file *'.
15667 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15668 of a 'ui_file *'. Use string_file.
15669 (generate_c_for_variable_locations): Take a 'string_file &'
15670 instead of a 'ui_file *'.
15671 * compile/compile-internal.h (generate_c_for_for_one_variable):
15672 Take a 'string_file &' instead of a 'ui_file *'.
15673 * compile/compile-loc2c.c (push, pushf, unary, binary)
15674 (print_label, pushf_register_address, pushf_register)
15675 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15676 'ui_file *'. Adjust.
15677 * compile/compile.c (compile_to_object): Use string_file.
15678 * compile/compile.h (compile_dwarf_expr_to_c)
15679 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15680 'ui_file *'.
15681 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15682 (replace_typedefs_qualified_name): Use string_file and
15683 obstack_copy0.
15684 * disasm.c (gdb_pretty_print_insn): Use string_file.
15685 (gdb_disassembly): Adjust reference the null_stream global.
15686 (do_ui_file_delete): Delete.
15687 (gdb_insn_length): Use null_stream.
15688 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15689 * dwarf2loc.c (dwarf2_compile_property_to_c)
15690 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15691 'string_file &' instead of a 'ui_file *'.
15692 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15693 * dwarf2read.c (do_ui_file_peek_last): Delete.
15694 (dwarf2_compute_name): Use string_file.
15695 * event-top.c (gdb_setup_readline): Use stdio_file.
15696 * gdbarch.sh (verify_gdbarch): Use string_file.
15697 * gdbtypes.c (safe_parse_type): Use null_stream.
15698 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15699 string_file.
15700 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15701 'string_file *' instead of a 'ui_file *'.
15702 (gdbscm_arch_disassemble): Use string_file.
15703 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15704 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15705 inherits from ui_file.
15706 (ioscm_file_port_delete, ioscm_file_port_rewind)
15707 (ioscm_file_port_put): Delete.
15708 (ioscm_file_port_write): Rename to ...
15709 (ioscm_file_port::write): ... this. Remove file_port_magic
15710 checks.
15711 (ioscm_file_port_new): Delete.
15712 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15713 ui_file_up.
15714 * guile/scm-type.c (tyscm_type_name): Use string_file.
15715 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15716 Use string_file.
15717 * infcmd.c (print_return_value_1): Use string_file.
15718 * infrun.c (print_target_wait_results): Use string_file.
15719 * language.c (add_language): Use string_file.
15720 * location.c (explicit_to_string_internal): Use string_file.
15721 * main.c (captured_main_1): Use null_file.
15722 * maint.c (maintenance_print_architecture): Use stdio_file.
15723 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15724 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15725 event_channel>: Change type to mi_console_file pointer.
15726 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15727 (mi_console_file_delete): Delete.
15728 (struct mi_console_file): Delete.
15729 (mi_console_file_magic): Delete.
15730 (mi_console_file_new): Delete.
15731 (mi_console_file::mi_console_file): New.
15732 (mi_console_file_delete): Delete.
15733 (mi_console_file_fputs): Delete.
15734 (mi_console_file::write): New.
15735 (mi_console_raw_packet): Delete.
15736 (mi_console_file::flush): New.
15737 (mi_console_file_flush): Delete.
15738 (mi_console_set_raw): Rename to ...
15739 (mi_console_file::set_raw): ... this.
15740 * mi/mi-console.h (class mi_console_file): New class.
15741 (mi_console_file_new, mi_console_set_raw): Delete.
15742 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15743 (mi_set_logging): Use delete and tee_file. Adjust.
15744 * mi/mi-main.c (output_register): Use string_file.
15745 (mi_cmd_data_evaluate_expression): Use string_file.
15746 (mi_cmd_data_read_memory): Use string_file.
15747 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15748 * mi/mi-out.c (mi_ui_out::main_stream): New.
15749 (mi_ui_out::rewind): Use main_stream and
15750 string_file.
15751 (mi_ui_out::put): Use main_stream and string_file.
15752 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15753 Allocate a 'string_file' instead.
15754 (mi_out_new): Don't allocate a mem_fileopen stream here.
15755 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15756 (mi_ui_out::main_stream): Declare method.
15757 * printcmd.c (eval_command): Use string_file.
15758 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15759 * python/py-arch.c (archpy_disassemble): Use string_file.
15760 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15761 * python/py-frame.c (frapy_str): Use string_file.
15762 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15763 Use string_file.
15764 * python/py-type.c (typy_str): Use string_file.
15765 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15766 * python/py-value.c (valpy_str): Use string_file.
15767 * record-btrace.c (btrace_insn_history): Use string_file.
15768 * regcache.c (regcache_print): Use stdio_file.
15769 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15770 * remote.c (escape_buffer): Use string_file.
15771 * rust-lang.c (rust_get_disr_info): Use string_file.
15772 * serial.c (serial_open_ops_1): Use stdio_file.
15773 (do_serial_close): Use delete.
15774 * stack.c (print_frame_arg): Use string_file.
15775 (print_frame_args): Remove local mem_fileopen stream, not used.
15776 (print_frame): Use string_file.
15777 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15778 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15779 Take a 'string_file *' instead of a 'ui_file *'.
15780 * top.c (new_ui): Use stdio_file and stderr_file.
15781 (free_ui): Use delete.
15782 (execute_command_to_string): Use string_file.
15783 (quit_confirm): Use string_file.
15784 * tracepoint.c (collection_list::append_exp): Use string_file.
15785 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15786 * tui/tui-file.c: Don't include "ui-file.h".
15787 (enum streamtype, struct tui_stream): Delete.
15788 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15789 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15790 (tui_file::tui_file): New method.
15791 (tui_file_fputs): Delete.
15792 (tui_file_get_strbuf): Delete.
15793 (tui_file::puts): New method.
15794 (tui_file_adjust_strbuf): Delete.
15795 (tui_file_flush): Delete.
15796 (tui_file::flush): New method.
15797 * tui/tui-file.h: Tweak intro comment.
15798 Include ui-file.h.
15799 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15800 (tui_file_adjust_strbuf): Delete declarations.
15801 (class tui_file): New class.
15802 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15803 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15804 (tui_register_format): Use string_stream.
15805 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15806 (tui_get_function_from_frame): Use string_file.
15807 * typeprint.c (type_to_string): Use string_file.
15808 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15809 (null_stream): New global.
15810 (ui_file_delete): Delete.
15811 (ui_file::ui_file): New.
15812 (null_file_isatty): Delete.
15813 (ui_file::~ui_file): New.
15814 (null_file_rewind): Delete.
15815 (ui_file::printf): New.
15816 (null_file_put): Delete.
15817 (null_file_flush): Delete.
15818 (ui_file::putstr): New.
15819 (null_file_write): Delete.
15820 (ui_file::putstrn): New.
15821 (null_file_read): Delete.
15822 (ui_file::putc): New.
15823 (null_file_fputs): Delete.
15824 (null_file_write_async_safe): Delete.
15825 (ui_file::vprintf): New.
15826 (null_file_delete): Delete.
15827 (null_file::write): New.
15828 (null_file_fseek): Delete.
15829 (null_file::puts): New.
15830 (ui_file_data): Delete.
15831 (null_file::write_async_safe): New.
15832 (gdb_flush, ui_file_isatty): Adjust.
15833 (ui_file_put, ui_file_rewind): Delete.
15834 (ui_file_write): Adjust.
15835 (ui_file_write_for_put): Delete.
15836 (ui_file_write_async_safe, ui_file_read): Adjust.
15837 (ui_file_fseek): Delete.
15838 (fputs_unfiltered): Adjust.
15839 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15840 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15841 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15842 (set_ui_file_data): Delete.
15843 (string_file::~string_file, string_file::write)
15844 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15845 (do_ui_file_as_string, ui_file_as_string): Delete.
15846 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15847 (struct mem_file): Delete.
15848 (mem_file_new): Delete.
15849 (stdio_file::stdio_file): New.
15850 (mem_file_delete): Delete.
15851 (stdio_file::stdio_file): New.
15852 (mem_fileopen): Delete.
15853 (stdio_file::~stdio_file): New.
15854 (mem_file_rewind): Delete.
15855 (stdio_file::set_stream): New.
15856 (mem_file_put): Delete.
15857 (stdio_file::open): New.
15858 (mem_file_write): Delete.
15859 (stdio_file_magic, struct stdio_file): Delete.
15860 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15861 (stdio_file::flush): New.
15862 (stdio_file_read): Rename to ...
15863 (stdio_file::read): ... this. Adjust.
15864 (stdio_file_write): Rename to ...
15865 (stdio_file::write): ... this. Adjust.
15866 (stdio_file_write_async_safe): Rename to ...
15867 (stdio_file::write_async_safe) ... this. Adjust.
15868 (stdio_file_fputs): Rename to ...
15869 (stdio_file::puts) ... this. Adjust.
15870 (stdio_file_isatty): Delete.
15871 (stdio_file_fseek): Delete.
15872 (stdio_file::isatty): New.
15873 (stderr_file_write): Rename to ...
15874 (stderr_file::write) ... this. Adjust.
15875 (stderr_file_fputs): Rename to ...
15876 (stderr_file::puts) ... this. Adjust.
15877 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15878 (stderr_file::stderr_file): New.
15879 (tee_file_magic): Delete.
15880 (struct tee_file): Delete.
15881 (tee_file::tee_file): New.
15882 (tee_file_new): Delete.
15883 (tee_file::~tee_file): New.
15884 (tee_file_delete): Delete.
15885 (tee_file_flush): Rename to ...
15886 (tee_file::flush): ... this. Adjust.
15887 (tee_file_write): Rename to ...
15888 (tee_file::write): ... this. Adjust.
15889 (tee_file::write_async_safe): New.
15890 (tee_file_fputs): Rename to ...
15891 (tee_file::puts): ... this. Adjust.
15892 (tee_file_isatty): Rename to ...
15893 (tee_file::isatty): ... this. Adjust.
15894 * ui-file.h (struct obstack, struct ui_file): Don't
15895 forward-declare.
15896 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15897 (ui_file_write_ftype)
15898 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15899 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15900 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15901 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15902 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15903 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15904 (set_ui_file_fseek): Delete.
15905 (ui_file_data, ui_file_delete, ui_file_rewind)
15906 (struct ui_file): New.
15907 (ui_file_up): New.
15908 (class null_file): New.
15909 (null_stream): Declare.
15910 (ui_file_write_for_put, ui_file_put): Delete.
15911 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15912 Delete.
15913 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15914 (gdb_fopen, tee_file_new): Delete.
15915 (struct string_file): New.
15916 (struct stdio_file): New.
15917 (stdio_file_up): New.
15918 (struct stderr_file): New.
15919 (class tee_file): New.
15920 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15921 of a 'ui_file *'. Adjust.
15922 * ui-out.h (class ui_out) <field_stream>: Likewise.
15923 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15924 (null_stream): Delete.
15925 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15926 Adjust.
15927 * utils.h (struct ui_file): Delete forward declaration..
15928 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15929 (error_stream): Take a 'string_file &' instead of a
15930 'ui_file *'.
15931 * varobj.c (varobj_value_get_print_value): Use string_file.
15932 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15933 * gdbarch.c: Regenerate.
15934
15935 2017-02-02 Pedro Alves <palves@redhat.com>
15936
15937 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15938 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15939 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15940 Adjust to call gdb_print_insn instead of
15941 gdb_disassembler::print_insn.
15942 (dump_insns, do_mixed_source_and_assembly_deprecated)
15943 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15944 'gdbarch' parameter. Remove gdb_disassembler parameter.
15945 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15946 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15947 declaration.
15948 (gdb_pretty_print_insn): Re-add declaration.
15949 * record-btrace.c (btrace_insn_history): Don't allocate a
15950 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15951
15952 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15953
15954 * disasm.h (gdb_disassembly): Remove file_string parameter.
15955 * disasm.c (gdb_disassembly): Likewise.
15956 * cli/cli-cmds.c (print_disassembly): Adapt.
15957 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15958 * stack.c (do_gdb_disassembly): Likewise.
15959
15960 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15961
15962 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15963 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15964 targets. And if the implicit value is longer than needed, extract
15965 the first bytes instead of the "least significant" ones.
15966
15967 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15968
15969 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15970 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15971 (btrace_fetch): Assert can_access_registers_ptid.
15972 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15973 validate_registers_access.
15974
15975 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15976
15977 * gdbthread.h (can_access_registers_ptid): New.
15978 * thread.c (can_access_registers_ptid): New.
15979
15980 2017-02-01 Pedro Alves <palves@redhat.com>
15981
15982 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15983
15984 2017-01-31 Pedro Alves <palves@redhat.com>
15985
15986 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15987 Fix typos.
15988
15989 2017-01-31 Pedro Alves <palves@redhat.com>
15990
15991 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15992 not used.
15993
15994 2017-01-31 Pedro Alves <palves@redhat.com>
15995
15996 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15997
15998 2017-01-31 Pedro Alves <palves@redhat.com>
15999
16000 * common/scoped_restore.h
16001 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16002 change the value's parameter type to T2.
16003 (make_scoped_restore): Likewise.
16004
16005 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16006 Richard Henderson <rth@redhat.com>
16007
16008 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16009 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16010 GS_BASE for older kernels.
16011 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16012 GS_BASE for older kernels.
16013 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16014 and GS_BASE to the offset table.
16015 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16016 system register group.
16017 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16018 for older kernels.
16019 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16020 amd64 ABI.
16021 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16022 AMD64_GSBASE_REGNUM.
16023 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16024 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16025 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16026 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16027 i386/64bit-segments.xml in those rules.
16028 * features/i386/64bit-segments.xml: New file.
16029 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16030 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16031 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16032 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16033 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16034 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16035 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16036 * features/i386/amd64-avx-linux.c: Regenerated.
16037 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16038 * features/i386/amd64-avx-mpx.c: Regenerated.
16039 * features/i386/amd64-avx512-linux.c: Regenerated.
16040 * features/i386/amd64-linux.c: Regenerated.
16041 * features/i386/amd64-mpx-linux.c: Regenerated.
16042 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16043 * features/i386/i386-avx-mpx.c: Regenerated.
16044 * features/i386/x32-avx-linux.c: Regenerated.
16045 * features/i386/x32-avx512-linux.c: Regenerated.
16046 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16047 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16048 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16049 * regformats/i386/amd64-linux.dat: Regenerated.
16050 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16051 * regformats/i386/x32-avx-linux.dat: Regenerated.
16052 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16053 * regformats/i386/x32-linux.dat: Regenerated.
16054
16055 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16056
16057 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16058 Set to AMD64_NUM_REGS.
16059
16060 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16061
16062 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16063 that checks validity of a register number.
16064
16065 2017-01-27 Kees Cook <keescook@google.com>
16066
16067 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16068 fetch_fpregs if target has fpa registers.
16069 (arm_linux_store_inferior_registers): Call store_fpregs if target
16070 has fpa registers.
16071
16072 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16073
16074 * cris-tdep.c (cris_gdbarch_init): Remove check for
16075 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16076
16077 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16078
16079 * corelow.c (get_core_register_section): Check for regset
16080 existence before checking for REGSET_VARIABLE_SIZE.
16081
16082 2017-01-26 Yao Qi <yao.qi@linaro.org>
16083 Pedro Alves <palves@redhat.com>
16084
16085 PR gdb/20939
16086 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16087 call memory_error, save memaddr instead.
16088 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16089 negative, cal memory_error.
16090 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16091
16092 2017-01-26 Yao Qi <yao.qi@linaro.org>
16093
16094 * disasm-selftests.c (memory_error_test): New function.
16095 (_initialize_disasm_selftests): Register memory_error_test.
16096
16097 2017-01-26 Yao Qi <yao.qi@linaro.org>
16098
16099 * Makefile.in (SFILES): Add disasm-selftests.c and
16100 selftest-arch.c.
16101 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16102 * disasm-selftests.c: New file.
16103 * selftest-arch.c: New file.
16104 * selftest-arch.h: New file.
16105
16106 2017-01-26 Yao Qi <yao.qi@linaro.org>
16107
16108 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16109 to bfd_arch_mep. Don't return 0 if section is not
16110 found. Call print_insn_mep.
16111
16112 2017-01-26 Pedro Alves <palves@redhat.com>
16113 Yao Qi <yao.qi@linaro.org>
16114
16115 * arm-tdep.c: Include "disasm.h".
16116 (gdb_print_insn_arm): Update code to get gdbarch.
16117 * disasm.c (dis_asm_read_memory): Change it to
16118 gdb_disassembler::dis_asm_read_memory.
16119 (dis_asm_memory_error): Likewise.
16120 (dis_asm_print_address): Likewise.
16121 (gdb_pretty_print_insn): Change it to
16122 gdb_disassembler::pretty_print_insn.
16123 (dump_insns): Add one argument gdb_disassemlber. All
16124 callers updated.
16125 (do_mixed_source_and_assembly_deprecated): Likewise.
16126 (do_mixed_source_and_assembly): Likewise.
16127 (do_assembly_only): Likewise.
16128 (gdb_disassembler::gdb_disassembler): New.
16129 (gdb_disassembler::print_insn): New.
16130 * disasm.h (class gdb_disassembler): New.
16131 (gdb_pretty_print_insn): Remove declaration.
16132 (gdb_disassemble_info): Likewise.
16133 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16134 (gdbscm_disasm_read_memory_worker): Update.
16135 (gdbscm_disasm_read_memory): Update.
16136 (gdbscm_disasm_memory_error): Remove.
16137 (gdbscm_disasm_print_address): Remove.
16138 (gdbscm_disassembler::gdbscm_disassembler): New.
16139 (gdbscm_print_insn_from_port): Update.
16140 * mips-tdep.c: Include disasm.h.
16141 (gdb_print_insn_mips): Update code to get gdbarch.
16142 * record-btrace.c (btrace_insn_history): Update.
16143 * spu-tdep.c: Include disasm.h.
16144 (struct spu_dis_asm_data): Remove.
16145 (struct spu_dis_asm_info): New.
16146 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16147 SPU id.
16148 (gdb_print_insn_spu): Cast disassemble_info to
16149 spu_dis_asm_info.
16150
16151 2017-01-26 Yao Qi <yao.qi@linaro.org>
16152
16153 * disasm.c (do_ui_file_delete): Delete.
16154 (gdb_insn_length): Move code creating stream to ...
16155 * utils.c (null_stream): ... here. New function.
16156 * utils.h (null_stream): Declare.
16157
16158 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16159
16160 * python/py-inferior.c (find_thread_object): Return directly
16161 from the loop. Remove "found" variable.
16162
16163 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16164
16165 GDB 7.12.1 released.
16166
16167 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16168
16169 * python/py-function.c (fnpy_call): Reorder declarations to have
16170 the gdbpy_enter object declared first.
16171 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16172
16173 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16174
16175 PR python/21068
16176 * python/python-internal.h (PyMem_RawMalloc): Define for
16177 Python < 3.4.
16178 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16179 PyMem_RawMalloc instead of PyMem_Malloc.
16180
16181 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16182 Luis Machado <lgustavo@codesourcery.com>
16183
16184 * NEWS (New commands): Mention flash-erase.
16185 (New MI commands): Mention target-flash-erase.
16186 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16187 command.
16188 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16189 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16190 * target.c (flash_erase_command): New function.
16191 (initialize_targets): Add new flash-erase command.
16192 * target.h (flash_erase_command): New declaration.
16193
16194 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16195
16196 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16197 HAVE_SYS_PROCFS_H is defined.
16198
16199 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16200
16201 * remote.c (struct cached_reg): Change data into a pointer.
16202 * (stop_reply_dtr): Free data pointers before deleting vector.
16203 (process_stop_reply): Likewise.
16204 (remote_parse_stop_reply): Allocate space for data
16205
16206 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16207
16208 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16209 MAX_REGISTER_SIZE.
16210 (amd64_pseudo_register_read_value): Likewise.
16211 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16212 (store_register_using_P): Likewise.
16213 * regcache.c (regcache_xfer_part): Likewise.
16214
16215 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16216
16217 Split real and pseudo registers.
16218 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16219 (sparc32_pseudo_regnum): New enum.
16220 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16221 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16222 (SPARC32_CP0_REGISTERS): New macro.
16223 (sparc32_pseudo_register_name): New function.
16224 (sparc32_register_name): Use sparc32_pseudo_register_name.
16225 (sparc32_pseudo_register_type): New function.
16226 (sparc32_register_type): Use sparc32_pseudo_register_type.
16227 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16228 pseudo register numbers.
16229 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16230 (SPARC64_CP0_REGISTERS): New macro.
16231 (sparc64_pseudo_register_name): New function.
16232 (sparc64_register_name): Use sparc64_pseudo_register_name.
16233 (sparc64_pseudo_register_type): New function.
16234 (sparc64_register_type): Use sparc64_pseudo_register_type.
16235 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16236 pseudo register numbers.
16237 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16238 sparc64_store_arguments): Handle pseudo register numbers.
16239
16240 2017-01-13 Yao Qi <yao.qi@linaro.org>
16241
16242 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16243 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16244 output.
16245 (getpkt_or_notif_sane_1): Likewise.
16246
16247 2017-01-13 Yao Qi <yao.qi@linaro.org>
16248
16249 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16250 of CC. Pass "-x c++-header" instead of "-x c".
16251
16252 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16253
16254 * remote.c (remote_can_async_p): Update comment.
16255
16256 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16257
16258 * linux-nat.c (linux_nat_can_async_p): Update comment.
16259
16260 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16261
16262 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16263
16264 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16265
16266 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16267
16268 2017-01-10 Tom Tromey <tom@tromey.com>
16269
16270 * python/py-type.c (typy_legacy_template_argument): Update.
16271 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16272 ~demangle_parse_info): Declare new members.
16273 (cp_demangled_name_to_comp): Return unique_ptr.
16274 (cp_demangled_name_parse_free)
16275 (make_cleanup_cp_demangled_name_parse_free)
16276 (cp_new_demangle_parse_info): Remove.
16277 * cp-support.c (do_demangled_name_parse_free_cleanup)
16278 (make_cleanup_cp_demangled_name_parse_free): Remove.
16279 (inspect_type, cp_canonicalize_string_full)
16280 (cp_canonicalize_string): Update.
16281 (mangled_name_to_comp): Change return type.
16282 (cp_class_name_from_physname, method_name_from_physname)
16283 (cp_func_name, cp_remove_params): Update.
16284 * cp-name-parser.y (demangle_parse_info): New constructor, from
16285 cp_new_demangle_parse_info.
16286 (~demangle_parse_info): New destructor, from
16287 cp_demangled_name_parse_free.
16288 (cp_merge_demangle_parse_infos): Update.
16289 (cp_demangled_name_to_comp): Change return type.
16290
16291 2017-01-10 Tom Tromey <tom@tromey.com>
16292
16293 * top.c (prevent_dont_repeat): Change return type.
16294 * python/python.c (execute_gdb_command): Use std::string.
16295 Update.
16296 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16297 * command.h (prevent_dont_repeat): Change return type.
16298 * breakpoint.c (bpstat_do_actions_1): Update.
16299
16300 2017-01-10 Tom Tromey <tom@tromey.com>
16301
16302 * value.h (scoped_value_mark::~scoped_value_mark): Call
16303 free_to_mark.
16304 (scoped_value_mark::free_to_mark): New method.
16305 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16306 scoped_value_mark.
16307
16308 2017-01-10 Tom Tromey <tom@tromey.com>
16309
16310 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16311 (valpy_reference_value, valpy_const_value, valpy_get_address)
16312 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16313 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16314 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16315 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16316 scoped_value_mark.
16317 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16318 * value.h (scoped_value_mark): New class.
16319
16320 2017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16323 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16324 * psymtab.c (discard_psymtabs_upto): Remove.
16325 (make_cleanup_discard_psymtabs): Remove.
16326 (struct psymtab_state): Remove.
16327
16328 2017-01-10 Tom Tromey <tom@tromey.com>
16329
16330 * record-full.c (record_full_save_cleanups): Remove.
16331 (record_full_save): Use gdb::unlinker.
16332 * gcore.c (do_bfd_delete_cleanup): Remove.
16333 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16334 cleanups.
16335 * dwarf2read.c (unlink_if_set): Remove.
16336 (write_psymtabs_to_index): Use gdb::unlinker.
16337 * common/gdb_unlinker.h: New file.
16338
16339 2017-01-10 Tom Tromey <tom@tromey.com>
16340
16341 * windows-tdep.c (windows_xfer_shared_library): Update.
16342 * windows-nat.c (windows_make_so): Update.
16343 * utils.h (make_cleanup_bfd_unref): Remove.
16344 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16345 * symfile.h (symfile_bfd_open)
16346 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16347 * symfile.c (read_symbols, symbol_file_add)
16348 (separate_debug_file_exists): Update.
16349 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16350 (generic_load, reread_symbols): Update.
16351 * symfile-mem.c (symbol_file_add_from_memory): Update.
16352 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16353 (spu_symbol_file_add_from_memory): Update.
16354 * solist.h (struct target_so_ops) <bfd_open>: Return
16355 gdb_bfd_ref_ptr.
16356 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16357 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16358 gdb_bfd_ref_ptr.
16359 (solib_map_sections, reload_shared_libraries_1): Update.
16360 * solib-svr4.c (enable_break): Update.
16361 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16362 * solib-frv.c (enable_break2): Update.
16363 * solib-dsbt.c (enable_break): Update.
16364 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16365 gdb_bfd_ref_ptr.
16366 (darwin_solib_get_all_image_info_addr_at_init): Update.
16367 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16368 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16369 * record-full.c (record_full_save): Update.
16370 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16371 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16372 * minidebug.c (find_separate_debug_file_in_section): Return
16373 gdb_bfd_ref_ptr.
16374 * machoread.c (macho_add_oso_symfile): Change abfd to
16375 gdb_bfd_ref_ptr.
16376 (macho_symfile_read_all_oso): Update.
16377 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16378 (macho_symfile_read): Update.
16379 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16380 (jit_bfd_try_read_symtab): Update.
16381 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16382 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16383 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16384 gdb_bfd_ref_ptr.
16385 (gdb_bfd_ref_policy): New struct.
16386 (gdb_bfd_ref_ptr): New typedef.
16387 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16388 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16389 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16390 gdb_bfd_ref_ptr.
16391 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16392 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16393 (gcore_command): Update.
16394 * exec.c (exec_file_attach): Update.
16395 * elfread.c (elf_symfile_read): Update.
16396 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16397 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16398 (open_and_init_dwo_file): Update.
16399 (open_dwp_file): Return gdb_bfd_ref_ptr.
16400 (open_and_init_dwp_file): Update.
16401 * corelow.c (core_open): Update.
16402 * compile/compile-object-load.c (compile_object_load): Update.
16403 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16404 * coffread.c (coff_symfile_read): Update.
16405 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16406 gdb_bfd_ref_ptr. Rename.
16407 (dump_bfd_file, restore_command): Update.
16408 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16409 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16410 (find_separate_debug_file_by_buildid): Update.
16411
16412 2017-01-10 Tom Tromey <tom@tromey.com>
16413
16414 * common/gdb_ref_ptr.h: New file.
16415 * python/py-ref.h (struct gdbpy_ref_policy): New.
16416 (gdbpy_ref): Now a typedef.
16417
16418 2017-01-10 Tom Tromey <tom@tromey.com>
16419
16420 * utils.h (make_cleanup_htab_delete): Don't declare.
16421 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16422 Remove.
16423 * linespec.c (decode_compound_collector): Add constructor,
16424 destructor.
16425 (lookup_prefix_sym): Remove cleanup.
16426 (symtab_collector): Add constructor, destructor.
16427 (collect_symtabs_from_filename): Remove cleanup.
16428 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16429 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16430 Use htab_up.
16431 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16432 * dwarf2read.c (dw2_expand_symtabs_matching)
16433 (dw2_map_symbol_filenames, dwarf_decode_macros)
16434 (write_psymtabs_to_index): Use htab_up.
16435 * dwarf2loc.c (func_verify_no_selftailcall)
16436 (call_site_find_chain_1, func_verify_no_selftailcall)
16437 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16438 std::vector, gdb::unique_xmalloc_ptr.
16439 (call_sitep): Remove typedef.
16440 (dwarf2_locexpr_baton_eval): Remove unused variable.
16441
16442 2017-01-10 Tom Tromey <tom@tromey.com>
16443
16444 * python/python-internal.h (make_cleanup_py_decref)
16445 (make_cleanup_py_xdecref): Don't declare.
16446 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16447 (py_xdecref, make_cleanup_py_xdecref): Remove.
16448
16449 2017-01-10 Tom Tromey <tom@tromey.com>
16450
16451 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16452 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16453
16454 2017-01-10 Tom Tromey <tom@tromey.com>
16455
16456 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16457
16458 2017-01-10 Tom Tromey <tom@tromey.com>
16459
16460 * python/py-utils.c (unicode_to_encoded_string)
16461 (python_string_to_target_string)
16462 (python_string_to_target_python_string)
16463 (python_string_to_host_string, gdbpy_obj_to_string)
16464 (get_addr_from_python): Use gdbpy_ref.
16465
16466 2017-01-10 Tom Tromey <tom@tromey.com>
16467
16468 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16469 gdbpy_ref.
16470
16471 2017-01-10 Tom Tromey <tom@tromey.com>
16472
16473 * python/python.c (eval_python_command, gdbpy_decode_line)
16474 (gdbpy_run_events, gdbpy_start_type_printers)
16475 (gdbpy_apply_type_printers): Use gdbpy_ref.
16476
16477 2017-01-10 Tom Tromey <tom@tromey.com>
16478
16479 * python/py-param.c (get_doc_string, compute_enum_values): Use
16480 gdbpy_ref.
16481
16482 2017-01-10 Tom Tromey <tom@tromey.com>
16483
16484 * python/py-inferior.c (find_thread_object, build_inferior_list):
16485 Use gdbpy_ref.
16486
16487 2017-01-10 Tom Tromey <tom@tromey.com>
16488
16489 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16490
16491 2017-01-10 Tom Tromey <tom@tromey.com>
16492
16493 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16494 gdbpy_ref.
16495
16496 2017-01-10 Tom Tromey <tom@tromey.com>
16497
16498 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16499 extra incref.
16500 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16501 Use gdbpy_ref.
16502
16503 2017-01-10 Tom Tromey <tom@tromey.com>
16504
16505 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16506 gdbpy_ref.
16507
16508 2017-01-10 Tom Tromey <tom@tromey.com>
16509
16510 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16511 decref results of PyArg_ParseTupleAndKeywords.
16512
16513 2017-01-10 Tom Tromey <tom@tromey.com>
16514
16515 * python/python.c (python_run_simple_file): Use
16516 unique_xmalloc_ptr, gdbpy_ref.
16517
16518 2017-01-10 Tom Tromey <tom@tromey.com>
16519
16520 * python/py-prettyprint.c (print_stack_unless_memory_error)
16521 (print_string_repr, print_children): Use gdbpy_ref.
16522 (dummy_python_frame): New class.
16523 (dummy_python_frame::dummy_python_frame): Rename from
16524 push_dummy_python_frame.
16525 (py_restore_tstate): Remove.
16526
16527 2017-01-10 Tom Tromey <tom@tromey.com>
16528
16529 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16530
16531 2017-01-10 Tom Tromey <tom@tromey.com>
16532
16533 * python/python.c (ensure_python_env, restore_python_env):
16534 Remove.
16535 * python/python-internal.h (ensure_python_env): Don't declare.
16536 * varobj.h (varobj_ensure_python_env): Don't declare.
16537 * varobj.c (varobj_ensure_python_env): Remove.
16538
16539 2017-01-10 Tom Tromey <tom@tromey.com>
16540
16541 * varobj.c (varobj_value_get_print_value): Use
16542 gdbpy_enter_varobj.
16543
16544 2017-01-10 Tom Tromey <tom@tromey.com>
16545
16546 * python/py-prettyprint.c (print_string_repr, print_children):
16547 Update.
16548 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16549 of "encoding".
16550 * varobj.c (varobj_value_get_print_value): Update.
16551 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16552
16553 2017-01-10 Tom Tromey <tom@tromey.com>
16554
16555 * varobj.c (varobj_get_display_hint)
16556 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16557 (varobj_set_visualizer, free_variable): Use
16558 gdbpy_enter_varobj.
16559
16560 2017-01-10 Tom Tromey <tom@tromey.com>
16561
16562 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16563 (do_finish_initialization): New function. Use gdbpy_ref.
16564 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16565 do_finish_initialization.
16566
16567 2017-01-10 Tom Tromey <tom@tromey.com>
16568
16569 * python/py-param.c (get_set_value, get_show_value): Use
16570 gdbpy_enter, gdbpy_ref.
16571
16572 2017-01-10 Tom Tromey <tom@tromey.com>
16573
16574 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16575
16576 2017-01-10 Tom Tromey <tom@tromey.com>
16577
16578 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16579
16580 2017-01-10 Tom Tromey <tom@tromey.com>
16581
16582 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16583 Use gdbpy_enter_varobj.
16584
16585 2017-01-10 Tom Tromey <tom@tromey.com>
16586
16587 * varobj.c (gdbpy_enter_varobj): New constructor.
16588 * python/python-internal.h (gdbpy_enter_varobj): New class.
16589 * python/py-varobj.c (py_varobj_get_iterator): Use
16590 gdbpy_enter_varobj.
16591
16592 2017-01-10 Tom Tromey <tom@tromey.com>
16593
16594 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16595 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16596 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16597 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16598 unique_xmalloc_ptr.
16599 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16600
16601 2017-01-10 Tom Tromey <tom@tromey.com>
16602
16603 * python/py-xmethods.c (invoke_match_method): Use
16604 gdbpy_ref.
16605
16606 2017-01-10 Tom Tromey <tom@tromey.com>
16607
16608 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16609 gdbpy_enter, gdbpy_ref.
16610
16611 2017-01-10 Tom Tromey <tom@tromey.com>
16612
16613 * python/python.c (python_interactive_command): Use gdbpy_enter.
16614
16615 2017-01-10 Tom Tromey <tom@tromey.com>
16616
16617 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16618 gdbpy_ref.
16619
16620 2017-01-10 Tom Tromey <tom@tromey.com>
16621
16622 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16623 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16624
16625 2017-01-10 Tom Tromey <tom@tromey.com>
16626
16627 * utils.h (htab_deleter): New struct.
16628 (htab_up): New typedef.
16629 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16630 gdbpy_enter, gdbpy_ref, htab_up.
16631
16632 2017-01-10 Tom Tromey <tom@tromey.com>
16633
16634 * python/py-unwind.c (pending_frame_invalidate): Remove.
16635 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16636
16637 2017-01-10 Tom Tromey <tom@tromey.com>
16638
16639 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16640 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16641
16642 2017-01-10 Tom Tromey <tom@tromey.com>
16643
16644 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16645
16646 2017-01-10 Tom Tromey <tom@tromey.com>
16647
16648 * python/python.c (gdbpy_eval_from_control_command)
16649 (gdbpy_source_script, gdbpy_run_events)
16650 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16651 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16652 gdbpy_enter.
16653
16654 2017-01-10 Tom Tromey <tom@tromey.com>
16655
16656 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16657
16658 2017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16661
16662 2017-01-10 Tom Tromey <tom@tromey.com>
16663
16664 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16665 (python_on_inferior_call_pre, python_on_inferior_call_post)
16666 (python_on_memory_change, python_on_register_change)
16667 (python_inferior_exit, python_new_objfile, add_thread_object)
16668 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16669
16670 2017-01-10 Tom Tromey <tom@tromey.com>
16671
16672 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16673 (bpfinishpy_handle_exit): Use gdbpy_enter.
16674
16675 2017-01-10 Tom Tromey <tom@tromey.com>
16676
16677 * python/py-cmd.c (cmdpy_destroyer)
16678 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16679 gdbpy_enter.
16680
16681 2017-01-10 Tom Tromey <tom@tromey.com>
16682
16683 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16684 gdbpy_enter.
16685 (gdbpy_breakpoint_has_cond): Likewise.
16686
16687 2017-01-10 Tom Tromey <tom@tromey.com>
16688
16689 * python/python.c (gdbpy_enter): New constructor.
16690 (~gdbpy_enter): New destructor.
16691 (restore_python_env, ensure_python_env): Rewrite.
16692 * python/python-internal.h (gdbpy_enter): New class.
16693
16694 2017-01-10 Tom Tromey <tom@tromey.com>
16695
16696 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16697
16698 2017-01-10 Tom Tromey <tom@tromey.com>
16699
16700 * python/py-value.c (value_has_field, get_field_flag)
16701 (get_field_type, valpy_getitem, convert_value_from_python): Use
16702 gdbpy_ref.
16703
16704 2017-01-10 Tom Tromey <tom@tromey.com>
16705
16706 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16707 gdbpy_ref.
16708
16709 2017-01-10 Tom Tromey <tom@tromey.com>
16710
16711 * python/py-prettyprint.c (search_pp_list)
16712 (find_pretty_printer_from_objfiles)
16713 (find_pretty_printer_from_progspace)
16714 (find_pretty_printer_from_gdb, find_pretty_printer)
16715 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16716 gdbpy_ref.
16717
16718 2017-01-10 Tom Tromey <tom@tromey.com>
16719
16720 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16721
16722 2017-01-10 Tom Tromey <tom@tromey.com>
16723
16724 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16725 (ltpy_get_all_source_lines): Use gdbpy_ref.
16726
16727 2017-01-10 Tom Tromey <tom@tromey.com>
16728
16729 * python/py-framefilter.c (extract_sym, extract_value)
16730 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16731 gdbpy_ref.
16732
16733 2017-01-10 Tom Tromey <tom@tromey.com>
16734
16735 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16736
16737 2017-01-10 Tom Tromey <tom@tromey.com>
16738
16739 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16740
16741 2017-01-10 Tom Tromey <tom@tromey.com>
16742
16743 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16744 gdbpy_ref.
16745
16746 2017-01-10 Tom Tromey <tom@tromey.com>
16747
16748 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16749
16750 2017-01-10 Tom Tromey <tom@tromey.com>
16751
16752 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16753 (typy_range): Use gdbpy_ref.
16754
16755 2017-01-10 Tom Tromey <tom@tromey.com>
16756
16757 * python/py-threadevent.c (create_thread_event_object): Use
16758 gdbpy_ref.
16759 * python/py-stopevent.c (create_stop_event_object): Simplify.
16760 (emit_stop_event): Use gdbpy_ref.
16761 * python/py-signalevent.c (create_signal_event_object): Use
16762 gdbpy_ref.
16763 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16764 (emit_new_objfile_event, create_clear_objfiles_event_object)
16765 (emit_clear_objfiles_event): Use gdbpy_ref.
16766 * python/py-infevents.c (create_inferior_call_event_object)
16767 (create_register_changed_event_object)
16768 (create_memory_changed_event_object, emit_inferior_call_event)
16769 (emit_memory_changed_event, emit_register_changed_event): Use
16770 gdbpy_ref.
16771 * python/py-exitedevent.c (create_exited_event_object)
16772 (emit_exited_event): Use gdbpy_ref.
16773 * python/py-event.h (evpy_emit_event): Remove
16774 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16775 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16776 * python/py-continueevent.c (emit_continue_event): Use
16777 gdbpy_ref.
16778 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16779 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16780 gdbpy_ref.
16781 * python/py-bpevent.c (create_breakpoint_event_object): Use
16782 gdbpy_ref.
16783
16784 2017-01-10 Tom Tromey <tom@tromey.com>
16785
16786 * python/py-ref.h: New file.
16787
16788 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16789
16790 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16791 void.
16792 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16793 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16794 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16795 * ui-out.c (ui_out::redirect): Likewise.
16796 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16797 * cli/cli-logging.c (set_logging_redirect): Update call site of
16798 ui_out::redirect.
16799 (handle_redirections): Likewise.
16800 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16801 * top.c (execute_command_to_string): Likewise.
16802 * utils.c (do_ui_out_redirect_pop): Likewise.
16803
16804 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16805
16806 * stack.c (_initialize_stack): Update "frame" command help message.
16807
16808 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16809
16810 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16811
16812 2017-01-06 Yao Qi <yao.qi@linaro.org>
16813
16814 * x86-linux-nat.h: Include gdb_proc_service.h.
16815
16816 2017-01-06 Yao Qi <yao.qi@linaro.org>
16817
16818 * ser-base.h: Include serial.h.
16819
16820 2017-01-06 Yao Qi <yao.qi@linaro.org>
16821
16822 * ppc-linux-tdep.h: Include ppc-tdep.h.
16823
16824 2017-01-06 Yao Qi <yao.qi@linaro.org>
16825
16826 * nat/amd64-linux-siginfo.h: Include signal.h.
16827
16828 2017-01-06 Yao Qi <yao.qi@linaro.org>
16829
16830 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16831
16832 2017-01-06 Yao Qi <yao.qi@linaro.org>
16833
16834 * mi/mi-parse.h: Include mi-cmds.h.
16835
16836 2017-01-06 Yao Qi <yao.qi@linaro.org>
16837
16838 * inf-loop.c: Don't include "target.h".
16839 * inf-loop.h: Include it here.
16840
16841 2017-01-06 Yao Qi <yao.qi@linaro.org>
16842
16843 * dfp.h: Include "dboulest.h" and "expression.h".
16844
16845 2017-01-06 Yao Qi <yao.qi@linaro.org>
16846
16847 * ax-gdb.h: Include "ax.h".
16848
16849 2017-01-06 Yao Qi <yao.qi@linaro.org>
16850
16851 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16852 with nat/gdb_ptrace.h.
16853
16854 2017-01-05 Yao Qi <yao.qi@linaro.org>
16855
16856 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16857 new line.
16858 (mips64_fbsd_sigframe_init): Likewise.
16859
16860 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16861
16862 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16863 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16864
16865 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16866
16867 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16868 * NEWS: Mention new FreeBSD/mips native configuration.
16869 * config/mips/fbsd.mh: New file.
16870 * configure.host: Add mips*-*-freebsd*.
16871 * mips-fbsd-nat.c: New file.
16872
16873 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16874
16875 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16876 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16877 * NEWS: Mention new FreeBSD/mips target.
16878 * configure.tgt: Add mips*-*-freebsd*.
16879 * mips-fbsd-tdep.c: New file.
16880 * mips-fbsd-tdep.h: New file.
16881
16882 2017-01-04 Yao Qi <yao.qi@linaro.org>
16883
16884 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16885 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16886
16887 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16888
16889 Update copyright year range in all GDB files.
16890
16891 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16892
16893 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16894
16895 For older changes see ChangeLog-2016.
16896 \f
16897 Local Variables:
16898 mode: change-log
16899 left-margin: 8
16900 fill-column: 74
16901 version-control: never
16902 coding: utf-8
16903 End:
This page took 0.383845 seconds and 4 git commands to generate.